pantherb / setBfree

DSP tonewheel organ
http://setbfree.org
GNU General Public License v2.0
194 stars 36 forks source link

Help adding CC parameters for Nord controller #74

Open chrisdiamand opened 4 years ago

chrisdiamand commented 4 years ago

Hi!

Recently I've been trying to use my Nord Electro 5D keyboard with setBfree. I started working out the MIDI mappings, but I've run into a few issues which I think might require some code changes.

The main two issues are as follows:

I started hacking something up, but I got to the point where I thought I should stop and ask for advice before continuing :)

The obvious way to solve both issues seems to be to simply add more CC-controllable things. E.g. a "reverse drawbar values" setting, and for the Leslie, equivalent "triggers". "Stop mode" would require some extra state in struct b_whirl though.

Does that seem like the way to go?

Thanks! Chris

x42 commented 4 years ago

If you suffix a midi-mapping with a minus-sign, the range is reversed (grep for MFLAG_INV). eg. https://github.com/pantherb/setBfree/blob/master/cfg/cx3.cfg

As for the Leslie, I don't know what a good solution would be. Perhaps add a 4th way There's already rotary.speed-toggle (slow/fast), rotary.speed-preset, rotary.speed-select to satisfy other controllers.

However I don't see an easy way to combine those with an explicit internal stopped state, since that can lead to ambiguities and maintaining backwards compatibility with existing sessions will be tricky. Using two controls for a parameter that should be atomically automatable needs to be avoided.

chrisdiamand commented 4 years ago

If you suffix a midi-mapping with a minus-sign, the range is reversed

That worked perfectly :)

Perhaps add a 4th way

Sounds good - I've got most of a patch for that, I'll tidy it up and send it over. In the meantime I've just created a PR for the controls which can already be handled just using the existing code.

However I don't see an easy way to combine those with an explicit internal stopped state...

Yeah :( I'll leave this one until last...

Would backwards compatibility be an issue if it was ignored until explicitly set by the controller, or if there was a user-provided default (like the existing whirl.speed-preset)?

Using two controls for a parameter that should be atomically automatable needs to be avoided.

Could this be solved by leaving the existing control mechanisms intact? I guess if you were automating the rotary control you'd use rotary.speed-select or rotary.speed-preset anyway? Unless you are referring to another kind of automation - apologies if I've misunderstood.

Thanks again, Chris

x42 commented 4 years ago

The use-case I have in mind is when the organ is used as plugin, or when re-playing a partial MIDI file, or CC automation from a DAW. -- If there are two distinct messages for on/off and slow/fast. One has to make sure that both are re-played at the same time.

On the Nord 5, do the switches physically toggle on/off? Or are they push-buttons that don't latch? What messages are sent for on/off and fast/slow? Can those be customized?

chrisdiamand commented 4 years ago

Physically, the switches are non-latching push-buttons. But from a MIDI standpoint they're toggles.

E.g. I press the speed button once, the keyboard lights up the "fast" LED, and outputs a value 127 on CC 82 I press it again, the "slow/stop" LED lights up, and we get a 0 on CC 82.

Pressing "stop mode" is the same - when pressed, the LED lights up, we get 127 on CC 79. Press it again, LED off, 0 on CC 79.

I've contacted customer support just in case, but currently I can't see any way to customise it. It's a stage piano more than a controller so I expect this is a low-priority use case :(

Also worth noting that at least the Hammond SK-1, SK-2 and XK-1 use a similar scheme: http://hammondorganco.com/wp-content/uploads/2011/03/owners-manual-XK-1c-101613.pdf

10 STOP button ... When the light is ON, the [FAST] button toggles STOP/FAST. And when the light is OFF, it toggles SLOW/FAST(P. 49) 11 FAST button Toggles the modes of the rotors FAST or not. When the light is ON, it is FAST. (P. 49)