|
I promised to get back to you if/when I figured out how to pipe OS X SC Speech into scsynth. Here's the step by step as I *think* I understand it with a bit of code to try. And break. It's all pretty new and rudimentary so comments and suggestions will be a big help; questions? I'll try to answer but I'm no genius with this stuff at the moment.
1. Start JackPilot and the Jack server 2. Change System Preferences >> Sound such that JackRouter is the Input and Output setting. 3. Issue the following server options commands (assuming local is default): Server.default.options.inDevice_("JackRouter"); Server.default.options.outDevice_("JackRouter"); // this should mean the output will come through onboard speakers (Note: I use a Saffire DAC for monitoring -- headphones and speakers -- consequently my outDevice setting is Server.default.options.outDevice_("Saffire"); I'm assuming if SC can see your DAC as one of the sound devices, you might do the same thing. But...) 4. (Re-)Boot the server and double check the routing set-up. 5. Open Routing in JackPilot. You should see, in addition to system input and output (and MIDI stuff unless you've turned it off), an scsynth and a SuperCollider entry. If the SuperCollider entry is not there, run the speech code (below) and it should appear. (This is pretty cludgy, but I don't know how to make it more elegant. Suggestions?) 6. In Routing, connect SuperCollider (Send Ports) to scsynth (Receive Ports); connect scsynth (Send Ports) to system (Receive Ports) AND *disconnect* system (Send ports) from scsynth (Receive Ports) unless you like your FXs accompanied by random screams of feedback. Now run this or something more sophisticated: ( x = SynthDef(\LoopBack, { var src ; // read input src = Normalizer.ar(SoundIn.ar([0,1]), 0.95, 0.01) ; Out.ar([0,1], FreeVerb.ar(src, 0.5, 0.5, 0.5)); }).play; ) then, this (which will benefit from more work and better style): ( var spk2me; spk2me = Routine { var wrdsArray, wrd; // Some Samuel Beckett, "Something There" wrdsArray = [ "something there", "where", "out there", "out where", "outside", "what", "the head what else", "something there", "somewhere outside", "the head" ]; Speech.init(2); wrdsArray.size.do({ arg a; wrdsArray[a].postln; wrd = wrdsArray[a]; while({Speech.channels[0].isActive}, {0.5.wait}); Speech.channels[0].speak(wrd); 1.0.wait; }); // Wait a second before saying it's done 1.0.wait; "done".postln; }.play; ) Thanks for the help so far. ...edN _______________________________________________ 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/ |
|
thanks for posting this - it gives me some interesting insights ...
Am 20.07.11 22:16, schrieb Edward Nixon: > I promised to get back to you if/when I figured out how to pipe OS X SC Speech into scsynth. Here's the step by step as I *think* I understand it with a bit of code to try. And break. It's all pretty new and rudimentary so comments and suggestions will be a big help; questions? I'll try to answer but I'm no genius with this stuff at the moment. > > 1. Start JackPilot and the Jack server > 2. Change System Preferences>> Sound such that JackRouter is the Input and Output setting. > 3. Issue the following server options commands (assuming local is default): > > Server.default.options.inDevice_("JackRouter"); > Server.default.options.outDevice_("JackRouter"); // this should mean the output will come through onboard speakers or: Server.default.options.device_("JackRouter"); // sets in- and out-device at once > > (Note: I use a Saffire DAC for monitoring -- headphones and speakers -- consequently my outDevice setting is > Server.default.options.outDevice_("Saffire"); > I'm assuming if SC can see your DAC as one of the sound devices, you might do the same thing. But...) > > 4. (Re-)Boot the server and double check the routing set-up. > 5. Open Routing in JackPilot. > > You should see, in addition to system input and output (and MIDI stuff unless you've turned it off), an scsynth and a SuperCollider entry. If the SuperCollider entry is not there, run the speech code (below) and it should appear. (This is pretty cludgy, but I don't know how to make it more elegant. Suggestions?) i just tried that and it worked. however, the clue seemes to be that speech is *always* coming over the internal server. so, booting localhost (as default server) *and* internal (for speech purposes only) seems to work just as well - no need to initialise SuperCollider (aka the internal server) via Speech. good to know ... thanks, stefan > > 6. In Routing, connect SuperCollider (Send Ports) to scsynth (Receive Ports); connect scsynth (Send Ports) to system (Receive Ports) AND > *disconnect* system (Send ports) from scsynth (Receive Ports) unless you like your FXs accompanied by random screams of feedback. > > Now run this or something more sophisticated: > ( > x = SynthDef(\LoopBack, { > var src ; > // read input > src = Normalizer.ar(SoundIn.ar([0,1]), 0.95, 0.01) ; > Out.ar([0,1], FreeVerb.ar(src, 0.5, 0.5, 0.5)); > }).play; > ) > > then, this (which will benefit from more work and better style): > ( > var spk2me; > spk2me = Routine { var wrdsArray, wrd; > // Some Samuel Beckett, "Something There" > wrdsArray = [ > "something there", > "where", > "out there", > "out where", > "outside", > "what", > "the head what else", > "something there", "somewhere outside", > "the head" > ]; > Speech.init(2); > wrdsArray.size.do({ arg a; > wrdsArray[a].postln; > wrd = wrdsArray[a]; > while({Speech.channels[0].isActive}, {0.5.wait}); > Speech.channels[0].speak(wrd); > 1.0.wait; > }); > // Wait a second before saying it's done > 1.0.wait; > "done".postln; > }.play; > ) > > Thanks for the help so far. > > ...edN > > > > > > > _______________________________________________ > 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/ > _______________________________________________ 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/ |
|
On 2011-07-20, at 5:30 PM, Stefan Nussbaumer wrote: > <snip/> > i just tried that and it worked. however, the clue seemes to be that speech is *always* coming over the internal server. so, booting localhost (as default server) *and* internal (for speech purposes only) seems to work just as well - no need to initialise SuperCollider (aka the internal server) via Speech. SuperCollider comes up as an entry in Jack when the internal server is booted as you say. But I'm not sure it shuts down when internal server is shut down. It seems to stick. There's another thing I forgot to mention in the initial post: If you shut down Jack server while scsynth is still looking for input/output from Jack, you'll corrupt the scsynth environment such that it will not boot again unless SC is shut down entirely and re-started. The error scsynth throws relates to a missing or corrupt UDP socket. Bad behaviour perhaps -- by someone -- but it makes a bit of sense. All of which is to say, you have to either shut down scsynth and/or re-direct device_ server options away from Jack if you're going to shut down Jack before SC. Which, I guess means, you're not going to shut down Jack before SC! ...edN _______________________________________________ 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/ |
|
Hiho,
On Thursday 21 July 2011 02:15:00 Edward Nixon wrote: > On 2011-07-20, at 5:30 PM, Stefan Nussbaumer wrote: > > <snip/> > > i just tried that and it worked. however, the clue seemes to be that > > speech is *always* coming over the internal server. so, booting > > localhost (as default server) *and* internal (for speech purposes only) > > seems to work just as well - no need to initialise SuperCollider (aka > > the internal server) via Speech. > > SuperCollider comes up as an entry in Jack when the internal server is > booted as you say. But I'm not sure it shuts down when internal server is > shut down. It seems to stick. > > There's another thing I forgot to mention in the initial post: > > If you shut down Jack server while scsynth is still looking for > input/output from Jack, you'll corrupt the scsynth environment such that > it will not boot again unless SC is shut down entirely and re-started. The > error scsynth throws relates to a missing or corrupt UDP socket. Bad > behaviour perhaps -- by someone -- but it makes a bit of sense. it makes sense, as JACK will kill scsynth in that case, and is bypassing the usual shutdown method. Could maybe be fixed by checking the signal that JACK sends scsynth to shutdown, and handling that correctly in scsynth to close the socket. > All of which is to say, you have to either shut down scsynth and/or > re-direct device_ server options away from Jack if you're going to shut > down Jack before SC. Which, I guess means, you're not going to shut down > Jack before SC! correct, you should not be doing that; when it happens it is probably a crash or a problem of some sort anyways. sincerely, marije _______________________________________________ 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/ |
| Powered by Nabble | See how NAML generates this page |
