rev
2014-08-03 10:40:43 UTC
Hi list,
I'm bothering You again after a week I'm struggling with \VoicerMIDI event
generator. My goal is to register some notes from a MIDI keyboard to a
MIDIRecBuf, then play them again on a Voicer I defined. Here is my code:
---CODE---
//Instr definition
Instr(\base, {
arg freq =440, gate=1, ctrl=#[0,0,0], ctrr=#[0,0,0];
var signal, amp;
amp = Latch.kr(gate, gate);
signal=LFSaw.ar(Vibrato.ar(DC.ar(freq),ctrr[0]*1000,ctrl[0]*0.5));
Out.ar(0,abs(ctrr[0]*ctrl[0])*EnvGen.ar(Env([0,1,0.6,0.3,0],[0.01,0.5,0.2,1]),
gate) * signal);
},#[nil]);
//Voicer, MIDISocket and MIDIManager
v = Voicer(10, \base,[\ctrl, b.asMap, \ctrr, c.asMap]); //it is taking some
external controls
t = TempoClock.new(100/60);
v.clock_(t);
k = VoicerMIDISocket([3,\omni], v);
m = MIDIBufManager.new(chan:[3,\omni]);
m.gui
---END CODE---
The above is working for direct keyboard notes interpretation (i.e: I hear
my instr playing when I press the keyboard keys) and for MIDI registration
(I see the MIDIRecBuf getting full on its GUI and I can play some notes with
a Pbind).
But I can't hear the buffer using:
---CODE---
// A slightly edited version of \VoicerMIDI example found in Voicer help
p = Pbind(
\note, Pseq(m[0].notes, inf),
\voicer, v,
\latency, 0.5,
\midi, true,
\gate, 1
).play(protoEvent: Event.makeProto(\voicerMIDI));
---END CODE---
Although this simpler structure is working but non playing on my instrument:
---CODE---
p = Pbind(
#[midinote, delta, sustain, amp], Pseq(m[0].notes).collect(_.asArray);
).play;
---END CODE---
I feel like I'm missing some details in \VoicerMIDI but I couldn't find
other working examples over the web, nor I was able to get any more
information from the source code and the help file.
Maybe someone could help?
Thank You!
Regards,
rev
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/VoicerMIDI-how-does-it-work-tp7612667.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
I'm bothering You again after a week I'm struggling with \VoicerMIDI event
generator. My goal is to register some notes from a MIDI keyboard to a
MIDIRecBuf, then play them again on a Voicer I defined. Here is my code:
---CODE---
//Instr definition
Instr(\base, {
arg freq =440, gate=1, ctrl=#[0,0,0], ctrr=#[0,0,0];
var signal, amp;
amp = Latch.kr(gate, gate);
signal=LFSaw.ar(Vibrato.ar(DC.ar(freq),ctrr[0]*1000,ctrl[0]*0.5));
Out.ar(0,abs(ctrr[0]*ctrl[0])*EnvGen.ar(Env([0,1,0.6,0.3,0],[0.01,0.5,0.2,1]),
gate) * signal);
},#[nil]);
//Voicer, MIDISocket and MIDIManager
v = Voicer(10, \base,[\ctrl, b.asMap, \ctrr, c.asMap]); //it is taking some
external controls
t = TempoClock.new(100/60);
v.clock_(t);
k = VoicerMIDISocket([3,\omni], v);
m = MIDIBufManager.new(chan:[3,\omni]);
m.gui
---END CODE---
The above is working for direct keyboard notes interpretation (i.e: I hear
my instr playing when I press the keyboard keys) and for MIDI registration
(I see the MIDIRecBuf getting full on its GUI and I can play some notes with
a Pbind).
But I can't hear the buffer using:
---CODE---
// A slightly edited version of \VoicerMIDI example found in Voicer help
p = Pbind(
\note, Pseq(m[0].notes, inf),
\voicer, v,
\latency, 0.5,
\midi, true,
\gate, 1
).play(protoEvent: Event.makeProto(\voicerMIDI));
---END CODE---
Although this simpler structure is working but non playing on my instrument:
---CODE---
p = Pbind(
#[midinote, delta, sustain, amp], Pseq(m[0].notes).collect(_.asArray);
).play;
---END CODE---
I feel like I'm missing some details in \VoicerMIDI but I couldn't find
other working examples over the web, nor I was able to get any more
information from the source code and the help file.
Maybe someone could help?
Thank You!
Regards,
rev
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/VoicerMIDI-how-does-it-work-tp7612667.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/