nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 16, 2018 7:52:40 GMT
Hi tja , Thanks for all that information! From the GigRig dump I can confirm that ChordFlow sends the note events in random order with each chord. This is therefore going to produce those tiny artefacts because of the logic in the script where when the current bass note is released, the next highest note starts sounding. Take this sequence of events as an example: 0:00 C3 on 0:00 E3 on 1:00 C3 off 1:00 E3 off 1:00 D3 on 1:00 F3 on 2:00 D3 off 2:00 F3 off At 1:00, the following happens: - C3 is turned off and E3 is turned on as it is now the lowest note - D3 is then received almost immediately, is the new lowest note so turns off E3 and turns on D3 So you get that tiny moment when E3 is the lowest note and the artefact event. At 2:00 this does not happen, because the highest note is turned off first. What this means is that your source events need to always turn on the lowest note first and turn off the highest note first for the algorithm in the script not to generate artefacts. I've understood this to be the case from the start when you first reported it. The issue that does perplex me is the one you showed where the note off was mysteriously extended and overlapped. I cannot explain this. Right, so what are the options here: 1. Accept that these artefacts occur and make sure the sound's ADSR settings are set in such a way that the tiny events are not heard. 2. Make sure the source sends chords as lowest note first/lowest note last. 3. Remove the logic in the script that autosounds the next lowest note when the current lowest note stops. In this case things will work better but if chords overlap then the 2nd chord's bass note will not sound. 4. Try and filter out the nasty tiny notes afterwards with a second Stream Byter. This might be tricky and will introduce some (admittedly very small) latency. 5. Maybe the existing autobass script's lowest note autosound algorithm can be improved to workaround this. Let me think on points 4 and 5 today. Regards, Nic.
|
|
tja
Converser
Posts: 44
|
Post by tja on Aug 16, 2018 8:24:02 GMT
I'm again impressed in your analysis and speed. Thanks a bunch!
I will also contact the ChordFlow developer with this information.
What irritates me is, that also modstep produced artifacts,so that this will be the same behavior - something I did not expect from such a solid MIDI App.
|
|
tja
Converser
Posts: 44
|
Post by tja on Aug 16, 2018 8:44:33 GMT
Ah, and about the longer note we saw earlier, I think that this came from a different MIDI file where the chords first did go up and then down. In my later tests, they only did go up.
I will repeat this, trying to reproduce.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 16, 2018 9:19:06 GMT
Hi tja , OK, some good and bad news! I had a brainwave in the shower (where all my brainwaves happen) and I think I can resolve the artefacts issue. This will only work in MidiFire (not the AUv3 - that is the bad news) as I'm using the inject feature. Here is how it works (if you're interested) - Instead of sending the bass note directly, I wrap it in a sysex message and inject it with a 1ms delay. This gets fed back into the autobass Stream Byter. - When the Stream Byter receives the wrapped/injected message, it checks to see if the note is actually still sounding as it may have already been turned off. - If it is still sounding, it sends the note on. - All other events are delayed by 1ms, so there is a 1ms latency but this is not going to be noticeable. - There is extra logic to suppress the note offs of a tiny artefact too. Attached is a new version of the scene that you can merge in and point ChordFlow at the autobass Stream Byter. Do not remove the MidiFire virtual port - this is used to deliver the wrapped events. This is working for me - I am not getting any artefacts. Regards, Nic.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 16, 2018 9:23:05 GMT
Here is the code:
# tja autobass v2.1 by audeonic IF LOAD # K0 = bass channel (0-F) # K1 = latency/min. note length ASS K0 = 3 1
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 # via inject IF L80 < 80 MAT I0 = 80 + K0 SND F0 7D I0 L80 00 F7 +I +DK1 END
# inject new note on on bass channel MAT I0 = 90 + K0 SND F0 7D I0 M1 M2 F7 +I +DK1
# 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 IF JM1 == 1 # also turn off bass channel (inject) MAT I0 = 80 + K0 SND F0 7D I0 M1 00 F7 +I +DK1 ASS L80 = 80 SET LB1 S-- END
# 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 (via inject) MAT I0 = 90 + K0 SND F0 7D I0 I1 LI1 F7 +I +DK1
# 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
# injected note on/off IF M0 == F0 7D IF M2 < 90 # wrapped note off IF JM3 == 1 SND M2 M3 M4 END ASS JM3 = 0 END IF M2 >= 90 # wrapped note on # default to not sounding ASS JM3 = 0 # only sound bass note if source # is still sounding IF LM3 > 0 # send note on/off now SND M2 M3 M4 # mark that we sounded the note ASS JM3 = 1 END END
# block the internal sysex message XX = XX +B END
# delay all events by latency IF ML == 3 SND M0 M1 M2 +DK1 XX = XX +B END
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 16, 2018 9:37:01 GMT
I will also add that this new version does not work quite so well with manual playing due to the 1ms latency being too small. We may need to adjust the latency value in any case depending upon how you get on with this version. What we are doing might seem simple on the surface but actually it's quite complex to do.
EDIT - might need a bit more work - I am getting stuck notes if I play two notes together on a manual keyboard. I think I'm on the right track, just need a bit more refinement.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 16, 2018 12:20:08 GMT
Hi tja , OK, I have refined this some more and this (autobass 2.1 - code above updated) seems to be working much better for me. Please ignore the scene above (I have deleted it anyway) and use this one instead: Regards, Nic. Attachments:Scene-autobass.mfr (3.08 KB)
|
|
tja
Converser
Posts: 44
|
Post by tja on Aug 16, 2018 13:08:01 GMT
Could not test so far, too much work... Will report back later!
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 16, 2018 13:49:31 GMT
No hurry at all!
I have thought of some other improvements (sometimes extra note offs are sent but these are harmless if the note is not already sounding)
I will see how this new version works before making any further changes. If it works well enough it is probably not worth the effort.
Regards, Nic.
|
|
tja
Converser
Posts: 44
|
Post by tja on Aug 16, 2018 18:18:57 GMT
Now, Nic :-) This looks quite good already, but not yet perfect! There is one small artifact in upper right. Cubasis MIDI attached - both tracks OK, or better just the resulting track?
|
|
tja
Converser
Posts: 44
|
Post by tja on Aug 16, 2018 18:28:01 GMT
I then tried again with chords going up and then down again, but already at what ChordFlow produced, there is something wrong.
|
|
tja
Converser
Posts: 44
|
Post by tja on Aug 16, 2018 18:34:39 GMT
Created a new ChordFlow progression. Strange results. I think I will try again with some other Sequencer
|
|
tja
Converser
Posts: 44
|
Post by tja on Aug 16, 2018 18:35:15 GMT
And the Cubasis MIDI from the above
|
|
tja
Converser
Posts: 44
|
Post by tja on Aug 16, 2018 18:50:37 GMT
Finally, i used Xequence instead of ChordFlow and this looks good:
|
|
tja
Converser
Posts: 44
|
Post by tja on Aug 16, 2018 19:11:16 GMT
I think, that much of the problems come from ChordFlow. With Xequence, everything is fine now. Here, i am sending chords to MidiFire and results get played as Slap bass in Cubasis. And th same MIDI will also be send to StepPolyArp and again played within Cubasis as Double bass. Great!!!! Your App, Nic, and your interest and support are beyond any boundary. I’m so happy that i stumbled upon MidiFire :-) Thank you very much!!!
|
|