|
Post by howard on Feb 14, 2020 20:28:32 GMT
Hi there. I was wondering if I could MidiFire/Stream Byter to help me get CC11 to work properly with SampleTank for iOS. I stopped using SampleTank since it doesn't respond to expression data in the usual way (CC11) where it would adjust the volume of a layer up to the currently set volume amount. Instead Sampletank just responds to volume (CC07) and you can set your expression pedal to adjust volume but that is not very useful. For instance when you set two layers to two different volume amounts and want to use the expression pedal we would expect the layers to stay in relative balance but of course sending CC07 to both layers would set them to the same value. Anyhow, my question on this is whether there is any way for Midifire to do the math on this where it takes an amount set for Volume and then perhaps does a controller value remap of CC11 to CC07. So if I send CC07 127 to the app then CC11 would just remap to CC07 0-127 but if I send CC07 100 I am hoping CC11 would could be remapped to CC07 0-100. Is there any way to do this in MidiFire? Oh gosh, I hope question makes sense to you, Nic!
Thanks
Howard
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Feb 16, 2020 16:11:51 GMT
Hi howard , Right, so you want to rescale CC11 events to the current value of CC7? Something like this (completely untested - just to explain the mechanism) # remember current value of CC7 if M0 == B0 $7 assign L0 = M2 end
# rescale CC11 from 0 to L0 if M0 == B0 $11 calc M2 = M2 * L0 calc M2 = M2 / $127 endRegards, Nic.
|
|
|
Post by howard on Feb 16, 2020 22:33:27 GMT
Thanks, Nic. Very clever. I see that that first part should assign the range based on the value of received for CC07. Then the second set of statements should set the range of CC11 to be from 0 to the value sent for CC07. That makes sense except it didn't work quite right in that CC11 0-126 outputed CC11 0 and CC11 127 sent CC11 1. I have tried playing around with it a bit but I can't seem to get it to work properly where CC07 100 for instance would cause CC11 to then rescale to 0 - 100. Also, ultimately I also want to change the rescaled CC11 to output CC07 since SampleTank doesn't respond to CC11. Could you please have a further look at it when you have a chance, Nic.
|
|
|
Post by howard on Feb 21, 2020 13:56:13 GMT
Ok, after some trial and error I found that this worked:
# remember current value of CC7 if M0 == B0 $7 assign L0 = M2 End
#Scale and convert CC11 to CC07 If M0 == B0 $11 ass L2 = L0 Calc L2 = L2 * M2 Calc M2 = L2 / $127 Ass M1 = 07 End
|
|
|
Post by uncledave on Jun 29, 2020 14:39:42 GMT
Hello nic. This is actually a good catch. The M array contains bytes, so calcs driving the value over FF produce inconsistent results. The OP fixed it by using L2 instead. This might be worth a note in the (otherwise excellent) docs.
BTW, StreamByter seems to have vanished from the US app store. I hope this is just temporary.
|
|