Forums > MaxMSP

Audio Timeline


Joe
July 2, 2013 | 8:25 am

Hey guys,

I had a look through the forum but could not really find what I needed here.

Could someone advice me on whether it is possible to create a timeline which monitors a playing audio file?

I have a buffer, groove and gizmo working to play an audio file which I can change the speed without affecting the pitch.

This works just fine but I want to monitor where in the audio file it currently is and bang when it is at the beginning and end. I did in fact see something in a patch a few months ago that did this I think, but I can’t find it/can’t remember looking into how this was achieved.

So if anyone has any ideas, it would be really appreciated. Not sure if it is worth me posting the patch of the buffer etc, because its pretty straight forward.

All the best,

J


July 2, 2013 | 8:45 am

the right output of groove~ is a signal that goes from 0 to 1 as the, indicating the current position. send that to a snapshot~ and then to a slider, with the float output enabled and range set from 0. to 1.


July 2, 2013 | 8:58 am

the above solution is the simplest and most efficient. if you are using the waveform object you could do it like this:

<code>

– Pasted Max Patch, click to expand. –

</code>



Joe
July 2, 2013 | 9:12 am

Nice one mate, struggled with it for some reason but finally got it working!

Thanks a lot, thought I would post it in case anybody else needed help with it.

All the best,

J

– Pasted Max Patch, click to expand. –


Joe
July 2, 2013 | 9:46 am

wow that is a lot more impressive than mine haha.

Cheers,

j



Joe
July 2, 2013 | 2:03 pm

Quick question.

I have a float connected to the output of the slider and I have a match 0.9 connected to the float. The problem is, it is not banging when the number travels past the number (its going up and down). It does when I use the mouse to drag the float to the number so why won’t it bang when the slider is moving via the groove~

all the best

J


July 2, 2013 | 4:37 pm

Match looks for an exact match, which is fairly unlikely to happen on a dependable basis with floating point values. (if you look closely, you’ll discover that the right outlet signal of groove~ is approximately 0-1; not every cycle hits the same values)

Look for the transition and you’ll have it. Try > 0.9, change, then sel 1.



Joe
July 3, 2013 | 4:59 am

works perfect that peter, cheers.

Another question relating to this, bit more tricky I fear. The system I am creating is basically starting the audio file, and then reversing it when it gets to 0.9 then I have been trying to get it to play normal when the reverse gets to 0.1. However, I used a similar method to the one you suggested >0.9 etc, but I changed it to < 0.1. This doesnt work though because the starting point of the audio file is 0.

So is there are a way of getting around this by ignoring the <0.1 until the audio file is in reverse and producing decreasing numbers?

All the best

J


July 3, 2013 | 8:00 am

yeah – look for whether you’re in reverse and only use the data from the <0.1 comparison if you are. gate and gate~ are your friends :)


July 3, 2013 | 8:01 am

The right outlet of groove~ does go all the way from 0 to 1, so you can use >=~ and <=~.
Maybe something like this?
<code>

– Pasted Max Patch, click to expand. –

</code>


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