Goals Microcontroller plugged in
|
Instructions Read the introduction and answer the question Goals Answer all questions
Submit your answers
| An envelope, in digital audio, is a function to alter the characteristics of a sound over time.
One of the most common characteristics to modify is loudness. So instead of just having a note "on" or "off",
an envelope allows us to, for instance, gradually get louder at the beginning or fade out at the end of a note.
The type of envelope we're going to use is called an ADSR Envelope, which is short for Attack, Decay, Sustain, Release. It's called that because those are the four parameters that we'll adjust to create a specific sound. ![]() In our envelope:
Attack is how long (in seconds) it takes the sound to get to it's loudest point. A small value, like 0.1 will start almost right away, while a value like 10 will slowly get louder over 10 seconds. Decay and Sustain are kind of a pair. Sustain is the loudness the note will have for as long as you hold it "on". So, if the sustain is 1, the note will stay at it's loudest. If the value is 0.5 the note will be half it's loudest value. Decay is how long (in seconds) it takes the sound to get from it's loudest, to the Sustain value. So, if you have a Sustain of 0.5 and a Decay of 1, then it will take 1 second for the note to go from full volume (after the attack), to fade down to half volume ,where it will stay for as long as you keep the note "on". Release is how long it takes for the sound to go completely quiet after you tell it to stop. If the Release is 0.1, it will stop almost right away. Where a value of 5, for instance, will take 5 seconds to fade out. Which of the following parameters of the ADSR Envelope is not a length of time?
|
Instructions Connect the circuit and experiment with the Envelope node. Goals Connect the Button to the Envelope
Connect the Sine node to the Multiplier
Connect the Envelope node to the Multiplier
Connect the Multiplier to the Output
Plot the Multiplier node after connecting the circuit
| To use the envelope to control the loudness of the Sine node, we're going to build a circuit.
First make sure you have a button connected to pin 2. Then in the editor, connect the output of that
sensor to the input of the Envelope. Next, connect the output of the Sine node to the audio input of the Multiplier node. Then connect the output of the envelope
to the green value input of the Multiplier node. Finally, connect the output of the Multiplier to the input on the Output node. Congratulations, you've just built a basic Synthesizer!
The button is going to control the "gate" parameter, which is like the on/off switch for the envelope. When the gate switches
from 0 to 1, that signals the envelope to move into the attack phase. When the gate switches from 1 to 0, that tells the
envelope to start the release phase.
Since the envelope outputs a value between 0 and 1, we can control the loudness (or Amplitude) of the Sine wave by multiplying it with the output of the envelope. Sinefrequency:
(1 to 4186.0) ADSREnvelopegate:
(0 to 1) attack: (0.1 to 10) decay: (0.1 to 10) sustain: (0 to 1) release: (0.1 to 10) Output
Multiplyaudio:
Connect Here value:(-9999 to 9999) Now that you've built the circuit, you can change the parameters on the Envelope and see what it sounds like when you press or hold the button.
If you plot the Multiplier node, you can see the changes as well as hear them. Try some different values and see what interesting sounds you can come
up with.
|
Instructions Read the introduction, build the circuit, and answer the question. Goals Connect the Sine node to the Pan node
Connect the Potentiometer to the Pan node
Connect the Pan node to the Output
Plot the Pan node
Answer all questions
Submit your answers
| The audio we've worked with so far has been mono-channel. That means that, if you have stereo speakers, it has sounded
the same in the left and right speaker. Now we're going to work with a stereo effect that will change how the audio sounds
in each speaker.
We're going to use an effect called panning where we can change how much power from a sound goes to each speaker. When you pan a sound all the way left (set panning to 0) it means you can only hear it in the left speaker. All the way right (set panning to 1) is the opposite. Anything in between, like 0.5, will divide the sound proportionally. So, for instance, 0.5 means that half of the power goes to the left and half to the right. Because of the way we perceive sound, this makes it appear to be comming from in between the two speakers! First, Make sure your volume isn't up all the way! Then connect a potentiometer to analog pin 0. This is how we're going to control
the pan. Next, connect the sine generator to the audio input of the pan node. Then connect the potentiometer to the value input
of the pan node. Finally, connect the pan node to the output. Now, when you adjust the potentiometer the audio will pan! If you plot the pan node
you might notice the wave getting smaller as you pan. That's because the plot is showing one channel. As you adjust it, watch the power decrease
and increase in that channel and listen for the changes.
Sinefrequency:
(1 to 4186.0) Output
Panaudio:
Connect Here pan:(0 to 1) Potentiometer
0.00 Which channel has full power when Pan is at 0?
|
Instructions Read the introduction, build the circuit, and answer the question. Goals Connect the Button to the Envelope
Connect the Sine node to the Multiplier
Connect the Envelope node to the Multiplier
Connect the Multiplier to the Pan Node
Connect the LFO to the Pan node
Connect the Pan node to the Output
Plot the Pan node
Answer all questions
Submit your answers
| LFO stands for Low-Frequency Oscillator. An ocillator is any periodic wave (like the waves we've been using to make sounds).
Low-frequecy means that it's peroid is long. Usually a LFO has a frequency under 20Hz. LFO's are often used to make audio effects have a sweeping
quality that follows the wave's slow oscillation. We're going to combine a LFO with the panning and envelope effects you explored already
to make a more interesting sounding synthesizer.
First construct the basic synthesizer just like you did in the envelope lab. Instead of connecting the multiplier directly to the
output, we're going to connect it to the Pan node. Then connect the LFO to the Pan node as well. Finally, connect the Pan node to the Output.
Sinefrequency:
(1 to 4186.0) ADSREnvelopegate:
(0 to 1) attack: (0.1 to 10) decay: (0.1 to 10) sustain: (0 to 1) release: (0.1 to 10) Output
Multiplyaudio:
Connect Here value:(-9999 to 9999) LFOfrequency:
(1 to 4186.0) Panaudio:
Connect Here pan:(0 to 1) Notice the "wobble" that the pan node applies to the sound?
Try adjusting the frequency of the LFO and see what kinds of effects you can generate.
What does the LFO do in this circuit?
|
Instructions You have completed the lesson. You may scroll up to review the lesson. |