<div dir="ltr"><div><div><div>Hello Vitalije,<br><br></div>If clipping as Perry describes below is not the problem, or if you would like more flexibility in routing audio out of ChucK to other applications, I would suggest looking in to jack<br><br><a href="http://jackaudio.org/">http://jackaudio.org/</a><br><br></div>After you have jackd configured and running with a few applications (say a mixer/router such as patchage or QjackCtl and something to record with, e.g. jack_capture or ardour), then you could recompile ChucK for jack and route ChucK audio out to your recording app via the jack router.<br><br>That said, I've never had very good luck with jack on ubuntu/linux mint distributions, probably because PulseAudio has its evil tentacles all over the place and is nearly possible to remove. If anyone has suggestions for a linux distribution that runs jack + ardour + chuck well without any headaches I would welcome them. I typically run ChucK on linux out to a hardware mixer and into my DAW on another computer.<br><br></div><div>On OSX there is an audio routing utility called SoundFlower or you can try JackOSX.<br></div><div><br></div> michael <br><div><div><div><div><div><div class="gmail_extra"><br><a href="http://jackaudio.org/applications/">http://jackaudio.org/applications/</a><br><a href="http://drobilla.net/software/patchage/">http://drobilla.net/software/patchage/</a><br><a href="http://qjackctl.sourceforge.net/">http://qjackctl.sourceforge.net/</a><br><a href="https://ardour.org/">https://ardour.org/</a><br><a href="http://rogueamoeba.com/freebies/soundflower/">http://rogueamoeba.com/freebies/soundflower/</a><br><a href="http://www.jackosx.com/">http://www.jackosx.com/</a><br><br><br><div class="gmail_quote">On Sat, Jan 24, 2015 at 1:54 PM, Perry Cook <span dir="ltr"><<a href="mailto:prc@cs.princeton.edu" target="_blank">prc@cs.princeton.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It's likely just overloading and clipping on the output file. WvOut<br>
and WvOut2 must quantize to 16 bits to write out the file. So<br>
numbers that are greater than +/- 1.0 will overload. If this is<br>
really the problem (likely), then there's an easy fix. There's a<br>
method called fileGain() that sets an extra gain before the file<br>
is written out. The default is of course 1.0, but you can change<br>
it to anything. Example useage:<br>
<br>
<br>
MyPatch => WvOut bob => blackhole;<br>
"mywavfile.wav" => bob.wavFilename;<br>
<br>
0.5 => bob.fileGain; // This is your friend for writing non-clipped files<br>
<br>
while (now < then) {<br>
// do whatever;<br>
}<br>
<br>
bob.closeFile();<br>
<br>
<br>
Hope this helps. If not let us know and we'll dig deeper.<br>
<br>
PRC<br>
<br>
<br>
> On Jan 24, 2015, at 9:00 AM, <a href="mailto:chuck-users-request@lists.cs.princeton.edu">chuck-users-request@lists.cs.princeton.edu</a> wrote:<br>
><br>
> Send chuck-users mailing list submissions to<br>
> <a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
><br>
> To subscribe or unsubscribe via the World Wide Web, visit<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>
> or, via email, send a message with subject or body 'help' to<br>
> <a href="mailto:chuck-users-request@lists.cs.princeton.edu">chuck-users-request@lists.cs.princeton.edu</a><br>
><br>
> You can reach the person managing the list at<br>
> <a href="mailto:chuck-users-owner@lists.cs.princeton.edu">chuck-users-owner@lists.cs.princeton.edu</a><br>
><br>
> When replying, please edit your Subject line so it is more specific<br>
> than "Re: Contents of chuck-users digest..."<br>
><br>
><br>
> Today's Topics:<br>
><br>
> 1. WvOut sample size (????????? ????????)<br>
><br>
><br>
> ----------------------------------------------------------------------<br>
><br>
> Message: 1<br>
> Date: Fri, 23 Jan 2015 20:22:21 +0100<br>
> From: ????????? ???????? <<a href="mailto:vitalije@kviziracija.net">vitalije@kviziracija.net</a>><br>
> To: <a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
> Subject: [chuck-users] WvOut sample size<br>
> Message-ID: <<a href="mailto:54C29F6D.8070701@kviziracija.net">54C29F6D.8070701@kviziracija.net</a>><br>
> Content-Type: text/plain; charset=utf-8; format=flowed<br>
><br>
> Hello,<br>
> I am a new member of this list.<br>
> I have made some ChucK program that sounds good when performed by ChucK<br>
> VM. However, when I record this music through WvOut in to file and later<br>
> play recorded file using system player, I hear some cracks (distortions,<br>
> noise).<br>
> It seems to me that it is some conversion taking place during recording.<br>
> In the documentation of WvOut class it is suggested that MATLAB file<br>
> format will write 64-bit floats. But even with that precision I get the<br>
> same sound in file. I have looked in to the source code and found that<br>
> every method of WvOut class (WvOut_ctrl_<filetype>Filename) opens file<br>
> with the same 16-bit sample-size (Stk::STK_SINT16).<br>
><br>
> I have tried naively to change that parameter into Stk::STK_SINT32, and<br>
> recompiled successfully ChucK, but the quality of recorded sound was not<br>
> improved. Actually, file was again 16-bit signed encoded.<br>
><br>
> What can I do to improve quality of recording.<br>
><br>
> My computer is amd-64 Ubuntu 14.04. I have compiled ChucK with 'make<br>
> linux-alsa' command.<br>
><br>
> PS: I tried to record sound from system sound-card by using some other<br>
> programs for recording, but with no success. Either ChucK could not<br>
> access sound-card or a recording program could not access sound-card. It<br>
> seems that ChucK insists on having exclusive rights over sound-card and<br>
> doesn't want to share it with other programs. Even if in my browser is<br>
> opened some site that uses sound, ChucK refuses to start.<br>
><br>
> Vitalije<br>
><br>
><br>
> ------------------------------<br>
><br>
> _______________________________________________<br>
> chuck-users mailing list<br>
> <a href="mailto:chuck-users@lists.cs.princeton.edu">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>
><br>
><br>
> End of chuck-users Digest, Vol 114, Issue 4<br>
> *******************************************<br>
<br>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">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></div></div></div></div></div></div></div>