Transient detection within a loaded sampler - SNEX ????
-
Is this a job for SNEX???
I'm daydreaming about slicing up drum loops based on transients, and pondering how to achieve it.
-
@Orvillain Is the end result to create separate samples? If so, does it have to be done in HISE?
-
@d-healey said in Transient detection within a loaded sampler - SNEX ????:
@Orvillain Is the end result to create separate samples? If so, does it have to be done in HISE?
End result would effectively be a list of transient positions, essentially a list of sample start positions.
If I was building it in Python, I'd still have one sample loaded and I would just index an array o f sample start positions when activating a voice.
You could n theory have an "export slices" feature which would create separate samples, but no. That isn't the purpose of this, and my aim isn't to create separate samples as such. Rather, my aim is to create a loop slicing playback engine.
-
@Orvillain I think there are several techniques to detect transients, and it is often a blend of many of them.
- It depends on the frequency (so I think that it shouldn't be bad to "listen" to a certain frequency range)
- apply an exponential factor to the signal in order to improve the ratio of the transients it contains
- don't detect below a certain threshold (but that becomes amplitude dependent)
Why taking not the derivative of the amplitude and check for the a minimum slope... but that is just an idea, and here again the input has to be filtered
if the detection is not real time, I would probably go with a waveform detection above a specific threshold, and prevent to detect the next transient after a specified amount of samples. Well, after thinking to it this can be real time too... -
@Orvillain Did you ever make any progress on this? Looking into something similar for a custom audio file player I have and am wondering if you have some recommendations!
-
@HISEnberg
Yes I wrote a custom transient detector in a c++ node, and made sure it utilised an audio file, which I can load in my UI using the audio waveform floating tile.I implemented spectral flux extraction:
- Take your audio.
- Perform an FFT on it.
- Extract the spectral flux envelope from the FFT.
- Downsample the spectral flux envelope (optional but can help accuracy)
- Perform peak picking on the spectral flux envelope.
I used the stock JUCE FFT processor.
-
Oh, and once I got my head around exactly how to interface c++ nodes with HISE, it has become one of my favourite ways of working. I pretty much just jump straight to a c++ node for any DSP or advanced analysis thing; whereas my very first transient detector was written in the HISE JS layer, and believe it or not it was quite good!! A little slow, but it did work.