Metro and noteout

Aug 19, 2007 at 6:25pm

Metro and noteout

Problem:
Getting a continuous sensor to send only one noteout.

Current situation:
I have a metro going at 500 polling the sensor for the value. I would like it to behave like a keyboard- when the value gets below a certain value- send a bang for noteout and when the sensor value returns to nominal- send the noteoff. Right now I have a ‘< x' and Ggate doing the work but the metro bangs are triggering the note message at the pace of the sensor polling.

Question:

How do I get the sensor to behave like a keyboard and pass the noteon only once and the note off only once dependent on the sensor value?

I am a noob so please go easy on me :)

DvD

#33322
Aug 19, 2007 at 7:21pm

At 12:25 PM -0600 8/19/07, DvD wrote:
>How do I get the sensor to behave like a keyboard and pass the noteon only once and the note off only once dependent on the sensor value?

A lot of different ways to do this. Here’s one:

#P button 118 185 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 74 203 54 196617 onebang 1;
#P newex 74 315 43 196617 noteout;
#P message 74 265 20 196617 60;
#P newex 74 284 88 196617 makenote 64 500;
#P newex 74 159 32 196617 sel 1;
#P user hslider 74 81 18 128 128 1 0 0;
#P newex 74 104 30 196617 < 32;
#P window linecount 4;
#P comment 138 167 81 196617 only allow one note-on until the sensor croses the threshold;
#P user panel 60 152 171 80;
#X brgb 149 249 147;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 5 1 7 1;
#P connect 5 0 7 0;
#P connect 6 0 5 0;
#P connect 9 0 8 1;
#P fasten 4 1 9 0 101 180 123 180;
#P connect 8 0 6 0;
#P connect 4 0 8 0;
#P connect 2 0 4 0;
#P connect 3 0 2 0;
#P window clipboard copycount 10;


Chris Muir | “There are many futures and only one status quo.
cbm@well.com | This is why conservatives mostly agree,
http://www.xfade.com | and radicals always argue.” – Brian Eno

#110861
Aug 19, 2007 at 7:29pm

Thank you but…

I am not sure how to translate this in to a .pat file.

Tried with my handy notepad but it just give me the text back.

DvD < -noob

#110862
Aug 19, 2007 at 7:32pm

Noobs should read the FAQ.

Umm cut/paste? Durrrr.

Thanks again.

D

#110863
Aug 19, 2007 at 7:50pm

hi,
here is another one with lo and hi tresholds for noteon and noteoff :

max v2;
#N vpatcher 310 101 532 462;
#P window setfont “Sans Serif” 9.;
#P message 109 277 26 9109513 60 0;
#P message 36 277 36 9109513 60 100;
#P newex 36 314 43 9109513 noteout;
#P comment 136 151 43 9109513 hi tresh;
#P number 139 167 35 9 0 127 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 36 119 83 9109513 t i i;
#P number 66 167 35 9 0 127 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 93 237 15 0;
#P newex 109 236 28 9109513 sel 1;
#P newex 109 212 40 9109513 change;
#P newex 109 189 40 9109513 < 10;
#P button 20 237 15 0;
#P newex 36 236 28 9109513 sel 1;
#P newex 36 212 40 9109513 change;
#P newex 36 189 40 9109513 > 50;
#P user multiSlider 36 33 27 80 0. 127. 1 2665 47 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P comment 62 151 43 9109513 lo tresh;
#P connect 4 0 5 0;
#P connect 1 0 11 0;
#P connect 11 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 15 0;
#P fasten 16 0 14 0 114 302 41 302;
#P connect 15 0 14 0;
#P connect 10 0 2 1;
#P connect 8 0 9 0;
#P connect 11 1 6 0;
#P connect 6 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 16 0;
#P connect 12 0 6 1;
#P pop;

#110864

You must be logged in to reply to this topic.