Programing help!

coyne's picture

Hi everyone!

This may sound dumb but im really trying to learn but not been in it it for long so here it comes.

What i want to accomplish is that one horisontal line that rises from the bottom to the top of the viewer in something like 10 sec everytime i recieve a midi note.

What i am having problems figuring out is how to get it to send another line if it recieves another instance of the same midi note prior to the time of 10 sec instead of resetting it.

So you would see two lines rising on started rising at the first midi note and the second started rising at the second midi note. Both visible.

In the attached ex. it will always reset it.

Thanks in advance.

best regards Niklas

ps: any tips on where i can read and learn more about all this? Except this great community of course. are there any books? ds.

PreviewAttachmentSize
risingLines.qtz2.71 KB

cwright's picture
Re: Programing help!

for multiple instances of the same thing (same line, in this case), you'll have to use an iterator. You'll want to increment the iteration count each time a midinote happens, and decrement it once the line has finished animating (gone off the screen, faded out, whatever you're doing)

As for books, there's only one published book that I'm aware of, and it's in Japanese (日本語). I think there's another one due out sometime that will be in English.

usefuldesign.au's picture
Re: Programing help!

You need a separate instance of your patch for each of the max. number of lines you want to display at any given time. Either by duplicating your patch or repeating it inside an iterator.

You then need some control logic 'before' this to test for midi in event then send a trigger to appropriate line instance, maybe by keeping count of previous lines and adding a new count then reducing count when line patch has finished (12 sec).

This could be done with a chain of counters and maths expressions and a series of nested multiplexers (like nested if/then/else statements in code) or in a javascript patch where you can output boolean triggers (or ext patch times) for you line patches/iterator. Or even partially inside the iterator patch itself to get tricky.

Don't have MIDI installed at moment otherwise would have a go for you. Happy to look at your attempt if still having probs.

Oh and it's never dumb to try and learn something new (on the condition it is wholesome, which come to think of it QC isn't – it's an addictive curse).

coyne's picture
Re: Programing help!

thanks for the directions. heads up.