Home › Forums › General › Programming › Possible to create modulators from Lua?
- This topic has 6 replies, 4 voices, and was last updated 11 years, 5 months ago by mb47.
-
AuthorPosts
-
October 21, 2012 at 3:33 pm #750
Hi all,
I am using Lua to arrange modulators in a panel (more than four hundreds), and setting their properties.
However I had to create them first, and so far I did this by hand (right-click/create or right-click/copy)
Is it possible to create (or copy) modulators from Lua?Thanks,
MarcoOctober 21, 2012 at 7:01 pm #4922Not at the moment. If you can provide a reasnable argument for why I should add this ill consider it.
October 24, 2012 at 6:12 pm #4923Not sure the exact scenario here or what you want to achieve, but instead of create a modulator throu lua you could create the modulator manually like normal then set the visibility and/or position of the modulator through lua. Would prolly be easier too ” title=”Smile” />
You can always move the modulator off canvas by default and set the position throu the animate method..
Take a look at my jp8080 panel if youd like an example. Click the vmod button and the vocoder controls slide/fade in.
Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen
October 24, 2012 at 9:10 pm #4924hello,
yes, creating them manually and then setting their position with Lua is what I’ve done so far.
However it can be quite time consuming when you have to create hundreds of modulators by hand.Here’s an example with a panel for the Kawai -5:
[attachment=0:3i8ruluu]KitScreenshot.png[/attachment:3i8ruluu]
In a "kit" program each key is assigned a "single" sound plus few other settings. In this case there are 528 modulators that need to be manually created.
Being able to programmatically create by copying a modulator from another would also do.October 24, 2012 at 11:40 pm #4925Could you use the same modulators and change whatever attributes needed via Lua? If it’s just Midi Channel or some midi property this is likely the best way to go.
Also be aware you can add all your hundreds of modulators to a group (just drag em and drop em onto a uiGroup) and control the position/visibility through the group.Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen
October 25, 2012 at 9:04 am #4926I’m making the drum part of the Roland XP-30. It consists of one sound for each key, and each sound has more than 70 parameters. In total there must be more than 4500 modulators.
So I had to repeat 63 times the same scheme, and then change the sysex message and some other properties of each modulator.
The best way to do for me was to put each key sound (with it’s 70 parameters) in a different layer. Once I’ve got the first layer, I edited the .panel file with a text editor, created all the layers needed and duplicated the modulators of the first layer, changed it’s layer id (find and replace) and did it until I got the 63 layers with it’s modulators.Still, I have to change sysex message and several other properties one by one, but I’ve the panel ready with all modulators created in little time.
October 30, 2012 at 7:19 pm #4927I could imagine there MIGHT be issues with having functions that are used to dynamically create modulators when the panel is running.
As an alternative to having a Lua function to create modulators, one way could be to have a GUI function "Create Modulator Array" or "Copy Modulator to Array" (to get not just one copy, but several instances, in one single shot).
Editing the .panel text file is defintely an option, but it would just be great to have GUI functions for simplicity.
Just a thought…. -
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.