zl.stream help
This is probably a stupid question, but why isn't multiple notes showing up in the message, when more than one note are held down?
Three things to remember:
1. Only one thing ever happens at a time
2. note numbers are not continuously output
3. zl objects do not keep a list in memory once they have dumped it out
Think of it step by step
-- hold down note 1
-- pitchval goes to pipe (1 value)
-- number of notes held down (1) goes to zl stream
-- pitchval goes to zl.stream
-- number of notes held down == number of note numbers in zl.stream, so first note value outputs
-- Hold down note 2
-- pitchval goes to pipe (1 value)
-- -- number of notes held down (2) goes to pipe
-- pitchvalr goes to zl.stream
-- number of notes held down (2) < number of note numbers in zl.stream, so nothing happens
/M
"— — number of notes held down (2) goes to pipe"
I don't understand this. Number of notes isn't connected to the pipe?
Typo, sorry.
the point is that Borax only outputs the last note played. Once the first note is output, when the list length is 1, the number of events accumulated in the zl.stream will always be one less than the listlength you're setting. If what you want is a list of all held notes every time you play one, you will need to store the notes somewhere, and maintain their played/off state. There's probably a more elegant way to do this, as I'm still having my coffee, but look at the example below.
\M
very helpful! thanks!
No problem.