rhoadley.net music research software blogs
aru seminars m&t critski focm1a cmc circuit bending mic2b sensor technology comp 3 sonic art major project
youtube vimeo facebook
Task 11 & 12 | Name: Demos, compositions performances | Set: w11i | Due: w12i | Weighting: assessable (40%) | Courses: cmc2a |
Prev Task: Creative Computing Presentations | Next Task: Beat-cutting with SC | ||||
Task Summary | All CMC2a tasks | VLE |
In preparation
// 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
);
)
SynthDef("autotune", { arg note=50;
var in, freq, hasFreq,out;
in=AudioIn.ar(1);
# freq, hasFreq = Tartini.kr(in);
freq = Clip.ar(freq, 40.midicps, 70.midicps);
//PrintVal.kr(hasFreq);
out = PitchShift.ar(
in,
1/16,
(note.midicps / freq),
0,
0.01
) * 1;
Out.ar(0, out.dup);
}).send(s);
(
// autotune.
s = Server.local;
t = ([0, 1, 3, 4, 7, 11, 12] + 70).midicps;
b = Buffer(s, t.size, 1);
// alloc and set the values
s.listSendMsg( b.allocMsg( b.setnMsg(0, t) ).postln );
{
var index, in, out, f0, fdiff;
var bufnum = b;
in = Pulse.ar(MouseX.kr(t.minItem, t.maxItem)) * 0.1;
f0 = Pitch.kr(in).at(0);
index = IndexInBetween.kr(bufnum, f0);
fdiff = index.frac * (Index.kr(bufnum, index + 1) - Index.kr(bufnum, index));
out = PitchShift.ar(in, 0.1, 1 - (fdiff / f0), 0.01, 0.01);
RLPF.ar(out, [2000, 5000], 0.3)
}.play;
)
b.free;
(
// autotune.
s = Server.local;
t = ([0, 1, 3, 4, 7, 11, 12] + 70).midicps;
b = Buffer(s, t.size, 1);
// alloc and set the values
s.listSendMsg( b.allocMsg( b.setnMsg(0, t) ).postln );
{
var index, in, out, f0, fdiff;
var bufnum = b;
// in = Pulse.ar(MouseX.kr(t.minItem, t.maxItem)) * 0.1;
in=AudioIn.ar(1);
f0 = Pitch.kr(in).at(0);
index = IndexInBetween.kr(bufnum, f0);
fdiff = index.frac * (Index.kr(bufnum, index + 1) - Index.kr(bufnum, index));
out = PitchShift.ar(in, 0.1, 1 - (fdiff / f0), 0.01, 0.01);
RLPF.ar(out, [2000, 5000], 0.3)
}.play;
)
b.free;
The TaskAutotune
Finally
|
You might also be interested in:
The projects and tasks are designed to help you through the various courses and materials that you'll have to deal with, and also to provide an active and practical element to what could otherwise become a rather dry and technical exercise. Tasks are small exercises - you may be asked to complete one or two per week. Projects are larger and carry a higher percentage of the mark. We will undertake two, three, four or more projects and tasks. The final project is usually an individual choice project, and will be worth significantly more than the others in terms of percentages in your portfolio. We will usually try to set aside a time to perform the projects in a public setting.
v1.0b001