Page 1 of 1

Midi Note Priority

Posted: Wed Jan 25, 2017 8:49 pm
by Andreas Ruland
Hello,
I'm currently using FL Studio 12 where Flowstone is integrated and what I wanted to do is to create a plug-in which has "Low-Note" or "High-Note Priority" because I couldnt find anything in the Internet.
So if I play any note on my MIDI keyboard (i.e. C4) every higher note should be disabled as long as C4 is played. If I release C4 every note should be playable again. The notes below C4 shouldn't be affected
I'm really new to coding so I don't really know what to do :?

Hope you can help me :/

Re: Midi Note Priority

Posted: Tue Jan 31, 2017 11:06 am
by tulamide
You need to store the state of the last note. You only know the incoming note, so at the very start the first note will be the "priority note". Store it in a variable and compare the next note with it. If higher, don't play, if lower play. As soon as the note off signal from the "priority note" comes in (caution: can be 144 with velocity 0 OR 128), clear the content of the variable to fill it with the next note.

Re: Midi Note Priority

Posted: Thu Feb 02, 2017 9:11 pm
by Andreas Ruland
Thanks for your reply!

But I dont really know how to compare values :/

Do you have any example fsm files you can show me which covers this topic?

I would appreciate it thx :)

Re: Midi Note Priority

Posted: Fri Feb 03, 2017 5:32 pm
by tulamide
I'm sorry, but I'm too busy with my own projects currently. Maybe someone else will chime in?

Re: Midi Note Priority

Posted: Sun Feb 05, 2017 7:53 pm
by Walter Sommerfeld
Hi Andreas,

I'm too busy 2... but maybe this little gem from nubeat7 gives u a hint:

or this: http://www.dsprobotics.com/support/viewtopic.php?f=3&t=3294&p=17614#p17605

Re: Midi Note Priority

Posted: Mon Feb 06, 2017 6:04 pm
by Andreas Ruland
Thanks for your help!

I think this is a keyboard split right?

Ok I think some programmers here will call me crazy x) but after a few days of googling I found that "priority queue" thing and the way I did it works but is totally buggy and I think there gotta be a much easier way.^^

Hope you can help me :)