📘 CodingMarble Learn

Sound Synthesis and Sampling

Synthesis makes sound from scratch: an oscillator makes a wave, a filter shapes its colour, and an envelope (ADSR) shapes its loudness over time. Sampling records a real sound as many numbers per second (sample rate) with a set precision (bit depth). Electroacoustic music uses both, often with gesture, text, images and the internet.

🎬 Step-by-step story

  1. An oscillator makes a wave. The simplest one is the sine wave. More waves in the window means a higher pitch.
  2. Change the wave shape and the sound colour (timbre) changes. The bars below show its harmonics.
  3. A filter cuts the high harmonics. Lower the cutoff and a sharp wave turns round and soft.
  4. An envelope shapes loudness in time: attack, decay, sustain, release. Press the button and watch the dot.
  5. Sampling measures a real sound as dots. Few dots make a rough staircase. Many dots look smooth.
  6. Free play: change the wave, pitch, filter and samples. See each effect.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Why does a sine wave sound so plain?

It has only one harmonic. Other waves have many harmonics that add colour. Compare in step 1.

Does more waves in the window change the note?

Yes. More waves per second means higher frequency and a higher pitch. Use the pitch slider.

Why does a filter make the sound softer?

It removes high harmonics, which carry the sharp, bright part. Only the low smooth part is left.

Why does a piano note fade but an organ note does not?

Their envelopes differ: a piano has a quick attack and a falling decay with no sustain; an organ holds its sustain while the key is pressed.

Why do few samples give a bad sound?

Each dot is one measurement. With few dots the wave becomes a rough staircase. Raise the samples slider to see it clean.

Is sampling the same as copying?

Sampling is a way to record. Using someone else’s recording in your music needs permission or a licence.

Sound as a wave

Sound is air moving back and forth. We draw it as a wave. Two things matter most: how many waves per second (frequency, in hertz, Hz, which we hear as pitch) and how tall the wave is (amplitude, which we hear as loudness). The wave shape gives timbre, the "colour" of a sound. 440 Hz is the note A that orchestras tune to.

Synthesis systems: oscillator, filter, envelope

A synthesizer makes sound with electronics or software. Its basic blocks are:

Other methods: additive (add many sine waves, like the harmonic bars), FM (one oscillator bends another) and wavetable (step through stored waves).

Sampling

A computer cannot store a smooth wave. It measures the height of the wave many times a second. Each measure is a sample.

A sampler plays recorded sounds back at different pitches from a keyboard. Producers also use samples in loops, drum kits and sample libraries. Always respect copyright and ask for permission.

Sound, gesture, text and image

Modern electroacoustic works link sound to other things. Gesture: a sensor, a camera or a touch screen turns hand movement into pitch, volume or filter settings. Text: a poem can be spoken, cut into pieces and turned into sound (speech synthesis, text-to-speech). Image: pictures can be drawn as sound (a spectrogram read backwards) or sound can drive visuals, as in live shows and games. The common thread is mapping: deciding which input changes which sound parameter.

Music online

Digital sound files are shared by streaming and download. Files are made smaller by compression: lossless (FLAC, keeps everything) or lossy (MP3, AAC, drops parts we hear least). Browsers can make sound live with the Web Audio system, so synths can run in a web page. Online platforms also bring copyright and licences (for example Creative Commons) and online collaboration between artists far apart.

Electroacoustic music and its criticism

Electroacoustic music uses electronics and recorded sound as its main material. Early landmarks: musique concrète in Paris in the 1940s (tape recordings of real sounds, cut and changed) and the electronic music studios in Cologne (pure synthesised sounds). Later came computers and live electronics.

To write a critique, listen more than once and answer: What sounds are used (recorded or synthesised)? How does the sound change in time? How is space used (left, right, far, near)? What is the structure? What idea or feeling does it make you think of? Support each point with a moment in the piece, not just "I liked it".

Try it: build and see

In the 3D, (1) pick a saw wave, lower the filter and watch the wave soften; (2) set the sample count to 6, then raise it and see the staircase disappear. At home: clap once near a phone voice recorder, then zoom into the waveform in the app. Predict first, then check: where is the attack, where is the release?

Key formulas and definitions

Worked examples

1. What is the period of the note A at 440 Hz?

T = 1 / f = 1 / 440 ≈ 0.00227 s, about 2.27 ms.

2. The note A3 is 220 Hz. What is the A one octave above?

An octave doubles frequency: 220 × 2 = 440 Hz.

3. Why is 44,100 Hz enough for music?

Humans hear up to about 20,000 Hz. The Nyquist rule says the sample rate must be more than twice this, 40,000 Hz. 44,100 Hz is above it.

4. How many samples are in 2 seconds of audio at 48,000 Hz (mono)?

48,000 × 2 = 96,000 samples.

5. How many bytes is 1 minute of CD-quality stereo audio?

44,100 samples/s × 16 bits × 2 channels × 60 s = 84,672,000 bits ÷ 8 = 10,584,000 bytes, about 10.6 MB.

6. A pad sound slowly fades in and fades out after the key is lifted. Describe its ADSR.

Long attack (slow rise), medium decay, high sustain, long release (slow fade).

Common mistakes

Practice quiz

1. Which block makes the basic wave in a synthesizer?
2. What does a low-pass filter remove?
3. In ADSR, "S" stands for:
4. CD sample rate is:
5. The "colour" of a sound is called:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is sound synthesis in simple words?

Making sound from scratch with electronics or software: an oscillator makes a wave, a filter shapes its colour and an envelope shapes its loudness.

What is the difference between synthesis and sampling?

Synthesis builds a sound from waves. Sampling records a real sound as numbers and plays it back.

What is an ADSR envelope?

It is how loudness changes while a note plays: Attack, Decay, Sustain, Release.

Where this is taught

ItalySecondaria di secondo grado – classe 3ªSynthesis and multimedia
ItalySecondaria di secondo grado – classe 4ªSynthesis and multimedia

Learn first

Learn next

Related lessons

All Music lessons