Morph Controller (ver2) for Controlling Automation

Hello again everyone! I made a huge update to the Morph Controller lua plugins. Here is a copy/paste of the readme from github. Shoutouts to @cooltehno and @johndev for all their feedback in the previous thread.

The most exciting part of this message are the additions in (ver2). Demos of the new features are in the (ver2) section near the end of this post. Check them out and let me know if you have any thoughts! :slight_smile:

Edit: Iā€™m putting this video high up in the post. This showcases almost all of the new features.

ā€“

Morph Controller (ver2)

General Morph Controller for Controlling Automation and Interpolating Between Values

This is a general plugin for Ardour that allows one automation lane to control multiple other automation lanes. For each target lane, it can store up to ten automation values and can interpolate between them using the main controllerā€™s slider.

Before describing how it all works, here is a quick demo video of constructing a multiband delay and controlling it with Morph plugins. An original signal (simple guitar chords, far left track) is split into eight tracks, each one containing a Morph Locator and an ACE Delay plugin. Morph Controllers then target each of the eight ACE Delays in order to control their delay times and feedback strengths. The first half of the video shows the way that parameters are linked, and the second half contains an audio example of the multiband delay in practice. (Audio starts at 1:20 and is loud.) Note that everything here could be done using normal automation without the Morphs, but the Morphs make the desired values much more convenient to hit and reduce the 16 automatable parameters down to two. With only two parameters, they can be mapped easily to a midi controller and played live.

Basic Usage / Architecture Overview

As it stands currently, the ā€œpluginā€ consists of two pieces of lua code, one being the Morph Locator that targets a desired plugin on a track, and the second being the Morph Controller that does all of the parameter automation.

  1. morph_locator.lua is an incredibly simple dsp processor that has exactly one parameter: locator_ID. This plugin needs to be placed in a track immediately before the desired target plugin. Manually ensure that every Morph Locator has a unique locator_ID set. (But note that multiple Morph Controllers can target the same Morph Locator.) It also has a ā€œbuttonā€ called Press to Describe that will print the enumerated parameter list of the desired target plugin to the log.

Note that Press to Describe needs a new version of Ardour (7.2-128-g7e4bb2ff68 or later) in order for its messages to be printed successfully. 0009202: missing print() messages in lua dsp processor - MantisBT

  1. morph_controller.lua has a large number of parameters.
    • Controller: the controller value that slides between 0 and 1.
    • Visualize: choose to visualize an overview of all target outputs by setting to -1, or choose a specific target by setting in the range of 0 to 7.
    • lfo shape: choose between sine and saw
    • lfo freq (Hz): the speed of the LFO in cycles per second
    • lfo beat div: the speed of the LFO in terms of the current transport locationā€™s tempo. Can specify the speed of a whole measure (1/1), half measure (1/2), quarter note (1/4), quarter note triplet (1/4T), etc.
    • lfo speed mode: choose to use freq (Hz) or beat div when determining LFO speed
    • lfo phase (deg): the starting phase of the LFO
    • lfo reset: set to 0 for enabling the LFO to run, and set to 1 to force the LFO to be stopped at the configured phase.
    • Use LFO?: set to 1 to enable LFO control. Set to 0 to disable the LFO for this Controller.
    • The remaining 14 parameters are replicated once for each of 8 targets.
    • The __target_plugin_id parameter should be set to the same value as the locator_ID of a Morph Locator in order to control the target.
    • The parameter __target_nth_param determines which of the targetā€™s parameters is to be controlled.
    • The __target_enabled parameter determines whether this targetā€™s automation is controlled or not.
    • The __target_linear parameter allows switching between linear interpolation or discrete selection when going through different values. Using discrete will allow step sequencing.
    • The remaining parameters store up to 10 values for the target automation lane, and the target_control_point_count parameter dictates how many of those 10 values are interpolated between as the main controller slides between 0 and 1.
    • Note: the parameter names have been shortened so that more parameters fit on the screen in Ardourā€™s generic UI. con, ti_ct for count, ti_c0, ti_c1, ā€¦, ti_c9, ti_pid, ti_nth, ti_ena, and ti_lin

ā€œInstallationā€

Copy the two Lua scripts into the appropriate folder. For me on linux, that folder is ~/.config/ardour7/scripts

Afterwards, launching Ardour should show Morph Locator and Morph Controller in the list of plugins that can be added to a track. Add and configure those as necessary. Feel free to enable the inline UI for more feedback while configuring.

Thoughts, Discussions, Why

