|
Post by uncledave on Jan 25, 2022 16:57:41 GMT
If you post the changes you're making, I might be able to offer some help. Just be sure to put it between [code] and [/code] brackets so it formats properly.
|
|
|
Post by midijam on Jan 25, 2022 17:32:26 GMT
Yes, I found this before in code: Mat M1 = $10 * J00 , works on all cc124 not on just when PC3 is pressed(cc124 is cc125). So, cc125 I know to change Ass currentCC = $125 , but not sure how give just to this number "Mat M1 = $10 * J00" or "Ass M1 = J00". I tried to change currentCC, no luck yet...
|
|
|
Post by uncledave on Jan 25, 2022 18:29:17 GMT
Yes, I found this before in code: Mat M1 = $10 * J00 , works on all cc124 not on just when PC3 is pressed(cc124 is cc125). So, cc125 I know to change Ass currentCC = $125 , but not sure how give just to this number "Mat M1 = $10 * J00" or "Ass M1 = J00". I tried to change currentCC, no luck yet... It's not a matter of luck. currentCC is just the memory of the last selected mode, chosen by PC3 or a different PC#. You probably don't want to change it If you want to change the CC number that is sent, change Mat M2 = $10 * currentCount in the CC message handler to be Mat M1 = $10 * currentCount This works because M1 is the CC# in the message. Or, if you just want to send 1..12 instead of 10..120, Ass M1 = currentCount What we are doing is taking the input MIDI message, broken into 3 bytes according to the MIDI standard, editing the bytes, and letting SB send the message on out. And you can see how it changes using the SB monitor.
|
|
|
Post by midijam on Jan 26, 2022 4:52:03 GMT
Code is great. Is my fault, that I forget to tell before, that some presets need value numbers(this works 100% OK), some need just CC numbers to change sounds. Trying to solve this:” to leave code as is”:
Mat M2 = $10 * currentCount # change value to 10 times count this works as should, but I would like to add in code also this
Mat M1 = $10 * currentCount this Mat M1 = $10 * currentCount, would "somehow work JUST" on CC125(which is made from cc124 on PC3 press), because now both cc125 and cc124 sending cc10,cc20,cc30….Showing event monitor...Hope I am not complicating too much, i forget, that some presets need value numbers, some need just CC numbers to change sounds as with “next botton”. Then I will be able to save presets correctly.
|
|
|
Post by uncledave on Jan 26, 2022 16:00:39 GMT
This will do it. If MT == B0 # CC message If M1 == $124 # CC 124 Ass M1 = currentCC # change CC#, both press and release If M2 > 0 # on CC124 press, send the new count Mat currentCount = currentCount + 1 # update count If currentCC == $125 Mat M1 = $10 * currentCount # change CC# Else Mat M2 = $10 * currentCount # change CC value to 10 times count End If currentCount >= maxCount # back to start after 12 Ass currentCount = 0 End End End End
You can see that it handles currentCC==125 differently.
You didn't say what should happen to the button release in this mode. Does it need to be the same CC# as the press, or is CC125 OK? If it needs to be the same CC#, we'll need to save it, because currentCount changes before the release comes. Or does it need to be Blocked?
This is why I kept trying to make you explain what you needed. It would have been easier if you had described the full scenario: what the controller can send, and what the app or apps expect. Then I could be sure to handle the various cases. This way, we are trying different things to get closer to the goal, which is still a secret to me.
|
|
|
Post by midijam on Jan 27, 2022 9:12:14 GMT
Awesome, this code is exactly what I need, together with previous one. I can now open close effects with CC VALUE(first code that you made), with new I can load new sequencer loop without problem- after press PC3 and then CC that I choose in upper row on FCB1010 midi-footswitch, works all as should. Wau, I can also move fast between loops, really great, now works just when PC3 is send. So now I have two codes, that will work for what I can imagine, sorry also to me secret  , is a lot of chance what can do now midi foot-switch, this 2 codes are game changer, really will help in creative process. I now need to make midi connections for better workflow. Uncledave where is paypal for coffee?  I have now work with connecting things. I am surprised what I can do with stomp midi controller.
|
|
|
Post by uncledave on Jan 27, 2022 12:02:48 GMT
You can put the new fragment I posted in the original script, replacing the original CC handler (from If MT == B0 down to End). It does the same stuff except for CC125. But you can do as you wish. If you study this with the SB manual you can learn a lot about SB programming. The key thing is to remember that the script runs once for each MIDI message. So it just provides logic to change (edit) that MIDI message.
|
|