Page 1 of 1

Midi gate counter problem

Posted: Fri Oct 10, 2014 6:43 pm
by zoobooboozoo
Hi all.

I'm implementing midi control by notes for my filter and I'm having a problem.
I want the filter to change (doesn't matter in what way right now) incrementally every time a note is played so the filter would go through 1-stage when the 1st note is played, 2-stage when the 2nd is played etc.
so I used

Code: Select all

Midi in->splitter(changed)->counter->ruby

The problem is I also get an increment whenever a note is let go.

I thought of using:

Code: Select all

midi in->midi to poly->gate->greater than 0->counter->ruby

but the white-poly gate out of the "midi to poly" can't connect to the counter.

any suggestions?

Edit: As expected I managed to solve part of the problem(but not really...) within the code with some comparisons and dividing... it solves the problem in the case of every note having a trigger in the begning and the end but if one note starts in the middle of another the solution is no good.

Re: Midi gate counter problem

Posted: Sat Oct 11, 2014 12:40 am
by Tronic
your filter is for control stream or green part?

Re: Midi gate counter problem

Posted: Sat Oct 11, 2014 11:25 am
by zoobooboozoo
Not sure I totally get the question.
My filter is DSP and there are green floats and one mono in going into it.
Actually, the part of the vst that is interacting with the midi notes is all ruby and floats...

Re: Midi gate counter problem

Posted: Sat Oct 11, 2014 5:06 pm
by oddson
Not sure if this is a factor for what you're doing but many keyboards send Note-on with Velocity=0 instead of note off. That will give you double counting if you're not looking for it.
capture1.png
capture1.png (21.65 KiB) Viewed 11261 times

Re: Midi gate counter problem

Posted: Tue Oct 14, 2014 9:44 am
by zoobooboozoo
Works great so far thanks. (I'll have to figure out some code for chords as well. Maybe one that doesn't count triggers if they arrive at the exact same moment)