Sample Start From First Transient?

Nov 21, 2010 at 8:23am

Sample Start From First Transient?

Hi guys… kinda new to Max… ive come up against a problem

Basically ive got my mic set up and im wanting to record some audio in and then have max automatically set the sample start from the first transient so that there is no ‘dead air’…. is there an easy way to do this? Ive looked round on the forum and on the net only thing I can find is people saying how hard it is to get max to do this

Thanks in advance

Carl.

#47750
Nov 21, 2010 at 9:23am

you could use peakamp and a [> threshold] type of thing, though this isn’t strictly transient detection, but more peak detection. if the first transient is important and not just a trigger to start recording, you would have to do some jiggery pokery with buffers to record at a time before the transient occurs.

#171715
Nov 21, 2010 at 10:58am

Have you tried the [bonk~ ] external?

#171716
Nov 21, 2010 at 2:30pm

it isnt a record trigger as this will be done via a midi button press (wiimote) – rather a way of max effectively truncating the start of the sample to get rid of the gap between the button press and the wanted audio…. the process will go something like this

1. Press button on wiimote to begin recording
2. shout into mic a couple of words
3. Max then get the sample ready to be triggered at the start of the audio by looking for the first transient and then setting that as the start point
4. press another button on the wiimote to trigger sample

ive looked at Bonk… i cant get my head around what its for :( it doesnt seem like you put audio through it… or am I wrong??

will have a look at peakamp….

thanks a lot guys :)

#171717
Nov 21, 2010 at 2:36pm

peakamp~ doesnt look like it will do the job as its only reporting what the highest peak was not when…. also i dont really want the highest peak… just first bit of ‘meaningful’ sound coming from the mic… am i still on the right lines asking for transient detection???

#171718
Nov 21, 2010 at 3:19pm

something like this

– Pasted Max Patch, click to expand. –
#171719
Nov 21, 2010 at 7:49pm

thanks for the reply… unfortunately i have no idea what im supposed to do with that patcher…. ive copied it into my project… but what do I route to what? ive clicked on the help files for the objects but i have no clue

BTW this is what my project looks like so far…

#171720
Nov 21, 2010 at 7:50pm
#171721
Nov 22, 2010 at 12:14am

that was just a sketch to give you an idea. I’ll try and fill it out tomorrow

#171722
Nov 22, 2010 at 12:51pm

if one is sure that there are no clicks and crackles in the line, one could even just
use maximum~ 0.25 to find the first occurance of a somewhat louder (- 6 dBA) sound.

+~ 0.25 , zerox~ will also do.

#171723
Nov 22, 2010 at 8:26pm

thanks for the replies again guys…

right… here goes….ive been at it for 2 hours and cant get it to do what i want… After seeing the zerox~ object ive changed my tactic from:

‘automatic trimming of a sample already recorded’

to

‘trigger sample record from a set signal threshold’

http://img.skitch.com/20101122-rdnkbu1i7j2uxpsteye8ut8ky8.jpg

if you see this pic… you can see that im trying to get zerox~ to output a bang when it receives a signal… at the moment its outputting a bang when there is not signal (when i take the cross out of the audio on/off box)… seems backwards logic to me… obviously im doing something wrong :(

#171724
Nov 22, 2010 at 10:05pm
– Pasted Max Patch, click to expand. –
#171725
Nov 24, 2010 at 5:53pm

wow! can I just say I love you :) works like a dream….

#171726

You must be logged in to reply to this topic.