Forums > MaxMSP

difficulty triggering SINGLE notes

March 26, 2006 | 1:00 am

Hi,
I’ve just built most of a patch that translates data from a linear accelerometer into MIDI, the problem lies in making the MIDI data usable. Basically the y axis angle of the device (tilt) selects the note, the x axis selects the velocity and then a button on the device opens a gate to let the information into the makenote object. However, the resolution of the accelerometer part, ie, getting the data is high, so when the button is pressed, rather than playing a single note a repated note is played (obviously with this same note getting sent 25 times a second it doesn’t sound too great). Is there a way of getting the button to trigger jstu one note? I’ve tried with the onenote object, and sending a ’0′ message to the gate at a higher rate than the data from the accelerometer is being analysed, but the ’1′ message triggered by the button on the device overrides this.
Anyone have any ideas?
Thanks
Doug Adams


March 26, 2006 | 1:19 am

have you tried [change]?


March 26, 2006 | 1:22 am

like this? or am I missing something?

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 351 207 14 196617 1;
#P number 366 267 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 296 268 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 10 59 610 459;
#P inlet 53 52 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 53 82 52 196617 metro 25;
#P newex 127 120 64 196617 random 127;
#P newex 51 119 64 196617 random 127;
#P outlet 51 141 15 0;
#P outlet 127 142 15 0;
#P connect 4 0 2 0;
#P connect 2 0 1 0;
#P connect 5 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 0 0;
#P pop;
#P newobj 343 247 70 196617 p randomdata;
#P number 410 369 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 340 370 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 536 187 92 0;
#P newex 399 338 41 196617 v pitch;
#P newex 335 337 56 196617 v velocity;
#P comment 366 208 100 196617 startme;
#P connect 9 0 6 0;
#P connect 3 0 2 0;
#P connect 3 0 1 0;
#P connect 1 0 4 0;
#P connect 2 0 5 0;
#P connect 6 1 2 0;
#P connect 6 1 8 0;
#P connect 6 0 1 0;
#P connect 6 0 7 0;
#P window clipboard copycount 10;


March 26, 2006 | 1:52 am


March 26, 2006 | 2:13 am

sorry, i cant open that as a patch for some reason? sorry…newbie.


March 26, 2006 | 11:35 am

On 26-Mar-2006, at 4:13, doug wrote:
> sorry, i cant open that as a patch for some reason? sorry…newbie.

Copy & Paste.

> is there an object that’ll send a bang when it stops receiving a bang?

speedlim, or cobble something together with timer.

We can find dozens of approaches to your problem, and you’ll probably
only like one of them. The question is which one. At this juncture
you probably need to gird your loins and spend a weekend with the
tutorials to find the solution *you* want.

– P.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter

iCE: Sequencing, Recording & |home | chez nous|
Interface Building for |bei uns | i nostri|
Max/MSP Extremely cool http://www.castine.de

http://www.dspaudio.com/


March 26, 2006 | 12:11 pm

thanks,
i think i’ve got it sorted now, using a change on the button state signal itself rather than later down the line. thanks for your help.
DOug


March 26, 2006 | 12:41 pm

doug wrote:
> is there an object that’ll send a bang when it stops recieving a
> bang?

onebang

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-57 42 91 09


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