CS 276 - Synthesis Lab (obsolete - Ess version)
The purpose of this lab is to learn how to work with Unit Generators
(UGens) such as classes AudioSamples
- Start up Processing and copy in the GenerateSines
example from the sample code page. Try running it, but make sure
your computer's volume is set at a reasonable level first. Your
should hear two pure tones, both at the same pitch and separated by
about a second of silence.
Briefly, this sketch creates an empty AudioSamples,
initializes it to hold 6 seconds of sound (though note the parameters
are always expressed in milliseconds), and has two sine waves of varying
duration copied into it, then played. The SineOsc ugen
is initialized to play a pitch based on a frequency of 480 Hz, at an
amplitude of 0.1 units.
- Modify your copy of GenerateSine as described below. I recommend
making one change one at a time, making sure each works, then
demonstrating them all together.
You've just created a simple software synthesizer, using a very basic additive
Demonstrate the code and results to the instructor.
- For help with the methods, check the documentation for the SinOsc
and AudioSamples constructor and methods,
Note: the docs don't mention it, but SinOsc
is a subclass of AudioSamples
- Switch drivers. Make a new sketch and copy in the full-blown AdditiveSynthesis
example from the sample code page. Run this example as
well. Experiment with different unit generators; for example, you
can try changing the SineWave
objects to TriangleWave
objects. Or combine SineWave
UGens in any combination (or any other subclass of AudioGenerator).
Demonstrate what you get.