[Csnd] Csound IDE in workshop, diskin on the web
Date | 2020-10-23 19:19 |
From | Tarmo Johannes |
Subject | [Csnd] Csound IDE in workshop, diskin on the web |
Hi, First, compliments again to the Csound web IDE https://ide.csound.com/! I had a workshop yesterday where I used the web IDE - I shared my project link and it was so comfortable to write the code, explain and comment it, participants could get the code easily be refreshing their pages and they could experiment and tweak the code. Really convenient! Secondly, thank you Steven for making @kunstmusik/csound npm module and providing clear examples for React/Csound projects https://github.com/kunstmusik/learn-synthesis/! I got my first test-project nicely working but I cannot find a solution how to load and play audio files with diskin? In the Csound WebAudio module there is csound.CopyUrlToLocal(url,dest) but by the CsoundObj that I used following the example, the method is not there. My Csound initialisation code looks like: useEffect(() => { I guess I should load the files to memory somewhere here, but how? I want to use a bunch of ogg files for playing different notes with diskin2 in the Csound code. Please give some advice or examples! Thanks! tarmo |
Date | 2020-10-23 19:56 |
From | Pablo Zoani Heffele |
Subject | Re: [Csnd] Csound IDE in workshop, diskin on the web |
Thank you for this to all of you. Csound + React opens a big door to us.
Regards
El 23 oct. 2020 3:20 p. m., Tarmo Johannes <trmjhnns@GMAIL.COM> escribió:
Hi,
First, compliments again to the Csound web IDE
https://ide.csound.com/! I had a workshop yesterday where I used the web IDE - I shared my project link and it was so comfortable to write the code, explain and comment it, participants could get the code easily be refreshing their pages and they could
experiment and tweak the code. Really convenient!
Secondly, thank you Steven for making @kunstmusik/csound npm module and providing clear examples for React/Csound projects
https://github.com/kunstmusik/learn-synthesis/!
I got my first test-project nicely working but I cannot find a solution how to load and play audio files with diskin?
In the Csound WebAudio module there is csound.CopyUrlToLocal(url,dest) but by the CsoundObj that I used following the example, the method is not there.
My Csound initialisation code looks like:
useEffect(() => { I guess I should load the files to memory somewhere here, but how? I want to use a bunch of ogg files for playing different notes with diskin2 in the Csound code.
Please give some advice or examples!
Thanks!
tarmo
|
Date | 2020-10-23 19:58 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound IDE in workshop, diskin on the web |
I think that code is part of the Csound.js frontend. https://github.com/csound/csound/blob/develop/Emscripten/src/csound.js ======================== Prof. Victor Lazzarini Maynooth University Ireland > On 23 Oct 2020, at 19:19, Tarmo Johannes |
Date | 2020-10-23 20:00 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound IDE in workshop, diskin on the web |
I should also add my note of thanks to the Web IDE team. With the lockdown situation, this has been invaluable in my teaching, I am using it actively with one group and encouraging another group to look at it too. ======================== Prof. Victor Lazzarini Maynooth University Ireland > On 23 Oct 2020, at 19:19, Tarmo Johannes |
Date | 2020-10-23 22:53 |
From | Steven Yi |
Subject | Re: [Csnd] Csound IDE in workshop, diskin on the web |
Hi Tarmo, So glad to hear from you that the Web-IDE has been working out (and for Victor too!)! Victor's code from csound.js should be usable copying it into your project, but I also went ahead and just put together an example that uses a custom function I wrote based on Victor's code: https://github.com/kunstmusik/webaudio-csound-samples-example You can test the site here: https://kunstmusik.github.io/webaudio-csound-samples-example/ It uses samples from Freepats and a modified version of a project I use for teaching samples. I added some heavy reverb and a simple generative pattern. One issue I did run into is that saving the files to a subdirectory in the filesystem didn't seem to work. I think it's something we might have fixed in the Web-IDE version of Csound that's in the process of being backported to Webaudio Csound. As long as you use writeToFS() with a path in the root and load the samples from there in your Csound code it should work. Hopefully will be fixed in the next version of Webaudio Csound. Let me know if you have any further questions! Steven On Fri, Oct 23, 2020 at 2:20 PM Tarmo Johannes |
Date | 2020-10-23 23:23 |
From | Tarmo Johannes |
Subject | Re: [Csnd] Csound IDE in workshop, diskin on the web |
Dear Steven, Excellent! This example was exactly what I needed, I adjusted to my needs and works. Definitely useful for other members, too. Thanks! tarmo Kontakt Steven Yi (<stevenyi@gmail.com>) kirjutas kuupäeval L, 24. oktoober 2020 kell 00:53: Hi Tarmo, |