Morph Plugin for Controlling Automation

Now, after some practice in using your plugins this note becomes actual to me :))

1 Like

I just took a quick peek at implementing this. It’s a little more difficult than I had hoped, because my lua scripts have no concept of “now” that would let them access the current BPM. I’m going to put this on the backburner for the moment…

Wait wait! It was actually really easy. I added an option to use beat divisions for setting the speed of the LFO. It correctly adjusts as the tempo map updates. Here’s an example of using quarter notes through a tempo ramp from 20 bpm to 180 bpm using saw as the LFO shape. Notice that it cycles from 0 to 1 once per beat. (The reset automation is to ensure that the LFO starts at the desired phase in the beginning.)

1 Like

I thought print() did work but not sure and am not on my Ardour machine to try it. Other than that, no, I have no ideas for debugging them.

LuaAPI methods, I believe, are only convenience methods - a simpler way of doing things that can be done by other means. Looking at the source code (lua_api.cc) those particular methods can indeed be done by other means but I have no idea if they’re realtime-safe. If those LuaAPI methods have been made non-available for realtime reasons then I expect that trying to do them ‘directly’ wouldn’t be realtime-safe either. Worth a try. My C++ skills aren’t great but I can follow what those methods are doing so give a yell if you need help.

1 Like

Thanks for the support! My c++ isn’t great either… And I’m definitely very new to ardour’s codebase (and just scratching the surface via lua scripting as an entry).

I’ll definitely hit you up if I run into a problem or need someone to bounce around ideas with. I have a couple more days of free time in the near future, so I’m considering taking a deeper look at the dsp_run method and the lua_api.cc code that you linked.

A seemingly-okay version of live reloading ended up being fairly simple to implement, so it’s in the repo now! The morph_lane_linker.lua session script checks the session once when loading initially and then again once every 5 seconds while the transport is not running.

If everything goes well with this, then you should never need to reload the script! :smiley: Here’s a video of moving the Morph Locator from one plugin to another and the automation keeps going as expected, with the new configuration being reflected within about 5 seconds of the change.

If you get a chance to test it, let me know how it goes! Especially let me know if you have any memory issues with the lane_linker script or problems with the new tempo sync on the LFO.

Hi, rastin! Brilliant, brilliant thank you! Everything you’ve done - works good!

I’ve tested moving Locator between two tracks with Helm. I had started a Gnome Clock during Locator’s Ctrl+X & Ctrl+V - the Linker finds changes about 2-3 sec/// - Super!
The DAW sync also fine!
A little video of my testing:

-this is the thing I don’t know how to check, sorry. But if it does not require the programming knowledge - i could try it with pleasure - if you advise how to measure the memory or any other parameters…

1 Like

One more question about the Controller’s Locator ID(s). By default they are “-1”. So if I need to enter a “0” ID - I double click to the slider type “0”&“Enter” - but it doesn’t work (I need to enter something that not a “0” and after enter “0”):
negative_1_value
Is it possible to change the default ID to zero?
Many many thanks, as usual! :star:

1 Like

Thanks for trying it out and playing around! I appreciate it.

For memory management, I also have no real clue how to measure it. I’ve been going through the lane_linker code to try to remove anything that might increase memory consumption. Hopefully it’ll be okay. Just let me know if anything crashes or gets stuck.

(I am unsure why, but the lane linker for me sometimes seems to hang, or it gets trapped in a weird state where the automation continues on one target even after moving a locator… Again, I am unsure when or why this happens.)

Regarding the default ID and the -1 to 0 thing, I also noticed that issue and needed the same workaround that you used – set it to some other number, then set it to zero. I have absolutely no idea why this happens. However, I think I would prefer us to work around it rather than change the default to 0. For both pid and nth_parameter, I like -1 being the default to signify that they are not configured. If they were set to 0 by default, then a Locator=0 would make all 8 lanes of every fresh Controller target that Locator until you changed them all manually.

Your animated gif with the keyboard overlay is excellent for explaining the issue. I wonder if the root issue is a minor Ardour bug? Or maybe gtk?

OK!

-aa! understood. yes, that is like an empty slot for ID. Thank you!

:footprints: I can only make a bigger scale&slower gif with my programming “super-knowledge” :))
negative_1_value
Thanks! :dark_sunglasses:

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.