since VL has data types, the NotesState outputs all playing notes as a spread of type MidiNote which is more compact than three individual spreads and the data stays together. a MidiNote contains information about note number, channel and velocity. to split that into basic values that vvvv can understand you can use the node Split [MidiNote] in a ForEach loop. something like this:
i got it to work but only with set slice inside of vvvv.
How would it be done inside of VL to set the slices of an spread of zeros?
I think i understand why this is happening because it iterates 8 times through ervery slice of the 3xLinearSpread. But where i stop understanding is how the “BadSpread” is sorted.
the patch is almost correct, not bad for a first contact.
so your ForEach loop will iterate thru all slices of the NotesState output. the set slice is also correct… only the output Splicer is not the right choice here. output Splicers will generate a new spread on the output with as many slices as the loop has iterations. so in your case you output a spread of spread. in the screenshot you see a spread of 6 slices where each slice is your input spread with 28 slices.
but what you want it the same spread as you put it. for that an Accumulator has to be used. it takes an initial value (in your case the original spread of 28 slices) and modifies this value in each iteration and passes it on to the next iteration:
it would also be interesting if this gray book page explains it well for you and if not what is missing:
It is very well written in the gray book and surely understandable.
The only problem is to change my own habit of thinking in the process of patching.
Now that i think i understood spreads a little i have to get used to the system of looping but it`ll be more than worth to wrap my head around it :)
I tried to build it that way but with the node repeat/spread it acknowledges the first pressed button but when i press two or more buttons on my lpd8 the value shifts to the highest slice and every other value is zero again.
Switching from repeat to a linear spread works fine.
Is it because the linear spread is some kind of steady and the repeat spread not?
I dont know if i understood youre question right but i think you want to plug out the Launch Controle xl and plug in again while the program is running?
if thats the case have you tried to switch to another midi input and then back to launch control because?
when using the my akai midi controllers it works when unplugging and plugging back in.
Only the controle xl needs the switching.
here is my launch controle patch