Midi Polyphony / Chord Splitter

Edit: Now solved, please don’t worry! Just a few silly mistakes!

Hi all

I’m a newbie here. I need a little bit of help finishing my first preset (see attachment). Its very simple, just two translators, Note On and Note Off.

I am trying to split the midi polyphony from one channel, and separate it as individual monophonic notes on separate channels on the midi output. Up to 8 notes of polyphony. I’m not trying to do anything fancy regarding note stealing. In an ideal world the lowest note would be outputted on channel 1 and ascending channels up to the highest note.

e.g if there was a 4 note chord on channel 1 of the midi input, for example CEGB
the notes get outputted to channels 1-4 of the midi output in the following way
Channel 1 = C
Channel 2 = E
Channel 3 = G
Channel 4 = B

I’m a first time user of MTP. I’ve spent a number of hours studying @FlorianBome 's preset for Channel Rotation (here). Learning how this sort of thing works. And then had a go at writing my own rules based on what I’ve learnt.

At the moment its not working properly and could do with a bit of help. Currently all Note On messages output messages are being sent with midi note value 0. e.g income midi note 60 is being outputted at 0. Which is obviously not desired. I think its something to do with how I’m dealing with variable notes.

Would any experienced user be able to have a look at my code and push me in the right direction please? Or even finish it off! :wink: Or if such a preset already exists online please do let me know where I can get a copy of it.

Help much appreciated. Thank you!

chordsplitter v1.bmtp (3.7 KB)

See edit: managed to solve it now! A few silly mistakes. Needs testing properly, but think I’ve got it working now.

I’m glad you got it working. I haven’t looked at your project but it sounds a bit tricky. Chord evaluation is not always easy as the user may not press all of the keys at the exact same time which means you have to give a bit of time before evaluating the notes pressed.

Steve Caldwell
Bome Customer Care

Also available for paid consulting services: bome@sniz.biz

Hi Steve

Thanks for the response. Yes I can see how that could get tricky if you have to code in some sort of buffer time to evaluate the notes. I’ve opted for a simple design, its a first in, first out system. So notes get allocated to channels in the order they’re pressed. Which only if all the notes of the chord are programmed to start together, they get allocated in order of pitch low to high. Quite often I’ll use pre-programmed midi so this is fine for me. But you’re right, if its a pianist playing, the notes will just get assigned to a vacant output channel in the order the keys are held down. I’ve tried various max devices in ableton to do this, but was experiencing big CPU spikes on chord changes causing audio dropouts so not a workable solution.

If anyone is interested, once I’ve done more testing I’ll attach the project here.


1 Like