| ah, if we handle the promise correctly, it works too
node = await csound.getNode();
node.connect(scopeNode);
========================
Prof. Victor Lazzarini
Maynooth University
Ireland
> On 12 Nov 2022, at 15:03, Victor Lazzarini wrote:
>
> I found another way just now
>
> csound.on("onAudioNodeCreated", node => { node.connect(scopeNode); });
>
> getNote() did not seem to have been found.
> ========================
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
>
>> On 12 Nov 2022, at 14:56, Steven Yi wrote:
>>
>> *Warning*
>>
>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>
>> .getNode() should work. I'm not sure why it's not in the documentation
>> on NPMJS, but it's in our .d.ts:
>>
>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fblob%2Fmaster%2Fwasm%2Fbrowser%2Findex.d.ts%23L50-L54&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C019193392f8840edcbce08dac4bf0b7a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638038622053092945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VsiSaoaxos45VMnZlUS3FLbKHOT2jdXzbHItm5MN8Ko%3D&reserved=0
>>
>> I'll ask Hlodver about the documentation issue.
>>
>> On Sat, Nov 12, 2022 at 7:20 AM Victor Lazzarini wrote:
>>>
>>> I figured out I can create an audio context
>>>
>>> let actx = new AudioContext();
>>>
>>> and then pass it to Csound
>>>
>>> csound = await Csound({AudioContext: actx});
>>>
>>> That seems to work.
>>>
>>> So that seems to solve 1/2 my needs. The next thing is how to get the Csound node
>>> so I can make the connection to my scope and mag spectrum plotter.
>>>
>>> ========================
>>> Prof. Victor Lazzarini
>>> Maynooth University
>>> Ireland
>>>
>>>> On 12 Nov 2022, at 11:53, Victor Lazzarini wrote:
>>>>
>>>> In the previous (Emscripten) version, we could get the Webaudio context from Csound by using
>>>>
>>>> CSOUND_AUDIO_CONTEXT
>>>>
>>>> We could also get the Csound node using
>>>>
>>>> csound.getNode()
>>>>
>>>> So for example, I could create an analyser in the same audio context and connect Csound to it
>>>>
>>>> scopeNode = CSOUND_AUDIO_CONTEXT.createAnalyser();
>>>> csound.getNode().connect(scopeNode);
>>>>
>>>> How is this done now in Csound WASM?
>>>> ========================
>>>> Prof. Victor Lazzarini
>>>> Maynooth University
>>>> Ireland
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C019193392f8840edcbce08dac4bf0b7a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638038622053092945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Mns3phxwTzR9szGQWAIoWTz6pxc2kgxF4I2o1RTEUcU%3D&reserved=0
>>>> Send bugs reports to
>>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C019193392f8840edcbce08dac4bf0b7a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638038622053092945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=9mJFcSao937cSFFPRda9L4fqyDiNPGwbBL%2BLIOT8Avo%3D&reserved=0
>>>> Discussions of bugs and features can be posted here
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C019193392f8840edcbce08dac4bf0b7a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638038622053092945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Mns3phxwTzR9szGQWAIoWTz6pxc2kgxF4I2o1RTEUcU%3D&reserved=0
>>> Send bugs reports to
>>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C019193392f8840edcbce08dac4bf0b7a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638038622053092945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=9mJFcSao937cSFFPRda9L4fqyDiNPGwbBL%2BLIOT8Avo%3D&reserved=0
>>> Discussions of bugs and features can be posted here
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C019193392f8840edcbce08dac4bf0b7a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638038622053092945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Mns3phxwTzR9szGQWAIoWTz6pxc2kgxF4I2o1RTEUcU%3D&reserved=0
>> Send bugs reports to
>> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C019193392f8840edcbce08dac4bf0b7a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638038622053092945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=9mJFcSao937cSFFPRda9L4fqyDiNPGwbBL%2BLIOT8Avo%3D&reserved=0
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C019193392f8840edcbce08dac4bf0b7a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638038622053092945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Mns3phxwTzR9szGQWAIoWTz6pxc2kgxF4I2o1RTEUcU%3D&reserved=0
> Send bugs reports to
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C019193392f8840edcbce08dac4bf0b7a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638038622053092945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=9mJFcSao937cSFFPRda9L4fqyDiNPGwbBL%2BLIOT8Avo%3D&reserved=0
> Discussions of bugs and features can be posted here
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |