Monotonie ist schön source code

Non-realtime synthesis in supercollider to create a 6 hour rising sine tone used for Monotonie ist schön.

(
var server = Server(\nrt,
    options: ServerOptions.new
    .numOutputBusChannels_(1)
    .numInputBusChannels_(1)
);

~duration = 60*60*6;

a = Score([
    [0.0, ['/d_recv',
        SynthDef(\NRTsine, {
            Out.ar(
                0,
                SinOsc.ar(
                        freq: EnvGen.kr(
                            Env.new([73, 700], [~duration], curve=\exp),
                            doneAction: Done.freeSelf,
                        ),
                        mul: 0.5
                    )
                )
        }).asBytes
    ]],
    [0.0, (x = Synth.basicNew(\NRTsine, server, 1000)).newMsg()],
    //[1.0, x.freeMsg]
]);

a.recordNRT(
    outputFilePath: "~/glis_2.wav".standardizePath,
    headerFormat: "wav",
    sampleFormat: "int16",
    options: server.options,
    duration: ~duration,
    action: { "done".postln }
);

server.remove;
)