loop audio file backwards

estzi's icon

Hey Everyone,

is there a way to loop audio file backwards ? i'm coming from PD and to do this you would just write the audio file into an array and use a [phasor~] and [tabread4] for playback at varying speeds backward and forward. [sfplay~] doesn't seem to start when initialized playback is a negative number in Max 5.1.6. i looked at the forum and the only thing i found was a suggestion to reverse the audio in a sound editting program and then use [sfplay~] to loop it.

that works, but i'm sort of bummed about that way. is there a way to read the audio file from a table similar to PD to avoid the problems that occur when using negative numbers with [sfplay~] ? or is there another work around that i just don't know yet ?

thanks Everyone

--

steven

ergaster's icon

hey steven

check [groove~] help

enjoy

estzi's icon

oh cool thanks ergaster !

pdelges's icon

In Max, the tables are called buffer~.

If you want to use sfplay~, you can set the playback speed thru its rightmost inlet (negative values are accepted). This is explained in the reference, not in the helpfile.

p

Christopher Dobrian's icon

If you have the sound in RAM (i.e., in a buffer~ object) you can use play~ or groove~ to play it backwards. If you are reading a sound file from disk (with a sfplay~ object) the syntax is a bit more complicated than you might expect, but it's certainly feasible. See the documentation of the 'preload' message on the sfplay~ reference page. See also this example: http://music.arts.uci.edu/dobrian/IAP2010/examples.htm#Ex14

estzi's icon

thanks guys, christopher thanks for that great link !

--

steven