[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] some impros



Hi Eddi,

thanks for your comments! i'm listening to your music now an i'm enjoying it a lot.

so, my code is pretty messy now but here's a little bit of what i do in svetlina (the rest and most important is what Maria does with her voice-speech). I drive the improvisation (it is quite planned, actually), through nodes in NodeProxy.

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

a = NodeProxy.audio(s, 2);
a.play;
//INPUT and Random Panning
(
a.source = SynthDef("mic", { arg out = 0, pan = 0, panLo = 2, panHi = 25, density, freq1 = 20, freq2 = 4000;
            Limiter.ar(Out.ar(out, Pan2.ar(SoundIn.ar(0, 1), TRand.kr(-1.0, 1.0,Dust.kr(11), EnvGen.kr(Env.adsr(0.3, 0.1, 1, 0.3, 0.9), 1, doneAction: 2)) ), 0.3))});
)
//Delays
a[1] = \filter -> {arg in, dur= MouseX.kr(0.25, 7, 1), density = 4.2; LeakDC.ar(DelayC.ar(in, 10, [TRand.kr(0.35, 10, Dust.kr(density)), TRand.kr(3.05, 10, Dust.kr(density))], EnvGen.kr(Env.adsr(0.3, 0.1, 0.75, 0.3, 0.9, 'sine'), 1, doneAction: 2)), 0.995) };

// I Have external control with these:

a.set(\density, 0.1);
a.set(\density, 21.31);
a.xlineAt(\density, 27.1, 34.3);
a.lineAt(\density, 59, 100.5);
a[1] = 0;

//REVERB
a[2] = \filter -> {arg in; LeakDC.ar(FreeVerb.ar(in, Rand(0.2, 1), Rand(0.2, 1), Rand(0.2, 1), Rand(0.2, 0.9), in), 0.995, EnvGen.kr(Env.adsr(0.3, 0.1, 1, 0.3, 0.9), 1, doneAction: 2))};

//PitchShift
a[1.1] = \filter -> {arg in, lo = 0.65, hi = 1.01; PitchShift.ar(in, 0.1, TRand.ar(lo, hi, Dust.kr(15)), 0, Rand(0.001, 0.1), 1, in)};

//and controls of that too
(
a.xlineAt(\lo, 0.95, 20);
a.xlineAt(\hi, 1.09, 19);
)

//Resonator (this is the one that produces those bell-like sounds) and controls

(
a[4] = \filter -> {arg in, loFreq = 500, hiFreq = 512 , quiu = 0.005; Resonz.ar(in, TRand.kr(loFreq, hiFreq, Dust.kr(5.5)), quiu, 5, in)};
)

(
a.lineAt(\loFreq, 14230, 23);
a.lineAt(\hiFreq, 17235, 24);
)
a.lineAt(\quiu, 0.1, 25);


|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
for the granulator in the other two tracks i use this, which still needs some work and needs Conductor quark:

(
// allocate a Buffer
s = Server.local;
b = Buffer.alloc(s, 44100 * 5.0, 1);
q = Buffer.alloc(s, 512 *2);
)


(
SynthDef( "inputGran", { | bufnum, pos = 0, sustain = 4, trate = 1, rate = 1, amp = 0.5, panFreq = 9, pL = 0, pR = 0, mix = 0.1, room = 0.1, damp = 0.1, pitchR, dur= 0.1, overlap = 4, width|
    var  clk, in, chain, onsets, thresh, pan, gran, verb;

        thresh = 0.5;
        clk = Impulse.kr(trate);
        width = TRand.ar(width.neg, width, clk).midiratio;
        pos = pos * BufDur.kr(bufnum);
        pan = LFNoise1.ar(panFreq).range(pL, pR);
        in = Limiter.ar(SoundIn.ar(1), 0.5);
        in = PitchShift.ar(in, 0.5, pitchR, 0.1, 0.1, 1);
        chain = FFT(q, in);
        thresh);
    RecordBuf.ar(in, b.bufnum, loop: 0, trigger: onsets);
        gran = TGrains.ar(2, clk, b, rate, pos, dur * overlap * width, pan, amp);
        verb = FreeVerb.ar(gran, mix, room, damp, 1);
    Out.ar(0, verb);
}).store;

Conductor.make({ | con, pos, trate, sustain, dur, overlap rate, amp, panFreq, pL, pR, mix, room, damp, pitchR, width |
    con.gui.use{ ~cvGUI = ~knob};
    pos            .sp(0.5, 0, 1);
    panFreq    .sp(9, 0.05, 50, 0, 'exp');
    pL            .sp(-0.3, -1.0, 0.9);
    pR            .sp(0.3, -0.9, 1.0);
    trate        .sp(1, 0.01, 50);
    sustain    .sp(4, 0.005, 5);
    rate        .sp(1, 0.005, 1.5, 0, 'exp');
    amp            .sp(0.1, 0.01, 1, 0, 'exp');
    mix            .sp(0.1, 0.01, 1.0, 0);
    room        .sp(0.1, 0.01, 1.0, 0);
    damp        .sp(0.1, 0.01, 1.0, 0);
    pitchR        .sp(1, 0.15, 1.75, 0, 'exp');
    dur            .sp(0.5, 0.001, 1.0, 0);
    overlap    .sp(1, 0.1, 10, 0);
    width        .sp( 0, 0, 48);

   
    con.useInterpolator;
   
    con.synth_((
        instrument:         \inputGran,
        bnum:                 b.bufnum),
        [pos: pos,
        pL:    pL,
        pR:    pR,
        trate: trate,
        sustain:    sustain,
        rate:    rate,
        amp:    amp,
        panFreq:    panFreq,
        mix:    mix,
        room:    room,
        damp:    damp,
        pitchR:    pitchR,
        dur:    dur,
        overlap:    overlap,
        width:        width,
                ]);
               
    con.gui.guis = (
        posSustain:    [\rslider, [pos, sustain]],
        panRange:        [\rslider, [pL, pR]]
       
        );

    con.gui.keys = #[posSustain, panRange, [pos, sustain, trate, rate, dur], [overlap, amp, pL, pR, panFreq], [mix, room, damp, pitchR, width]];
    con.useMIDI;

}).show


)

I Hope it helps. also, any suggestions with the coding will be greatly appreciated


Iván n