<div dir="ltr"><div>Hey Elliot,</div><div><br></div><div>You may have seen Ge&#39;s recent email, but if not, here&#39;s an example of how to embed a ChucK VM in C++: <br></div><div><a href="http://chuck.stanford.edu/release/files/examples/chuck-embed/host/chuck-embed.cpp">http://chuck.stanford.edu/release/files/examples/chuck-embed/host/chuck-embed.cpp</a></div><div><br></div><div>The whole example is here:</div><div><a href="http://chuck.stanford.edu/release/files/examples/">http://chuck.stanford.edu/release/files/examples/</a></div><div><br></div><div>~Jack<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 1, 2020 at 10:52 AM S. Elliot Perez &lt;<a href="mailto:s.elliot.perez@gmail.com">s.elliot.perez@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hey, thanks for the information. I&#39;m currently learning DSP and the JUCE framework, so it sounds like I&#39;d be able to incorporate ChucK there as well with the chuck.cpp file. Are there tutorials for that specifically? Or is it roughly the same as the Chunity implementation and I should be able to figure it out by looking at that?<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 2, 2020 at 1:00 AM &lt;<a href="mailto:chuck-users-request@lists.cs.princeton.edu" target="_blank">chuck-users-request@lists.cs.princeton.edu</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send chuck-users mailing list submissions to<br>
        <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>
        <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <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>
        <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 &quot;Re: Contents of chuck-users digest...&quot;<br>
Today&#39;s Topics:<br>
<br>
   1. Efficient analysis &amp; resynthesis for game audio (S. Elliot Perez)<br>
   2. Re: Efficient analysis &amp; resynthesis for game audio<br>
      (Jack Atherton)<br>