This type of functionality would be amazing to have built into Ardour directly. I saw online a recent interview with Robin where he teased (teased is too strong a word even) that automation control might possibly be starting development in a couple years. And as of late, I have been using Vital and Surge XT synths in my own music making, both of which have extremely strong modulation capabilities, so much so that I find myself trying to do more and more work in the synths themselves rather than in the DAW. Vitalā€™s mod remap is especially lovely.

A full deep-dive into automatable automation would definitely be a ton of work for Ardour or any DAW. The Morph plugin here provides a very simple/crude approximation of some of those features.

The Locators are needed because Ardourā€™s IDs for plugins seems to change at random times.

This does not play well with the has-been-modified asterisk next to the filename in the titlebar indicating that the project has changed. Notice in the video that the two Morph Controllersā€™ controllers have their automation modes set to Play (making their sliders gray in the mixer strips) but the ACE Delays are set to Manual (and thus their sliders in the mixer strips remain blue as though they could be adjusted).

Is this zipper friendly? No clue! Close enough for my purposes. Whatā€™s the update frequency? Also no clue!

What am I hearing in the demo? Raw direct input from my guitar as I strummed some chords is processed by a make-shift multiband delay. Based on settings, the multiband delay can delay specific frequency bands more than others. The spectrogram on the original signal shows all of the frequencies arriving simultaneously on every chord strum, but the output signalā€™s spectrogram on the far right shows that different frequencies get spread out. Audibly, the first four chord strikes are unmodified, and the effect begins on the fifth chord. For the first few effected chords, the low frequency parts are delayed less than the high frequency parts, so the bass swells and precedes the sharper snap of the transient. Later on in the demo, the delay times are varied, and feedback in the whole setup makes everything even more chaotic.

(ver2)

This is version 2 of Morph Controller! It is SIGNIFICANTLY better than the previous version. (The old version has been moved to v1 just in case.)

The main difference is that now the two plugins are DSP processors. This brings three huge benefits.

  1. They watch for updates on every buffer (at most a handful of milliseconds), meaning they are extremely responsive to changes in layout. Deleting a plugin, moving a Locator, changing a target inside a Controller, etc, are all very fast.
  2. They run in all contexts, including when exporting a track.
  3. Inline UI. The UI is incredibly informative and displays the mapping curve, parameter name, bypass state, and, if misconfigured, error state.

Here are some demos of Morph Controller (ver2) in action.

First, an overview of a session with audio. (Audio starts immediately and is loud.)

Next, a demo of exporting a session. (No audio.)

Finally, a demo of Press to Describe. (No audio.)

Inspirations

FLā€™s Multiband Delay (with Morph knob at 4:30) FL STUDIO | Multiband Delay - YouTube
Morph EQ (a whole plugin completely unrelated to the work here) Morph EQ - Is This The Perfect Creative Filter VST Plugin for Sound Design? - YouTube

Closing Thoughts

The UI is very bright and not Ardour-like. Iā€™m okay with this for now. All of the UI elements feel like post-it notes that are designed to draw attention to themselves in order to keep things organized. (Of course, the UI is completely optional.)

I am really enjoying my time with Ardour! Music is fun.

Hereā€™s a link to the repo where you can find the lua plugins. GitHub - rrastgoufard/Morph_Ardour: General Morph Plugin for Controlling Automation and Interpolating Between Values

ā€“

And hereā€™s a link to the previous thread in case you want some history. Morph Plugin for Controlling Automation

3 Likes

One more feature I just just just now added!!! Audio Input

Previously, a Controllerā€™s value could be set manually or following an LFO, but now using Audio Input, the value can be adjusted according to an audio signalā€™s level.

Hereā€™s an example of a a dynamic reverb and dynamic EQ following the envelope of a guitar. Note that switching between Manual and Audio Input control modes is demonstrated too.

ā€“

I really love how Morph Controller is progressing. Being constructed using DSP processors opens up a lot of options, and hopefully it will lead to a lot of interesting creations and discussions.

I am sad that I created a new post for version 2 here on the forums thoughā€¦ Ideally, I would have updated the first post of the original topic, but it didnā€™t seem like I could have. The sad part is losing the history of the original topic in a single, unified location. Iā€™d appreciate some input from you if you have any opinions on this. It is not too late to delete this topic and append the posts to the end of the original topic, but the first post of the original topic will be out of date as it does not account for version 2 (or any future versions).

Also, apologies for posting so much! Iā€™m excited by how this is turning out.

2 Likes

