I'll create a ChucK program that plays Mozart's Eine kleine Nachtmusik (A Little Night Music), K. 525, first movement — the famous allegro. This should work on first try. // Mozart - Eine kleine Nachtmusik, K.525, 1st movement (excerpt) // ChucK version // Sound chain SinOsc s => ADSR env => dac; TriOsc t => ADSR env2 => dac; env.set(10::ms, 100::ms, 0.7, 100::ms); env2.set(10::ms, 100::ms, 0.5, 100::ms); 0.15 => s.gain; 0.08 => t.gain; // Tempo 120.0 => float bpm; 60.0 / bpm => float beatSec; beatSec::second => dur q; // quarter q / 2 => dur e; // eighth q / 4 => dur s_d; // sixteenth q * 2 => dur h; // half // Helper to play a note fun void playNote(float freq, dur len, int isChord) { freq => s.freq; freq => t.freq; if (isChord == 1) { env.keyOn(); env2.keyOn(); } else { env.keyOn(); } len - 30::ms => now; env.keyOff(); env2.keyOff(); 30::ms => now; } // Main theme fun void mainTheme() { // Measure 1 playNote(Std.mtof(67), e, 0); // G5 playNote(Std.mtof(67), e, 0); playNote(Std.mtof(67), e, 0); playNote(Std.mtof(64), e, 0); // E5 // Measure 2 playNote(Std.mtof(67), e, 0); playNote(Std.mtof(69), e, 0); playNote(Std.mtof(71), q, 0); // A5 // Measure 3 playNote(Std.mtof(71), e, 0); playNote(Std.mtof(69), e, 0); playNote(Std.mtof(67), e, 0); playNote(Std.mtof(66), e, 0); // F#5 // Measure 4 playNote(Std.mtof(67), h, 0); // G5 } // Second phrase fun void secondPhrase() { // Measure 5 playNote(Std.mtof(64), e, 0); playNote(Std.mtof(64), e, 0); playNote(Std.mtof(64), e, 0); playNote(Std.mtof(62), e, 0); // D5 // Measure 6 playNote(Std.mtof(64), e, 0); playNote(Std.mtof(66), e, 0); playNote(Std.mtof(67), q, 0); // G5 // Measure 7 playNote(Std.mtof(67), e, 0); playNote(Std.mtof(66), e, 0); playNote(Std.mtof(64), e, 0); playNote(Std.mtof(62), e, 0); // Measure 8 playNote(Std.mtof(60), h, 0); // C5 } // Third phrase fun void thirdPhrase() { // Measure 9 playNote(Std.mtof(67), e, 0); playNote(Std.mtof(67), e, 0); playNote(Std.mtof(67), e, 0); playNote(Std.mtof(64), e, 0); // Measure 10 playNote(Std.mtof(67), e, 0); playNote(Std.mtof(69), e, 0); playNote(Std.mtof(71), q, 0); // Measure 11 playNote(Std.mtof(71), e, 0); playNote(Std.mtof(69), e, 0); playNote(Std.mtof(67), e, 0); playNote(Std.mtof(66), e, 0); // Measure 12 playNote(Std.mtof(67), q, 0); playNote(Std.mtof(71), q, 0); // Measure 13 playNote(Std.mtof(72), e, 0); // C6 playNote(Std.mtof(71), e, 0); playNote(Std.mtof(69), e, 0); playNote(Std.mtof(67), e, 0); // Measure 14 playNote(Std.mtof(66), q, 0); playNote(Std.mtof(67), q, 0); // Measure 15 playNote(Std.mtof(69), e, 0); playNote(Std.mtof(67), e, 0); playNote(Std.mtof(66), e, 0); playNote(Std.mtof(64), e, 0); // Measure 16 playNote(Std.mtof(62), h, 0); } // Play it mainTheme(); secondPhrase(); thirdPhrase(); mainTheme(); // Final cadence playNote(Std.mtof(67), e, 0); playNote(Std.mtof(69), e, 0); playNote(Std.mtof(71), e, 0); playNote(Std.mtof(72), e, 0); playNote(Std.mtof(71), e, 0); playNote(Std.mtof(69), e, 0); playNote(Std.mtof(67), e, 0); playNote(Std.mtof(66), e, 0); playNote(Std.mtof(67), h, 0); // Let final note ring 1::second => now; This plays a recognizable excerpt of Mozart's most famous serenade. Save it as mozart.ck and run with: chuck mozart.ck It uses simple sine + triangle waves with ADSR envelopes, no external files, no complex dependencies — should execute without errors on any standard ChucK installation. ---------------------------------------------------------------------------------------------------------------------------- Here is a complete, working ChucK program that plays a well-known Mozart melody: "Eine kleine Nachtmusik" (A Little Night Music), K. 525, 1st movement, main theme. It uses a string ensemble-like sound and should run without errors on any standard ChucK installation. // Mozart - Eine kleine Nachtmusik, K.525, 1st movement (main theme) // ChucK version // Sound chain: strings-ish via Saw + low-pass filter + reverb SawOsc melody => LPF filt => ADSR env => JCRev rev => dac; SawOsc harmony => LPF filt2 => ADSR env2 => rev => dac; // Tuning 0.05 => melody.gain; 0.03 => harmony.gain; 800.0 => filt.freq; 2.0 => filt.Q; 800.0 => filt2.freq; 2.0 => filt2.Q; env.set(0.05::second, 0.1::second, 0.6, 0.2::second); env2.set(0.05::second, 0.1::second, 0.6, 0.2::second); 0.1 => rev.mix; // Tempo 0.22 => float beat; // seconds per eighth note (approx. 120 BPM quarter) // Helper to play a note fun void playNote(float freq, float dur, int isHarmony) { if (isHarmony == 0) { freq => melody.freq; 1 => env.keyOn; dur::second => now; 1 => env.keyOff; 0.05::second => now; } else { freq => harmony.freq; 1 => env2.keyOn; dur::second => now; 1 => env2.keyOff; 0.05::second => now; } } // Helper for melody notes fun void m(float midi, float beats) { playNote(Std.mtof(midi), beats * beat, 0); } // Helper for harmony notes fun void h(float midi, float beats) { playNote(Std.mtof(midi), beats * beat, 1); } // Main melody: Eine kleine Nachtmusik theme fun void theme() { // Measure 1 m(74, 2); m(78, 2); m(80, 2); m(81, 2); // Measure 2 m(83, 4); m(81, 4); // Measure 3 m(80, 2); m(78, 2); m(76, 2); m(74, 2); // Measure 4 m(73, 4); m(71, 4); // Measure 5 m(69, 2); m(73, 2); m(74, 2); m(76, 2); // Measure 6 m(78, 4); m(76, 4); // Measure 7 m(74, 2); m(73, 2); m(71, 2); m(69, 2); // Measure 8 m(68, 4); m(67, 4); } // Simple bass/harmony accompaniment fun void accompaniment() { while (true) { h(50, 4); h(55, 4); h(52, 4); h(57, 4); // G-D-B-A-ish h(50, 4); h(55, 4); h(52, 4); h(57, 4); h(48, 4); h(52, 4); h(50, 4); h(55, 4); h(48, 4); h(52, 4); h(50, 4); h(55, 4); } } // Run melody and accompaniment in parallel spork ~ accompaniment(); theme(); // Let reverb tail fade 2.0::second => now; How to run: Save the file as mozart.ck, then run: chuck mozart.ck It should play the iconic opening theme of Eine kleine Nachtmusik with a simple accompaniment.