Would it be possible for me to alter the Shruthi-1’s code to replace cc16 with cc2 as a modulation source (cc A) for use with my wind controller?
In the code base on GitHub I’ve found line 41 of midi.h
const uint8_t kAssignableCcA = 0x10;
It seems this defines cc A as cc16.
Is it as simple as replacing “0x10” with “0x02”?
Thanks Rimwolf, that explains it. Ha, I just learnt about conditionals in JavaScript from Codeacademy, so this actually made sense ;^)
@moshang, you can see it in the code that Olivier linked to, just above your post. (SynthesisEngine::ControlChange function.) Basically the definition of cc2 as ccA takes precedence; it never gets to the old definition in the switch statement.
I’ve successfully replaced cc’s 16-19 with cc’s 2-5 for ccA through D and am having a load of fun playing around with the new modulation possibilities. I see cc2 was assigned to modwheel joystick originally - although I haven’t changed that definition, the shruthi doesn’t respond to breath in the way it did before, as if that definition is now overruled. I was curious why this would be. Either way, it’s easy enough to assign my new ccA (breath) to filter cutoff and reproduce the effect.
Check the code If ccA … ccD spans more than 4 values, some entries in the modulation matrix might get overwritten by CC in this range. Minor bug, but a bug, nonetheless…
I’m a little surprised to read that ccA–ccD need to be 4 consecutive values; there wasn’t any comment in the code to that effect. I had changed ccA=2 a while back & it’s working fine, but I’ve had no reason to try to use the other controllers.
CC trivia: ever notice that cc3 isn’t assigned? I recently read that it was originally supposed to be the CC for aftertouch, but at the last minute before publishing the MIDI spec they decided to give it the current 2-byte sequence instead.
Actually, the WX-5’s pitch wheel can be set up to send CCs 16 and 17, so your suggestion to rather change C and D would be perfect for my use case. Not so much for herrprof though… I think I’ll have a go at changing all four CCs as you suggested as soon as I’ve worked up the courage ;^)
More info: I had a phatboy midi which has fixed cc values, so I was going to use a midipal rule to grab four knobs and assign them to the shurthi. So if you decided to do this, it wouldnt be a heart breaker, just change my plans.
Good to know! Let’s see what other people think about it. Note that this feature was implemented at a time there was no CC implementation at all on the Shruthi
By the way, is there anybody using those?
If not, I’d rather have only two assignable CCs (16 and 17), and replace C and D by breath controller and expression pedal.
I was planning on using them more in the future, having them non consecutive values would make my setup more difficult.
The caveat is that the Shruthi-1 codebase expects kAssignableCcA, kAssignableCcB, kAssignableCcC, kAssignableCcD to have consecutive values, so you need to change the 4 of them ; for example to 2, 3, 4, 5. Not a big deal if you plan to use only the first one.
Does anyone have the “cc2 as cca” code as a sysex file? I don’t think I’m up to compiling, programming etc. I don’t even know where to start with github.
It seems everything I use on the Shruthi gets cut. I’ll just start my own branch. Shruthi: Curmudgeon