Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: 360 audio
name
code content
( s.waitForBoot({ Routine({ var duration = 60; // Duration in seconds var filePath = "~/Desktop/360_Soundscape.wav".standardizePath; // 1. Define the Synth for a spatialized sound source SynthDef(\SpatialSource, { |out=0, freq=440, az=0, amp=0.2, gate=1| var signal, w, x, y, z; // Generate a placeholder sound (using noise/filters to mimic your list) signal = HPF.ar(PinkNoise.ar(amp), freq) * EnvGen.kr(Env.asr(2, 1, 2), gate, doneAction: 2); // Encode into Ambisonics (B-format) #w, x, y, z = PanB.ar(signal, az, 0, 1); Out.ar(out, [w, x, y, z]); }).add; s.sync; // 2. Start Recording s.prepareForRecord(filePath, 4); // 4 channels for B-format s.record; // 3. Instantiate the 5 Sounds at different angles // [Sound Type, Frequency, Azimuth (-1 to 1)] // -1 = Rear, -0.5 = Left, 0 = Front, 0.5 = Right, 1 = Rear ~wind = Synth(\SpatialSource, [\freq, 100, \az, -0.8, \amp, 0.1]); // Back-Left ~birds = Synth(\SpatialSource, [\freq, 2000, \az, 0.4, \amp, 0.05]); // Front-Right ~car = Synth(\SpatialSource, [\freq, 50, \az, 0.0, \amp, 0.15]); // Center-Front ~chime = Synth(\SpatialSource, [\freq, 800, \az, 0.8, \amp, 0.1]); // Back-Right ~water = Synth(\SpatialSource, [\freq, 500, \az, -0.3, \amp, 0.08]); // Front-Left duration.wait; // 4. Cleanup and Save [~wind, ~birds, ~car, ~chime, ~water].do(_.set(\gate, 0)); 2.wait; s.stopRecording; "File saved to Desktop as 360_Soundscape.wav".postln; }).play; }); )
code description
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change