playback question

Aug 4, 2008 at 2:21am

playback question

OK I posted here on the other day and I thought I had my issues solved, but I was wrong. Basically what I need help with is lets say I have 3 buffers and they referencing to a play or groove object which receives a set message in which file to play, and a counter is used to move onto the next set message and play the next file but I want it to be able to move to the next message based on the length of that audio file without having to compile a list and typing in the duration. I need it to dynamically receive the file lengths duration upon loading and once it plays that file it automatically moves on to play the next one and takes account of the new files duration and uses that time for when it will move onto the next. Basically what I need is what sflist~ does for sfplay~ but I need to play from RAM. Any help would be much appreciated

#39124
Aug 4, 2008 at 4:00am

Calling all Max/Msp Masters. please help

#137339
Aug 4, 2008 at 4:28am

Use info~, name it the same name as a buffer~ you’re using, attach it to the right-most-outlet of buffer~ so that whenever a sound is loaded into the buffer~ it will automatically generate the info needed, then take the file-length out of info~’s appropriate outlet and calculate from there.

#137340
Aug 4, 2008 at 4:39am

Here’s an example showing just three buffer~’s outputting their info. automatically using info~ on load-up of soundfiles so you can apply to your situation:

– Pasted Max Patch, click to expand. –
#137341
Aug 4, 2008 at 4:52am

Ya I know about info~ and tried that, I guess my question would be what to do after that or what would be the best way of passing that info on to process the play next file because I tried having that duration time from info go to a metros right input and have that going into a message saying next and having coll with my sounds in a list telling which one to load but for some reason the transition from one sound to the next would cause it skip over the 3rd sound or the 2nd sound would not play all the way through or it wouldnt play the sound from the first sample

#137342
Aug 4, 2008 at 4:54am

Yes, info~ is your friend.

Not sure, however, why you need to get durations and use a counter when you
can get sync output from a groove~ to detect the end of a signal and so
trigger the next sound in another groove~ while you replace the sound in the
inactive groove~. (see patch below for the sync detection)

You can also use a line~ to mark off duration more accurately than a
counter, or use the strategies in the
examples/sequencing-looping/audio-rate-sequencing-looping directory in
MaxMSP (fairly advanced, but can put you on the trail).

– Paul

#P window setfont “Sans Serif” 9.;
#P flonum 154 257 35 9 0. 10. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 123 289 41 196617 *~ 0.5;
#P newex 79 289 41 196617 *~ 0.5;
#P newex 57 346 76 196617 dac~;
#P message 95 182 27 196617 stop;
#P message 57 163 65 196617 startwindow;
#P user panel 44 156 99 63;
#X brgb 144 199 89;
#X frgb 55 199 76;
#X border 2;
#X rounded 0;
#X shadow 0;
#X done;
#P message 46 44 43 196617 replace;
#P newex 45 98 143 196617 info~ bar;
#P newex 46 69 62 196617 buffer~ bar;
#P flonum 159 122 67 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 230 124 50 196617 duration;
#P button 451 317 15 0;
#P newex 451 341 55 196617 print zero;
#P user number~ 520 241 559 256 9 3 3 1 0. 0. 0 1. 250 0. 0 0 0 221 221 221
222 222 222 0 0 0;
#P newex 503 267 27 196617 ==~;
#P button 529 317 15 0;
#P newex 503 290 36 196617 edge~;
#P newex 529 341 70 196617 print nonzero;
#P button 228 39 15 0;
#P message 336 67 29 196617 stop;
#P newex 304 66 27 196617 sig~;
#P newex 248 66 27 196617 1.;
#P message 228 66 17 196617 0.;
#P user scope~ 316 139 448 227 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135
135 0;
#P newex 292 94 176 196617 groove~ bar;
#P fasten 16 1 17 0 103 92 50 92;
#P connect 18 0 16 0;
#P fasten 21 0 22 0 100 237 62 237;
#P connect 20 0 22 0;
#P fasten 23 0 22 0 84 337 62 337;
#P fasten 0 0 23 0 297 247 84 247;
#P connect 25 0 23 1;
#P fasten 0 0 24 0 297 247 128 247;
#P connect 24 0 22 1;
#P connect 25 0 24 1;
#P connect 17 6 15 0;
#P connect 6 0 2 0;
#P fasten 6 0 3 0 233 58 253 58;
#P fasten 5 0 0 0 341 88 297 88;
#P fasten 2 0 0 0 233 88 297 88;
#P fasten 4 0 0 0 309 88 297 88;
#P fasten 3 0 4 0 253 85 279 85 279 64 309 64;
#P fasten 0 1 1 0 463 120 321 120;
#P fasten 8 0 13 0 508 312 456 312;
#P connect 13 0 12 0;
#P fasten 0 1 10 0 463 258 508 258;
#P connect 10 0 8 0;
#P connect 11 0 10 1;
#P connect 8 1 9 0;
#P connect 9 0 7 0;
#P window clipboard copycount 26;

On Sun, Aug 3, 2008 at 11:28 PM, raja wrote:

>
> Use info~, name it the same name as a buffer~ you’re using, attach it to
> the right-most-outlet of buffer~ so that whenever a sound is loaded into the
> buffer~ it will automatically generate the info needed, then take the
> file-length out of info~’s appropriate outlet and calculate from there.
>


—– |(*,+,#,=)(#,=,*,+)(=,#,+,*)(+,*,=,#)| —–

#137343
Aug 4, 2008 at 5:36am

thanks a lot guys I really appreciate your help, it really means a lot. This will for sure get me going on the path.

#137344

You must be logged in to reply to this topic.