Forums > MaxMSP

arithmetic operator to change noteinvelocity to either 1 or 0 (on or off,not pressure sensitive)

September 26, 2007 | 2:45 pm

Helu

Should i use an arithmetic operator to change noteinvelocity to either 1 or 0 (on or off,not pressure sensitive).

What is the simplest way to do this?

Thanks!


September 26, 2007 | 3:01 pm

[> 0]

On 26/09/2007, petterdass wrote:
>
> Helu
>
> Should i use an arithmetic operator to change noteinvelocity to either 1 or 0 (on or off,not pressure sensitive).
>
> What is the simplest way to do this?
>
> Thanks!
>



jln
September 26, 2007 | 3:06 pm

It depends on your situation but something like below should work :

velocity -> [!= 0] -> 0; 1

If velocity does not equal 0 then it’s 1. You could use [>] if you want a threshold or something.

hth,
Julien


September 26, 2007 | 3:13 pm

thanks alot,

but im not yet clever enough to understand how to implement it..:) Now i have a notein where velocity is scaled with an /127 object which is multiplied with the oscillator outputs, but i will prefer to get the output not pressure sensitive as im rendering audio as wavetables for using n external sampler.


September 26, 2007 | 3:34 pm

I think the || operator is spot on :

|| returns 1 if either input is nonzero , 0 otherwise , and && returns one if both inputs are nonzero , 0 otherwise.;


September 26, 2007 | 3:43 pm

it was supereasy..ill try experimenting more before bothering you…

RTFM!! :)


September 26, 2007 | 9:21 pm

petterdass skrev:
> it was supereasy..ill try experimenting more before bothering you…
>
> RTFM!! :)
Generally that is sage advice, for sure.

a.


September 26, 2007 | 11:01 pm

Alternately, [clip 0 1]


September 27, 2007 | 4:10 pm

petterdass wrote:
> Helu
>
> Should i use an arithmetic operator to change noteinvelocity to either 1 or 0 (on or off,not pressure sensitive).
>
> What is the simplest way to do this?
>
#P toggle 102 139 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 86 91 40 196617 notein;
#P number 101 117 35 9 0 1 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P connect 0 0 2 0;
#P connect 1 1 0 0;
#P window clipboard copycount 3;

=)

p
> Thanks!
>
>
>


http://pure.test.at

http://www.heartchamberorchestra.org


September 27, 2007 | 8:05 pm


September 28, 2007 | 1:45 pm


September 28, 2007 | 2:55 pm


October 1, 2007 | 12:20 pm


Viewing 13 posts - 1 through 13 (of 13 total)