How exactly is beat division applied to a signal?
Does the rhythm need to be detected or can just the onset be manipulated?
For rhythm detection is it better to look for patterns in the frequency domain or time domain for accuracy?
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.
Sign up to join this communityHow exactly is beat division applied to a signal?
Does the rhythm need to be detected or can just the onset be manipulated?
For rhythm detection is it better to look for patterns in the frequency domain or time domain for accuracy?
Using the video you have posted as a reference, it appears to be based on a beat-tracker. When you press one of the buttons, the previous beat in the playback buffer is looped, using a loop duration which is a fraction of the beat duration. This works well on music genres in which rhythmic events tend to coincide with the beat grid; and in which the beat grid is regular.
Most implementations of beat-trackers use of the short-term Fourier transform, with a relatively small window and hop size. This gives you an accuracy on the location of beats in the 5 to 10ms range.
Let us take an example. We assume in this example that the BPM is 120 ; and the audio is processed at a rate of 48kHz. Thus, a beat has a duration of 0.5 seconds or 24000 samples.
To implement the "beat divide" effect, the audio is shoved in a ringer buffer as it is played, and a beat tracker collects the time stamp of beats. For example, the beat tracker is aware that the previous beats are at timestamps 86000, 60000, 36000... in the ring buffer ; while the play-head is at timestamp 90000. When you press the "beat divide" button, with a ratio of 1, the device loops the content of the buffer between timestamps 60000 and 86000. With a ratio of 1/4, the device loops the content between timestamps 60000 and 66000 - the loop has thus a duration of 6000 samples, or 0.125s, or one fourth of the duration of a beat.