Session session_1772039696909
Practice Journal
Here’s a simple drone using a single SynthDef with evolving parameters:
// 1. Define SynthDef and write to disk
SynthDef(\drone, { |freq = 220, amp = 0.3, gate = 1|
var env = EnvGen.ar(Env.perc(0.1, 10), gate, doneAction: 2);
var sig = Blip.ar(freq, amp * 0.1) * env;
var filtered = sig * LPF.ar(sig, 800);
Out.ar(0, filtered ! 2);
}).writeDefFile;
// 2. Build Score with ONLY explicit [time, message] pairs
Score([
[0.0, [\s_new, \drone, 1001, 0, 0, \freq, 220, \amp, 0.3]],
[2.0, [\n_set, 1001, \freq, 220 * 1.059463]], // Up a semitone
[4.0, [\n_set, 1001, \freq, 220 * 1.059463 * 1.059463]], // Up another semitone
[6.0, [\n_set, 1001, \freq, 220 * 1.059463 * 1.059463 * 0.943874]], // Down a whole tone
[8.0, [\n_set, 1001, \gate, 0]],
[8.0, [\c_set, 0, 0]]
]).recordNRT(
outputFilePath: "~/output.wav".standardizePath,
headerFormat: "WAV",
sampleFormat: "int16",
sampleRate: 44100,
options: ServerOptions.new.numOutputBusChannels_(2),
duration: 10,
action: { 0.exit }
);
This creates a simple drone that:
- Starts with a 220Hz fundamental frequency
- Uses a Blip oscillator for a buzzy tone
- Has a low-pass filter that evolves over time
- Changes pitch gradually over the duration
- Has a 10-second duration
The drone evolves through pitch changes while maintaining a consistent texture. The Blip oscillator creates a buzzy, harmonic-rich sound that works well for drone textures.