Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Amplitude-Controlled Sample Players and Continuous Playback Speed: An Analytical Exploration
- by weightausend
- *this essay is currently being updated, reviewed and improved.
- The following is a review on how .wav waveforms are integrated for use in the “W.I.S.E.” MaxForLive device. MaxForLive is a platform for developing DSP Audio and MIDI devices within Ableton Live using the MaxMSP/Gen environment. “W.I.S.E.” stands for Waveform-Integrated Sample Engine: it’s an experimental MIDI-controlled DSP Audio device that puts the concept of amplitude-controlled sample players into practice.
- Read more about W.I.S.E. and download it here:
- https://maxforlive.com/library/device/9591/w-i-s-e
- You can download the waveform creation and integration system here (you can open the patch in MaxMSP if needed):
- https://maxforlive.com/library/device/9603/4096-wavetable-drawer
- Amplitude-controlled sample players represent a niche yet powerful domain within digital audio processing. These devices work on the principle of using the amplitude values of a given sampled waveform to influence the playback speed of a target audio sample. In a normal sample player playing a sample back at normal speed this value would be a fixed time index value of 1. Instead of using a fixed time index value, amplitude-controlled sample players use continuous varying amplitude values of complex waveforms to modulate the speed of an audio sample loaded in a buffer, in a digital synthesis environment [1]. The interaction between waveform and sample creates intricate sounds that are conceptually near, but aesthetically far from FM-synthesis.
- A central challenge in the design of these players is maintaining a consistent and continuous playback speed, especially when transitioning between different waveforms: all the waveform functions should in fact, regardless of their form, play the sample back up to nearly the same point. The solution to this challenge lies in mathematical normalisation processes that rely on discrete summation and scaling techniques. We’ll refer to this process as the integration process of a complex waveform.
- The integration process initiates by computing a discrete sum of a complex digitalised waveform’s amplitude values, for each sample [2]. This discrete summation provides a cumulative amplitude value that can then be normalized against a fixed constant. This constant is either half or equivalent to the full size of the wave duration. The mathematical rationale behind this is to set a baseline for the waveform, thereby ensuring continuity in playback speed irrespective of the wave’s shape.
- Consider now a square waveform, with amplitudes ranging from 0.0 to 1.0, hereinafter referred to as SWave, with a length of 4096 samples. This waveform plays the target sample at normal speed (1x) for half its cycle and remains silent (amplitude equals to 0.0) for the subsequent half. A careful analysis reveals that the discrete sum of the amplitudes in this scenario equals 2048. This value, intrinsically tied to the nature of the square wave, serves as a critical reference point or constant. It becomes instrumental in determining the playback continuity of other waveforms relative to SWave.
- To further elucidate this, let’s introduce another wave, termed CWave. Suppose CWave has a discrete amplitude sum of 2678, and possesses a random unknown shape. Regardless of the shape, we we want to normalise CWave to the standard set by SWave, and to do so we calculate the ratio 2048/2678, which equals approximately 0.764. This computed value serves as a scaling factor. By applying this factor to the CWave, we can produce a normalized wave, designated NWave. NWave retains the general shape and character of CWave. However, post-normalisation, its amplitude values aggregate to the reference sum of 2048 [3]. In this way, it’s possible to achieve a standardized playback continuity when transitioning between SWave and the normalized version of CWave, or between other complex normalized waveforms.
- In the broader realm of mathematical considerations, this technique resonates with vector normalization processes prevalent in linear algebra, where vectors are scaled to unit length. The overarching principle remains consistent: preserving the general shape or direction while standardizing magnitude.
- In conclusion, amplitude-controlled sample players leverage discrete summation and normalization techniques to ensure consistent playback speed. By standardizing amplitude values to a reference constant, the various resultant waveforms, regardless of their distinct shapes, will all play the sample back up to approximately the same point. W.I.S.E. puts all these concepts into practice by providing an environment in which audio samples can be actually played back by the integrated waveforms.
- NOTES:
- [1] Note that the same concept could be applied to a hypothetical system comprised of an analogue tape loop recorder/player where the playback speed is controlled by unipolar voltages coming from an oscillator via a CV input.
- [2] In our specific case, the amplitude values of the waveforms are stored in a list (coll object in MaxMSP) containing an index of 4096 amplitude values, with a maximum float resolution of 32.
- [3] Interpolation is not taken into consideration in this system, although cubic interpolation is applied inside W.I.S.E. to avoid clicks or distortions.
- ***
- To add:
- ...
- Linear interpolation/Average -> Works only if there's an average between N waveforms (50/50 for 2, 25/25/25/25 for four... etc)
- ...
- if the computed normalising ratio is >1.0, the resulting amplitudes might clip out of 1.0. This is no problem in W.I.S.E. or MaxMSP since the wavetable buffer does not clip to 0-1 values. In an analogue or constricted environment however, the signal should be first scaled using a 0.5 multiplier for instance and then multiplied by the normalising ratio to keep the functions within the voltage or buffer limits.
Advertisement