|
| WaveWarp 2.0 Example DrawingBoard

TimeCompressExample1
Description
Time Compress Example 1
Illustrates how to achieve time-compression WITHOUT pitch shifting using the well-known technique of "sample removal".
It works as follows: samples are read into the grain buffer of length determined by the "Grain size". This grain is then played
normally. Next, the audio is played for a length of time according to the "Hop size" during which some samples are
dropped, as determined by the fact that the "Hop play" speed ratio is set to be greater than unity . Next, the grain is refilled
and played normally, and so on.
Increasing the "Hop size" and/or "Hop play" or reducing the "Grain size" has the effect of increasing the time
compression factor. Consideration of how the Granular Playback Controller functions, leads to the following relationship
between the compression factor and the parameter settings. Defining the Compression_ratio as the factor by which the time
duration is compressed, then:
Compression_ratio = (Grain_size + Hop_size) / (Grain_size + Hop_play*Hop_size)
Example settings:
Compression_ratio Grain_size Hop_size Hop_play
---------------------------- ---------------- -------------- --------------
0.9 (i.e. 10%) 300 30 2.1 (default)
0.8 (i.e. 20%) 300 30 3.2
0.7 (i.e. 30%) 300 30 4.3
Note that the Grain_size and Hop_size can also be used to adjust the total Compression_ratio. In the above examples they
have been kept constant for simplicity, and only the Hop_play has been adjusted.
Depending on the source material, audible artifacts may be heard (due to irregular grain boundaries), especially at large
compression factors. More sophisticated time-compression algorithms would incorporate "smoothing" over the grain
boundaries. However, the simple method demonstrated here illustrates the key idea.
See "ControllablePlaybackSimpleExample.dwb" for a detailed description of WaveWarp's controllable playback
functionality).
Note: ALL audio files will appear in both the "Controllable Input Audio Files" category and the "Input Audio Files" category
so it is possible to play ANY file with or without playback control.
Note: due to the fact that the grain boundaries are not precisely equidistant in time (owing to the built-in zero-crossing
matching to avoid audible discontinuities), it is difficult to set the Granular Playback Controller to "straight through" (i.e.
exactly normal playback). Hence, in order to compare the compressed signal with the original, a switch has been included
to alternate between the compressed and the original versions. Toggle the switch to appreciate the difference.
Furthermore, by increasing the switch "Leakiness", the modified and original signals are mixed to the output, thereby
enabling simultaneous comparison (for test purposes).
Components used:

|
|