<div dir="ltr"><br><div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">Hey,</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">
You can collect the values from the ADC by calling it's .last() method.</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">
so for example:</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">float values[32];</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">
int i;</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">for (int i;i<values.size;i++) {</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">
<span class="" style="white-space:pre">       </span>adc.last() => values[i];</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium"><span class="" style="white-space:pre">      </span>samp => now;</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">
}</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">I think what is confusing you is that chuck ugens works sample by sample and not by sending a vector like other languages.</div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">Does this help ?</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">
<br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">Happy chucking,</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">Casper</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:medium">
<br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 7, 2013 at 7:19 PM, Casper Schipper <span dir="ltr"><<a href="mailto:casper.schipper@gmail.com" target="_blank">casper.schipper@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><div style="word-wrap:break-word"><div><br></div><div><div><div style="word-wrap:break-word">
<div>Hey,</div><div><br></div><div>You can collect the values from the ADC by calling it's .last() method.</div><div><br></div><div>so for example:</div><div><br></div><div>float values[32];</div><div>int i;</div><div>
<br></div><div>for (int i;i<values.size;i++) {</div><div><span style="white-space:pre-wrap">   </span>adc.last() => values[i];</div><div><span style="white-space:pre-wrap">      </span>samp => now;</div><div>}</div><div>
<br></div><div>I think what is confusing you is that chuck ugens works sample by sample and not by sending a vector like other languages.</div><div><br></div><div>Does this help ?</div><div><br></div><div>Happy chucking,</div>
<div>Casper</div><div><br></div><div><br></div></div></div><blockquote type="cite"><div style="word-wrap:break-word"><div><br><blockquote type="cite"><pre style="white-space:pre-wrap">Thanks for the fast reply. I have write this code:


fun int[] discreteHaarWaveletTransform( int input[]){
    int sum, difference,length,i;
    int  output[input.cap()];


    for ( (input.cap() >> 1) => length ; true ;  (length >> 1) => length) {
        for (0 => i; i < length; ++i) {
            input[i * 2] + input[i * 2 + 1] => sum;
            input[i * 2] - input[i * 2 + 1] => difference;
            sum => output[i] ;
            difference => output[length + i];
        }
        if (length == 1) {
            return output;
        }

        //Swap arrays to do next iteration
        for (0=>i; i < (length<<1); i++){
            output[i] => input[i];
        }
    }
}




For this reason I need the int input [] array relating to adc input
samples.  I need to extract the "raw" values of the input (without
FFT). I have test with something like that:

adc.chan(0) => UGen inputMic;


