Forums > MaxMSP

Triggering the scope~

February 14, 2006 | 2:03 am

A while back I asked whether anyone has a version of scope~ that accepts
an external trigger. This is a basic feature of real-world scopes and
really necessary if you want to see what’s happening simultaneously in
different signals. (I’m building demos for an undergrad acoustics
course, so accurate visualization is important). The response was
basically negative, so I assume there is no such object.

I’ve tried to work around the problem by extracting triggers manually
and adding them as large transients to each signal. It’s easy enough to
extract triggers, generate impulses, and add them to the signals. The
problem is that they can be seen in the waveform. So I’d like to extract
a trigger and then inhibit the extraction of succeeding triggers for
some "holdoff" period. I am having a lot of difficulty with this bit. In
principle, I should be able to generate any signal of the requisite
holdoff duration, trigger it by the first impulse, and use that to mask
out (by comparison or multiplication) the nuisance triggers. However, as
far as I can tell, the only objects that would let me make a one-shot
holdoff signal are line~, adsr~, etc. and all of these are triggered at
the event level (i.e. by bangs) rather than the signal level. That means
that while we wait for the bang to be processed, 2-3 extra trigger
pulses get through to the waveform.

I would really appreciate any help that anyone can give me, either with
collecting the first of a series of triggers or with otherwise
synchronizing a number of scope~ objects. For the record, I need this to
run under the MSP Runtime (students use it), so I’ve been avoiding
jitter, etc.

-Chris

G. Christopher Stecker, Ph.D.

Assistant Professor – Speech & Hearing Sciences
Univ. of Washington – 1417 N.E. 42nd St – Seattle WA 98105

Voice: 206-543-7561

cstecker@u.washington.edu


February 14, 2006 | 3:35 am

After banging my head against this for longer than I’d like to admit, I
think I’ve come up with an acceptable workaround.

I extract triggers from the positive zero crossings (or other suitable
event) and then use spike~ to compute intervals between triggers. I set
spike~’s refractory time (right inlet) to just longer than the duration
my scope~ is set to display; this gives me intervals suitable for
triggering the display cleanly. From these intervals I compute the
frequency of a separate triggering waveform, which I synthesize with
cycle~ or phasor~. Extracting triggers from this waveform (as before)
and adding them as large-amplitude impulses to the original waveform
does the trick. The triggering phase of the scope~d waveform is not
fixed, but that’s ok for my purposes. I was more concerned that the
phase of the triggering waveform would drift relative to the visualized
signals. It does, but not too much. It actually looks quite steady.

I’m still interested in hearing of any other solutions, but this is a
pretty usable solution.

-Chris

G. Christopher Stecker, Ph.D.

Assistant Professor – Speech & Hearing Sciences
Univ. of Washington – 1417 N.E. 42nd St – Seattle WA 98105

Voice: 206-543-7561

cstecker@u.washington.edu


February 14, 2006 | 3:18 pm

Hi,

a different route would be to use the Ircam Gabor and FTM libs:

http://recherche.ircam.fr/equipes/temps-reel/ftm/index.html

Maybe this could help you get going:

#P toggle 76 28 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 76 54 57 196617 qmetro 40;
#P user ezdac~ 465 180 509 213 0;
#P user ftm.vecdisplay 148 321 256 128 0. 127. 127. 190 190 190 0 5 1
0. 1. 255 0 0 1 0. 1. 0 255 0 1 0. 1. 0 0 255 1 0. 1. 255 0 255 1 0.
1. 255 255 0;
#T open 93;
#P message 167 94 77 196617 open , 1 , loop 1;
#N sfplay~ 2 120960 0 ;
#P newobj 167 137 53 196617 sfplay~ 2;
#P button 76 94 15 0;
#P newex 76 197 21 196617 t 1;
#P newex 123 266 21 196617 t 0;
#P newex 265 233 29 196617 gate;
#P newex 148 233 29 196617 gate;
#P newex 284 179 164 196617 gbr.slice~ 1024 512 @mode slave;
#P newex 167 179 103 196617 gbr.slice~ 1024 512;
#P comment 92 95 46 196617 update;
#P connect 13 0 12 0;
#P connect 12 0 7 0;
#P fasten 8 1 2 0 193 166 289 166;
#P fasten 8 1 11 1 193 166 504 166;
#P connect 8 0 1 0;
#P fasten 8 0 11 0 172 170 470 170;
#P connect 3 0 5 0;
#P connect 3 0 10 0;
#P connect 4 0 10 1;
#P connect 9 0 8 0;
#P connect 7 0 6 0;
#P fasten 6 0 3 0 81 223 153 223;
#P fasten 6 0 4 0 81 223 270 223;
#P fasten 5 0 3 0 128 290 114 290 114 227 153 227;
#P fasten 5 0 4 0 128 290 114 290 114 227 270 227;
#P connect 2 0 4 1;
#P connect 1 0 3 1;
#P connect 1 1 2 0;
#P window clipboard copycount 14;

You should be able to do something similar with the new audio to
jitter objects that are part of Jitter 1.5.

Best,
Trond


February 14, 2006 | 8:27 pm

Hi Chris – unless there’s some kind of licensing restriction that I am
forgetting, there’s no reason that you can use Jitter with Max/MSP
runtime. The jit.catch~ object will do exactly what you want.

Ben


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