matrixctrl to make a sequencer using data recieved as OSC messages

imthatguy's icon

I know how to receive and unpack OSC messages, and within these messages there are two values: Location and velocity.

I want to use these to make a sequencer with the location being a number (eg. 1-16) with each point being a point on the matrix's grid. I then want the second number which is velocity to impact the loudness of that particular tone/sample being played. (i.e. the sequencer knows how hard to play the tone/sample each time it runs through the sequence)

Mapping the location to a point on the grid is fairly straight forward, however, how to I get the second number to influence that particular samples loudness?

Any suggestions welcome.

Thanks in Advance! :)

Nikolas K's icon

You can check the [matrixctrl] help file. It has a "dial mode" to make the points act like a dial with a user-specified range (probably needs a custom cell image though).

You probably control a [matrix~] with the [matrixctrl] ?
If you specify the point of the [matrixctrl] to have a range of lets say 0-100, and scale that to 0.-1., you can feed these to the [matrix~].
A message like "3 0 0.7" will connect the fourth input the first outlet of the matrix, and apply a gain of 0.7.

Personally, I wouldn't use the [matrixctrl], just feed the values straight to a [poly~] patch. You could use the control value with a "target $1" message to the [poly~].

Hope this helps...
Nikolas

Thinksamuel's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here is a good example of using matrixctrl to route data. Made by Metamax https://cycling74.com/forums/how-to-create-a-matrixcontrol/