nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 17, 2018 10:05:39 GMT
Hi ki, Originally I thought doing an inject was impossible in an AU environment, since a plugin cannot feed events into the hosts's routing engine. However, I am now thinking I may have a way of implementing inject internally, so it is possible this will appear in a future version. Depends how many requests I get for that! :-) Regards, Nic.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 17, 2018 10:28:38 GMT
Hi tja , So we are up to v6... (I did find a problem) # tja autobass v6 by audeonic IF LOAD # K0 = bass channel (0-F) # K1 = latency/min. note length # K2 = source events 0=pass/1=delay/2=block ASS K0 = 3 1 0
MAT I0 = K0 + 1 SET LB0 I0 +D
# L80 currently sounding # bass note (80 == none) ASS L80 = 80 SET LB1 S--
# L0-7F table of all source notes # sounding (initialise to 0) ASS I0 = 0 IF I0 < 80 +L ASS LI0 = 0 MAT I0 = I0 + 1 END END
# handle source notes 9X XX 00 = 8X IF MT < A0 # set L entry, assume note off ASS LM1 = 0 IF MT == 90 ASS LM1 = M2 END
# wrap bass into sysex and inject+delay MAT I0 = MT + K0 SND F0 7D I0 M1 M2 F7 +I +DK1 END
# handle injected bass notes IF M0 == F0 7D # copy type into I0 for compare MAT I0 = M2 - K0
# is it a note on? IF I0 == 90 # find the lowest sounding note currently # store it into I3 ASS I2 = 0 80 IF I2 < 80 +L IF LI2 > 0 ASS I3 = I2 ASS I2 = 80 END MAT I2 = I2 + 1 END
# the lowest note is in I3 # if it is lower than L80 then # replace L80 with it IF I3 < L80 IF L80 < 80 MAT I1 = 80 + K0 SND I1 L80 00 END
# sound new bass+mark SND M2 I3 M4 ASS L80 = I3 SET LB1 L80 +N END END
# is it a note off? IF I0 == 80 # is this our current bass? IF M3 == L80 # turn off current bass+mark MAT I1 = 80 + K0 SND I1 L80 00 ASS L80 = 80 SET LB1 S—
# do we have any higher sounding notes? MAT I2 = M3 + 1 IF I2 < 80 +L IF LI2 > 0 # found higher sounding note, turn on # new bass note MAT I1 = 90 + K0 SND I1 I2 LI2
# mark new bass note ASS L80 = I2 SET LB1 L80 +N ASS I2 = 80 # terminate loop early END MAT I2 = I2 + 1 END END
END
# block the sysex XX = XX +B END
# source event logic IF K2 > 0 IF ML == 3 IF K2 == 1 SND M0 M1 M2 +DK1 END XX = XX +B END END
Regards, Nic Attachments:Scene-autobass6.mfr (3.13 KB)
|
|
tja
Converser
Posts: 44
|
Post by tja on Aug 17, 2018 11:00:17 GMT
Hi tja , Thanks for confirmation. That's definitely v5! Let me look further into this. What I mean by passing is that the original notes from MidiSteps/ChordFlow pass through the autobass module and into Cubasis. If you ASS K0 = 3 1 2 then these original notes will be blocked by the module and not forwarded to Cubasis. Regards, Nic. They would be passed also on channel 4? Or some other channel?
|
|
tja
Converser
Posts: 44
|
Post by tja on Aug 17, 2018 11:09:36 GMT
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 17, 2018 11:12:26 GMT
Hi tja , Thanks for confirmation. That's definitely v5! Let me look further into this. What I mean by passing is that the original notes from MidiSteps/ChordFlow pass through the autobass module and into Cubasis. If you ASS K0 = 3 1 2 then these original notes will be blocked by the module and not forwarded to Cubasis. Regards, Nic. They would be passed also on channel 4? Or some other channel? The original notes will issue with whatever channel they were sent in with. The bass notes are issued on channel 4 (which can be changed of course) Regards, Nic.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Aug 17, 2018 11:13:55 GMT
Niccccccccc!!!! You nailed it!!!! Great news - I knew we would get there in the end. Really appreciate all your help with testing and patience with my bumbling around with this! (to be fair, there was some complexity involved) Regards, Nic.
|
|
tja
Converser
Posts: 44
|
Post by tja on Aug 17, 2018 11:17:16 GMT
That was a pleasure!
And your support, interest and dedication as well as your skill are sheer unbelievable!
Many, many thanks!
|
|
|
Post by daner on Nov 17, 2018 20:35:51 GMT
I’m interested in having this code for streambyter, is that possible? Also it would be cool to have option to choose which note of chord is chosen to send to the bass channel. Would be similar to have a drop 2, 3 voicing.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Nov 19, 2018 11:19:56 GMT
Hi daner , Unfortunately, the above code uses the one feature that the MidiFire Stream Byter module has that the StreamByter AUv3 does not have: event injection. Thus the code above won't work. I am looking at adding the event injection feature to the AUv3 so it may work in the future. Selecting the 2nd or 3rd lowest note would need a bit of work in that code. Just looking at that code makes me think this would be a bit tricky... and as you can see, getting it to work took a lot of effort to start with! Regards, Nic.
|
|
|
Post by daner on Jan 7, 2019 10:17:46 GMT
Hi daner , Unfortunately, the above code uses the one feature that the MidiFire Stream Byter module has that the StreamByter AUv3 does not have: event injection. Thus the code above won't work. I am looking at adding the event injection feature to the AUv3 so it may work in the future. Selecting the 2nd or 3rd lowest note would need a bit of work in that code. Just looking at that code makes me think this would be a bit tricky... and as you can see, getting it to work took a lot of effort to start with! Regards, Nic. Hey Nic, OK fair enough, if you do add event ejection to SB please let me know. Cheers
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jan 7, 2019 10:35:47 GMT
Hi daner, Well, as it happens I did add event injection to the last release of the AU. In theory then, the above should work with the AU, but I have not tried it myself. Regards, Nic.
|
|
|
Post by daner on Jan 12, 2019 12:56:11 GMT
Hi daner , Well, as it happens I did add event injection to the last release of the AU. In theory then, the above should work with the AU, but I have not tried it myself. Regards, Nic. Nic you are totally awesome the code works with the AU. Just to check you say choice of bass note option would be very complex to implement correct?
|
|
|
Post by daner on Jan 12, 2019 12:59:03 GMT
Oh and which part of the code do I need to change to lower the bass note by an octave?
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jan 14, 2019 15:17:08 GMT
Hi daner , Try replacing this: # sound new bass+mark SND M2 I3 M4with # sound new bass+mark # transpose down by 1 octave if possible IF I3 >= 0C MAT I3 = I3 - 0C END SND M2 I3 M4Regards, Nic.
|
|
|
Post by beng13 on Mar 19, 2019 13:29:20 GMT
Hi Nic,
thanks for your script !
I was wondering if there was a way to chain your module (put a second identical module in output of your module) in order to be able to send each note of the chord to a different channel; for this, you only need to send only the lowest note to the selected channel and not forward it to the next module. Now in the next module, you apply your script again with another channel and it should detect the « second lowest note » as the first one has not been forwarded.
Do you think it make sense?
If yes, then chaining 4 modules would allow to send each note of a 4 notes chord to a different channel.
Thank you
|
|