Forums > MaxMSP

audio scrubbing with sfplay~?

October 11, 2007 | 9:57 am


October 11, 2007 | 10:59 am

On 11 oct. 07, at 11:57, Mihalic Alexander wrote:

> I would like to know if somebody has a solution to make a audio scrub
> with sfplay~object.

There is a speed message for [sfplay~], and also a seek message.

_____________________________
Patrick Delges

Centre de Recherches et de Formation Musicales de Wallonie asbl

http://www.crfmw.be/max


October 11, 2007 | 3:20 pm


October 13, 2007 | 7:47 am

Try this, maybe it’ll generate some ideas. I like the ability to set the "scrub grain size". The metro keeps the file from continuing to play by holding it at the current seek point, essentially looping for the metro length / grain size. Note that you read into the sfinfo~ rather than the sfplay~, to get the length, which sets the slider range and the ctlin scaling.

–CJ

————————-

#P window setfont Impact 14.;
#P window linecount 1;
#P comment 108 46 88 11599886 Initialize;
#B frgb 0 242 248;
#P comment 235 56 195 11599886 Set scrub "grain length";
#B frgb 0 242 248;
#P button 77 45 23 0;
#P comment 385 197 263 11599886 but this works as a start , perhaps;
#B frgb 0 242 248;
#P window setfont "Sans Serif" 14.;
#P flonum 14 271 82 14 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 18.;
#P number 14 216 50 18 0 127 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 14 246 140 9109513 scale 0 127 0. 0.;
#P newex 14 191 63 9109513 ctlin 10 1;
#P message 135 170 48 9109513 loop $1;
#P toggle 136 135 29 0;
#P hidden newex 43 309 58 9109513 t 0 f;
#P hidden newex 19 140 93 9109513 bgcolor 80 80 80;
#P user gain~ 266 250 20 57 158 0 1.071519 7.94321 10.;
#P hidden newex 452 314 149 9109513 prepend set Total Length;
#P window setfont "Sans Serif" 14.;
#P message 452 336 198 9109518 Total Length 7487.845703;
#P window setfont "Sans Serif" 9.;
#P hidden message 146 97 25 9109513 115;
#P hidden message 111 97 25 9109513 150;
#P hidden message 77 97 25 9109513 1;
#P hidden newex 78 72 63 9109513 loadbang;
#P user meter~ 205 250 228 329 50 0 12 182 75 75 75 255 24 24 255 0 0 42 226 255 90 116 255 20 3 4 4 4;
#P user gain~ 234 250 20 57 158 0 1.071519 7.94321 10.;
#P user meter~ 321 250 344 329 50 0 12 182 75 75 75 255 24 24 255 0 0 42 226 255 90 116 255 20 3 4 4 4;
#P user gain~ 296 250 20 57 158 0 1.071519 7.94321 10.;
#P hidden newex 356 234 93 9109513 prepend open;
#P message 42 337 114 9109513 setminmax 0. $1;
#P newex 281 207 89 9109513 sfinfo~;
#B color 5;
#P message 15 400 48 9109513 set $1;
#P toggle 191 73 29 0;
#P window setfont "Sans Serif" 14.;
#P number 238 81 53 14 5 0 1 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P newex 193 106 63 9109513 metro 150;
#P user multiSlider 15 361 635 29 0. 7487.845703 1 2680 47 0 2 4 0 0 0;
#M frgb 4 244 238;
#M brgb 58 58 58;
#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 window setfont "Sans Serif" 14.;
#P message 362 285 119 9109518 stop;
#P message 362 259 118 9109518 startwindow;
#P window setfont "Sans Serif" 18.;
#P flonum 280 141 106 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P message 280 172 43 9109513 seek $1;
#P newex 248 334 56 9109513 dac~;
#P window setfont "Sans Serif" 18.;
#P flonum 195 141 55 18 0. 0 1 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P message 195 170 48 9109513 speed $1;
#P window setfont "Sans Serif" 18.;
#P message 304 106 82 9109522 open;
#P window setfont "Sans Serif" 9.;
#N sfplay~ 2 60000 2 ;
#P newobj 127 207 131 9109513 sfplay~ 2 60000 2;
#B color 5;
#P window setfont Impact 14.;
#P comment 384 174 263 11599886 Could certainly get more fancy;
#B frgb 0 242 248;
#P connect 33 0 35 0;
#P connect 35 0 34 0;
#P hidden connect 34 0 36 0;
#P hidden connect 36 0 10 0;
#P hidden connect 30 0 10 0;
#P hidden connect 16 0 10 0;
#P hidden connect 10 0 14 0;
#P hidden connect 30 1 16 0;
#P hidden connect 15 3 30 0;
#P hidden connect 22 0 23 0;
#P connect 38 0 22 0;
#P hidden connect 22 0 24 0;
#P hidden connect 30 1 34 4;
#P hidden connect 32 0 1 0;
#P hidden connect 17 0 1 0;
#P hidden fasten 3 0 1 0 200 193 132 193;
#P hidden fasten 6 0 1 0 285 193 132 193;
#P hidden connect 31 0 32 0;
#P hidden connect 23 0 31 0;
#P hidden connect 22 0 25 0;
#P hidden connect 13 0 11 0;
#P hidden connect 23 0 4 0;
#P hidden connect 4 0 3 0;
#P hidden connect 20 0 21 0;
#P hidden connect 28 1 20 0;
#P hidden connect 1 0 20 0;
#P hidden connect 24 0 12 0;
#P hidden connect 12 0 11 1;
#P hidden connect 20 0 5 0;
#P hidden connect 8 0 5 0;
#P hidden connect 9 0 5 0;
#P hidden connect 25 0 28 0;
#P hidden connect 11 0 7 0;
#P hidden connect 14 0 7 0;
#P hidden connect 7 0 6 0;
#P hidden connect 2 0 15 0;
#P hidden connect 18 0 5 1;
#P hidden connect 28 1 18 0;
#P hidden connect 1 1 18 0;
#P hidden connect 18 0 19 0;
#P hidden connect 15 5 17 0;
#P hidden connect 30 1 27 0;
#P hidden connect 27 0 26 0;
#P window clipboard copycount 41;


October 13, 2007 | 7:40 pm

also, referring to the previous patch, since you are scrubbing in the scheduler domain (using the metro), it would be fairly trivial to add an envelope to get rid of the pops.



PQE
October 14, 2007 | 12:14 am

Quote: mihalic.imeb wrote on Thu, 11 October 2007 02:57
—————————————————-
> Hi,
>
> I would like to know if somebody has a solution to make a audio scrub
> with sfplay~object.
>
I have a discussion of this in a tutorial called Spinner.pdf on my web site
ftp://arts.ucsc.edu/pub/ems/MaxTutors

Most of the tutorials on this site have just been revised and expanded, eliminating the last of the system 9 look just in time for Max 5.
pqe


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