Skip to content

Parameters

passivist edited this page Jan 22, 2017 · 3 revisions

Parameters of granular synthesis

When developing the prototype, especially while playing around with it before I implemented the GUI, a number of parameters concerning the single grains that seemed useful started to emerge:

  • duration
  • length
  • transposition
  • grain-envelope
  • amplitude

Duration

The length of time between the creation of one grain and the next is called duration in my implementation. It could also be described as inter onset-time between grains or as frequency of grain creation but I felt that would have been to closely associated with pitch. It interacts with the "density" parameter to define the length of a grain.

Length / Density

The length of the grains is defined as duration * density. In practice density defines the average number of grains playing no matter if the duration is short or long. This represents a level of abstraction from the low level parameters of length and duration that aren't necessarily meaningful in the context of real time use.

The definition of length in that way also simplifies the management of the grains in the implementation because we know roughly how many grains will be playing at any moment.

Imagine we trigger grains for 1 second. A new grain is created every 1ms and each grain is 2000ms long. After the 1 second we have 1000 grains playing. My implementation is certainly not efficient enough, or my computer fast enough, to handle that amount of playing grains. When the length is defined as a multiple of the duration however, we know even for edge cases that we won't produce far too many grains. This enables us to set the boundaries for the parameters much more generously. By testing I determined that a density of 80 (the length of of the grain is 80 times the duration) worked fairly well and didn't limit the sonic flexibility of the plugin too much.

Pitch / Chords

The pitch of the grains can be manipulated in two ways. With the "transposition" control the pitch can be changed from down 4 octaves to up 4 octaves continuously. The pitch can also be controlled with MIDI input.

Using MIDI input it is also possible to play polyphonically. The processing however isn't done in parallel. When more then one note is pressed on the keyboard the plugin creates grains with a pitch value randomly chosen from the pressed keys. This way of handling "polyphony" ensures that the amount of grain, and thus the density of the sound, doesn't change when playing different amount of notes at once. As a side effect low settings for the density control and medium setting for the duration result in randomly arpeggiated grains and high values for density result in a full chord.

Envelope

Rather than implementing a specific kind of envelope (like a hanning or cosine window) standard for granular synthesis I wanted for the synthesizer to have a variable grain envelope. Lacking a filter (at least the JUCE version) the envelope is a important tool for sculpting the timbre of the resulting sound especially at small grain sizes where the amplitude modulation effects of the envelope become more pronounced.

In the SuperCollider version the envelope is a 4-point envelope function. The first and the last point are set to a fixed position (start and end) and amplitude (zero) while the points in the middle can be freely set in amplitude or position (as long as they don't pass each other).

In the JUCE version I decided to implement the envelope in a way that is a bit faster to control and easier to program (not needing a fancy GUI). Additionally it covers most of the same ground as the SuperCollider implementation but omits some settings I never found myself using anyway.

This envelope has three parameters: center, sustain and curve. sustain controls for how much of the envelope the level is held at the value 1. For example at a sustain of 0.5 the envelope would have the level 1 for half of the duration of the grain. center governs the relationship between the attack, release and sustain of the envelope. The attack of the envelope is defined as (1 - sustain) * center and the release as sustain + attack. The curve parameter sets the curvature of the attack and release segments: negative values curve the segments upward, positive values curve them downward.

Here are some examples of different envelope settings and their resulting envelopes:

  • center: 0.5, sustain: 0, curve: 0 env cent:0.5 sus:0 cur:0

  • center: 0.5, sustain: 0.5, curve: 0 env cent:0.5 sus:0.5 cur:0

  • center: 0, sustain: 0, curve: 0 env cent:0.5 sus:0.5 cur:0

  • center: 1, sustain: 0, curve: 3 env cent:1 sus:0.5 cur:3

  • center: 1, sustain: 0, curve: -3 env cent:1 sus:0.5 cur:3

Amplitude

The Amplitude can be set for all future grains via the volume control or randomized resulting in a rougher more disjointed sound.

<<< last Chapter next Chapter >>>

Clone this wiki locally