Forum

Convert spread of Midi messages to value spread

vl

#1

I’m trying to get Midi input from an Akai LPD8 in vvvv via a vl plugin.

I can get the rotaries with ControllersState and select the numbers using a spread with their indices. This returns a spread with the current value of all rotaries. Perfect!
image

I’m now wondering how that works for the pads? They are sending Note messages instead of Controller messages. NotesState sounds like the right node but it returns a spread of Midi notes only of the pads pressed. So the spread can have between 0 and 8 slices. Just like the ControllerState node, I would like to output a spread with 8 slices (one for each pad) with each either 0 or 1 as a value instead. How can I do that?

I’m still a bit overwhelmed by all the different regions and versions of the nodes in VL. Also is there some simple MidiIn example that I missed?

Thanks!


#2

for this you can create a dictionary from note number to boolean (or velocity, if you want). then update the values in the dictionary when notes are playing:

image
VVVV.Spreads.IsNoteOn.vl (16.6 KB)


#3

Just in case it´s simpler for you… you can also set the pads to send CC´s.

https://www.akaipro.com/amfile/file/download/file/677/product/40/


#4

@tonfilm, thanks a lot! This really helped, is exactly what I was looking for and answered all my questions.

Though I have to say I would have never found this solution myself. E.g. Just to make sense of this I tried to find this particular version of FromSequnce but didn’t have much luck. It’s hard for me to understand what this region is doing in general but there are also many different versions and I don’t know what the differences are.
Where can I find the documentation of these regions to learn more about it? Thanks.

Also, I recognized this error though when opening the patch and choosing the Midi input:
image

@Meierhans, thanks for this. I know about this possibility but don’t like to change the controller configuration for every project.