|
Post by jasonmidas1 on Mar 29, 2015 21:18:44 GMT
Hi i need to create some code to reverse controllers for drawbars what I need is, on channels 2-5, continuous controllers 3-11 0-127 values to be reversed i.e high =0, low =127
given the sparse documentation for the app I've not been able to figure this out, it should be really simple?
thanks
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 30, 2015 9:33:37 GMT
Hi jasonmidas1, In defence of the 'sparse' documentation, the inbuilt manual for MidiBridge is the definitive specification of the Stream Byter language and as such it is quite concise. There is an Stream Byter guide available which may be of use also. Unfortunately what you want to do isn't exactly straight forward and a little outside the limits of what the (current) Stream Byter was created to do. Nevertheless it can be done. Please copy/paste the following rules into the Stream Byter edit box on the port you wish to manipulate: # jasonmidas1 - reverse CCs 3-1 on CHs 2-5 A1-4 03-0B = XX +B B1-4 03-0B 00 = AX XX 7F B1-4 03-0B 01 = AX XX 7E B1-4 03-0B 02 = AX XX 7D B1-4 03-0B 03 = AX XX 7C B1-4 03-0B 04 = AX XX 7B B1-4 03-0B 05 = AX XX 7A B1-4 03-0B 06 = AX XX 79 B1-4 03-0B 07 = AX XX 78 B1-4 03-0B 08 = AX XX 77 B1-4 03-0B 09 = AX XX 76 B1-4 03-0B 0A = AX XX 75 B1-4 03-0B 0B = AX XX 74 B1-4 03-0B 0C = AX XX 73 B1-4 03-0B 0D = AX XX 72 B1-4 03-0B 0E = AX XX 71 B1-4 03-0B 0F = AX XX 70 B1-4 03-0B 10 = AX XX 6F B1-4 03-0B 11 = AX XX 6E B1-4 03-0B 12 = AX XX 6D B1-4 03-0B 13 = AX XX 6C B1-4 03-0B 14 = AX XX 6B B1-4 03-0B 15 = AX XX 6A B1-4 03-0B 16 = AX XX 69 B1-4 03-0B 17 = AX XX 68 B1-4 03-0B 18 = AX XX 67 B1-4 03-0B 19 = AX XX 66 B1-4 03-0B 1A = AX XX 65 B1-4 03-0B 1B = AX XX 64 B1-4 03-0B 1C = AX XX 63 B1-4 03-0B 1D = AX XX 62 B1-4 03-0B 1E = AX XX 61 B1-4 03-0B 1F = AX XX 60 B1-4 03-0B 20 = AX XX 5F B1-4 03-0B 21 = AX XX 5E B1-4 03-0B 22 = AX XX 5D B1-4 03-0B 23 = AX XX 5C B1-4 03-0B 24 = AX XX 5B B1-4 03-0B 25 = AX XX 5A B1-4 03-0B 26 = AX XX 59 B1-4 03-0B 27 = AX XX 58 B1-4 03-0B 28 = AX XX 57 B1-4 03-0B 29 = AX XX 56 B1-4 03-0B 2A = AX XX 55 B1-4 03-0B 2B = AX XX 54 B1-4 03-0B 2C = AX XX 53 B1-4 03-0B 2D = AX XX 52 B1-4 03-0B 2E = AX XX 51 B1-4 03-0B 2F = AX XX 50 B1-4 03-0B 30 = AX XX 4F B1-4 03-0B 31 = AX XX 4E B1-4 03-0B 32 = AX XX 4D B1-4 03-0B 33 = AX XX 4C B1-4 03-0B 34 = AX XX 4B B1-4 03-0B 35 = AX XX 4A B1-4 03-0B 36 = AX XX 49 B1-4 03-0B 37 = AX XX 48 B1-4 03-0B 38 = AX XX 47 B1-4 03-0B 39 = AX XX 46 B1-4 03-0B 3A = AX XX 45 B1-4 03-0B 3B = AX XX 44 B1-4 03-0B 3C = AX XX 43 B1-4 03-0B 3D = AX XX 42 B1-4 03-0B 3E = AX XX 41 B1-4 03-0B 3F = AX XX 40 B1-4 03-0B 40 = AX XX 3F B1-4 03-0B 41 = AX XX 3E B1-4 03-0B 42 = AX XX 3D B1-4 03-0B 43 = AX XX 3C B1-4 03-0B 44 = AX XX 3B B1-4 03-0B 45 = AX XX 3A B1-4 03-0B 46 = AX XX 39 B1-4 03-0B 47 = AX XX 38 B1-4 03-0B 48 = AX XX 37 B1-4 03-0B 49 = AX XX 36 B1-4 03-0B 4A = AX XX 35 B1-4 03-0B 4B = AX XX 34 B1-4 03-0B 4C = AX XX 33 B1-4 03-0B 4D = AX XX 32 B1-4 03-0B 4E = AX XX 31 B1-4 03-0B 4F = AX XX 30 B1-4 03-0B 50 = AX XX 2F B1-4 03-0B 51 = AX XX 2E B1-4 03-0B 52 = AX XX 2D B1-4 03-0B 53 = AX XX 2C B1-4 03-0B 54 = AX XX 2B B1-4 03-0B 55 = AX XX 2A B1-4 03-0B 56 = AX XX 29 B1-4 03-0B 57 = AX XX 28 B1-4 03-0B 58 = AX XX 27 B1-4 03-0B 59 = AX XX 26 B1-4 03-0B 5A = AX XX 25 B1-4 03-0B 5B = AX XX 24 B1-4 03-0B 5C = AX XX 23 B1-4 03-0B 5D = AX XX 22 B1-4 03-0B 5E = AX XX 21 B1-4 03-0B 5F = AX XX 20 B1-4 03-0B 60 = AX XX 1F B1-4 03-0B 61 = AX XX 1E B1-4 03-0B 62 = AX XX 1D B1-4 03-0B 63 = AX XX 1C B1-4 03-0B 64 = AX XX 1B B1-4 03-0B 65 = AX XX 1A B1-4 03-0B 66 = AX XX 19 B1-4 03-0B 67 = AX XX 18 B1-4 03-0B 68 = AX XX 17 B1-4 03-0B 69 = AX XX 16 B1-4 03-0B 6A = AX XX 15 B1-4 03-0B 6B = AX XX 14 B1-4 03-0B 6C = AX XX 13 B1-4 03-0B 6D = AX XX 12 B1-4 03-0B 6E = AX XX 11 B1-4 03-0B 6F = AX XX 10 B1-4 03-0B 70 = AX XX 0F B1-4 03-0B 71 = AX XX 0E B1-4 03-0B 72 = AX XX 0D B1-4 03-0B 73 = AX XX 0C B1-4 03-0B 74 = AX XX 0B B1-4 03-0B 75 = AX XX 0A B1-4 03-0B 76 = AX XX 09 B1-4 03-0B 77 = AX XX 08 B1-4 03-0B 78 = AX XX 07 B1-4 03-0B 79 = AX XX 06 B1-4 03-0B 7A = AX XX 05 B1-4 03-0B 7B = AX XX 04 B1-4 03-0B 7C = AX XX 03 B1-4 03-0B 7D = AX XX 02 B1-4 03-0B 7E = AX XX 01 B1-4 03-0B 7F = AX XX 00 A1-4 03-0B = BX
Note that this hijacks a portion of the aftertouch space on those channels for notes 3 to 11. Note this can also be done using the Holy Mapper module but would require a lot of button pushing... Regards, Nic.
|
|
|
Post by jasonmidas1 on Mar 30, 2015 17:46:48 GMT
Wow, thanks for the reply nic. It's not that unusual an action: drawbars work in reverse to normal faders. So you literally have to put in a rule for every iteration: that's why I couldn't find anything as Im used to using more 'compact' methods that would involve a simple filter (even something as simple as qmidiroute does it), I've used Bomes in the past too, can't remeber how you'd do it in that but it's either in-built or you'd do it algorithmically or in a loop. Thanks again for the help. Control v at the ready 
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 30, 2015 18:21:27 GMT
Hi jasonmidas1, Yes, there is currently no 'maths' in Stream Byter rules, so covering every controller value is the only option. Don't worry though, I didn't write all that stuff manually; generated from a script. It might seem like a lot of rules, but the Stream Byter engine will process those in no time at all. Regards, Nic.
|
|
|
Post by jasonmidas1 on Mar 30, 2015 19:28:45 GMT
Thanks again. Out of interest and for future reference, what does the filter A1 do, I can't seem to find it in the guide?
Cheers
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 30, 2015 19:57:39 GMT
Hi jasonmidas1, That's related to the MIDI spec rather than anything Stream Byter specific. A is for Poly Key Pressure (aftertouch). I'm hijacking a small portion of the aftertouch namespace to temporarily remap the controllers to, because if I just did: B1-4 03-0B 00 = XX XX 7F ... B1-4 03-0B 7F = XX XX 00 Each controller value would be remapped reverse and back, so to prevent any rules further down from matching again after a remap I also change the event type from controller to poly aftertouch. Once the controller value remaps are done, then I have to revert those aftertouch messages back to controller messages. The very first rule is to block that section of aftertouch messages (all aftertouch messages on channels 2 to 5, notes 3 to 11) so that if any aftertouch messages *do* come in they are just thrown away and not converted to controllers. Regards, Nic.
|
|