Sunday 11 November 2012

Granulate

Granulate - the gateway to granular synthesis

Granulate takes a signal and breaks it up into a series of sound grains. The over all length of the grain is passed into granulate:


(?signal,50)granulate !new


In the above, signal is broken up into 50ms grains. The grains are faded in and out so that the first 25 milliseconds (in the above) are fading in and the second are fading out.

The result of Granulate is a bunch of bunches. Each inner bunch consists of a sample as the grain and the time in milliseconds from which it came. Passing the output of Granulate into MixAt will exactly reproduce exactly the original signal appart from the first half and last half of a grain which are missing causing a short fade in and fade out section.

Here is a test case for Granulate:


[ Granulates a singal so that the middle section when reconstructed and mixed
  with the orignal should be within rounding error of silent
]
(10000,440)SinWave !signal
(?signal,50)granulate !new
>new MixAt Normalise !dog
(>dog,>signal Invert)Mix !dog
0 !zero
(
   1000,2000,
   {
      !x
      (>zero,((?dog,>x)ValueAt,2)**)+ !zero
   }
)Repeat
(?zero,0.1)LT Println

No comments:

Post a Comment