is there a way to remove empty part in a recorded sample?
Hi, everyone.
I'd like to know is there a way to detect and remove empty part (or in other words : samples under a certain amplitude) in a sound sample ?

Thanks
[average~ 1000]
[abs~]
[>= 0.01]
now use this to control "record" and "stop" when copying the buffer into another buffer, but put a [delay~ 500]
between the buffers.
Thank you @ ROMAN THILENIUS ,
this is my patch using [average~], it works sometime, but not stable, the sample which removed empty space will be different every time. I can't figure out what caused the problem,did I miss something/object? or the arguments is not right?
here is the patch
different results can be a result of the average function itself.
i think it should go away if you artificially add a piece of minimum length silence at the beginning.
applications like the famous recycle check for transients in addition to power, a combination of both can be a good idea for percussive material.
you should also compare measuring peaks vs power to get a good picture how a certain type of analysis can be built.
if you combine these two (peak and power) you can easily distinguish between "silence with a few clicks" and the starting point of a not-so-loud pad type of sound.
0, 0 100 400 400
line~
Thank you ROMAN , I think [peakamp~] is a better solution, at least for percussive material. I believe it still needs some improvements. anyway, it works, so here is the "code" :
yes. but note that it wil start recording when there is a single click in the silence.
a parallel branch with power measurement and then some kind of "only if both conditions are met" will be almost perfect to find the logical beginning of a musical event in a recording.
another cool option could be to use the analysis only to zoom in using waveform and then set the desired sample position by hand.
@ROMAN , what dose "power" mean ? and which object can detect power?
Thank you !
power is what average does, peak is what peakamp does. :)
the power (in the sense of electric energy) of an analog signal is equal to the size of the geometrical area of its shape (which is about what the RMS mode of average~ is calculating.)
the peak of a signal is its highest value (or sample value, on the digital domain)
peaks over time somehow give you the "envelope" of an audio recording, power over time somehow give you the relative loudness.
they are very often combined together when analyzing things, for example to display it on a meter.
general advice: dont use white noise or sinewaves as test sound with this kind of stuff; it works much better with a piece of music.