Drum loop with a bassline
Scribbletune can be used to generate EDM beats that you'd otherwise point and click to create in a DAW
Before we go on, here's a sample of what we are gonna end up creating using Scribbletune.
In many EDM genres, there is a monotonous kick for 8 bars with a small variation at the end. You can script this variation instead of tweaking notes manually.
Kick
By default a single x
implies a quarter note. Four of these make the common kick pattern:
const ptn = 'xxxx';
Eight bars would be 'xxxx'.repeat(8)
, but we'll do seven and vary the eighth:
const ptn = 'xxxx'.repeat(7);
Define the ending-bar variations:
const A = 'xxx[x[RR]]';
const B = 'xx[x[RR]][x[RR]]';
const C = 'x-[x[RR]]';
Use R
for random on/off events and square braces for extra subdivisions.
Compose the full kick clip:
const kick = scribble.clip({
notes: 'c4',
pattern: ptn + A + ptn + B + ptn + A + ptn + C,
});
Export as MIDI:
scribble.midi(kick, 'kick.mid');
Hats
Closed and open hats with random subdivisions:
const ch = scribble.clip({
pattern: '[xR][[x[xR]]]'.repeat(16),
notes: 'C4',
sizzle: 'sin',
sizzleReps: 32,
});
scribble.midi(ch, 'ch.mid');
const oh = scribble.clip({
notes: 'C4',
pattern: '[-x][Rx][Rx][Rx]'.repeat(8),
});
scribble.midi(oh, 'oh.mid');
Snare
A common snare loop with slight end-of-bar variation:
const D = '-x-x'; // base pattern
const E = '-[xR]-[Rx]'; // variation
const snare = scribble.clip({
notes: 'C4',
pattern: (D + D + E + D + D + E + D + D).repeat(4),
});
scribble.midi(snare, 'snare.mid');
Bassline
Two-part bass using randomNotes from scales:
const bass = scribble.clip({
notes: 'Bb2',
pattern: '[-xRx][-xRR][-xRx][-xxR]'.repeat(2),
randomNotes: scribble.scale('Bb2 minor').slice(1),
accent: '--x-',
});
const bassEnd = scribble.clip({
notes: 'G#2',
pattern: '[-xRx][-xRR][-xRx][-xxR]'.repeat(2),
randomNotes: scribble.scale('Bb2 harmonic minor').slice(2, 5),
accent: '--x-',
});
scribble.midi(bass.concat(bassEnd), 'bass.mid');
This script now produces five MIDI files:
- kick.mid
- ch.mid
- oh.mid
- snare.mid
- bass.mid
I imported these into Ableton Live and rendered them with samples; here's how it sounds: