[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Voicer / VoicerProxy / pitchbend
Thanks James -
That approach seems to work fine. I have about a dozen possible
synthdefs, I take it there's no big resource issue to keep one
Voicer-instance-per-synthdef in a big list despite only using one at a
time.
I do notice a slight oddity which is that after pushing a new choice
of Voicer to the proxy, the very first pitchbend instruction seems to
get ignored, although all subsequent pitch-bends work fine - nice
sensitivity etc. Easy to work around but a bit odd.
Dan
2009/7/23 James Harkins <jamshark70@xxxxxxxxx>:
> On Jul 23, 2009, at 10:15 AM, Dan Stowell wrote:
>
> Hi -
> I have a VoicerProxy setup which reacts correctly to pitch-bends,
> until I push a new synthdef to the proxy, when the pitchbend stops
> working.
>
> The behavior you're seeing is because the pitch bend control routing over to
> scsynth is part of the Voicer, not the proxy or the MIDI socket. When you
> call addControl on the MIDI socket, it creates a Voicer MIDI Control object
> to pick up the MIDI messages and also creates a global control for pitch
> bend in the Voicer object. Then, when you replace the proxy's referent with
> a brand-new Voicer, the new Voicer doesn't have the global control. The MIDI
> socket will still pick up the pitch bend messages, but the voicer doesn't
> know how to translate that over to the server.
> .gui-ing the proxy illustrates this more clearly.
> A better workflow would be to create the two voicers in advance and manually
> add the pitch bend global control to each (Voicer:mapGlobal). Then you can
> alternate between the two in the proxy.
> (By the way, generally it's a good idea to free a voicer before discarding
> it, in case it allocated control buses or other resources.)
> This seems to work:
> s.boot;
> v = VoicerProxy.new;
> v.gui;
> // Establishes VoicerMIDISocket:
> ~vmidisock = VoicerMIDISocket(14, v);
> (
> ~defName = { |synthdefname = 'harpsi'|
> if(v.voicer.notNil){
> v.voicer.releaseAll;
> };
> Voicer.new(12, synthdefname, bus:Bus.new);
> }
> )
> // Creates voicer:
> ~v1 = ~defName.();
> ~v2 = ~defName.('xylo_v');
> [~v1, ~v2].do { |vc|
> vc.mapGlobal(\pb, nil, 1, [3.midiratio.reciprocal, 3.midiratio, \exp]);
> };
> v.voicer = ~v1;
> // note, this does not create or overwrite the \pb controls created just
> above
> // if the global control already exists, it just points to the existing one
> ~vmidisock.addControl(\pb, \pb, 1, 3);// 3-semitone bend
> // the VoicerMIDIControl actually points to a VoicerGCProxy;
> // this also swaps ~v2's global control into the gcproxy,
> // automatically remapping the MIDI control
> v.voicer = ~v2;
> hjh
>
>
> : H. James Harkins
> : jamshark70@xxxxxxxxxxxxxxxxx
> : http://www.dewdrop-world.net
> .::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:
> "Come said the Muse,
> Sing me a song no poet has yet chanted,
> Sing me the universal." -- Whitman
>
--
http://www.mcld.co.uk
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/