View Single Post
Old 10-21-2019, 09:27 AM   #332
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,690
Default

Quote:
Originally Posted by TonE View Post
Thanks mespotine you added all the great parameter learn functionality, with set and get. I still did not try them yet. But the most obvious and general use case scenario of this would be as follows, especially also useful to non-programmers:

1. only simple .txt files are used for parameter mappings
2. for saving and loading, simple .txt files
3. format could be 5 columns per line
4. using tab or ; as delimiter might work, or any of them
5. columns are: trackname;fxname;parametername;type;value

And the lua script would scan this .txt file, line by line and do following:
if (project contains any track with trackname AND any fx in that track with fxname AND any parameter in that fx with parametername)
use type for midi mapping
and value for its value

That's it. Then you could define any mappings for any scenarios for any complex project. Those .rpp templates could be shared together with those mapping .txt files.

Especially when thinking in terms of certain starndard mappings for certain devices, we could have many such templates for certain devices. Over time there could be many useful fun projects to play with, 100's of templates for device x, e.g. reason mode. Has your device reason mode, switch it on, load template, ready to go, all would work, immediately. In short it would allow making normal reaper .rpp projects, something like grooveboxes, all parameters mapped immediately to your hardware. Ready to have fun.

You plug in your project to your hardware(s) and not the opposite.

save_midi_mappings.lua would save midi_mappings.txt to project directory, which would simply contain all tracknames, all fxnames per track and all parameternames per fx, where no mapping is columns type and value would be empty. Optionally those empty mapping entry lines could be left out.

load_midi_mappings.lua would load midi_mappings.txt from project directory, if available. Wonderful way of sharing them in this forum, together with their .rpp templates.

And if load_midi_mappings.lua would be a bit more intelligent, it could even add the missing fx to the project first, then apply the midi mapping!

Typical mapping targets could be: Bypass, Wet, Cutoff, Resonance, Volume, Pan.
Will think about that but first, I will finish off the functions, so that is fully programmable.

The most important thing to take care of would be, future compatibility. Means, if the devs add new features, the txt-file must be extendable without breaking anything. This is where things become difficult and tedious in the design-process.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote