Sounds Logical
home

WaveWarp 2.0 Example DrawingBoard

Index Current Example DrawingBoard Group Previous Example DrawingBoard Group Next Example DrawingBoard Group Previous Example DrawingBoard Next Example DrawingBoard Bottom of Page

Description | Components Used

TimeStretchExample1

Description
Time Stretch Example 1 Illustrates how to achieve time-stretching WITHOUT pitch shifting using the well-known technique of "grain repititions". It works as follows: samples are read into the grain buffer of length determined by the "Grain size". This grain is then played twice, determined by the fact that the "Grain Repititons" is set equal to 1 i.e. the grain is played normally then repeated once. Next, the audio is played normally for a length of time according to the "Hop size". Next, the grain is refilled and played twice, and so on. Increasing the "Grain size" and/or reducing the "Hop size" has the effect of increasing the total time stretch. Consideration of how the Granular Playback Controller functions, leads to the following relationship between the stretch factor and the parameter settings. Defining the Stretch_ratio as the factor by which the time duration is stretched, then: Stretch_ratio = (2+R)/(1+R) where R is defined as: R = ( Hop_size / Grain_size) Example settings: Stretch_ratio Grain_size Hop_size R ---------------------------- ---------------- -------------- -------------- 1.1 (i.e. 10%) 1000 9000 9 (default) 1.2 (i.e. 20%) 1000 4000 4 1.3 (i.e. 30%) 1000 2330 2.33 Note that the Grain_size can also be used to adjust the total Stretch_ratio. In the above examples it has been kept constant for simplicity, and only the Hop_size has been adjusted. Depending on the source material, audible artifacts may be heard (due to irregular grain boundaries), especially at large stretch factors (as in this example). More sophisticated time-stretch 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 stretched signal with the original, a switch has been included to alternate between the stretched 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:

Index Current Example DrawingBoard Group Previous Example DrawingBoard Group Next Example DrawingBoard Group Previous Example DrawingBoard Next Example DrawingBoard Top of Page

home - news - products - store - support - site map - company info
© 2007 Sounds Logical. All rights reserved.
Sounds Logical
legal notice - privacy statement