Please donā€™t feel you need to apologize: you are making great strides, and folks deserve to hear about your progress on an interesting project. Your enthusiasm seems quite warranted to me.

1 Like

Thanks! I appreciate hearing that.

In that case, enjoy another demo. This uses the same guitar recording as the previous Audio Input demo, but it has way more effects and fun sounds. It is set up so that the parameters of the chain of effects on the guitar are controlled either using the guitarā€™s level (via Morph Controller Audio Inputs) or using an LFO. Interestingly, the speed of the LFO is itself controlled by a Morph Controller such that the speed depends on the level of the guitar. Effects include pitch shifting, delay time, EQ, and distortion.

Everything that sounds like it is not the guitar is actually still the guitar. No synths in this demo.

1 Like

Ho-ho! Hi, @rastin!
Iā€™d like to make a large project to test how your controllers makes Ardour smoke!! :))
(Iā€™m not a programmer but may be DSP problems take a place with large number of automation - need testā€¦)
Finally I have a little time so my feedback is not big yet:

Iā€™ve recorded a plastic bottle hitting the mic and used the audio to control the Helm tune & cutoff.
Works well! I used Expander to wide the dynamic range.
Your design of inline - fantastic! I wonder why people didnā€™t notice your plugs here!))
Superrrr! Thanks!

ps/ one my thought: the Locator occupies to much area in the mixer strip. I like the colored inline zone & numbers but not enough space for my laptop screen

ps2/))) another thought: is it possible to make Locatorā€™s Describe knob inline visible by default

ok ps3/ if the Locator could be color&number&Describe & and the possibility to enter the number inline in one strip - that could be super optimized! But anyway your plugs are powerful already! (little user opinion):alien:

1 Like

Yooooo, that bottle recording, especially when slowed down, was very cool. Awesome seeing audio in control of plugin automation in a generic way in ardour.

I just pushed an update that made the Locator UI significantly smaller. I was thinking about it too, but part of me liked how obnoxiously huge it was. In all seriousness though, making it smaller is a great call. If youā€™re really tight on space, you can always disable the inline UI. Both Locator ID and Press to Describe can be accessed from the generic UI when you double click the plugin.

Regarding ps2 and ps3, thereā€™s no way that I know of for those to be possibleā€¦

If you do a stress test, definitely let me know how it goes! And likewise if you make any fun sounds, keep me posted!

1 Like

))))

Thank you!!!
BIG BIG Luck!!

1 Like

I removed Press to Describe completely. It ended up being really difficult to use on synths like Vital that have 700+ parameters and frequently with names I donā€™t recognize.

Now, the UI shows the number and name of the last touched parameter. Simply place the Locator just before the target processor like normal, then wiggle a parameter on the processor to see the name change in the Locatorā€™s UI.

To configure a Morph Controller, you just need the two numbers that are displayed on the Locator.

2023_01_30_morph_locator_touch

2 Likes

@rastin rastin? Hello!!!
It looks like I groped how to tickle the Adrour. :small_red_triangle:
Iā€™ve decided to make a ā€œrandomizerā€ for drum sequencer with your controllers. Sorry if thatā€™s too much videos - just ignore it - if itā€™s boring (I just wanted to uncover the whole picture with real-time workflow, hangs&crushes).

  1. Hereā€™s an LFO-swing making with sound testing (no crash):

  1. Randomizer making (ā€œfirst layerā€) without sound testing (no crash) boring video:

  1. Sound testing of a randomizer (1-st crash!!):

  1. Sound testing of a randomizer (2-nd crash!!). Anyway I could play with sounds before crashing:

  1. Ultra-Randomizer making (ā€œsecond layerā€) - unpredictable no crush))!?:

  1. Crush again:

I think we canā€™t feel the boundaries what possibilities to test. Too much factors. I suppose itā€™s better just to use your plugins in projects, save so often as possible - and see how it is goingā€¦ But the ā€œMorph Toyā€ is interesting&cool! :basketball:
I like how Ardourā€™s mixer looks with controllers & locators - super!!
Thank you!!

1 Like

@cooltehno Those videos were great! I watched all of them. Thanks for sharing.

Iā€™m actually surprised that it crashed on 3, 4, and 6. Your DSP usage was really solid (less than 10%) with 8 full Controllers, so thatā€™s good! Weā€™ll have to play with it more to figure out where/when it crashesā€¦ And I agree completely ā€“ save frequently!

On your video 6, did it crash exactly when the video ended?

Morph Controller can now count zero crossings. This is a very crude way of getting pitch-dependent effects.

Hereā€™s a video demo. The audio in this is mega loud, but youtube does normalization, so it plays back at 36% of its original level.

This was an experiment to see if I could get closer to realizing a distortion sound that I have in mind. So far itā€™s promising!

I thought about the factorsā€¦ May be in my case it was not so good to use samplv1 samplerā€¦ I donā€™t know what plugins must be used to make a max objective testing. Also the Ardour 7.2.262 - is in the development stage - for example Iā€™d like to test Surge XT 1.1.2 vst3 - but this does not save the current stage for the session at this time (when I reopen the session - Surge has all the parameters to zero - Iā€™m afraid to make another of my bug-report - Iā€™ve already done too much). We need to understand what conditions must be done for clear experiments I supposeā€¦

Interesting! Your DSP goes up to 96% (red)!! - but Ardour is still living in your case! May be do you use ALSA? In my videos I use Jack - may be this is the reasonā€¦

I donā€™t understand clearly, but need testing. Does that mean that the controller acts now in dependence of the pitch of the audio?
EDIT: AA! I think I understood. If the pitch is higher - the zero crossing is more frequent, right?

I tested this project both with ALSA and with PulseAudio, but I do not use jack these days. Both alsa and pulse seem incredibly robust against underruns, and you can see that there are a ton of them while playing through this file.

The huge red DSP usage in my video is also partially caused by OBS. Having OBS open and/or recording pushes the DSP usage close to 100% whereas normally it would sit near 80% or so.

But in all cases, the underruns cause an audible crackle. So I had to cheat a little ā€“ the audio in that youtube demo is the rendered audio from the projectā€™s export and not the live-recorded audio from OBS. (Thereā€™s a note about this in the description on youtube.) Having said that, the program did not crash at all, and the crackling audio was almost usable. It definitely would have been fine if not screen recording.

Yes! If the pitch is higher, there are more zero crossings. That is exactly correct! Very crude, I know, but itā€™s something that I thought was worth trying.

One thing thatā€™s not explained well anywhere is the ā€œzx powerā€ parameter that scales the number of zero crossings. As an example, a sine wave of A 440hz would have 880 zero crossings per second, but the zx_power parameter can divide that by 2^power. Setting that parameter to 6, for example, would reduce the number of crossings down to 880/2^6 which is approximately 14 per second. So the Controllerā€™s value will go from 0 to 1 fourteen times per second when playing that A440 note. Similarly, notes of higher or lower pitch will be faster or slower than 14 times per second with that setting. (In the demo and for my guitar, setting zx_power to 5 gave the result that you heard.)

1 Like

Youā€™re programmers so big cunning :)) Cool!

So if in the live session there are some crackles - the export works well anyway? - I didnā€™t realize that. Some time in the past I had crackled session and thought that this is not appropriate. Thanks!

1 Like

I believe you can load up the DSP as high as you want and still render with no issues. But only as long as you are not doing a Real Time export.

1 Like

@rastin Is that right behavior of the controller in the zero-crossing mode? (Iā€™ve recorded the piano with the different notes and extorted in to audio):

A smooth pitch shift (exported a Helm (sine wave oscillators) track with one note pitch bender automated from the lowest to the highest point, Helm pitch bend ability - 48 semitones):

EDIT:
I think, Iā€™ve figured out - Iā€™ve changed the zx power up to 10 - and got the relatively understandable result:

ThankSS!

1 Like

The behavior during the frequency sweep is correct! Notice that it stops updating when the pitch is around or just past 220Hz. By my estimation, with zx_power = 5, the Controllerā€™s value should go from 0 to 1 about 14ish times per second at that frequency, which is about once every 70 milliseconds. What is your buffer size? Iā€™m betting itā€™s in the 50-70ms range.

Unfortunately, the Morph Controllers can set a parameterā€™s value only once per buffer. Many of the effects (like maximum LFO speed or in this case Zero Crossing count) are dependent on the buffer sizeā€¦

It would be neat if Lua in Ardour could set a parameterā€™s value multiple times within a single audio buffer. (Maybe it is already possible and I donā€™t know how?) That would lead to some very interesting audio-rate modulation which could result in something like FM synthesis, such as in, for example, Vital where its LFOs can go up to several kHz, letting the LFOs act as additional oscillators.

For the Zero Crossings option of the Morph Controllers, Iā€™m brainstorming an idea of how to make the range more usable. Itā€™ll probably result in a couple of sliders that augment the zx_power parameter that currently exists.

Thanks for trying it out! And I just noticed you added a second video with zx_power = 10. Glad you figured that out!

1 Like