Note counter like device to alternate between values

Questions and discussion about building and using Max for Live devices
Post Reply
valankar
Posts: 33
Joined: Tue Jun 15, 2010 4:20 am

Note counter like device to alternate between values

Post by valankar » Sat Jan 05, 2019 4:14 pm

Bitwig has a "Note Counter" modulator that alternates between values based on incoming notes:

https://www.bitwig.com/en/bitwig-studio ... ators.html

Is there a M4L device that does essentially the same? Basically, I would like to round-robin the chain selector in an instrument rack. Thanks.

hoffman2k
Posts: 14689
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: Note counter like device to alternate between values

Post by hoffman2k » Sat Jan 05, 2019 7:28 pm

The Borax object keeps count of the current "voices". So you could use it to achieve what you want. The only problem would be that the notes probably would be faster than you could change the chain selector with the API. The workaround to the problem requires a virtual MIDI driver, so you can send a CC from a device out of a Track to Live's remote mapping. (or delay the note output based on when the chain is changed)

hoffman2k
Posts: 14689
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: Note counter like device to alternate between values

Post by hoffman2k » Sun Jan 06, 2019 3:50 pm

Had a test, the API latency is between 1ms and 10.67ms on my system. Averages to about 3ms per note switch.
Although, I may be messing with something different than you asked for. Do you want an actual round-robin with a fixed amount of steps or rather something that follows the voices? (eg. Voice 1 is an operator, voice 2 a sampler on chain 2, etc..)
And are you just sending notes? Or want to use pitchbend, mod and aftertouch too?

hoffman2k
Posts: 14689
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: Note counter like device to alternate between values

Post by hoffman2k » Sun Jan 06, 2019 4:59 pm

https://we.tl/t-7TTsrzVBxQ

Quick and dirty. More of a proof of concept. Just passes the notes after selecting a chain.
Chain 0 does nothing. Voice 1 is Chain 1, Voice 2 is Chain 2, etc...
There's still a bug somewhere, because I get occasional hanging notes. (click Transport stop twice to stop hanging notes)
I reckon using a virtual MIDI port would be the way to go. The latency should be lower and consistent.

valankar
Posts: 33
Joined: Tue Jun 15, 2010 4:20 am

Re: Note counter like device to alternate between values

Post by valankar » Sun Jan 06, 2019 5:52 pm

Thanks for the device.

Actually what I meant was cycling through chains for each MIDI note. So for example, with 2 chains:

C3 -> Chain 1
C3 -> Chain 2
D3 -> Chain 1
...

Your device seems to be for polyphony, with the 2nd chain coming in only when 2 notes are pressed at the same time.

hoffman2k
Posts: 14689
Joined: Tue Jun 15, 2004 6:40 pm
Location: Belgium
Contact:

Re: Note counter like device to alternate between values

Post by hoffman2k » Sun Jan 06, 2019 6:10 pm

valankar wrote:Thanks for the device.

Actually what I meant was cycling through chains for each MIDI note. So for example, with 2 chains:

C3 -> Chain 1
C3 -> Chain 2
D3 -> Chain 1
...

Your device seems to be for polyphony, with the 2nd chain coming in only when 2 notes are pressed at the same time.
Yes indeed. You got me thinking about this feature and if I get it working, Aftertouch, PB and Mod should effect the last note played. Meaning you could record at least 3 dimensions of an MPE controller in a single clip.
I once made a round-robin rack before the MFL days, though you had to set the sequence in advance and it progressed if you played C1.
The Rack was set up to output MIDI, but you could always add it inside an instrument Rack instead if you want different instruments on the chains.

http://covops.dreamhosters.com/uploads/ ... 16.adg.zip

valankar
Posts: 33
Joined: Tue Jun 15, 2010 4:20 am

Re: Note counter like device to alternate between values

Post by valankar » Sat Jan 26, 2019 8:31 am

This is another example of what I'm looking for:

http://blamsoft.com/rack-extensions/pol ... stributor/

It has a random mode that can select a different device for each note.

chapelier fou
Posts: 4915
Joined: Mon May 15, 2006 12:15 pm

Re: Note counter like device to alternate between values

Post by chapelier fou » Sat Jan 26, 2019 11:41 am

I am working on such a voice distribution system with several modules. Hopefully I will share soon, so be patient !
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

Post Reply