Forums > Jitter

how do I sync audio w. qt with ms.pinky control?

April 24, 2007 | 1:35 am


April 24, 2007 | 2:59 am

a few ways to do this.

if the audio files are small enough, you can load them all into buffers~’s and play them back with groove~’s.
you will send your rate output from mspinky to the rate message to groove.

if the audio files are too large to store in memory, you can use the sfplay~ object instead, and send mspinky rate to sfplay~ speed message.

for syncing with either method, i would sync the movie to the audio files. with groove~, the right out put goes from 0 to 1 as it plays through, sfplay~ will output the current millisec position.
either of these values can be used to sync to qt.movie by doing some math and getting the correct frame.

although, perhaps syncing is not a problem, in which case leave your qt movie control as is, and just send the mspinky rate to your audio playback.

hth.
-rob


April 26, 2007 | 12:09 pm

Thank you for your help. I think this could work, but I have problems properly adressing the buffer~. I load the wav files per random from an ubumenu, but then the "prepend read" or "prepend replace" message doesn’t work. I also added a "append 0 -1 2" for resizing and channels, but it didn’t help.

How do I have to adress the buffer~ to load the files from an ubumenu?
Or do I have to choose different buffers by random and if so how do I organize the loading and unloading with gates or something? I tried to send a "prepend set" message to the buffer and the groove~ from the ubumenu to make them adjust to the actual file, but again no luck.
Actually the mptcfs~ object from the ms.pinky patch should play back files and handle the vinyl control, but in this configuration it doesn’t work.

