Re: nanoKtrl hack

6 views
Skip to first unread message

daniel palkowski

unread,
Jan 16, 2014, 3:07:21 PM1/16/14
to Jascha Narveson, nycsuper...@googlegroups.com
Thx!  I also think we need to revisit incorporating the buss control into the synthdef itself (if such a thing is possible), so it will pick up the buss state at instantiation.  Of course another approach which would obviate that would be to generate synths via Pbinds...


On Thu, Jan 16, 2014 at 2:01 PM, Jascha Narveson <jas...@jaschanarveson.com> wrote:

An array would be a good upgrade here:

q = Array.fill(4, {Bus.control(s, 1)});

Then you can refer to the buses as q[0], q[1], etc.  

cheers,

j




On Jan 16, 2014, at 1:11 AM, Dan Palkowski <in...@meetup.com> wrote:


Your Organizer, Dan Palkowski, sent the following message to some members of New York SuperCollider (SC3) Meetup: 

voila:

s.boot;
MIDIIn.connectAll;



//test synth

SynthDef(\testSyn, {|out, freq=200, amp = 0.1, dur = 10.0, filt = 1000.0, res = 0.1|
var env = EnvGen.kr(Env.perc(Rand(0.01,0.5), dur*Rand(0.1,1.0), 1, -8), doneAction:2)*amp;
out = RLPF.ar( Saw.ar(freq, amp),filt, rq: res)*env;
Out.ar([0,1], out);
}).add;


(
n = MIDIFunc.noteOn ({ | val, num, chan, src | a = Synth("testSyn", [\freq, num.midicps]);num.postln});
o = MIDIFunc.noteOff({a.release});

q = Bus.control( s, 1);
r = Bus.control( s, 1);
t = Bus.control( s, 1);
u = Bus.control( s, 1);
)

n.free;
o.free;
//test for specific incoming controllers, apply specs to each, map parameter (determined by placement in args list)
(
x =MIDIFunc.cc({ | val, num, chan, src |
case
{num == 0}
{q.set(val.midicps);
a.map(1, q)}
{num == 1}
{r.set((val+1.0)/127);
a.map(2, r)}
{num == 2}
{t.set(0.1*(val+1.0));
a.map(3, t)}
{num == 3}
{u.set(100.0*(val+1.0));
a.map(4, u)};

[val, num, chan, src].postln
});

)

[x,a,n,o,q,r,t,u].free;



To visit New York SuperCollider (SC3) Meetup, go here:
http://www.meetup.com/nyc-supercollider/

Add in...@meetup.com to your address book to receive all Meetup emails
To manage your email settings, click here
Start a Meetup in January and save 50%! http://www.meetup.com/create/


keith patchel

unread,
Jan 16, 2014, 4:17:16 PM1/16/14
to nycsuper...@googlegroups.com
Thanks Dan !!     sorry I had to run last night....I would love to get SC working in real time........I think I will get a Korg Nano

best Keith

--
You received this message because you are subscribed to the Google Groups "nycsupercollider" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nycsupercollid...@googlegroups.com.
To post to this group, send email to nycsuper...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nycsupercollider/CABVmqUPEnPvy-SL5PBWRP%3Deq7jJU%2BWBCG2D_1s-mugBm7XGbmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

very best regards

Keith


http://keithpatchel.com

 
2010 Composer for Emmy nominated HBO documentary "Finishing Heaven"
Winner Best Composer 2011 Manhattan Film Festival   for  "Crumble"
Winner Best Composer 2010 New York International Film Festival   for "Crumble"



Reply all
Reply to author
Forward
0 new messages