Bass
A bass is a low note with a shape: how bright it is, and whether it plucks and fades or holds. A sawtooth wave and a low-pass filter give you both.
The sound
A sawtooth has strong overtones above its note. The low-pass filter decides how many survive: turn Cutoff down and the bass gets rounder and deeper; up, and it buzzes.
export const bassSound = (sound: BassSettings): PatternModifierCall[] => [
fn('instrument', sample('sawtooth')), // Rich in overtones, so the filter has work to do.
fn('lowPass', sound.cutoff), // Remove everything above this (Hz): lower is rounder.
fn('attack', 0.005),
fn('decay', sound.decay), // Seconds to fall from the peak to the sustain level.
fn('sustain', sound.sustain), // Level held while the note lasts: 0 = pluck, 1 = organ.
fn('release', 0.05),
fn('gain', 0.3),
]Playing it on its own takes a rhythm, here written next to the sound. Switch to Strudel output to see the values the sliders are playing now.
export const bassAlone = (settings: BassSettings) => chain(
// Eight slots: root, rest, root, fifth, rest, root, octave, fifth.
fn('note', sequence(
pitch('c2'), rest(), pitch('c2'), pitch('g2'),
rest(), pitch('c2'), pitch('c3'), pitch('g2'),
)),
...bassSound(settings),
fn('cpm', 25), // 100 BPM.
)How it is built
| Part | Unit | What it does |
|---|---|---|
instrument(sawtooth) | — | The source: a bright wave with every overtone, so the filter has something to remove. |
lowPass | Hz | Removes frequencies above the cutoff. The most important control for a bass. |
decay | seconds | Time to fall from the first peak to the sustain level. |
sustain | level 0–1 | How loud the note stays while it lasts. 0 plucks; 1 holds like an organ. |
In a groove
Your bass with a kick on beats 1 and 3. They start the bar together; on beat 3 the bass rests and lets the kick through.
export const bassGroove = (settings: BassSettings) => chain(
fn('stack',
chain(fn('note', sequence(KICK, rest(), KICK, rest())), ...kickSound(KICK_DEFAULTS)),
chain(fn('note', sequence(pitch('c2'), rest(), pitch('c2'), pitch('g2'), rest(), pitch('c2'), pitch('c3'), pitch('g2'))), ...bassSound(settings)),
),
fn('cpm', 25),
)Bass and kick
Used in: Bass line · Layer a song