Page 1 of 2

Ruby midi learn cc system

PostPosted: Tue May 21, 2019 2:11 pm
by kortezzzz
Well, this is a very naive attempt to substitute the green veteran "control change" primitive with a Ruby one (although some greenies are involved here too). It somehow works, but far a way from Ruby's typical elegance :(
But I guess it can be a kinda start of something better :)

Ruby guys,
Is there any potential here?

Re: Ruby midi learn cc system

PostPosted: Tue May 21, 2019 3:13 pm
by Spogg
That’s brilliant sir! :ugeek:
It looks like it would be easy to add to my favourite knob framework.

I’m wondering about saving schematics and saving songs in the DAW though. If I set say 3 knobs to MIDI CC sliders on my MIDI controller, then save the songs, wouldn’t my learnt assignments be unavailable when restarting work on the song later?
Similarly, wouldn’t I have to “Forget” all the knobs before saving the schematic in FS, so the knobs are in a virgin condition?
Maybe we should involve the preset manager somehow, so the learnt settings are available to the DAW for saving songs and presets.

With the present CC system we, as devs, decide what CC a knob responds to, and it’s baked into the design. It would be great to have a universal flexible MIDI learn system like this.

Cheers

Spogg

Re: Ruby midi learn cc system

PostPosted: Tue May 21, 2019 3:53 pm
by trogluddite
Spogg wrote:Maybe we should involve the preset manager somehow, so the learnt settings are available to the DAW for saving songs and presets.

Many moons ago, I used such a system in my old "Soopa Doopa Loopa" project. This has a central "controller bindings" module which stores an Array of which CC links to which control, and has the neat side-effect of making MIDI filtering more efficent - control values are sent only to a specific control via a named wireless bus channel, so each control doesn't have to test every incoming CC for the correct number. The bindings array is stored in VST presets, and can also be saved as a text file "cheat sheet".

Since the switch from SM to FS, I've always meant to "Rubify" it, as Ruby allows a few sneaky tricks which would save a lot of wireless linking and setting of control IDs etc. In the mean time, here's the current Soopa Doopa Loopa schematic. The main controller bindings module is inside "Soopa Doopa Loopa -> Menu Panels (bottom-right) -> Controller Bindings", and if you look inside the "MIDI CC" module of one of the simple knob controls, you'll see the bus receiver and the numeric ID used to identify each control.
Soopa Doopa Loopa.fsm
(1.19 MiB) Downloaded 860 times

(NB: Hold SHIFT+CTRL for MIDI learn mode, or click the little MIDI connector icon left of the big logo panel.)

Re: Ruby midi learn cc system

PostPosted: Tue May 21, 2019 5:00 pm
by kortezzzz
Spogg,

I think the preset thing its doable. But to make it working properly, you should use use a separate preset primitive for each parameter (the selector's boolian that turns midi learn on\off and the cc value. The knob's output float value would be saved by the knob's preset primitive).

Trog,
I'm so sorry, but it's way beyond my ability to understand what you've done in sooppa dooppa. I can build an array based text file cc system that allows loading automation files (and then you can just trigger it with the preset system) but if you won't somehow simplify that cc system, I believe no one of the "regular people" here will understand it :lol:

Re: Ruby midi learn cc system

PostPosted: Tue May 21, 2019 6:51 pm
by trogluddite
@kortezzzz - There's no need to apologize - it was just an example I had to hand that I've been far too lazy to ever suck out into its own set of simple modules. :oops:

However, take a look at this...
Midi Learn V2.fsm
(54.95 KiB) Downloaded 874 times


I've replaced your MIDI CC learner with an old module from my toolbox which does the same thing, and includes preset saving of the MIDI CC number (I've set it to store the value per-preset as a demo, though that might not be wanted in practice; and it's been fiddled with a little to reflect how your drop-down works).

If you take a peek inside, you'll see that there's no Ruby, and even the green component count is smaller (allowing for the added preset handling). So for this method of doing MIDI learn (i.e. per-control rather than a central "binding manager"), I think this is one of those cases where Ruby doesn't really bring any advantage.

Re: Ruby midi learn cc system

PostPosted: Tue May 21, 2019 7:23 pm
by kortezzzz
Brilliant, Trog :) No words. Thank you!

Re: Ruby midi learn cc system

PostPosted: Tue May 21, 2019 7:35 pm
by kortezzzz
Just one more off topic: is there any advantage in using preset array in the knob that will merge the knob's value with the cc value (instead of 2 separate "regular" preset primitives for the knob's value and the cc value)?

Re: Ruby midi learn cc system

PostPosted: Tue May 21, 2019 9:36 pm
by lalalandsynth
Stupid question ...does anyone use cc to control anything anymore ?
You can bind to any parameter with the daw.

Re: Ruby midi learn cc system

PostPosted: Tue May 21, 2019 10:52 pm
by trogluddite
kortezzzz wrote:Brilliant, Trog :) No words. Thank you!

Well, I probably shouldn't take the credit - I think it's something migrated over from my old SM toolbox, so it might well be the work of long-lost gurus from the olden days. It's been that long since I made a VST plugin that I'm rather surprised I even thought to search my toolbox for it!

kortezzzz wrote:Just one more off topic: is there any advantage in using preset array

None that I can think of. In fact, I'd say that keeping them separate would be more useful for a "universal" toobox module. In most cases, you'd want them to have different default values (the module uses an out-of-range value to represent "unassigned"), and it can be useful to have CC bindings stored by the host as VST parameters, but not as part of a preset, so it would be handy to have that option be an independent property.

lalalandsynth wrote:Stupid question ...does anyone use cc to control anything anymore ?
You can bind to any parameter with the daw.

It depends what I'm doing. I've made a few things which I quite often use as stand-alone applications, so there's no choice with those. I use DAW bindings for transport/mixer controls and when I'm explicitly tweaking automation data - it's certainly very handy when you have limited hardware controls. But I'm a big fan of old-school one-knob-per-parameter tweaking, and I don't like switching between "music hardware" and keyboard/mouse/monitor all the time (especially if re-binding involves opening menus and drop-down lists). So for synth bindings, it's just more intuitive to me that my knobs are always controlling the same thing as the music keyboard, and are always the same regardless of which host I'm using - remapping all 60+ controls on my master keyboard can be a bit of a bind (if you'll excuse the pun! :lol: )

Re: Ruby midi learn cc system

PostPosted: Wed May 22, 2019 7:09 am
by Spogg
That’s an excellent solution trog (no surprise! :lol: ).

I adore the way you just append “CC “to make a new preset parameter name.

Cheers

Spogg