Commit Graph

4 Commits (b29d0c6fc73b0f64af036213b2db940628792bb9)

Author SHA1 Message Date
Ben Niemann b29d0c6fc7 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 <>
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 <>
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 <>
Date:   Tue Apr 3 01:37:25 2018 +0200

    Larger log files to make debugging easier.

commit 6ccae1f7c89cdd5ef0f699e676af8ea988f03351
Author: Ben Niemann <>
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 <>
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 <>
Date:   Mon Apr 2 02:11:48 2018 +0200

    Move PluginState message to noisicaa.audioproc.public.

commit 252946a849806745a7ae1d529dedf47406b98c6a
Author: Ben Niemann <>
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 <>
Date:   Sun Apr 1 19:18:11 2018 +0200

    Two test modules were missing from CMakeLists.txt.

commit fcb94a0f25322b7d60c124bc2af0344a4560e58a
Author: Ben Niemann <>
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 <>
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 <>
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 <>
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 <>
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 <>
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 <>
Date:   Fri Mar 30 15:54:52 2018 +0200

    Allow lines with type annotation to exceed max length limit.

commit 07dd43e24f5368a2f1db2feb8a11ba35398b0fa9
Author: Ben Niemann <>
Date:   Thu Mar 29 17:31:01 2018 +0200

    Remove obsolete class.
2018-04-09 04:11:37 +02:00
Ben Niemann f1b2f9031a Implement LV2 instance-access feature for UIs.
- Move noisicaa.lv2.ui_host to noisicaa.audioproc.engine.plugin_ui_host_lv2.
- test-ui-gtk2 test plugin requires instance-access.
- Now Helm UI works!
2018-03-25 16:07:45 +02:00
Ben Niemann a1a798b905 Enable mypy by default.
Mark all modules that currently have issues as mypy-unclean.
2018-03-24 15:28:19 +01:00
Ben Niemann 45be492aed Massive refactoring of the audio layer.
- Run all audio in a single process.
  - Instead of a main audio process connected to the backend and one process per opened project.
  - Audio engine is composed of a tree of 'realms', with the top-level realm hooked up to the
    backend, and each project creates a sub-realm.
- Run plugins in a separate process, isolated from the main audio engine.
  - Turns out I really want to support the LV2 instance access feature, so UIs need to run in the
    same process as the plugin itself.
  - So plugins need to be isolated from each other, so they can use different UI toolkits without
    linker symbol clashes. I.e. they can't all run in the main audio process.
- Separate audio processing from the project process.
  - Instead of generating MIDI events from the project and route them to the audio pipeline, have
    processors in the pipeline, which capture the full state of the project and emit events during
    playback. Changes to the project update those processors to keep them in sync.
- Use protocol buffers for a lot of internal messages in non-realtime contexts.
- Very basic support for LV2 plugin UIs.
  - Trying to get that working triggered all those changes above...
- And many, many more changes...
2018-03-21 08:01:20 +01:00