블로그 이미지
Leeway is... the freedom that someone has to take the action they want to or to change their plans.
maetel

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
  • total
  • today
  • yesterday

Category

2008. 5. 21. 17:00 Techne/문성준: SuperCollider
week 2
B. Synthesis I

1. Tone generator & argument

많은 종류의 tone generator들을 SC에서는 UGEN(Unit Generator)으로 분류한다.

UGEN(Unit Generator)
http://en.wikipedia.org/wiki/Unit_generator
Unit Generators form the building blocks for designing synthesis and signal processing algorithms in software. For example, a simple unit generator called OSC could generate a sinusoidal waveform of a specific frequency (given as an input or argument to the function or class that represents the unit generator).
ref.
Computer Music: Synthesis, Composition, and Performance
by Charles Dodge and Thomas A. Jerse

unit generator: an algorithm that performs a particular function of sound generation, modification, or combination. It is controlled by parameters obtained from a score or transducer. (438p)

Each unit generator has input parameters and at least one output. Each performs a specific function of signal generation or modification, or the combination of signals. Many music languages express synthesis algorithms in terms of unit generators, using them as the building blocks with which instruments are made. The internal algorithm of each unit generator has been determined and encoded by the music systems programmer. The musician's task is to interconnect the inputs and outputs of the unit generators to achieve an overall synthesis algorithm that produces the desired result. (72p)

ref.
ChucK : Unit Generators Reference
(all)
ChucK : Language Specification > Unit Generators
Unit Generators are function generators that output signals that can be used as audio or control signals.

{Saw.ar}.play
{FSinOsc.ar}.play
{Pulse.ar}.play


Saw            band limited sawtooth

Saw.ar(freq, mul, add)

Band limited sawtooth wave generator.
freq - Frequency in Hertz (control rate).

See also: LFSaw

// modulating the frequency

{ Saw.ar(XLine.kr(40,4000,6),0.2) }.play;

// two band limited sawtooth waves through a resonant low pass filter

{ RLPF.ar(Saw.ar([100,250],0.1), XLine.kr(8000,400,5), 0.05) }.play;

http://en.wikipedia.org/wiki/Sawtooth
A more general form, in the range −1 to 1, and with period a, is
x(t) = 2 \left( {t \over a} - \operatorname{floor} \left ( {t \over a} + {1 \over 2} \right ) \right )

This sawtooth function has the same phase as the sine function.
A sawtooth wave's sound is harsh and clear.


http://en.wikipedia.org/wiki/440_Hz
A440
is the 440 Hz tone that serves as the standard for musical pitch. A440 is the musical note A above middle C (A4).



FSinOsc        fast sine oscillator

FSinOsc.ar(freq, iphase,mul, add)

Very fast sine wave generator (2 PowerPC instructions per output sample!) implemented using a ringing
filter.  This generates a much cleaner sine wave than a table lookup oscillator and is a lot faster.
However, the amplitude of the wave will vary with frequency. Generally the amplitude will go down as
you raise the frequency and go up as you lower the frequency.
WARNING: In the current implementation, the amplitude can blow up if the frequency is modulated
by certain alternating signals.
freq - frequency in Hertz

{ FSinOsc.ar(800, 0.0, 0.25) }.play;

{ FSinOsc.ar(XLine.kr(200,4000,1),0.0, 0.25) }.play;

// loses amplitude towards the end
{ FSinOsc.ar(FSinOsc.ar(XLine.kr(4,401,8),0.0, 200,800),0.0, 0.25) }.play;

http://en.wikipedia.org/wiki/Electronic_oscillator

http://en.wikipedia.org/wiki/Sine_wave


Pulse            band limited pulse wave

Pulse.ar(freq, width, mul, add)

Band limited pulse wave generator with pulse width modulation.
freq - Frequency in Hertz (control rate)
width - Pulse width ratio from zero to one. 0.5 makes a square wave (control rate)

See also: LFPulse

// modulate frequency
{ Pulse.ar(XLine.kr(40,4000,6),0.1, 0.2) }.play;

// modulate pulse width
{ Pulse.ar(200, Line.kr(0.01,0.99,8), 0.2) }.play;

// two band limited square waves thru a resonant low pass filter
{ RLPF.ar(Pulse.ar([100,250],0.5,0.1), XLine.kr(8000,400,5), 0.05) }.play;


ref.
invalid-file

<Band-Limited Pulse Generator> Ed Doering

 
invalid-file

<Arbitrary Band-Limited Pulse Generation for Built-in Self-test Applications> Benoit Dufort & Gordon W. Roberts, McGill University




'Techne > 문성준: SuperCollider' 카테고리의 다른 글

week 4: Envelop Generator in SuperCollider  (0) 2008.05.28
week 3: B. Synthesis I - Envelopes  (0) 2008.05.21
week 1: A. Basic  (0) 2008.05.21
SupperCollider  (0) 2008.05.17
posted by maetel