Thanks for the help!
</pre></blockquote><div><br></div></div><br><div>
<div style="font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div><font color="#787878">Casper Schipper</font></div><div><font color="#787878"><a href="mailto:casper.schipper@gmail.com" target="_blank">casper.schipper@gmail.com</a></font></div><div><font color="#787878"><a href="http://www.casperschipper.nl/" target="_blank">www.casperschipper.nl</a></font></div>
<div><font color="#787878"><a href="tel:%2B316%2052322590" value="+31652322590" target="_blank">+316 52322590</a></font></div></div>
</div>
<br><div><div>On 7 jun. 2013, at 18:00, <a href="mailto:chuck-users-request@lists.cs.princeton.edu" target="_blank">chuck-users-request@lists.cs.princeton.edu</a> wrote:</div><br><blockquote type="cite">Send chuck-users mailing list submissions to<br>
<span style="white-space:pre-wrap">     </span><a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br><span style="white-space:pre-wrap">       </span><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><span style="white-space:pre-wrap">       </span><a href="mailto:chuck-users-request@lists.cs.princeton.edu" target="_blank">chuck-users-request@lists.cs.princeton.edu</a><br>
<br>You can reach the person managing the list at<br><span style="white-space:pre-wrap">    </span><a href="mailto:chuck-users-owner@lists.cs.princeton.edu" target="_blank">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>Today's Topics:<br><br>   1. Re: Get audio samples of adc (Aur?lien Bondis)<br>   2. Re: EspGrid 0.42 (Michael Heuer)<br>
<br><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium;color:rgba(127,127,127,1.0)"><b>From: </b></span><span style="font-family:'Helvetica';font-size:medium">Aurélien Bondis <<a href="mailto:abondis@kerunix.com" target="_blank">abondis@kerunix.com</a>><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium;color:rgba(127,127,127,1.0)"><b>Subject: </b></span><span style="font-family:'Helvetica';font-size:medium"><b>Re: [chuck-users] Get audio samples of adc</b><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium;color:rgba(127,127,127,1.0)"><b>Date: </b></span><span style="font-family:'Helvetica';font-size:medium">7 juni 2013 17:48:51 CEST<br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium;color:rgba(127,127,127,1.0)"><b>To: </b></span><span style="font-family:'Helvetica';font-size:medium">ChucK Users Mailing List <<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium;color:rgba(127,127,127,1.0)"><b>Reply-To: </b></span><span style="font-family:'Helvetica';font-size:medium">ChucK Users Mailing List <<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>><br>
</span></div><br><br>Hi,<br>I don't know what a wavelet transform is, but can't 'adc =>' work ? or<br>'LiSa' do what you need?<br>(<a href="http://chuck.cs.princeton.edu/doc/program/ugen_full.html#LiSa" target="_blank">http://chuck.cs.princeton.edu/doc/program/ugen_full.html#LiSa</a>)<br>
Sorry if I did not understand the question...<br>Aurélien.<br><br>On Fri, 07 Jun 2013, fernando alonso wrote:<br><br><blockquote type="cite">Hi,<br><br>I want to program de Wavelet Transform, and for it I need to get the<br>
audio samples. Do you know some way to get the audio samples?<br><br><br>Thanks.<br><br>-- <br>Fernando Alonso Martín<br><a href="mailto:Lualobus@gmail.com" target="_blank">Lualobus@gmail.com</a><br><a href="http://roboticnaturalinteraction.com" target="_blank">http://roboticnaturalinteraction.com</a><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><br><br><br><br><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium;color:rgba(127,127,127,1.0)"><b>From: </b></span><span style="font-family:'Helvetica';font-size:medium">Michael Heuer <<a href="mailto:heuermh@gmail.com" target="_blank">heuermh@gmail.com</a>><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium;color:rgba(127,127,127,1.0)"><b>Subject: </b></span><span style="font-family:'Helvetica';font-size:medium"><b>Re: [chuck-users] EspGrid 0.42</b><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium;color:rgba(127,127,127,1.0)"><b>Date: </b></span><span style="font-family:'Helvetica';font-size:medium">7 juni 2013 17:56:23 CEST<br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium;color:rgba(127,127,127,1.0)"><b>To: </b></span><span style="font-family:'Helvetica';font-size:medium">ChucK Users Mailing List <<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:'Helvetica';font-size:medium;color:rgba(127,127,127,1.0)"><b>Reply-To: </b></span><span style="font-family:'Helvetica';font-size:medium">ChucK Users Mailing List <<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>><br>
</span></div><br><br>Hello David,<br><br>This looks very cool.<br><br>The docs mention an <a href="http://esp.ck" target="_blank">esp.ck</a> ChucK file and I see it in the 0.42 .zip<br>file but it is not in the source tree on Google Code.<br>
<br>   michael<br><br><br>On Thu, Jun 6, 2013 at 12:00 PM, David Ogborn <<a href="mailto:ogbornd@mcmaster.ca" target="_blank">ogbornd@mcmaster.ca</a>> wrote:<br><blockquote type="cite">Dear friends,<br><br>I am pleased to announce the official release of version 0.42 of the EspGrid<br>
software - the synchronization and sharing software for laptop ensembles I<br>have developed around the Cybernetic Orchestra at McMaster, during the<br>project "Scalable, Collective Traditions of Electronic Sound Performance"<br>
(supported by Canada's Social Sciences and Humanities Research Council,<br>SSHRC).  The software and some additional helpful files (code/patches) can<br>be downloaded here: <a href="http://esp.mcmaster.ca/EspGrid-0.42-OSX-10.7.zip" target="_blank">http://esp.mcmaster.ca/EspGrid-0.42-OSX-10.7.zip</a><br>
<br>Over the course of the past year, earlier versions of the software have been<br>presented at the Toronto Electroacoustic Symposium, the Audio Engineering<br>Society Convention in San Francisco, and most recently, the<br>
live.code.festival in Karlsruhe, Germany.  This 0.42 release is a "clean-up<br>release" - with better stability and synchronization.  EspGrid has been<br>developed around the ideas of neutrality and hybridity with respect to the<br>
languages and environments employed by laptop and live coding performers.<br>The EspGrid application "sits in the background" and takes care of clock<br>synchronization, to a large degree independent of the diverse and multiple<br>
"foreground" environments in which performers/creators work.  Another<br>participant in the live.code.festival session (chair Alex McLean, if I<br>recall correctly) provided a perfect example of the intent of the EspGrid<br>
software: three electronic musicians find themselves on a train together;<br>despite all using different languages/tools to make their music, they each<br>fire up EspGrid and instantly share a tight common clock and a metronome<br>
that anyone can control.  Jamming ensues...<br><br>The EspGrid software is being made available to community as free and open<br>source software (GNU public license version 3).  The code base of the<br>software includes a large and growing number of unit tests, and development<br>
should proceed according to the principles of test-driven development.  The<br>rudiments of a help/documentation system are in place.  Binary executables<br>exist only for Mac OS X at the present moment but the Windows and Linux<br>
ports of the software are the highest, immediate priority following this<br>release.  Windows and Linux users in mixed laptop ensembles don't need to<br>wait for these ports however: there is a "side chain" mechanism that allows<br>
users/machines without a running grid to piggyback on a user/machine that is<br>running the grid.<br><br>To get/browse the source code, visit the software's Google code site at:<br><a href="http://code.google.com/p/espgrid" target="_blank">http://code.google.com/p/espgrid</a><br>
<br>Enjoy - and feel free to get in touch for help/issues with the software.  I<br>hope that some of you will find this useful, and look forward to working<br>with you on the (gradual) evolution of this tool!<br><br>Yours truly,<br>
David<br><br>--------------------------------------------------------------------------<br>Dr. David Ogborn, Assistant Professor<br>Communication Studies & Multimedia<br>Director, Cybernetic Orchestra<br>McMaster University, Hamilton, Canada<br>
<br><a href="http://esp.mcmaster.ca" target="_blank">http://esp.mcmaster.ca</a><br><a href="http://davidogborn.net" target="_blank">http://davidogborn.net</a><br><a href="http://twitter.com/d0kt0r0" target="_blank">http://twitter.com/d0kt0r0</a><br>
<a href="tel:1-905-525-9140%20ext%2027603" value="+19055259140" target="_blank">1-905-525-9140 ext 27603</a><br><br><br><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><br></blockquote><br><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></div></blockquote></div><br></div></div></div></blockquote></div><br></div>