a bang at each audio vector ? (re-asking after 5 years because topic is gone)

Feb 25, 2010 at 7:29pm

a bang at each audio vector ? (re-asking after 5 years because topic is gone)

I need a bang that comes at the beginning of each audio-vector. How to do this ?

(i already asked this 5 years ago, somebody had answered me, but now the old topics are gone… :-( and i forgot the answer.)

Thanks,
Alexandre

#48782
Feb 25, 2010 at 8:39pm

Wouldn’t this be possible using count~, like this (sorry, I don’t have Max5 here…):


#P window setfont "Sans Serif" 9.;
#P flonum 361 163 59 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#N vpatcher 525 182 715 430;
#N comlet interval in ms is reported here;
#P outlet 66 173 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 96 82 13 196617 b;
#P newex 96 104 46 196617 cpuclock;
#P newex 66 143 27 196617 - 0.;
#P newex 48 82 13 196617 b;
#P newex 48 104 46 196617 cpuclock;
#N comlet bang stops timing and reports interval;
#P inlet 96 58 15 0;
#N comlet bang starts timing interval;
#P inlet 48 58 15 0;
#P connect 0 0 3 0;
#P connect 3 0 2 0;
#P connect 5 0 4 0;
#P connect 4 0 7 0;
#P connect 2 0 4 1;
#P connect 1 0 6 0;
#P connect 6 0 5 0;
#P pop;
#P newobj 361 137 55 196617 p cputimer;
#P connect 0 0 1 0;
#P window clipboard copycount 2;

#175328
Feb 25, 2010 at 9:06pm

i don’t get how you do that with cpuclock…. but well… i just had a big luck to reach this old topic from some old mail archive i just found, and the solution was found by ben nevile :

#P button 221 269 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 221 234 33 9109513 edge~;
#P newex 300 179 27 9109513 / 2;
#P newex 221 207 89 9109513 < ~ 32;
#P number 292 149 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 232 122 70 9109513 adstatus sigvs;
#P newex 221 179 73 9109513 count~ 0 64 1 1;
#P comment 238 269 100 9109513 bangs every vector;
#P connect 3 0 1 1;
#P connect 3 0 5 0;
#P connect 1 0 4 0;
#P connect 6 0 7 0;
#P connect 4 0 6 0;
#P connect 5 0 4 1;
#P connect 2 1 3 0;
#P window clipboard copycount 8;

thanks anyway !

#175329
Feb 25, 2010 at 9:14pm

cpuclock was just there to show the time between two consecutive bangs, and show you the does work, as the bangs are blinking too fast.

p

#175330
Feb 26, 2010 at 1:37am

Hi Alexandre-

About your request: first, from what I can tell of Ben Nevile’s patch, it triggers a bang halfway into the vector time, not at the beginning as you asked about.

Also, it would seem to me that to ask for a bang at the beginning of the audio vector is hard, if not impossible, to achieve. After all, Max is in audio interrupt at that moment, and not attending to anything that could send a bang. The bang would be deferred until audio interrupt was over. So you’d get your bang (Ben’s way, or perhaps any way) after the audio vector, and hopefully, you’ll get one at each end-of-audio-vector.

Best, Charles

#175331
Feb 26, 2010 at 10:20pm

Well, thanks for the comment.
i need this to send new data to a [resonators~ smooth] in which sound is moving during the audio vector. I would say i can send my data at the middle of the vector. Well, if i’m demanding on latency – i’m working on a reel time wacom instrument -, i would want to send these data 1 ms before the beginning of the vector. In this case, your comment will be usefull.

#175332

You must be logged in to reply to this topic.