Difference between revisions of "SuperCollider"

From Noah.org
Jump to navigationJump to search
m
Line 1: Line 1:
 
[[Category: Engineering]]
 
[[Category: Engineering]]
 
[[Category: Audio]]
 
[[Category: Audio]]
 +
 +
== Running SuperCollider ==
 +
 +
<pre>
 +
Language | Reboot Server
 +
Language | Evaluate File
 +
</pre>
 +
 +
== Feedback with frequency shift ==
 +
 +
This creates an echo feedback with a frequency shift. All sounds are shifted higher in frequency before being played back in the audio output. If the microphone is on then you should get some interesting feedback. You will have to adjust the microphone sensitivity and the output volume. You can adjust for the balance of feedback that either  settles down or never settles down, depending on what you want.
 +
<pre>
 +
// mono: patch input to output with frequency shift.
 +
(
 +
SynthDef("help-AudioIn",{ arg out=0;
 +
Out.ar(out,
 +
FreqShift.ar(DelayC.ar(LPF.ar(AudioIn.ar(1),1000),0.2),50,0)
 +
)
 +
}).play
 +
)
 +
 +
// FreqShift.ar(LPF.ar(AudioIn.ar(1), 1, 600, 0),10)
 +
// FreqShift.ar(AudioIn.ar(1),300,0)
 +
// FreqShift.ar(DelayC.ar(LPF.ar(AudioIn.ar(1),1000),0.2),50,0)
 +
//    FreqShift(LPF.ar(AudioIn.ar(1),2000),200,0)
 +
//Filter.Formlet.dumpClassSubtree
 +
// LPF.ar(FreqShift.ar(AudioIn.ar(1,10),
 +
// MouseX.kr(-500,500)), 1000)
 +
</pre>
  
 
== Record Microphone into a buffer for later processing ==
 
== Record Microphone into a buffer for later processing ==

Revision as of 10:28, 14 February 2017


Running SuperCollider

Language | Reboot Server
Language | Evaluate File

Feedback with frequency shift

This creates an echo feedback with a frequency shift. All sounds are shifted higher in frequency before being played back in the audio output. If the microphone is on then you should get some interesting feedback. You will have to adjust the microphone sensitivity and the output volume. You can adjust for the balance of feedback that either settles down or never settles down, depending on what you want.

// mono: patch input to output with frequency shift.
(
SynthDef("help-AudioIn",{ arg out=0;
	Out.ar(out,
FreqShift.ar(DelayC.ar(LPF.ar(AudioIn.ar(1),1000),0.2),50,0)
	)
}).play
)

//		FreqShift.ar(LPF.ar(AudioIn.ar(1), 1, 600, 0),10)
//		FreqShift.ar(AudioIn.ar(1),300,0)
//		FreqShift.ar(DelayC.ar(LPF.ar(AudioIn.ar(1),1000),0.2),50,0)
//    FreqShift(LPF.ar(AudioIn.ar(1),2000),200,0)
//Filter.Formlet.dumpClassSubtree
// 		LPF.ar(FreqShift.ar(AudioIn.ar(1,10),
//			MouseX.kr(-500,500)), 1000)

Record Microphone into a buffer for later processing

// IXI tutorial #4
// Record into an 8 second mono buffer.
b = Buffer.alloc(s, 44100 * 8.0, 1);
(
SynthDef(\recBuf,{ arg out=0, bufnum=0;
	var in;
	in = AudioIn.ar(1);
	RecordBuf.ar(in, bufnum);
}).load(s);
)

// record into the buffer
x = Synth(\recBuf, [\out, 0, \bufnum, b.bufnum]);
x.free;

// play it back using the playBuf synthdef created above
z = Synth(\playBuf, [\bufnum, b.bufnum])
z.free;

// save buffer to disk as an AIFF soundfile.
b.write("myBufRecording.aif", "AIFF", 'int16');