Let's say you have a chord (2 notes or more) and the notes arrive in a particular order. By the time you have figured out the lowest note, then what do you do if that note is already sounding? And how long do you wait before knowing all notes in the chord have arrived?
I think the only reliable way this could be done would be to always remap the first note played in a chord to the low note channel. This means the player has to choose which note is going to the bass channel by playing it first in the chord. Maybe this is or isn't acceptable. I don't know, but I think that would work.
With one caveat - if you then start playing single notes, each will go to the low channel - again this may not be what is wanted.
Alternatively, we could remap the *second* note of a chord to the bass channel. This might be more tricky for the player to control but it would solve the above caveat.
Before I try and come up with something, it would be useful to know which approach would be best out of the above.
Yes, I think I understand. Let me see if I can come up with something tomorrow (European time) for you.
Are you using MidiFire or the StreamByter AUv3? If the latter, I'll probably need you to install the latest version from TestFlight as there is a bug and I know I'm going to need to use loops (which the bug affects).
Well, not knowing much about how you are working it is hard to say. MidiFire is a standalone app and has lots more features including the Stream Byter as a built in module. the AUv3 is just the Stream Byter module. Both should work for what you want to do. How about you PM me an email address I can use for Apple TestFlight and I will give you access to both MidiFire and the AUv3 and you can try both out. TestFlight version of MidiFire is same as App Store and the AUv3 in TestFlight has a few bugs fixed that you will probably need for this anyway.
In the meantime, here is the code you will be able to copy/paste to try out: (works for me)
See post below for MidiFire scene that can be downloaded instead of copy/paste
# tja autobass by audeonic IF LOAD # K0 = bass channel (0-F) ASS K0 = 3 MAT I0 = K0 + 1 SET LB0 I0 +D
# L80 currently sounding # lowest note ASS L80 = 80 SET LB1 S--
# L0-7F table of all sounding # notes (initialise to 0) ASS I0 = 0 IF I0 < 80 +L ASS LI0 = 0 MAT I0 = I0 + 1 END END
9X XX 00 = 8X IF MT == 90 # note on, mark as sounding (store velocity) ASS LM1 = M2
IF M1 < L80 # new low note, turn off current bass first IF L80 < 80 MAT I0 = 80 + K0 SND I0 L80 00 END
# send new note on on bass channel MAT I0 = 90 + K0 SND I0 M1 M2
# save and mark ASS L80 = M1 SET LB1 L80 +N END END
IF MT == 80 # note off, mark as silent ASS LM1 = 0
# is this the current bass note? IF M1 == L80 # also turn off bass channel MAT I0 = 80 + K0 SND I0 M1 00 ASS L80 = 80 SET LB1 S--
# see if another higher note is sounding MAT I1 = M1 + 1 IF I1 < 80 +L IF LI1 > 0 # found higher sounding note, turn on # new bass note MAT I0 = 90 + K0 SND I0 I1 LI1
# mark new bass note ASS L80 = I1 SET LB1 L80 +N ASS I1 = 80 # terminate loop early END MAT I1 = I1 + 1 END END END
The bass channel number is configured at the top of the script (ASS K0 = 3) and is currently set to channel 4. The left block label will show the current bass channel and the right hand label will show the currently sounding bass note.
Here is the autobass script packaged into a MidiFire scene that you can download and install into MidiFire. Just use the 'Merge' button to add the module to the canvas for use with your own input and outputs.
Hmm, those tiny events in the 2nd track are a clue to what is going on. When the incorrect long note off occurs we can see there is other activity (tiny events) in that period that should not be there at all.
Is it possible for you to export those two tracks out of cubasis into (preferably) two .MID files, one for each track and then I can examine the actual events. I think this is something to do with the way ChordFlow is sending them.
I just tested everything with a manual keyboard - in this situation the script performed correctly. Also with the original ChordFlow .MID file I should be able to pipe that in myself and see if I can reproduce it.
Don't worry about the quantise test. I was wondering whether Cubasis was setup to quantise on input and it was Cubasis that was extending the note. I don't think this is the case.