An open source DAW for GNU/Linux, inspired by modular synths. http://noisicaa.odahoda.de/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

319 lines
11 KiB

#!/usr/bin/python3
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# @end:license
import asyncio
import concurrent.futures
import functools
import logging
import os
import threading
import typing
from typing import Any, Dict, Tuple
import uuid
import warnings
import gbulb
import gi
with warnings.catch_warnings():
# gi warns that Gtk2 is not really compatible with PyGObject. Our use of it is very
# minimal, and getting PyGTK into the virtualenv (as recommended) is a PITA (needs manual
# build, no pip version available).
# So let's cross fingers that is keeps working and suppress that warning.
warnings.filterwarnings('ignore', r"You have imported the Gtk 2\.0 module")
gi.require_version("Gtk", "2.0")
from gi.repository import Gtk # pylint: disable=unused-import
from noisicaa import core
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
from noisicaa.core import ipc
from noisicaa import lv2
from noisicaa import host_system as host_system_lib
from noisicaa import node_db
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
from noisicaa.audioproc.public import plugin_state_pb2
from . import plugin_host_pb2
from . import plugin_host
if typing.TYPE_CHECKING:
from . import plugin_ui_host
logger = logging.getLogger(__name__)
# TODO: this should not extend PyPluginHost, but be a proxy class.
class PluginHost(plugin_host.PyPluginHost):
def __init__(
self, *,
spec: plugin_host_pb2.PluginInstanceSpec,
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
callback_address: str = None,
event_loop: asyncio.AbstractEventLoop,
host_system: host_system_lib.HostSystem,
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
tmp_dir: str) -> None:
super().__init__(spec, host_system)
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
self.__event_loop = event_loop
self.__tmp_dir = tmp_dir
self.__realm = spec.realm
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
self.__spec = spec
self.__node_id = spec.node_id
self.__description = spec.node_description
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
self.__callback_address = callback_address
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
self.__callback_stub = None # type: ipc.Stub
self.__state = None # type: plugin_state_pb2.PluginState
self.__thread = None # type: threading.Thread
self.__thread_result = None # type: concurrent.futures.Future
self.__state_fetcher_task = None # type: asyncio.Task
self.__pipe_path = None # type: str
self.__pipe_fd = None # type: int
@property
def realm(self) -> str:
return self.__realm
@property
def node_id(self) -> str:
return self.__node_id
@property
def node_description(self) -> node_db.NodeDescription:
return self.__description
@property
def pipe_path(self) -> str:
return self.__pipe_path
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
@property
def callback_stub(self) -> ipc.Stub:
assert self.__callback_stub is not None
return self.__callback_stub
def set_state(self, state: plugin_state_pb2.PluginState) -> None:
super().set_state(state)
self.__state = state
# Parent class doesn't use async setup/cleanup.
async def setup(self) -> None: # type: ignore
super().setup()
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
if self.__callback_address is not None:
self.__callback_stub = ipc.Stub(self.__event_loop, self.__callback_address)
await self.__callback_stub.connect()
self.__pipe_path = os.path.join(
self.__tmp_dir,
'plugin-%s.%s.pipe' % (self.node_id, uuid.uuid4().hex))
os.mkfifo(self.__pipe_path)
self.__pipe_fd = os.open(self.__pipe_path, os.O_RDONLY | os.O_NONBLOCK)
logger.info("Reading from %s...", self.__pipe_path)
self.__thread_result = concurrent.futures.Future()
self.__thread = threading.Thread(target=self.__main)
self.__thread.start()
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
if self.has_state():
self.__state = plugin_state_pb2.PluginState()
if self.__spec.initial_state is not None:
self.__state.CopyFrom(self.__spec.initial_state)
self.__state_fetcher_task = self.__event_loop.create_task(
self.__state_fetcher_main())
async def cleanup(self) -> None: # type: ignore
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
if self.__state_fetcher_task:
if self.__state_fetcher_task.done():
self.__state_fetcher_task.result()
else:
self.__state_fetcher_task.cancel()
self.__state_fetcher_task = None
if self.__thread is not None:
self.exit_loop()
self.__thread_result.result()
self.__thread.join()
self.__thread = None
if self.__pipe_fd is not None:
os.close(self.__pipe_fd)
self.__pipe_fd = None
if self.__pipe_path is not None:
if os.path.exists(self.__pipe_path):
os.unlink(self.__pipe_path)
self.__pipe_path = None
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
if self.__callback_stub is not None:
await self.__callback_stub.close()
self.__callback_stub = None
super().cleanup()
def __main(self) -> None:
try:
with core.RTSafeLogging():
self.main_loop(self.__pipe_fd)
except core.ConnectionClosed as exc:
logger.warning("Plugin pipe %s closed: %s", self.__pipe_path, exc)
self.__thread_result.set_result(False)
except Exception as exc: # pylint: disable=broad-except
self.__thread_result.set_exception(exc)
else:
self.__thread_result.set_result(True)
async def __state_fetcher_main(self) -> None:
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
while True:
await asyncio.sleep(1.0, loop=self.__event_loop)
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
state = self.get_state()
if state != self.__state:
self.__state = state
logger.info("Plugin state for %s changed:\n%s", self.__node_id, self.__state)
await asyncio.shield(
self.__callback_stub.call(
'PLUGIN_STATE_CHANGE',
self.__realm, self.__node_id, self.__state),
loop=self.__event_loop)
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
class PluginHostProcess(core.ProcessBase):
def __init__(self, **kwargs: Any) -> None:
super().__init__(**kwargs)
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
self.__urid_mapper = None # type: lv2.ProxyURIDMapper
self.__host_system = None # type: host_system_lib.HostSystem
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
self.__plugins = {} # type: Dict[Tuple[str, str], PluginHost]
self.__uis = {} # type: Dict[Tuple[str, str], plugin_ui_host.PyPluginUIHost]
async def setup(self) -> None:
await super().setup()
self.server.add_command_handler('SHUTDOWN', self.shutdown)
self.server.add_command_handler('CREATE_PLUGIN', self.__handle_create_plugin)
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
self.server.add_command_handler('DELETE_PLUGIN', self.__handle_delete_plugin)
self.server.add_command_handler('CREATE_UI', self.__handle_create_ui)
self.server.add_command_handler('DELETE_UI', self.__handle_delete_ui)
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
self.server.add_command_handler('SET_PLUGIN_STATE', self.__handle_set_plugin_state)
logger.info("Setting up URID mapper...")
urid_mapper_address = await self.manager.call('CREATE_URID_MAPPER_PROCESS')
self.__urid_mapper = lv2.ProxyURIDMapper(
server_address=urid_mapper_address,
tmp_dir=self.tmp_dir)
await self.__urid_mapper.setup(self.event_loop)
logger.info("Setting up host system...")
self.__host_system = host_system_lib.HostSystem(self.__urid_mapper)
self.__host_system.setup()
logger.info("PluginHostProcess.setup() complete.")
async def cleanup(self) -> None:
while self.__plugins:
_, plugin = self.__plugins.popitem()
await plugin.cleanup()
if self.__host_system is not None:
logger.info("Cleaning up host system...")
self.__host_system.cleanup()
self.__host_system = None
if self.__urid_mapper is not None:
logger.info("Cleaning up URID mapper...")
await self.__urid_mapper.cleanup(self.event_loop)
self.__urid_mapper = None
await super().cleanup()
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
async def __handle_create_plugin(
self, spec: plugin_host_pb2.PluginInstanceSpec, callback_address: str = None) -> str:
key = (spec.realm, spec.node_id)
assert key not in self.__plugins
plugin = PluginHost(
spec=spec,
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
callback_address=callback_address,
event_loop=self.event_loop,
host_system=self.__host_system,
tmp_dir=self.tmp_dir)
await plugin.setup()
self.__plugins[key] = plugin
return plugin.pipe_path
async def __handle_delete_plugin(self, realm: str, node_id: str) -> None:
key = (realm, node_id)
assert key in self.__plugins
ui_host = self.__uis.pop(key, None)
if ui_host is not None:
ui_host.cleanup()
plugin = self.__plugins.pop(key)
await plugin.cleanup()
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
async def __handle_create_ui(self, realm: str, node_id: str) -> Tuple[int, Tuple[int, int]]:
key = (realm, node_id)
assert key not in self.__uis
plugin = self.__plugins[key]
logger.info("Creating UI for plugin %s", plugin)
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
ui_host = plugin.create_ui(
functools.partial(self.__control_value_change, plugin))
ui_host.setup()
self.__uis[key] = ui_host
return (ui_host.wid, ui_host.size)
async def __handle_delete_ui(self, realm: str, node_id: str) -> None:
key = (realm, node_id)
ui_host = self.__uis.pop(key)
ui_host.cleanup()
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
async def __handle_set_plugin_state(
self, realm: str, node_id: str, state: plugin_state_pb2.PluginState) -> None:
key = (realm, node_id)
plugin = self.__plugins[key]
plugin.set_state(state)
def __control_value_change(
self, plugin: PluginHost, port_index: int, value: float, generation: int
) -> None:
port_desc = plugin.node_description.ports[port_index]
task = asyncio.run_coroutine_threadsafe(
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
plugin.callback_stub.call(
'CONTROL_VALUE_CHANGE',
plugin.realm, plugin.node_id, port_desc.name, value, generation),
loop=self.event_loop)
task.add_done_callback(self.__control_value_change_done)
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
def __control_value_change_done(self, task: concurrent.futures.Future) -> None:
task.result()
class PluginHostSubprocess(core.SubprocessMixin, PluginHostProcess):
Persist plugin state. - Now the state of the Helm synth is properly saved, although there is still odd behavior when using Helm's preset browser - which I blame Helm for. - Control value changes are routed through the project process, so the model can be updated. - Implement the LV2 state feature. - Also add the concept of generation numbers to control value changes, so delayed updates don't cause weird issues with the UI. Squashed commit of the following: commit b87929098aeafa3375e209d5eb3362caeccbd6cd Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 02:45:44 2018 +0200 Change to plugin_state in model are propagated to the plugin host. commit ae197b6a81a3a0a645cf8440a63b7aee53fab477 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:46 2018 +0200 Immediately unload plugin UI when hiding it. Currently crashes when closing the app while still waiting for the unload. commit 12454b02ca8d388537389e9d031295d1f24a7e03 Author: Ben Niemann <pink@odahoda.de> Date: Tue Apr 3 01:37:25 2018 +0200 Larger log files to make debugging easier. commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 20:30:59 2018 +0200 Set the initial plugin state from the state stored in the model. - Add PluginHost::set_state() methods and LV2 implementation. - Also make PluginHost::get_state() non-abstract. Somethings still missing, state isn't the same after reopening a project. commit 25710a77549501bd80164105b50ab575f5f88c09 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:14:24 2018 +0200 Persist the plugin state in the model. - Regularly poll the plugin for its state. - If changed, post it back to project process. - The callback address to the project process is now set when creating the realm, and the stub is created by the PluginHost instance. - PluginHostLV2::get_state() does not create an empty lv2 message, if no properties are set. commit 2fd537a73d77b30fa0b49193522b68ad928616a9 Author: Ben Niemann <pink@odahoda.de> Date: Mon Apr 2 02:11:48 2018 +0200 Move PluginState message to noisicaa.audioproc.public. commit 252946a849806745a7ae1d529dedf47406b98c6a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:22:02 2018 +0200 Add API to dump LV2 plugin state into a proto message. commit 6e0546cd47ce66e8481db2331496d7ba819c48b3 Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 19:18:11 2018 +0200 Two test modules were missing from CMakeLists.txt. commit fcb94a0f25322b7d60c124bc2af0344a4560e58a Author: Ben Niemann <pink@odahoda.de> Date: Sun Apr 1 16:05:07 2018 +0200 Control values are tracked as a (value, generation) pair. Implements a basic logical clock, so the UI can ignore delayed state updates. Also rename the BufferType classes for consistency. commit 574078a6cd228a0af72d8c06d026ccac822cdcf2 Author: Ben Niemann <pink@odahoda.de> Date: Sat Mar 31 13:32:30 2018 +0200 Post control value changes to the UI. Move the control port monitoring to PluginHostLV2, because it's only used by LV2 for now, and further improvements will be very LV2 specific. commit 45b0ca8bf2769b6218ccc1b74aa91015a3c2af91 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 17:52:40 2018 +0200 PluginHost exposed control value changes via a slot. The slot is called in a non-rt context. commit 31540a7ae5ff1e0f618faf4742628f41acee01ee Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:50:01 2018 +0200 ProjectProcess handles CONTROL_VALUE_CHANGE. Constructs and dispatches a SetPipelineGraphControlValue command, which automatically updates the audioproc and UI processes with the change. commit 62b3f9d5ea3a3302f7bf5906c164cf7cbd2ec294 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 16:18:50 2018 +0200 Some more fixes, because PluginHostProcess doesn't take the audioproc server address anymore. commit 1a4a687a5eb4a1a8188c0fb18a7f85223f841910 Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:56:46 2018 +0200 PluginHostProcess expects a callback address for each UI. And uses that to post control value changes. Doesn't need the audioproc server address anymore. commit ed1108e9ea97924204bf88a2d0bbf2594e221dae Author: Ben Niemann <pink@odahoda.de> Date: Fri Mar 30 15:54:52 2018 +0200 Allow lines with type annotation to exceed max length limit. commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9 Author: Ben Niemann <pink@odahoda.de> Date: Thu Mar 29 17:31:01 2018 +0200 Remove obsolete class.
5 years ago
def create_event_loop(self) -> asyncio.AbstractEventLoop:
gbulb.install(gtk=True)
event_loop = asyncio.new_event_loop()
return event_loop