View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide

sc3 Voicer

Home   How To   Code Pool   Public Library   Theory   Events
Voice-stealing node player. Easy chord playing–just send an array of frequencies. Accepts names of SynthDefs as well as Instr's (which can be nested). Controls can be made global over the whole voicer with a single command, for easy control of filter cutoffs, pitch bends, etc. Ideal for use with MIDIIn (my next project is a VoicerMIDISocket that will allow different voicers to be installed on MIDI channels and automatically route controllers to arguments). – hjh


note: I think the current stuff is located at http://www.duke.edu/~jharkins/sc3/

Voicer-1.tar

Here's a quick example of how easy it is to use with MIDI, even without VoicerMIDISocket.

(
Instr(\cheapharpsi, {
  arg freq, gate;
  var out;
  out = LPF.ar(Pulse.ar(freq, 0.25, 0.25), 12000) 
    EnvGen.kr(Env.adsr(0, 12, 0, 0.1), gate,
    doneAction:0);
  [out,out]
});

v = Voicer.new(10, Instr.at(\cheapharpsi)).releaseDur_(0.1);  // automatically boots localhost

MIDIIn.connect;
MIDIIn.noteOn = { arg src, chan, freq, vel;
  v.trigger1(freq.midicps);
};
MIDIIn.noteOff = { arg src, chan, freq, vel;
  v.release1(freq.midicps);
};
)

// now play your midi keyboard; latency is acceptable

v.cleanup;  // do this when you're done playing to free the synths