Sound & Rhythm

Shaders led by their sound: synthesis, envelopes and rhythm worked out on the GPU, with a picture that moves to them.

Take them in this order: each one uses what the ones before it showed. The same shaders, newest first, are on the topic’s page.

Sign in and the exercises you pass are marked here. Nothing is kept otherwise.

  1. Step 1 of 3

    A Shader That Keeps the Beat

    A drum machine drawn as a clock. Four rings of sixteen cells, one ring for each instrument, and a hand that sweeps round once a bar; where it passes a lit cell, that drum plays and the cell flashes. The sound and the picture are never told about each other. Both work out the same pattern and the same clock from the time, so they can't drift apart.

    Teaches: A sequencer in the sound, the picture synced to it

    Builds on Kaleidoscope

    5 exercises
    1. Four tracks and a pattern Make this step
    2. Swing and dice Make this step
    3. Keeping the beat Finish it
    4. Match the sliders Find the values
    5. Find the bug Put it right
  2. Step 2 of 3

    Pulse Synth

    A small FM synthesizer and the oscilloscope watching it. An arpeggio plays, each note one sine wave whose phase is bent by another, shaped by an attack, decay, sustain and release. The picture calls the sound's own function and draws its samples, left and right, as two glowing traces a few cents apart, with the note's envelope above them and the sidebands the bending makes below.

    Teaches: FM synthesis and envelopes, a picture drawn from its own waveform

    Builds on Kaleidoscope, A Shader That Keeps the Beat, Murmuration

    5 exercises
    1. Notes and envelopes Make this step
    2. Frequency modulation Make this step
    3. Pulse Synth Finish it
    4. Match the sliders Find the values
    5. Find the bug Put it right
  3. Step 3 of 3

    Wind Chimes

    Five metal tubes in the wind. A struck tube rings in several modes at once, at 1, 2.76, 5.40 and 8.93 times its lowest pitch, each dying away at its own rate, and the sound adds those sines for every strike. The picture lights each tube along the shapes of its ringing modes, dark at their nodes, and draws all twenty partials as lines along the bottom, as tall as they ring.

    Teaches: Modal synthesis: struck tubes ring with their own partials

    Builds on A Shader That Keeps the Beat, Pulse Synth

    3 exercises
    1. Five tubes in the wind Make this step
    2. Match the sliders Find the values
    3. Find the bug Put it right

Other paths Start here Noise & Texture Shapes & Symmetry 3D Scenes Particles & Simulation Light & Materials Atmosphere Fractals Geometry