<br><br><br>---------- Forwarded message ----------<br>From: &quot;S. Elliot Perez&quot; &lt;<a href="mailto:s.elliot.perez@gmail.com" target="_blank">s.elliot.perez@gmail.com</a>&gt;<br>To: <a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>Cc: <br>Bcc: <br>Date: Fri, 1 May 2020 21:01:01 +0900<br>Subject: [chuck-users] Efficient analysis &amp; resynthesis for game audio<br><div dir="ltr">Hello! <br><div><br></div><div>I&#39;ve been using Pure Data and the Heavy compiler (hvcc) to make procedural audio for games/interactive media pieces the last couple of years. I just started going through the videos of the Kadenze course. The first couple of lessons, I did what Mr. Cook was doing in his ChucK software using Pure Data... but then I got to Session 3 where he showcases a method of resynthesis using two scripts- one to analyze a sound file and output a list of peaks (frequency and amplitude), and one to perform the resynthesis. I was very impressed with how quickly this goes as you can just copy and paste the list from the 1st list into the 2nd one and you already have a working model which you can then begin to tweak. With Pure Data, this would be an exponentially more arduous process of manually looking at a spectral analysis, filling out boxes, connecting them with wires, copying &amp; pasting for each frequency...<br></div><div><br></div><div>I&#39;m curious as to what the possibilities of integrating these ChucK algorithms into standard programming languages like C++/C# for use in game engines. On the download page of ChuCK it says that the newest versions are made to be embedded in other systems. Is there documentation detailing this somewhere? <br></div><br><div>-- </div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b>S・エリオット・ペレス<br><a href="http://www.selliotp.com" target="_blank">www.selliotp.com</a><br></b>Sound Designer for<b> enen<br>インタラクティブサウンドディザイン</b><br><a href="https://youtu.be/xYpc9agfil8" target="_blank"><img src="https://docs.google.com/uc?export=download&amp;id=0B62i4Q4HxWJfNEwzX3o4UWhpTFE&amp;revid=0B62i4Q4HxWJfd1BiUC8yQ0dFbzBveXVIKzF2Rkhrc3dOUmljPQ" alt="http://enengame.com/" width="196" height="109"></a><br><u><b>「エンエン」は日本のAppStoreでリリースされました!</b></u><br><a href="https://itunes.apple.com/us/app/enen/id1164297889?ls=1&amp;mt=8" target="_blank"><img src="https://docs.google.com/uc?export=download&amp;id=0B62i4Q4HxWJfZXhqRXhFR3IyTHM&amp;revid=0B62i4Q4HxWJfdkV5ODNOYXNmL3c0bXlUc1FldnA0RFQxeHhJPQ" alt="https://itunes.apple.com/us/app/enen/id1164297889?ls=1&amp;mt=8" width="153" height="45"></a><br></div></div></div></div></div></div></div>
<br><br><br>---------- Forwarded message ----------<br>From: Jack Atherton &lt;<a href="mailto:lja@ccrma.stanford.edu" target="_blank">lja@ccrma.stanford.edu</a>&gt;<br>To: ChucK Users Mailing List &lt;<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>&gt;<br>Cc: <br>Bcc: <br>Date: Fri, 1 May 2020 07:34:24 -0700<br>Subject: Re: [chuck-users] Efficient analysis &amp; resynthesis for game audio<br><div dir="ltr"><div>Hello!</div><div><br></div><div>There&#39;s documentation for the Unity embedding here: <a href="http://chuck.stanford.edu/chunity/" target="_blank">http://chuck.stanford.edu/chunity/</a></div><div>Compared to Heavy, your ChucK code is compiled at runtime, so you can even assemble ChucK scripts on the fly with string manipulation while your game is currently running.</div><div><br></div><div>If you&#39;re looking to embed ChucK in another program, you will want to use the ChucK class in the core/chuck.cpp file as the interface. You will need to include all of the core/ files and none of the host/ files. The changes we made to ChucK involved separating its core logic (most of it) from its host -- command line and RtAudio interface, as well as reducing its dependencies on global variables so that multiple ChucK VM instances can coexist.</div><div><br></div><div>Then, there&#39;s also the new &quot;global&quot; variables in ChucK. If you add the global keyword to a variable, it&#39;s accessible by name across the entire VM (ChucK instance), and can also be set and gotten from outside ChucK (e.g. from Unity).<br></div><div><br></div><div>~Jack<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 1, 2020 at 5:01 AM S. Elliot Perez &lt;<a href="mailto:s.elliot.perez@gmail.com" target="_blank">s.elliot.perez@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello! <br><div><br></div><div>I&#39;ve been using Pure Data and the Heavy compiler (hvcc) to make procedural audio for games/interactive media pieces the last couple of years. I just started going through the videos of the Kadenze course. The first couple of lessons, I did what Mr. Cook was doing in his ChucK software using Pure Data... but then I got to Session 3 where he showcases a method of resynthesis using two scripts- one to analyze a sound file and output a list of peaks (frequency and amplitude), and one to perform the resynthesis. I was very impressed with how quickly this goes as you can just copy and paste the list from the 1st list into the 2nd one and you already have a working model which you can then begin to tweak. With Pure Data, this would be an exponentially more arduous process of manually looking at a spectral analysis, filling out boxes, connecting them with wires, copying &amp; pasting for each frequency...<br></div><div><br></div><div>I&#39;m curious as to what the possibilities of integrating these ChucK algorithms into standard programming languages like C++/C# for use in game engines. On the download page of ChuCK it says that the newest versions are made to be embedded in other systems. Is there documentation detailing this somewhere? <br></div><br><div>-- </div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b>S・エリオット・ペレス<br><a href="http://www.selliotp.com" target="_blank">www.selliotp.com</a><br></b>Sound Designer for<b> enen<br>インタラクティブサウンドディザイン</b><br><a href="https://youtu.be/xYpc9agfil8" target="_blank"><img src="https://docs.google.com/uc?export=download&amp;id=0B62i4Q4HxWJfNEwzX3o4UWhpTFE&amp;revid=0B62i4Q4HxWJfd1BiUC8yQ0dFbzBveXVIKzF2Rkhrc3dOUmljPQ" alt="http://enengame.com/" width="196" height="109"></a><br><u><b>「エンエン」は日本のAppStoreでリリースされました!</b></u><br><a href="https://itunes.apple.com/us/app/enen/id1164297889?ls=1&amp;mt=8" target="_blank"><img src="https://docs.google.com/uc?export=download&amp;id=0B62i4Q4HxWJfZXhqRXhFR3IyTHM&amp;revid=0B62i4Q4HxWJfdkV5ODNOYXNmL3c0bXlUc1FldnA0RFQxeHhJPQ" alt="https://itunes.apple.com/us/app/enen/id1164297889?ls=1&amp;mt=8" width="153" height="45"></a><br></div></div></div></div></div></div></div>
_______________________________________________<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" rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote></div>
_______________________________________________<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" rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b>S・エリオット・ペレス<br><a href="http://www.selliotp.com" target="_blank">www.selliotp.com</a><br></b>Sound Designer for<b> enen<br>インタラクティブサウンドディザイン</b><br><a href="https://youtu.be/xYpc9agfil8" target="_blank"><img src="https://docs.google.com/uc?export=download&amp;id=0B62i4Q4HxWJfNEwzX3o4UWhpTFE&amp;revid=0B62i4Q4HxWJfd1BiUC8yQ0dFbzBveXVIKzF2Rkhrc3dOUmljPQ" alt="http://enengame.com/" width="196" height="109"></a><br><u><b>「エンエン」は日本のAppStoreでリリースされました!</b></u><br><a href="https://itunes.apple.com/us/app/enen/id1164297889?ls=1&amp;mt=8" target="_blank"><img src="https://docs.google.com/uc?export=download&amp;id=0B62i4Q4HxWJfZXhqRXhFR3IyTHM&amp;revid=0B62i4Q4HxWJfdkV5ODNOYXNmL3c0bXlUc1FldnA0RFQxeHhJPQ" alt="https://itunes.apple.com/us/app/enen/id1164297889?ls=1&amp;mt=8" width="153" height="45"></a><br></div></div></div></div></div></div></div>
_______________________________________________<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" rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote></div>