Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Straighten Up!
name
code content
// Sing whatever pitch you like into the microphone, but have the output conform to the key you press on your connected MIDI keyboard, like a very low-rent Autotune. // by nonprivate April 2009 // best used with headphones // execute one by one... s = Server.local.boot; b = 200; // no. of control bus to use for pitch control ( SynthDef("straightenUp", { |baseFreq = 100| var in, freq, hasFreq, out; in = Mix.new(SoundIn.ar([0,1])); # freq, hasFreq = Pitch.kr(in, ampThreshold: 0.02, median: 7); out = PitchShift.ar(in, 0.08, (baseFreq / freq), 0.0, 0.0); Out.ar(0,[out, out]) } ).send(s); ) s.sendMsg("/s_new", "straightenUp", n = s.nextNodeID, 1, 0); s.sendMsg("/n_map", n, "baseFreq", b); ( c = NoteOnResponder( { |src,chan,note,vel| s.sendMsg("/c_set", b, note.midicps); }, nil, // any source nil, // any channel nil, // any note nil // any vel ); )
code description
Migration from the old SourceForge wiki.
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