Rob,<br><br>WvOut class should be what you are looking for...<br><br><a href="http://chuck.cs.princeton.edu/doc/program/ugen_full.html#WvOut">http://chuck.cs.princeton.edu/doc/program/ugen_full.html#WvOut</a><br><br>Graham<br>
<br><div class="gmail_quote">On Wed, Feb 18, 2009 at 5:16 PM, Robert Poor <span dir="ltr">&lt;<a href="mailto:rdpoor@gmail.com">rdpoor@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
fellow chukka&#39;s:<br>
<br>
I have not yet found an obvious way to record audio input under ChucK control. &nbsp;The SndBuf.write() method is documented as &quot;not yet implemented&quot;, and test code appears to confirm that it isn&#39;t implemented.<br>

<br>
I want to use ChucK to record snippets during a live performance using MIDI input to control when the recording starts, then use ChucK to play back processed snippets. &nbsp;I *really* don&#39;t want to be switching apps (more specifically -- I don&#39;t want to be fiddling on a Mac keyboard), so I need Chuck to control it all.<br>

<br>
So my gambit -- yet to be tested -- is to use ChucK to spawn a command line function to do the recording, such as:<br>
<br>
 &nbsp;def void recordSnippet(string toFilename) {<br>
 &nbsp; &nbsp;system (&quot;sndrecord &quot; + toFilename);<br>
 &nbsp;}<br>
<br>
... where sndrecord is a command-line recorder (such as /Developer/Examples/CoreAudio/Services/AudioFileTools/afrecord).<br>
<br>
Questions, always questions:<br>
<br>
- Given my constrains (real-time recording must be controlled from a MIDI device, not from a Mac keyboard) is this a sensible approach? &nbsp;How have other people managed this?<br>
<br>
- in the ChucK system() call, is there a way to attach to stdin / stdout of a spawned process? &nbsp;In this particular case, I would like to send it a string to stdin of the spawned process to tell it when to stop recording.<br>

<br>
- Aside from the afrecord utility in Mac OS /Developer, are there other command-line recording apps that people use and like?<br>
<br>
Thanks.<br>
<br>
- Rob<br>
<br>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote></div><br>