Either way I desparately need help. Tomorrow the exhibition starts and I’d like to have the sound working by then :.(
"Doctor pleeeeease heeeeeeelp!!!"

julian


April 27, 2007 | 12:45 am

sounds like you need to spend some face time with the tutorials.

however, because i have something similar on hand, this could get you started. it uses poly to handle the buffer/grooves and randomly selects from the ubumenu.
i think it needs urnNR which may or may not be in your path. if not just replace urnNR with regula ole urn.

this was made a long time ago, so there might be some dumbness lurking.
good luck.

save as "polySample.mxb"

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 175 263 97 196617 s polySampEndBang;
#N in~ 4;
#P newobj 151 94 33 196617 in~ 4;
#N out 1;
#P newobj 325 154 33 196617 out 1;
#P message 61 144 41 196617 mute 0;
#P newex 46 121 40 196617 t 0 b 1;
#P newex 71 91 32 196617 sel 1;
#P message 118 220 41 196617 mute 1;
#P newex 118 241 52 196617 thispoly~;
#P newex 175 241 32 196617 sel 1;
#P newex 175 220 40 196617 change;
#P newex 175 199 40 196617 == 1.;
#P flonum 175 180 45 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 175 158 74 196617 snapshot~ 100;
#P newex 122 94 27 196617 sig~;
#P newex 219 106 81 196617 prepend replace;
#P newex 219 128 116 196617 buffer~ $0_buf 1000 2;
#B color 5;
#N in 1;
#X comment buffer name;
#P newobj 219 84 25 196617 in 1;
#N in 3;
#X comment rate;
#P newobj 122 45 25 196617 in 3;
#N in 2;
#X comment to groove;
#P newobj 71 68 25 196617 in 2;
#N out~ 2;
#P newobj 134 182 39 196617 out~ 2;
#N out~ 1;
#P newobj 93 182 39 196617 out~ 1;
#P flonum 122 71 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 93 120 92 196617 groove~ $0_buf 2;
#B color 5;
#P connect 7 1 20 0;
#P connect 8 0 7 0;
#P connect 6 0 8 0;
#P connect 14 0 16 0;
#P connect 14 0 22 0;
#P connect 13 0 14 0;
#P connect 12 0 13 0;
#P connect 11 0 12 0;
#P connect 10 0 11 0;
#P connect 0 2 10 0;
#P connect 0 1 3 0;
#P connect 1 0 9 0;
#P connect 5 0 1 0;
#P connect 18 2 1 0;
#P connect 16 0 15 0;
#P connect 19 0 15 0;
#P connect 0 0 2 0;
#P connect 21 0 0 0;
#P connect 9 0 0 0;
#P connect 17 1 0 0;
#P connect 18 0 0 0;
#P connect 4 0 17 0;
#P connect 18 1 19 0;
#P connect 17 0 18 0;
#P window clipboard copycount 23;

____________________________________

save as whatever

#P button 28 34 15 0;
#N comlet rate;
#P inlet 258 239 15 0;
#P window setfont "Sans Serif" 9.;
#P flonum 240 257 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N comlet rate;
#P inlet 240 238 15 0;
#N comlet next clip;
#P inlet 210 206 15 0;
#P window linecount 1;
#P newex 77 311 151 196617 poly~ polySample;
#P newex 100 220 43 196617 pipe 10;
#P number 192 258 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 58 126 27 196617 + 1;
#P newex 164 257 27 196617 + 1;
#P window setfont "Fixedwidth Serif" 10.;
#P message 116 285 80 1441802 target $1 , 1;
#P outlet 120 342 15 0;
#P outlet 81 341 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 100 199 27 196617 sel;
#P number 211 150 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 211 169 53 196617 voices $1;
#P message 58 150 52 196617 target $1;
#N comlet random clip;
#P inlet 164 206 15 0;
#P newex 164 236 43 196617 urnNR;
#P newex 28 191 59 196617 pv $0_clip;
#P newex 28 103 40 196617 t b b i;
#N counter;
#X flags 0 0;
#P newobj 100 172 66 196617 counter;
#P newex 155 128 66 196617 t b i i i i;
#P newex 155 107 74 196617 route populate;
#P user ubumenu 28 83 116 196617 0 1 1 0;
#X prefix_set 0 1 0;
#N vpatcher 40 55 327 333;
#P window setfont "Sans Serif" 9.;
#P newex 50 88 29 196617 t b b;
#P inlet 50 67 15 0;
#P message 198 169 31 196617 clear;
#P outlet 141 221 15 0;
#P newex 50 145 74 196617 prepend prefix;
#P newex 50 115 74 196617 opendialog fold;
#P connect 4 0 5 0;
#P connect 5 0 0 0;
#P connect 0 0 1 0;
#P connect 3 0 2 0;
#P connect 1 0 2 0;
#P connect 5 1 3 0;
#P pop;
#P newobj 28 58 59 196617 p ubumaker;
#P comment 276 258 29 196617 rate;
#P comment 46 35 100 196617 bang to load folder;
#P connect 27 0 2 0;
#P connect 24 0 25 0;
#P connect 26 0 22 3;
#P lcolor 6;
#P connect 13 0 12 0;
#P connect 5 4 13 0;
#P connect 5 3 9 1;
#P connect 23 0 20 0;
#P connect 18 0 20 0;
#P connect 25 0 22 2;
#P connect 9 0 18 0;
#P connect 10 0 9 0;
#P connect 5 1 6 4;
#P connect 4 0 5 0;
#P fasten 3 2 4 0 139 104 160 104;
#P connect 17 0 22 1;
#P connect 22 1 16 0;
#P connect 5 2 14 1;
#P connect 20 0 17 0;
#P connect 14 1 21 0;
#P connect 6 0 14 0;
#P fasten 5 0 6 0 160 152;
#P connect 22 2 6 0;
#P connect 22 0 15 0;
#P connect 8 0 22 0;
#P connect 11 0 22 0;
#P connect 12 0 22 0;
#P connect 19 0 11 0;
#P connect 7 2 19 0;
#P connect 3 1 8 0;
#P connect 7 0 8 0;
#P connect 3 0 7 0;
#P connect 2 0 3 0;
#P connect 21 0 3 0;
#P window clipboard copycount 28;


April 27, 2007 | 11:42 pm

Thank you very much again!
But I think dumbness is lurking somewhere else. I saved your text as polySave.mxb and whatever.mxb, but max sais: can’t open: bad header ! I added max v2 and #p pop, but same thing.
Has it to do with some missing external or the max version?

If you would have the patience once again to tell me this I’d be very happy, cos I think your patch might really help me. I haven’t got the time right now to go through almost 3000 pages of max tutorials, but I’m looking forward to it. sort of : )


April 27, 2007 | 11:55 pm

:oops: Well just figured out how to do it, so the whatever.pat I can open but the polySave.pat gives a long list of error:#p no such object.
Don’t know why…


April 28, 2007 | 2:04 am

Hi everyone,

Anyone have a patch for serial control of a Knox Matrix Router
sitting around?

deKam


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