Page 1 of 1

Multiball and scaled notes?

Posted: 12 Jan 2013 22:33
by oivindi
I want to trigger a Note On every time I touch the ball of a multiball object. This is easy, and I found out how.

However, I also want to scale the Note On, so that when I move the ball up and down the Y axis, it changes notes from, say, 24 to 72 (Midi Note values).

How can this be done? Any suggestions as to where I might begin?

Re: Multiball and scaled notes?

Posted: 13 Jan 2013 18:12
by mat
Hey oivindi,

you can use "custom midi" for note on. In that case you can define the pitch not only to be 60, but to be a variable, e.g. "ballpitch"
create a variable and set it to something like "24 + ceil (Multiball.y*48)"
script not checked, just as idea....
..ceil (if I remember the syntax right) to give you only discret numbers for pitch.

However one problem: Midi does not only need note on, also note off. So you have to define a second custom midi, sending note off. Otherwise you got hung notes if you scrub along the Y axis (all notes turned on, but not turned off). The pitch for note off has also to be defined and here it gets a little tricky: It should be the pitch of that Y-axis area you are just leaving while moving the finger (so it is not the same as ballpitch and not necessarily "ballpitch-1").....well... in max/msp note events are defined including note on and off which makes that problem much easier. But midiprotocol alway wants note off with correct pitch.
In case you use percussive or drumsounds that noteoff problem is not so important (hung notes does not sound).

Hope that helps a little,
greetings
mat