copyright © 2011 by denny lin1 simple synthesizer part 3 based on floss manuals (pure data)...

13
Copyright © 2011 by Denny Lin 1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny Lin

Upload: ralph-horton

Post on 19-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 1

Simple Synthesizer Part 3

Based on Floss Manuals (Pure Data)“Building a Simple Synthesizer”

By Derek HolzerSlides by Denny Lin

Page 2: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 2

Filters

• Low Pass Filter: Allows frequencies below cutoff to pass through

• High Pass Filter: Allows frequencies above cutoff to pass through

• Band Pass Filter: Allows frequencies within a certain range to pass through; range is specified by its central frequency and its width is specified by the resonance value

• Voltage Controlled Filter: Similar to band pass filter, but the central frequency and resonance can be controlled by audio signals

Page 3: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 3

Filters and Subtractive Synthesis

• Subtractive synthesis starts with a sound that is rich in harmonics, and then selectively subtract harmonics to get a desired sound

• Low pass, high pass, band pass, or voltage controlled filters can be used to remove undesirable harmonics, and the gain of the resulting waveforms can be modulated by an envelope generator

Page 4: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 4

Phone voice using Subtractive Synthesis

• The frequency response of telephones is between 300Hz and 3000Hz

• Can reproduce the sound characteristics of a telephone by subtracting signals outside the telephone frequency response

• Effect of filter is intensified by placing filters in series (cascading)

Page 5: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 5

Envelopes and generators• Envelopes can be used to describe how a pitch or a sound

amplitude changes over time• An ADSR generator is often used to control sound amplitude

changes of an oscillator• The four components in an envelope generator are:

– Attack– Decay– Sustain– Release

• Some older synthesizers added a Hold component:– ADSHR (Korg MS-20)– AHDSR

• ADSR generators can be made from both the line~ and vline~ objects

• Envelopes also be drawn and stored in arrays

Page 6: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 6

Using the line~ generator

• The line and line~ objects take messages that have only two numbers:– Target level– Time in milliseconds

• New messages will over-ride a ramp in progress• The audio version of the line object is line~• Can build ADSR envelopes when used with

delay objects

Page 7: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 7

ADSR Envelope and line~ messagesAttack Decay Sustain Release

AGain

DGain

ADelay DDelayATime DTime STimeRTime

Where DElapsed = ADelay + ATime + DDelay

and SElapsed = DElapsed + DTime + STime

AGain ATime DGain DTime 0 RTime

ADelay DElapsed SElapsed

trigger bang bang bang

Page 8: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 8

An ADSR generator using line~

Page 9: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 9

Using the vline~ generator• The vline~ object has three inlets that take three parameters:

– Target level– TIme in milliseconds– Delay value

• The left inlet can also take sequences of messages that contain target, time, and delay values. A sequence of messages can be used to specify an ADSR envelope

• The message:– 0.8 1000 5, 0.5 1000 1500, 0 500 3300– Ramp up to 0.8 in 1000ms after 5ms delay, ramp down to 0.5 in

1000ms after 1500ms delay, and ramp down to 0 in 500 ms after 3300ms delay

• All delay values are counted from the beginning of the message, so must take into account elapsed time performing previous instructions in the message

Page 10: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 10

ADSR Envelope and vline~ message

Attack Decay Sustain Release

AGain

DGain

ADelay DDelayATime DTimeSTime

RTime

AGain ATime ADelay, DGain DTime DElapsed, 0 RTime SElapsed

Where DElapsed = ADelay + ATime + DDelay

and SElapsed = DElapsed + DTime + STime

Page 11: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 11

An ADSR generator using vline~

Page 12: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 12

Drawing and Storing an Envelope

• An envelope can be directly drawn by hand in an array graph

• This patch uses the line~ object to produce x-axis values from 0 to 99 in 4 seconds

• The audio envelope controls the amplitude of the oscillator

Page 13: Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny

Copyright © 2011 by Denny Lin 13

Controlling Sound Amplitude

• A slider can be used to control the gain when connected to the cold inlet of a multiplication object; output contains zipper noise

• Zipper noise can be eliminated using the line~ object

• Sound amplitude can be controlled by envelopes generated by line~, vline~, and read from an array by tabread4~