Csound Csound-dev Csound-tekno Search About

Including own C++ code in Csound

Date2016-01-03 09:15
FromMarieCurie
SubjectIncluding own C++ code in Csound
I'm working on a multimedia installation, in which also the audio content is
expected to be dynamic. This requires scripting capabilities for which
Csound seems to be well suited. I started my project with a much simpler
program, for which I've written quite some C-code. These algorithms, at
least part of them, I would like to use in Csound too. I intend to rewrite
them in C++. Now my question:  

In C++ I'm used to have the possibility of having several public methods
associated with a given class. In the example in the FLOSS Csound manual I
see only three methods: Initialisation, Process_Control and Process_Audio.
If I would need more - e.g. some function which frees the memory used by the
class which for my code could well be something like 50 MB per 'instrument'
as soon as the instrument stops - is it sufficient to add any additional
method to the OENTRY structure for the class? 



--
View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799.html
Sent from the Csound - General mailing list archive at Nabble.com.

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

Date2016-01-03 10:19
FromRory Walsh
SubjectRe: Including own C++ code in Csound
What example from the FLOSS manual?

On 3 January 2016 at 09:15, MarieCurie <karin.daum@desy.de> wrote:
I'm working on a multimedia installation, in which also the audio content is
expected to be dynamic. This requires scripting capabilities for which
Csound seems to be well suited. I started my project with a much simpler
program, for which I've written quite some C-code. These algorithms, at
least part of them, I would like to use in Csound too. I intend to rewrite
them in C++. Now my question:

In C++ I'm used to have the possibility of having several public methods
associated with a given class. In the example in the FLOSS Csound manual I
see only three methods: Initialisation, Process_Control and Process_Audio.
If I would need more - e.g. some function which frees the memory used by the
class which for my code could well be something like 50 MB per 'instrument'
as soon as the instrument stops - is it sufficient to add any additional
method to the OENTRY structure for the class?



--
View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799.html
Sent from the Csound - General mailing list archive at Nabble.com.

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

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

Date2016-01-03 10:38
FromMarieCurie
SubjectRe: Including own C++ code in Csound
Appendix Extending Sound, pages 634-635 in the printed version



--
View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745803.html
Sent from the Csound - General mailing list archive at Nabble.com.

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

Date2016-01-03 10:50
FromRory Walsh
SubjectRe: Including own C++ code in Csound
Gotcha. But I'm don't think you need to mess with the OENTRY structure. csoundModuleDestroy(CSOUND *csound) will be called when Csound is stopped. In there you can free what you like. Mike Goggin's has written an OpcodeBase class that you can use if you wish to write opcodes in archetypical C++ style. Look at ampmidid.cpp in the Csound source. It's in the Opcodes folder. 

On 3 January 2016 at 10:38, MarieCurie <karin.daum@desy.de> wrote:
Appendix Extending Sound, pages 634-635 in the printed version



--
View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745803.html
Sent from the Csound - General mailing list archive at Nabble.com.

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

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

Date2016-01-03 12:14
FromVictor Lazzarini
SubjectRe: Including own C++ code in Csound
What type of processing do you need to do?
You might not need to write a C++ opcode
for them, unless is something Csound does not have, or it cannot be coded neatly in Csound. 

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 3 Jan 2016, at 09:15, MarieCurie  wrote:
> 
> I'm working on a multimedia installation, in which also the audio content is
> expected to be dynamic. This requires scripting capabilities for which
> Csound seems to be well suited. I started my project with a much simpler
> program, for which I've written quite some C-code. These algorithms, at
> least part of them, I would like to use in Csound too. I intend to rewrite
> them in C++. Now my question:  
> 
> In C++ I'm used to have the possibility of having several public methods
> associated with a given class. In the example in the FLOSS Csound manual I
> see only three methods: Initialisation, Process_Control and Process_Audio.
> If I would need more - e.g. some function which frees the memory used by the
> class which for my code could well be something like 50 MB per 'instrument'
> as soon as the instrument stops - is it sufficient to add any additional
> method to the OENTRY structure for the class? 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 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

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

Date2016-01-03 13:37
FromMichael Gogins
SubjectRe: Including own C++ code in Csound

You can write opcodes in C++. There is an include/OpcodeBase.hpp class that you can derive your own opcodes from. I created this and use it for all my own opcodes. Such opcodes are plugins that Csound automatically loads. Look at the Csound source code for examples (all the .cpp files in the Opcodes directory). You can use the noteoff method for deallocating memory, or you can allocate your C++ memory using the Csound allocator, such memory is automatically deallocated.

Regards,
Mike

On Jan 3, 2016 4:16 AM, "MarieCurie" <karin.daum@desy.de> wrote:
I'm working on a multimedia installation, in which also the audio content is
expected to be dynamic. This requires scripting capabilities for which
Csound seems to be well suited. I started my project with a much simpler
program, for which I've written quite some C-code. These algorithms, at
least part of them, I would like to use in Csound too. I intend to rewrite
them in C++. Now my question:

In C++ I'm used to have the possibility of having several public methods
associated with a given class. In the example in the FLOSS Csound manual I
see only three methods: Initialisation, Process_Control and Process_Audio.
If I would need more - e.g. some function which frees the memory used by the
class which for my code could well be something like 50 MB per 'instrument'
as soon as the instrument stops - is it sufficient to add any additional
method to the OENTRY structure for the class?



--
View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799.html
Sent from the Csound - General mailing list archive at Nabble.com.

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
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

Date2016-01-03 15:09
FromMarieCurie
SubjectRe: Including own C++ code in Csound
well, I just learnt about Csound shortly before Xmas when I was discussing
some problems with my project with a sound engineer from the TV. For the
framework which I used so far which is primitive compared to Csound (and not
supported since long) but had the capability of being accessed via script
which is needed for my project. For this software I’ve written C code which
does the simulation of a virtual room producing multichannel (surruound 5.1)
output. This code allows for different multichannel panning schemes (similar
to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the stereo
case) and calculates the reverberation to a desired order of reflections
depending on the dimensions of the virtual room, the reflectivity and the
positions of the source and the sweet spot. The path of the source can be
steered by a string for a valid arithmetic expression (standard arithmetics
including the standard C-functions) such that the source can be moved almost
freely in (x,y) coordinates of the virtual room. This code yields
information on 

- the angle (or position) of the source, 
- the distance dependent volume, 
- the position dependent time delay between direct and reflected signals, 
- the position dependent volume ratio between direct and reflected signals, 
- the informations on the room contained in the reflections, 
- the information on the movement (Doppler effect and beats which differ for
the different channels because of different relative velocities w.r.t. the
different walls). 

As far as I understand by now the multichannel packages VBAP and Ambisonic 
address the first two points only. As far as I've understood Puckki's
article and the source code of VBAP in Csound it does the panning of the
phantom sources only between neighbouring loudspeakers which means you are
not able to put a phantom source at any position. This should be possible
with Ambisonic however it also does not include item 3-6 from the list
above. I certainly will have a look to this code. 

An example of a source @440Hz moving with a velocity of 4m/sec in a room
with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
(L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
sweet spot until it reaches the wall behind the listener then it slowly
moves until it reaches the right back corner, where it stops. (For
visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
 



-----
cheers,

Karin
--
View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
Sent from the Csound - General mailing list archive at Nabble.com.

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

Date2016-01-03 17:21
FromVictor Lazzarini
SubjectRe: Including own C++ code in Csound
You can do doppler and the other things in Csound by using variable delay lines, filters,
etc. What I would suggest is this:

1) write the audio processing code in Csound.

2) Access Csound via its API in your C++
program, controlling the instruments that
you created. The C++ code can calculate all
the parameters / trajectories and pass it
to Csound to do the processing.

Of course this makes sense if you are starting the project. If you have all
the code already written in C++, redoing
things in Csound might be duplication. In that case just keep to C++.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 3 Jan 2016, at 15:09, MarieCurie  wrote:
> 
> well, I just learnt about Csound shortly before Xmas when I was discussing
> some problems with my project with a sound engineer from the TV. For the
> framework which I used so far which is primitive compared to Csound (and not
> supported since long) but had the capability of being accessed via script
> which is needed for my project. For this software I’ve written C code which
> does the simulation of a virtual room producing multichannel (surruound 5.1)
> output. This code allows for different multichannel panning schemes (similar
> to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the stereo
> case) and calculates the reverberation to a desired order of reflections
> depending on the dimensions of the virtual room, the reflectivity and the
> positions of the source and the sweet spot. The path of the source can be
> steered by a string for a valid arithmetic expression (standard arithmetics
> including the standard C-functions) such that the source can be moved almost
> freely in (x,y) coordinates of the virtual room. This code yields
> information on 
> 
> - the angle (or position) of the source, 
> - the distance dependent volume, 
> - the position dependent time delay between direct and reflected signals, 
> - the position dependent volume ratio between direct and reflected signals, 
> - the informations on the room contained in the reflections, 
> - the information on the movement (Doppler effect and beats which differ for
> the different channels because of different relative velocities w.r.t. the
> different walls). 
> 
> As far as I understand by now the multichannel packages VBAP and Ambisonic 
> address the first two points only. As far as I've understood Puckki's
> article and the source code of VBAP in Csound it does the panning of the
> phantom sources only between neighbouring loudspeakers which means you are
> not able to put a phantom source at any position. This should be possible
> with Ambisonic however it also does not include item 3-6 from the list
> above. I certainly will have a look to this code. 
> 
> An example of a source @440Hz moving with a velocity of 4m/sec in a room
> with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
> (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
> sweet spot until it reaches the wall behind the listener then it slowly
> moves until it reaches the right back corner, where it stops. (For
> visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>  
> 
> 
> 
> -----
> cheers,
> 
> Karin
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 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

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

Date2016-01-03 18:21
FromMichael Gogins
SubjectRe: Including own C++ code in Csound

Efficiency is a goal. C++ runs about 3 times faster than Csound. Using Csound as a framework and writing critical opcodes in C++makes sense to me.

Regards,
Mike

On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <Victor.Lazzarini@nuim.ie> wrote:
You can do doppler and the other things in Csound by using variable delay lines, filters,
etc. What I would suggest is this:

1) write the audio processing code in Csound.

2) Access Csound via its API in your C++
program, controlling the instruments that
you created. The C++ code can calculate all
the parameters / trajectories and pass it
to Csound to do the processing.

Of course this makes sense if you are starting the project. If you have all
the code already written in C++, redoing
things in Csound might be duplication. In that case just keep to C++.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 3 Jan 2016, at 15:09, MarieCurie <karin.daum@DESY.DE> wrote:
>
> well, I just learnt about Csound shortly before Xmas when I was discussing
> some problems with my project with a sound engineer from the TV. For the
> framework which I used so far which is primitive compared to Csound (and not
> supported since long) but had the capability of being accessed via script
> which is needed for my project. For this software I’ve written C code which
> does the simulation of a virtual room producing multichannel (surruound 5.1)
> output. This code allows for different multichannel panning schemes (similar
> to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the stereo
> case) and calculates the reverberation to a desired order of reflections
> depending on the dimensions of the virtual room, the reflectivity and the
> positions of the source and the sweet spot. The path of the source can be
> steered by a string for a valid arithmetic expression (standard arithmetics
> including the standard C-functions) such that the source can be moved almost
> freely in (x,y) coordinates of the virtual room. This code yields
> information on
>
> - the angle (or position) of the source,
> - the distance dependent volume,
> - the position dependent time delay between direct and reflected signals,
> - the position dependent volume ratio between direct and reflected signals,
> - the informations on the room contained in the reflections,
> - the information on the movement (Doppler effect and beats which differ for
> the different channels because of different relative velocities w.r.t. the
> different walls).
>
> As far as I understand by now the multichannel packages VBAP and Ambisonic
> address the first two points only. As far as I've understood Puckki's
> article and the source code of VBAP in Csound it does the panning of the
> phantom sources only between neighbouring loudspeakers which means you are
> not able to put a phantom source at any position. This should be possible
> with Ambisonic however it also does not include item 3-6 from the list
> above. I certainly will have a look to this code.
>
> An example of a source @440Hz moving with a velocity of 4m/sec in a room
> with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
> (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
> sweet spot until it reaches the wall behind the listener then it slowly
> moves until it reaches the right back corner, where it stops. (For
> visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
> <http://csound.1045644.n5.nabble.com/file/n5745837/440HzDopplerSchwebung.jpg>
>
>
>
> -----
> cheers,
>
> Karin
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
> 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

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
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

Date2016-01-03 18:42
FromMarieCurie
SubjectRe: Including own C++ code in Csound

this is what I expected.  The code is ready in C. Modifying  it to C++ and calling it from Csound seems to me easier that starting from scratch in Csound. As I tried to explain in my previous answer and as you can see in the example this may become difficult to get it completely flexible in Csound. But as I also said, I just started with Csound a few days ago and don’t know all it’s capabilities. In my C code I need to define only the virtual room (size & reflectivity) + sweet spot in the initialisation and then if the position/path of a given sound source is passed to the code everything  turns out automatically.


And as I explained in the other thread computing power could be a limitation.

On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]> wrote:

Efficiency is a goal. C++ runs about 3 times faster than Csound. Using Csound as a framework and writing critical opcodes in C++makes sense to me.

Regards,
Mike

On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
You can do doppler and the other things in Csound by using variable delay lines, filters,
etc. What I would suggest is this:

1) write the audio processing code in Csound.

2) Access Csound via its API in your C++
program, controlling the instruments that
you created. The C++ code can calculate all
the parameters / trajectories and pass it
to Csound to do the processing.

Of course this makes sense if you are starting the project. If you have all
the code already written in C++, redoing
things in Csound might be duplication. In that case just keep to C++.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 3 Jan 2016, at 15:09, MarieCurie <<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>
> well, I just learnt about Csound shortly before Xmas when I was discussing
> some problems with my project with a sound engineer from the TV. For the
> framework which I used so far which is primitive compared to Csound (and not
> supported since long) but had the capability of being accessed via script
> which is needed for my project. For this software I’ve written C code which
> does the simulation of a virtual room producing multichannel (surruound 5.1)
> output. This code allows for different multichannel panning schemes (similar
> to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the stereo
> case) and calculates the reverberation to a desired order of reflections
> depending on the dimensions of the virtual room, the reflectivity and the
> positions of the source and the sweet spot. The path of the source can be
> steered by a string for a valid arithmetic expression (standard arithmetics
> including the standard C-functions) such that the source can be moved almost
> freely in (x,y) coordinates of the virtual room. This code yields
> information on
>
> - the angle (or position) of the source,
> - the distance dependent volume,
> - the position dependent time delay between direct and reflected signals,
> - the position dependent volume ratio between direct and reflected signals,
> - the informations on the room contained in the reflections,
> - the information on the movement (Doppler effect and beats which differ for
> the different channels because of different relative velocities w.r.t. the
> different walls).
>
> As far as I understand by now the multichannel packages VBAP and Ambisonic
> address the first two points only. As far as I've understood Puckki's
> article and the source code of VBAP in Csound it does the panning of the
> phantom sources only between neighbouring loudspeakers which means you are
> not able to put a phantom source at any position. This should be possible
> with Ambisonic however it also does not include item 3-6 from the list
> above. I certainly will have a look to this code.
>
> An example of a source @440Hz moving with a velocity of 4m/sec in a room
> with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
> (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
> sweet spot until it reaches the wall behind the listener then it slowly
> moves until it reaches the right back corner, where it stops. (For
> visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
> <http://csound.1045644.n5.nabble.com/file/n5745837/440HzDopplerSchwebung.jpg>
>
>
>
> -----
> cheers,
>
> Karin
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
> Csound mailing list
> <a href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=2" target="_top" rel="nofollow" link="external" class="">[hidden email]
> 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

Csound mailing list
<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=3" target="_top" rel="nofollow" link="external" class="">[hidden email]
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
Csound mailing list <a href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=4" target="_top" rel="nofollow" link="external" class="">[hidden email] 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


If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
To unsubscribe from Including own C++ code in Csound, click here.
NAML

cheers,

Karin


View this message in context: Re: [Csnd] Including own C++ code in Csound
Sent from the Csound - General mailing list archive at Nabble.com.
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

Date2016-01-03 19:00
FromVictor Lazzarini
SubjectRe: Including own C++ code in Csound
Not sure why you need Csound in this case. Just keep it all in C.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 3 Jan 2016, at 18:42, MarieCurie <karin.daum@DESY.DE> wrote:

this is what I expected.  The code is ready in C. Modifying  it to C++ and calling it from Csound seems to me easier that starting from scratch in Csound. As I tried to explain in my previous answer and as you can see in the example this may become difficult to get it completely flexible in Csound. But as I also said, I just started with Csound a few days ago and don’t know all it’s capabilities. In my C code I need to define only the virtual room (size & reflectivity) + sweet spot in the initialisation and then if the position/path of a given sound source is passed to the code everything  turns out automatically.

And as I explained in the other thread computing power could be a limitation.

On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]> wrote:

Efficiency is a goal. C++ runs about 3 times faster than Csound. Using Csound as a framework and writing critical opcodes in C++makes sense to me.

Regards,
Mike

On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
You can do doppler and the other things in Csound by using variable delay lines, filters,
etc. What I would suggest is this:

1) write the audio processing code in Csound.

2) Access Csound via its API in your C++
program, controlling the instruments that
you created. The C++ code can calculate all
the parameters / trajectories and pass it
to Csound to do the processing.

Of course this makes sense if you are starting the project. If you have all
the code already written in C++, redoing
things in Csound might be duplication. In that case just keep to C++.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 3 Jan 2016, at 15:09, MarieCurie <<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>
> well, I just learnt about Csound shortly before Xmas when I was discussing
> some problems with my project with a sound engineer from the TV. For the
> framework which I used so far which is primitive compared to Csound (and not
> supported since long) but had the capability of being accessed via script
> which is needed for my project. For this software I’ve written C code which
> does the simulation of a virtual room producing multichannel (surruound 5.1)
> output. This code allows for different multichannel panning schemes (similar
> to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the stereo
> case) and calculates the reverberation to a desired order of reflections
> depending on the dimensions of the virtual room, the reflectivity and the
> positions of the source and the sweet spot. The path of the source can be
> steered by a string for a valid arithmetic expression (standard arithmetics
> including the standard C-functions) such that the source can be moved almost
> freely in (x,y) coordinates of the virtual room. This code yields
> information on
>
> - the angle (or position) of the source,
> - the distance dependent volume,
> - the position dependent time delay between direct and reflected signals,
> - the position dependent volume ratio between direct and reflected signals,
> - the informations on the room contained in the reflections,
> - the information on the movement (Doppler effect and beats which differ for
> the different channels because of different relative velocities w.r.t. the
> different walls).
>
> As far as I understand by now the multichannel packages VBAP and Ambisonic
> address the first two points only. As far as I've understood Puckki's
> article and the source code of VBAP in Csound it does the panning of the
> phantom sources only between neighbouring loudspeakers which means you are
> not able to put a phantom source at any position. This should be possible
> with Ambisonic however it also does not include item 3-6 from the list
> above. I certainly will have a look to this code.
>
> An example of a source @440Hz moving with a velocity of 4m/sec in a room
> with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
> (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
> sweet spot until it reaches the wall behind the listener then it slowly
> moves until it reaches the right back corner, where it stops. (For
> visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
> <http://csound.1045644.n5.nabble.com/file/n5745837/440HzDopplerSchwebung.jpg>
>
>
>
> -----
> cheers,
>
> Karin
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
> Csound mailing list
> <a href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=2" target="_top" rel="nofollow" link="external" class="">[hidden email]
> 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

Csound mailing list
<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=3" target="_top" rel="nofollow" link="external" class="">[hidden email]
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
Csound mailing list <a href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=4" target="_top" rel="nofollow" link="external" class="">[hidden email] 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


If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
To unsubscribe from Including own C++ code in Csound, click here.
NAML

cheers,

Karin


View this message in context: Re: [Csnd] Including own C++ code in Csound
Sent from the Csound - General mailing list archive at Nabble.com.
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

Date2016-01-03 19:35
FromMichael Gogins
SubjectRe: Including own C++ code in Csound
Why should Karin reduplicate all the stuff in Csound that works fine
already (audio IO etc)? As I said it makes perfectly good sense to use
Csound as a framework, and to write performance critical code in C++
as plugin opcodes.

There is waaay too much re-invention of the wheel in this field...

Best,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
 wrote:
> Not sure why you need Csound in this case. Just keep it all in C.
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
> On 3 Jan 2016, at 18:42, MarieCurie  wrote:
>
> this is what I expected.  The code is ready in C. Modifying  it to C++ and
> calling it from Csound seems to me easier that starting from scratch in
> Csound. As I tried to explain in my previous answer and as you can see in
> the example this may become difficult to get it completely flexible in
> Csound. But as I also said, I just started with Csound a few days ago and
> don’t know all it’s capabilities. In my C code I need to define only the
> virtual room (size & reflectivity) + sweet spot in the initialisation and
> then if the position/path of a given sound source is passed to the code
> everything  turns out automatically.
>
> And as I explained in the other thread computing power could be a
> limitation.
>
> On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
> wrote:
>
> Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
> Csound as a framework and writing critical opcodes in C++makes sense to me.
>
> Regards,
> Mike
>
> On Jan 3, 2016 12:21 PM, "Victor Lazzarini" < href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=0"
> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>
>> You can do doppler and the other things in Csound by using variable delay
>> lines, filters,
>> etc. What I would suggest is this:
>>
>> 1) write the audio processing code in Csound.
>>
>> 2) Access Csound via its API in your C++
>> program, controlling the instruments that
>> you created. The C++ code can calculate all
>> the parameters / trajectories and pass it
>> to Csound to do the processing.
>>
>> Of course this makes sense if you are starting the project. If you have
>> all
>> the code already written in C++, redoing
>> things in Csound might be duplication. In that case just keep to C++.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>> > On 3 Jan 2016, at 15:09, MarieCurie <> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=1"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >
>> > well, I just learnt about Csound shortly before Xmas when I was
>> > discussing
>> > some problems with my project with a sound engineer from the TV. For the
>> > framework which I used so far which is primitive compared to Csound (and
>> > not
>> > supported since long) but had the capability of being accessed via
>> > script
>> > which is needed for my project. For this software I’ve written C code
>> > which
>> > does the simulation of a virtual room producing multichannel (surruound
>> > 5.1)
>> > output. This code allows for different multichannel panning schemes
>> > (similar
>> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>> > stereo
>> > case) and calculates the reverberation to a desired order of reflections
>> > depending on the dimensions of the virtual room, the reflectivity and
>> > the
>> > positions of the source and the sweet spot. The path of the source can
>> > be
>> > steered by a string for a valid arithmetic expression (standard
>> > arithmetics
>> > including the standard C-functions) such that the source can be moved
>> > almost
>> > freely in (x,y) coordinates of the virtual room. This code yields
>> > information on
>> >
>> > - the angle (or position) of the source,
>> > - the distance dependent volume,
>> > - the position dependent time delay between direct and reflected
>> > signals,
>> > - the position dependent volume ratio between direct and reflected
>> > signals,
>> > - the informations on the room contained in the reflections,
>> > - the information on the movement (Doppler effect and beats which differ
>> > for
>> > the different channels because of different relative velocities w.r.t.
>> > the
>> > different walls).
>> >
>> > As far as I understand by now the multichannel packages VBAP and
>> > Ambisonic
>> > address the first two points only. As far as I've understood Puckki's
>> > article and the source code of VBAP in Csound it does the panning of the
>> > phantom sources only between neighbouring loudspeakers which means you
>> > are
>> > not able to put a phantom source at any position. This should be
>> > possible
>> > with Ambisonic however it also does not include item 3-6 from the list
>> > above. I certainly will have a look to this code.
>> >
>> > An example of a source @440Hz moving with a velocity of 4m/sec in a room
>> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
>> > sweet spot until it reaches the wall behind the listener then it slowly
>> > moves until it reaches the right back corner, where it stops. (For
>> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>> >
>> > 
>> >
>> >
>> >
>> > -----
>> > cheers,
>> >
>> > Karin
>> > --
>> > View this message in context:
>> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >
>> > Csound mailing list
>> > > > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=2"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>>
>> Csound mailing list
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> 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
>
> Csound mailing list  href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=4"
> target="_top" rel="nofollow" link="external" class="">[hidden email]
> 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
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
> To unsubscribe from Including own C++ code in Csound, click here.
> NAML
>
>
> cheers,
>
> Karin
>
> ________________________________
> View this message in context: Re: [Csnd] Including own C++ code in Csound
> Sent from the Csound - General mailing list archive at Nabble.com.
> 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
>
> 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

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

Date2016-01-03 20:00
FromRory Walsh
SubjectRe: Including own C++ code in Csound
Why bother rewriting all the perfectly ready-to-go C code in C++?

On 3 January 2016 at 19:35, Michael Gogins <michael.gogins@gmail.com> wrote:
Why should Karin reduplicate all the stuff in Csound that works fine
already (audio IO etc)? As I said it makes perfectly good sense to use
Csound as a framework, and to write performance critical code in C++
as plugin opcodes.

There is waaay too much re-invention of the wheel in this field...

Best,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie> wrote:
> Not sure why you need Csound in this case. Just keep it all in C.
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
> On 3 Jan 2016, at 18:42, MarieCurie <karin.daum@DESY.DE> wrote:
>
> this is what I expected.  The code is ready in C. Modifying  it to C++ and
> calling it from Csound seems to me easier that starting from scratch in
> Csound. As I tried to explain in my previous answer and as you can see in
> the example this may become difficult to get it completely flexible in
> Csound. But as I also said, I just started with Csound a few days ago and
> don’t know all it’s capabilities. In my C code I need to define only the
> virtual room (size & reflectivity) + sweet spot in the initialisation and
> then if the position/path of a given sound source is passed to the code
> everything  turns out automatically.
>
> And as I explained in the other thread computing power could be a
> limitation.
>
> On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
> wrote:
>
> Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
> Csound as a framework and writing critical opcodes in C++makes sense to me.
>
> Regards,
> Mike
>
> On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <<a
> href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=0"
> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>
>> You can do doppler and the other things in Csound by using variable delay
>> lines, filters,
>> etc. What I would suggest is this:
>>
>> 1) write the audio processing code in Csound.
>>
>> 2) Access Csound via its API in your C++
>> program, controlling the instruments that
>> you created. The C++ code can calculate all
>> the parameters / trajectories and pass it
>> to Csound to do the processing.
>>
>> Of course this makes sense if you are starting the project. If you have
>> all
>> the code already written in C++, redoing
>> things in Csound might be duplication. In that case just keep to C++.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>> > On 3 Jan 2016, at 15:09, MarieCurie <<a
>> > href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=1"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >
>> > well, I just learnt about Csound shortly before Xmas when I was
>> > discussing
>> > some problems with my project with a sound engineer from the TV. For the
>> > framework which I used so far which is primitive compared to Csound (and
>> > not
>> > supported since long) but had the capability of being accessed via
>> > script
>> > which is needed for my project. For this software I’ve written C code
>> > which
>> > does the simulation of a virtual room producing multichannel (surruound
>> > 5.1)
>> > output. This code allows for different multichannel panning schemes
>> > (similar
>> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>> > stereo
>> > case) and calculates the reverberation to a desired order of reflections
>> > depending on the dimensions of the virtual room, the reflectivity and
>> > the
>> > positions of the source and the sweet spot. The path of the source can
>> > be
>> > steered by a string for a valid arithmetic expression (standard
>> > arithmetics
>> > including the standard C-functions) such that the source can be moved
>> > almost
>> > freely in (x,y) coordinates of the virtual room. This code yields
>> > information on
>> >
>> > - the angle (or position) of the source,
>> > - the distance dependent volume,
>> > - the position dependent time delay between direct and reflected
>> > signals,
>> > - the position dependent volume ratio between direct and reflected
>> > signals,
>> > - the informations on the room contained in the reflections,
>> > - the information on the movement (Doppler effect and beats which differ
>> > for
>> > the different channels because of different relative velocities w.r.t.
>> > the
>> > different walls).
>> >
>> > As far as I understand by now the multichannel packages VBAP and
>> > Ambisonic
>> > address the first two points only. As far as I've understood Puckki's
>> > article and the source code of VBAP in Csound it does the panning of the
>> > phantom sources only between neighbouring loudspeakers which means you
>> > are
>> > not able to put a phantom source at any position. This should be
>> > possible
>> > with Ambisonic however it also does not include item 3-6 from the list
>> > above. I certainly will have a look to this code.
>> >
>> > An example of a source @440Hz moving with a velocity of 4m/sec in a room
>> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
>> > sweet spot until it reaches the wall behind the listener then it slowly
>> > moves until it reaches the right back corner, where it stops. (For
>> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>> >
>> > <http://csound.1045644.n5.nabble.com/file/n5745837/440HzDopplerSchwebung.jpg>
>> >
>> >
>> >
>> > -----
>> > cheers,
>> >
>> > Karin
>> > --
>> > View this message in context:
>> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >
>> > Csound mailing list
>> > <a
>> > href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=2"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>>
>> Csound mailing list
>> <a href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=3"
>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> 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
>
> Csound mailing list <a
> href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=4"
> target="_top" rel="nofollow" link="external" class="">[hidden email]
> 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
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
> To unsubscribe from Including own C++ code in Csound, click here.
> NAML
>
>
> cheers,
>
> Karin
>
> ________________________________
> View this message in context: Re: [Csnd] Including own C++ code in Csound
> Sent from the Csound - General mailing list archive at Nabble.com.
> 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
>
> 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

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

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

Date2016-01-03 20:18
FromVictor Lazzarini
SubjectRe: Including own C++ code in Csound
If all you need is audio IO, just use one of the audio IO libs such as
portaudio, JUCE, jack. It would be over complicated to port a ready-to-go
C/C++ code as a Csound opcode, esp. if it involves memory management
etc, and have to learn Csound on top of that.

On the other hand, if you need any of oscillators, filters, delays, spectral 
processing, etc, then it might be worth your while. However, I don’t think
it makes tremendous sense to re-write stuff that already exists in Csound,
such as partitioned convolution, etc. It is best to take a step back, modularise
your code into unit generators, and re-implement only the things Csound 
does not have. This way you can re-use existing code, and allow for maximum 
flexibility to create your instruments. There will not be a 3-1 loss in performance,
because all the code will still be in C/C++ (the 3-1 figure is when we do all
the DSP mathematics in Csound code, rather than re-implementing it as
opcodes).

If you want to go down that route, unfortunately the FLOSS manual quick
intro into opcode writing will not be sufficient (as it does not cover more 
advanced things such as memory allocation etc.). However, you can contact me 
privately and I can send you my class notes on the subject.

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 3 Jan 2016, at 20:00, Rory Walsh  wrote:
> 
> Why bother rewriting all the perfectly ready-to-go C code in C++? 
> 
> On 3 January 2016 at 19:35, Michael Gogins  wrote:
> Why should Karin reduplicate all the stuff in Csound that works fine
> already (audio IO etc)? As I said it makes perfectly good sense to use
> Csound as a framework, and to write performance critical code in C++
> as plugin opcodes.
> 
> There is waaay too much re-invention of the wheel in this field...
> 
> Best,
> Mike
> 
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>  wrote:
> > Not sure why you need Csound in this case. Just keep it all in C.
> >
> > Victor Lazzarini
> > Dean of Arts, Celtic Studies, and Philosophy
> > Maynooth University
> > Ireland
> >
> > On 3 Jan 2016, at 18:42, MarieCurie  wrote:
> >
> > this is what I expected.  The code is ready in C. Modifying  it to C++ and
> > calling it from Csound seems to me easier that starting from scratch in
> > Csound. As I tried to explain in my previous answer and as you can see in
> > the example this may become difficult to get it completely flexible in
> > Csound. But as I also said, I just started with Csound a few days ago and
> > don’t know all it’s capabilities. In my C code I need to define only the
> > virtual room (size & reflectivity) + sweet spot in the initialisation and
> > then if the position/path of a given sound source is passed to the code
> > everything  turns out automatically.
> >
> > And as I explained in the other thread computing power could be a
> > limitation.
> >
> > On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
> > wrote:
> >
> > Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
> > Csound as a framework and writing critical opcodes in C++makes sense to me.
> >
> > Regards,
> > Mike
> >
> > On Jan 3, 2016 12:21 PM, "Victor Lazzarini" < > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=0"
> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
> >>
> >> You can do doppler and the other things in Csound by using variable delay
> >> lines, filters,
> >> etc. What I would suggest is this:
> >>
> >> 1) write the audio processing code in Csound.
> >>
> >> 2) Access Csound via its API in your C++
> >> program, controlling the instruments that
> >> you created. The C++ code can calculate all
> >> the parameters / trajectories and pass it
> >> to Csound to do the processing.
> >>
> >> Of course this makes sense if you are starting the project. If you have
> >> all
> >> the code already written in C++, redoing
> >> things in Csound might be duplication. In that case just keep to C++.
> >>
> >> Victor Lazzarini
> >> Dean of Arts, Celtic Studies, and Philosophy
> >> Maynooth University
> >> Ireland
> >>
> >> > On 3 Jan 2016, at 15:09, MarieCurie < >> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=1"
> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
> >> >
> >> > well, I just learnt about Csound shortly before Xmas when I was
> >> > discussing
> >> > some problems with my project with a sound engineer from the TV. For the
> >> > framework which I used so far which is primitive compared to Csound (and
> >> > not
> >> > supported since long) but had the capability of being accessed via
> >> > script
> >> > which is needed for my project. For this software I’ve written C code
> >> > which
> >> > does the simulation of a virtual room producing multichannel (surruound
> >> > 5.1)
> >> > output. This code allows for different multichannel panning schemes
> >> > (similar
> >> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
> >> > stereo
> >> > case) and calculates the reverberation to a desired order of reflections
> >> > depending on the dimensions of the virtual room, the reflectivity and
> >> > the
> >> > positions of the source and the sweet spot. The path of the source can
> >> > be
> >> > steered by a string for a valid arithmetic expression (standard
> >> > arithmetics
> >> > including the standard C-functions) such that the source can be moved
> >> > almost
> >> > freely in (x,y) coordinates of the virtual room. This code yields
> >> > information on
> >> >
> >> > - the angle (or position) of the source,
> >> > - the distance dependent volume,
> >> > - the position dependent time delay between direct and reflected
> >> > signals,
> >> > - the position dependent volume ratio between direct and reflected
> >> > signals,
> >> > - the informations on the room contained in the reflections,
> >> > - the information on the movement (Doppler effect and beats which differ
> >> > for
> >> > the different channels because of different relative velocities w.r.t.
> >> > the
> >> > different walls).
> >> >
> >> > As far as I understand by now the multichannel packages VBAP and
> >> > Ambisonic
> >> > address the first two points only. As far as I've understood Puckki's
> >> > article and the source code of VBAP in Csound it does the panning of the
> >> > phantom sources only between neighbouring loudspeakers which means you
> >> > are
> >> > not able to put a phantom source at any position. This should be
> >> > possible
> >> > with Ambisonic however it also does not include item 3-6 from the list
> >> > above. I certainly will have a look to this code.
> >> >
> >> > An example of a source @440Hz moving with a velocity of 4m/sec in a room
> >> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
> >> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
> >> > sweet spot until it reaches the wall behind the listener then it slowly
> >> > moves until it reaches the right back corner, where it stops. (For
> >> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
> >> >
> >> > 
> >> >
> >> >
> >> >
> >> > -----
> >> > cheers,
> >> >
> >> > Karin
> >> > --
> >> > View this message in context:
> >> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
> >> > Sent from the Csound - General mailing list archive at Nabble.com.
> >> >
> >> > Csound mailing list
> >> >  >> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=2"
> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]
> >> > 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
> >>
> >> Csound mailing list
> >>  >> target="_top" rel="nofollow" link="external" class="">[hidden email]
> >> 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
> >
> > Csound mailing list  > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=4"
> > target="_top" rel="nofollow" link="external" class="">[hidden email]
> > 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
> >
> > ________________________________
> > If you reply to this email, your message will be added to the discussion
> > below:
> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
> > To unsubscribe from Including own C++ code in Csound, click here.
> > NAML
> >
> >
> > cheers,
> >
> > Karin
> >
> > ________________________________
> > View this message in context: Re: [Csnd] Including own C++ code in Csound
> > Sent from the Csound - General mailing list archive at Nabble.com.
> > 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
> >
> > 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
> 
> 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
> 
> 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

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

Date2016-01-03 20:27
FromOeyvind Brandtsegg
SubjectRe: Including own C++ code in Csound
also, just a thought,
the spatialization and reverberation you want to do might be available
by using the spat3d opcode(?)


2016-01-03 21:18 GMT+01:00 Victor Lazzarini :
> If all you need is audio IO, just use one of the audio IO libs such as
> portaudio, JUCE, jack. It would be over complicated to port a ready-to-go
> C/C++ code as a Csound opcode, esp. if it involves memory management
> etc, and have to learn Csound on top of that.
>
> On the other hand, if you need any of oscillators, filters, delays, spectral
> processing, etc, then it might be worth your while. However, I don’t think
> it makes tremendous sense to re-write stuff that already exists in Csound,
> such as partitioned convolution, etc. It is best to take a step back, modularise
> your code into unit generators, and re-implement only the things Csound
> does not have. This way you can re-use existing code, and allow for maximum
> flexibility to create your instruments. There will not be a 3-1 loss in performance,
> because all the code will still be in C/C++ (the 3-1 figure is when we do all
> the DSP mathematics in Csound code, rather than re-implementing it as
> opcodes).
>
> If you want to go down that route, unfortunately the FLOSS manual quick
> intro into opcode writing will not be sufficient (as it does not cover more
> advanced things such as memory allocation etc.). However, you can contact me
> privately and I can send you my class notes on the subject.
>
> ========================
> Dr Victor Lazzarini
> Dean of Arts, Celtic Studies and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 3 Jan 2016, at 20:00, Rory Walsh  wrote:
>>
>> Why bother rewriting all the perfectly ready-to-go C code in C++?
>>
>> On 3 January 2016 at 19:35, Michael Gogins  wrote:
>> Why should Karin reduplicate all the stuff in Csound that works fine
>> already (audio IO etc)? As I said it makes perfectly good sense to use
>> Csound as a framework, and to write performance critical code in C++
>> as plugin opcodes.
>>
>> There is waaay too much re-invention of the wheel in this field...
>>
>> Best,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>>  wrote:
>> > Not sure why you need Csound in this case. Just keep it all in C.
>> >
>> > Victor Lazzarini
>> > Dean of Arts, Celtic Studies, and Philosophy
>> > Maynooth University
>> > Ireland
>> >
>> > On 3 Jan 2016, at 18:42, MarieCurie  wrote:
>> >
>> > this is what I expected.  The code is ready in C. Modifying  it to C++ and
>> > calling it from Csound seems to me easier that starting from scratch in
>> > Csound. As I tried to explain in my previous answer and as you can see in
>> > the example this may become difficult to get it completely flexible in
>> > Csound. But as I also said, I just started with Csound a few days ago and
>> > don’t know all it’s capabilities. In my C code I need to define only the
>> > virtual room (size & reflectivity) + sweet spot in the initialisation and
>> > then if the position/path of a given sound source is passed to the code
>> > everything  turns out automatically.
>> >
>> > And as I explained in the other thread computing power could be a
>> > limitation.
>> >
>> > On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
>> > wrote:
>> >
>> > Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
>> > Csound as a framework and writing critical opcodes in C++makes sense to me.
>> >
>> > Regards,
>> > Mike
>> >
>> > On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=0"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >>
>> >> You can do doppler and the other things in Csound by using variable delay
>> >> lines, filters,
>> >> etc. What I would suggest is this:
>> >>
>> >> 1) write the audio processing code in Csound.
>> >>
>> >> 2) Access Csound via its API in your C++
>> >> program, controlling the instruments that
>> >> you created. The C++ code can calculate all
>> >> the parameters / trajectories and pass it
>> >> to Csound to do the processing.
>> >>
>> >> Of course this makes sense if you are starting the project. If you have
>> >> all
>> >> the code already written in C++, redoing
>> >> things in Csound might be duplication. In that case just keep to C++.
>> >>
>> >> Victor Lazzarini
>> >> Dean of Arts, Celtic Studies, and Philosophy
>> >> Maynooth University
>> >> Ireland
>> >>
>> >> > On 3 Jan 2016, at 15:09, MarieCurie <> >> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=1"
>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >> >
>> >> > well, I just learnt about Csound shortly before Xmas when I was
>> >> > discussing
>> >> > some problems with my project with a sound engineer from the TV. For the
>> >> > framework which I used so far which is primitive compared to Csound (and
>> >> > not
>> >> > supported since long) but had the capability of being accessed via
>> >> > script
>> >> > which is needed for my project. For this software I’ve written C code
>> >> > which
>> >> > does the simulation of a virtual room producing multichannel (surruound
>> >> > 5.1)
>> >> > output. This code allows for different multichannel panning schemes
>> >> > (similar
>> >> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>> >> > stereo
>> >> > case) and calculates the reverberation to a desired order of reflections
>> >> > depending on the dimensions of the virtual room, the reflectivity and
>> >> > the
>> >> > positions of the source and the sweet spot. The path of the source can
>> >> > be
>> >> > steered by a string for a valid arithmetic expression (standard
>> >> > arithmetics
>> >> > including the standard C-functions) such that the source can be moved
>> >> > almost
>> >> > freely in (x,y) coordinates of the virtual room. This code yields
>> >> > information on
>> >> >
>> >> > - the angle (or position) of the source,
>> >> > - the distance dependent volume,
>> >> > - the position dependent time delay between direct and reflected
>> >> > signals,
>> >> > - the position dependent volume ratio between direct and reflected
>> >> > signals,
>> >> > - the informations on the room contained in the reflections,
>> >> > - the information on the movement (Doppler effect and beats which differ
>> >> > for
>> >> > the different channels because of different relative velocities w.r.t.
>> >> > the
>> >> > different walls).
>> >> >
>> >> > As far as I understand by now the multichannel packages VBAP and
>> >> > Ambisonic
>> >> > address the first two points only. As far as I've understood Puckki's
>> >> > article and the source code of VBAP in Csound it does the panning of the
>> >> > phantom sources only between neighbouring loudspeakers which means you
>> >> > are
>> >> > not able to put a phantom source at any position. This should be
>> >> > possible
>> >> > with Ambisonic however it also does not include item 3-6 from the list
>> >> > above. I certainly will have a look to this code.
>> >> >
>> >> > An example of a source @440Hz moving with a velocity of 4m/sec in a room
>> >> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>> >> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
>> >> > sweet spot until it reaches the wall behind the listener then it slowly
>> >> > moves until it reaches the right back corner, where it stops. (For
>> >> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>> >> >
>> >> > 
>> >> >
>> >> >
>> >> >
>> >> > -----
>> >> > cheers,
>> >> >
>> >> > Karin
>> >> > --
>> >> > View this message in context:
>> >> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>> >> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >> >
>> >> > Csound mailing list
>> >> > > >> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=2"
>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> > 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
>> >>
>> >> Csound mailing list
>> >> > >> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> 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
>> >
>> > Csound mailing list > > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=4"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>> >
>> > ________________________________
>> > If you reply to this email, your message will be added to the discussion
>> > below:
>> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
>> > To unsubscribe from Including own C++ code in Csound, click here.
>> > NAML
>> >
>> >
>> > cheers,
>> >
>> > Karin
>> >
>> > ________________________________
>> > View this message in context: Re: [Csnd] Including own C++ code in Csound
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> > 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
>> >
>> > 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
>>
>> 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
>>
>> 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
>
> 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



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp

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

Date2016-01-03 22:30
FromMichael Gogins
SubjectRe: Including own C++ code in Csound
It is not over complicated. You derive from OpcodeBase and basically
just paste in your C code or make calls to your C code. I have done
this many times and I can assure you that for me, it is much simpler
to write opcodes this way, either from scratch, or by delegating to
existing C code.

As for the performance ratios, I have actually tested C/C++/Csound
implementations of the very same algorithms. I have (actually, based
on your moog ladder filter code, which is very good). The C is 2.5 x
faster than your Csound UDO. LuaJIT is a bit sllower than C and  it is
harder to get to work. C++ would be as fast as C (again, I have tested
this).

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sun, Jan 3, 2016 at 3:18 PM, Victor Lazzarini
 wrote:
> If all you need is audio IO, just use one of the audio IO libs such as
> portaudio, JUCE, jack. It would be over complicated to port a ready-to-go
> C/C++ code as a Csound opcode, esp. if it involves memory management
> etc, and have to learn Csound on top of that.
>
> On the other hand, if you need any of oscillators, filters, delays, spectral
> processing, etc, then it might be worth your while. However, I don’t think
> it makes tremendous sense to re-write stuff that already exists in Csound,
> such as partitioned convolution, etc. It is best to take a step back, modularise
> your code into unit generators, and re-implement only the things Csound
> does not have. This way you can re-use existing code, and allow for maximum
> flexibility to create your instruments. There will not be a 3-1 loss in performance,
> because all the code will still be in C/C++ (the 3-1 figure is when we do all
> the DSP mathematics in Csound code, rather than re-implementing it as
> opcodes).
>
> If you want to go down that route, unfortunately the FLOSS manual quick
> intro into opcode writing will not be sufficient (as it does not cover more
> advanced things such as memory allocation etc.). However, you can contact me
> privately and I can send you my class notes on the subject.
>
> ========================
> Dr Victor Lazzarini
> Dean of Arts, Celtic Studies and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 3 Jan 2016, at 20:00, Rory Walsh  wrote:
>>
>> Why bother rewriting all the perfectly ready-to-go C code in C++?
>>
>> On 3 January 2016 at 19:35, Michael Gogins  wrote:
>> Why should Karin reduplicate all the stuff in Csound that works fine
>> already (audio IO etc)? As I said it makes perfectly good sense to use
>> Csound as a framework, and to write performance critical code in C++
>> as plugin opcodes.
>>
>> There is waaay too much re-invention of the wheel in this field...
>>
>> Best,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>>  wrote:
>> > Not sure why you need Csound in this case. Just keep it all in C.
>> >
>> > Victor Lazzarini
>> > Dean of Arts, Celtic Studies, and Philosophy
>> > Maynooth University
>> > Ireland
>> >
>> > On 3 Jan 2016, at 18:42, MarieCurie  wrote:
>> >
>> > this is what I expected.  The code is ready in C. Modifying  it to C++ and
>> > calling it from Csound seems to me easier that starting from scratch in
>> > Csound. As I tried to explain in my previous answer and as you can see in
>> > the example this may become difficult to get it completely flexible in
>> > Csound. But as I also said, I just started with Csound a few days ago and
>> > don’t know all it’s capabilities. In my C code I need to define only the
>> > virtual room (size & reflectivity) + sweet spot in the initialisation and
>> > then if the position/path of a given sound source is passed to the code
>> > everything  turns out automatically.
>> >
>> > And as I explained in the other thread computing power could be a
>> > limitation.
>> >
>> > On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
>> > wrote:
>> >
>> > Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
>> > Csound as a framework and writing critical opcodes in C++makes sense to me.
>> >
>> > Regards,
>> > Mike
>> >
>> > On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=0"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >>
>> >> You can do doppler and the other things in Csound by using variable delay
>> >> lines, filters,
>> >> etc. What I would suggest is this:
>> >>
>> >> 1) write the audio processing code in Csound.
>> >>
>> >> 2) Access Csound via its API in your C++
>> >> program, controlling the instruments that
>> >> you created. The C++ code can calculate all
>> >> the parameters / trajectories and pass it
>> >> to Csound to do the processing.
>> >>
>> >> Of course this makes sense if you are starting the project. If you have
>> >> all
>> >> the code already written in C++, redoing
>> >> things in Csound might be duplication. In that case just keep to C++.
>> >>
>> >> Victor Lazzarini
>> >> Dean of Arts, Celtic Studies, and Philosophy
>> >> Maynooth University
>> >> Ireland
>> >>
>> >> > On 3 Jan 2016, at 15:09, MarieCurie <> >> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=1"
>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >> >
>> >> > well, I just learnt about Csound shortly before Xmas when I was
>> >> > discussing
>> >> > some problems with my project with a sound engineer from the TV. For the
>> >> > framework which I used so far which is primitive compared to Csound (and
>> >> > not
>> >> > supported since long) but had the capability of being accessed via
>> >> > script
>> >> > which is needed for my project. For this software I’ve written C code
>> >> > which
>> >> > does the simulation of a virtual room producing multichannel (surruound
>> >> > 5.1)
>> >> > output. This code allows for different multichannel panning schemes
>> >> > (similar
>> >> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>> >> > stereo
>> >> > case) and calculates the reverberation to a desired order of reflections
>> >> > depending on the dimensions of the virtual room, the reflectivity and
>> >> > the
>> >> > positions of the source and the sweet spot. The path of the source can
>> >> > be
>> >> > steered by a string for a valid arithmetic expression (standard
>> >> > arithmetics
>> >> > including the standard C-functions) such that the source can be moved
>> >> > almost
>> >> > freely in (x,y) coordinates of the virtual room. This code yields
>> >> > information on
>> >> >
>> >> > - the angle (or position) of the source,
>> >> > - the distance dependent volume,
>> >> > - the position dependent time delay between direct and reflected
>> >> > signals,
>> >> > - the position dependent volume ratio between direct and reflected
>> >> > signals,
>> >> > - the informations on the room contained in the reflections,
>> >> > - the information on the movement (Doppler effect and beats which differ
>> >> > for
>> >> > the different channels because of different relative velocities w.r.t.
>> >> > the
>> >> > different walls).
>> >> >
>> >> > As far as I understand by now the multichannel packages VBAP and
>> >> > Ambisonic
>> >> > address the first two points only. As far as I've understood Puckki's
>> >> > article and the source code of VBAP in Csound it does the panning of the
>> >> > phantom sources only between neighbouring loudspeakers which means you
>> >> > are
>> >> > not able to put a phantom source at any position. This should be
>> >> > possible
>> >> > with Ambisonic however it also does not include item 3-6 from the list
>> >> > above. I certainly will have a look to this code.
>> >> >
>> >> > An example of a source @440Hz moving with a velocity of 4m/sec in a room
>> >> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>> >> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
>> >> > sweet spot until it reaches the wall behind the listener then it slowly
>> >> > moves until it reaches the right back corner, where it stops. (For
>> >> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>> >> >
>> >> > 
>> >> >
>> >> >
>> >> >
>> >> > -----
>> >> > cheers,
>> >> >
>> >> > Karin
>> >> > --
>> >> > View this message in context:
>> >> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>> >> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >> >
>> >> > Csound mailing list
>> >> > > >> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=2"
>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> > 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
>> >>
>> >> Csound mailing list
>> >> > >> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> 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
>> >
>> > Csound mailing list > > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=4"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>> >
>> > ________________________________
>> > If you reply to this email, your message will be added to the discussion
>> > below:
>> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
>> > To unsubscribe from Including own C++ code in Csound, click here.
>> > NAML
>> >
>> >
>> > cheers,
>> >
>> > Karin
>> >
>> > ________________________________
>> > View this message in context: Re: [Csnd] Including own C++ code in Csound
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> > 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
>> >
>> > 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
>>
>> 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
>>
>> 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
>
> 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

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

Date2016-01-04 06:10
FromVictor Lazzarini
SubjectRe: Including own C++ code in Csound
I am not referring to the C++ form of opcodes, in this case, but to converting 
an existing code to make an opcode
in general. It is over complicated if compared 
to just adding audio IO to your existing program.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 3 Jan 2016, at 22:30, Michael Gogins  wrote:
> 
> It is not over complicated. You derive from OpcodeBase and basically
> just paste in your C code or make calls to your C code. I have done
> this many times and I can assure you that for me, it is much simpler
> to write opcodes this way, either from scratch, or by delegating to
> existing C code.
> 
> As for the performance ratios, I have actually tested C/C++/Csound
> implementations of the very same algorithms. I have (actually, based
> on your moog ladder filter code, which is very good). The C is 2.5 x
> faster than your Csound UDO. LuaJIT is a bit sllower than C and  it is
> harder to get to work. C++ would be as fast as C (again, I have tested
> this).
> 
> Regards,
> Mike
> 
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Sun, Jan 3, 2016 at 3:18 PM, Victor Lazzarini
>  wrote:
>> If all you need is audio IO, just use one of the audio IO libs such as
>> portaudio, JUCE, jack. It would be over complicated to port a ready-to-go
>> C/C++ code as a Csound opcode, esp. if it involves memory management
>> etc, and have to learn Csound on top of that.
>> 
>> On the other hand, if you need any of oscillators, filters, delays, spectral
>> processing, etc, then it might be worth your while. However, I don’t think
>> it makes tremendous sense to re-write stuff that already exists in Csound,
>> such as partitioned convolution, etc. It is best to take a step back, modularise
>> your code into unit generators, and re-implement only the things Csound
>> does not have. This way you can re-use existing code, and allow for maximum
>> flexibility to create your instruments. There will not be a 3-1 loss in performance,
>> because all the code will still be in C/C++ (the 3-1 figure is when we do all
>> the DSP mathematics in Csound code, rather than re-implementing it as
>> opcodes).
>> 
>> If you want to go down that route, unfortunately the FLOSS manual quick
>> intro into opcode writing will not be sufficient (as it does not cover more
>> advanced things such as memory allocation etc.). However, you can contact me
>> privately and I can send you my class notes on the subject.
>> 
>> ========================
>> Dr Victor Lazzarini
>> Dean of Arts, Celtic Studies and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>> 
>>> On 3 Jan 2016, at 20:00, Rory Walsh  wrote:
>>> 
>>> Why bother rewriting all the perfectly ready-to-go C code in C++?
>>> 
>>> On 3 January 2016 at 19:35, Michael Gogins  wrote:
>>> Why should Karin reduplicate all the stuff in Csound that works fine
>>> already (audio IO etc)? As I said it makes perfectly good sense to use
>>> Csound as a framework, and to write performance critical code in C++
>>> as plugin opcodes.
>>> 
>>> There is waaay too much re-invention of the wheel in this field...
>>> 
>>> Best,
>>> Mike
>>> 
>>> -----------------------------------------------------
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>> 
>>> 
>>> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>>>  wrote:
>>>> Not sure why you need Csound in this case. Just keep it all in C.
>>>> 
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>> 
>>>> On 3 Jan 2016, at 18:42, MarieCurie  wrote:
>>>> 
>>>> this is what I expected.  The code is ready in C. Modifying  it to C++ and
>>>> calling it from Csound seems to me easier that starting from scratch in
>>>> Csound. As I tried to explain in my previous answer and as you can see in
>>>> the example this may become difficult to get it completely flexible in
>>>> Csound. But as I also said, I just started with Csound a few days ago and
>>>> don’t know all it’s capabilities. In my C code I need to define only the
>>>> virtual room (size & reflectivity) + sweet spot in the initialisation and
>>>> then if the position/path of a given sound source is passed to the code
>>>> everything  turns out automatically.
>>>> 
>>>> And as I explained in the other thread computing power could be a
>>>> limitation.
>>>> 
>>>> On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
>>>> wrote:
>>>> 
>>>> Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
>>>> Csound as a framework and writing critical opcodes in C++makes sense to me.
>>>> 
>>>> Regards,
>>>> Mike
>>>> 
>>>> On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <>>> href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=0"
>>>> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>>>> 
>>>>> You can do doppler and the other things in Csound by using variable delay
>>>>> lines, filters,
>>>>> etc. What I would suggest is this:
>>>>> 
>>>>> 1) write the audio processing code in Csound.
>>>>> 
>>>>> 2) Access Csound via its API in your C++
>>>>> program, controlling the instruments that
>>>>> you created. The C++ code can calculate all
>>>>> the parameters / trajectories and pass it
>>>>> to Csound to do the processing.
>>>>> 
>>>>> Of course this makes sense if you are starting the project. If you have
>>>>> all
>>>>> the code already written in C++, redoing
>>>>> things in Csound might be duplication. In that case just keep to C++.
>>>>> 
>>>>> Victor Lazzarini
>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>> Maynooth University
>>>>> Ireland
>>>>> 
>>>>>> On 3 Jan 2016, at 15:09, MarieCurie <>>>>> href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=1"
>>>>>> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>>>>> 
>>>>>> well, I just learnt about Csound shortly before Xmas when I was
>>>>>> discussing
>>>>>> some problems with my project with a sound engineer from the TV. For the
>>>>>> framework which I used so far which is primitive compared to Csound (and
>>>>>> not
>>>>>> supported since long) but had the capability of being accessed via
>>>>>> script
>>>>>> which is needed for my project. For this software I’ve written C code
>>>>>> which
>>>>>> does the simulation of a virtual room producing multichannel (surruound
>>>>>> 5.1)
>>>>>> output. This code allows for different multichannel panning schemes
>>>>>> (similar
>>>>>> to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>>>>>> stereo
>>>>>> case) and calculates the reverberation to a desired order of reflections
>>>>>> depending on the dimensions of the virtual room, the reflectivity and
>>>>>> the
>>>>>> positions of the source and the sweet spot. The path of the source can
>>>>>> be
>>>>>> steered by a string for a valid arithmetic expression (standard
>>>>>> arithmetics
>>>>>> including the standard C-functions) such that the source can be moved
>>>>>> almost
>>>>>> freely in (x,y) coordinates of the virtual room. This code yields
>>>>>> information on
>>>>>> 
>>>>>> - the angle (or position) of the source,
>>>>>> - the distance dependent volume,
>>>>>> - the position dependent time delay between direct and reflected
>>>>>> signals,
>>>>>> - the position dependent volume ratio between direct and reflected
>>>>>> signals,
>>>>>> - the informations on the room contained in the reflections,
>>>>>> - the information on the movement (Doppler effect and beats which differ
>>>>>> for
>>>>>> the different channels because of different relative velocities w.r.t.
>>>>>> the
>>>>>> different walls).
>>>>>> 
>>>>>> As far as I understand by now the multichannel packages VBAP and
>>>>>> Ambisonic
>>>>>> address the first two points only. As far as I've understood Puckki's
>>>>>> article and the source code of VBAP in Csound it does the panning of the
>>>>>> phantom sources only between neighbouring loudspeakers which means you
>>>>>> are
>>>>>> not able to put a phantom source at any position. This should be
>>>>>> possible
>>>>>> with Ambisonic however it also does not include item 3-6 from the list
>>>>>> above. I certainly will have a look to this code.
>>>>>> 
>>>>>> An example of a source @440Hz moving with a velocity of 4m/sec in a room
>>>>>> with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>>>>>> (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
>>>>>> sweet spot until it reaches the wall behind the listener then it slowly
>>>>>> moves until it reaches the right back corner, where it stops. (For
>>>>>> visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> -----
>>>>>> cheers,
>>>>>> 
>>>>>> Karin
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>>>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>>> 
>>>>>> Csound mailing list
>>>>>> >>>>> href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=2"
>>>>>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>>>>>> 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
>>>>> 
>>>>> Csound mailing list
>>>>> >>>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>>>>> 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
>>>> 
>>>> Csound mailing list >>> href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=4"
>>>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>>>> 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
>>>> 
>>>> ________________________________
>>>> If you reply to this email, your message will be added to the discussion
>>>> below:
>>>> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
>>>> To unsubscribe from Including own C++ code in Csound, click here.
>>>> NAML
>>>> 
>>>> 
>>>> cheers,
>>>> 
>>>> Karin
>>>> 
>>>> ________________________________
>>>> View this message in context: Re: [Csnd] Including own C++ code in Csound
>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>> 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
>>>> 
>>>> 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
>>> 
>>> 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
>>> 
>>> 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
>> 
>> 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
> 
> 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

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

Date2016-01-04 08:37
FromKarin Daum
SubjectRe: Including own C++ code in Csound
this is simple to answer: Csound seems to me so much superior to the primitive framework I used up to now. Csound enables me to include effects I didn’t think of so far.

Time will be an issue in what I have in mind. The simulation of the sound in a virtual room including higher order reflections from the walls is time consuming. As an example I model a virtual room with dimensions of e.g. 20m X 50m which is more like a cathedral then a meeting room. If you want to simulate a reverberation time T60 of about one second you need to  calculate the reflections on a 21x21 grid of mirror spaces. You need to calculate 440 reflections. Even with the technique of using mirror listeners on this grid the resulting computing requirement for a single sound source is  about 25-30% of the available time (using -o3 as compiler option) in a live performance. But the result doe not sound like a cathedral. The T60 is more what is recommended for a meeting room. If you want to simulate a T60 of about 3-4 seconds which is more like a cathedral without hearing a cutoff in the reverberation you need to perform this calculations on a grid with dimensions larger than 61x61 (>3720 reflections). The computing time is much larger than the time available in a live performance. This is no solution. Therefore for non-moving sound sources you need to do the convolution of the sound with the proper impulse response function (which you get very easily at a high speed from my program using a single ping with a length of 1/sampling rate). For moving sources you need to calculate the lower orders of reflections with this code and add to it the convolution of the dry sound with the pulse response of the higher order reflections which is not needed to be time dependent. The convolution is not available in the current scheme i have. I would have to implement it. It seems to me easier to convert my C code into C++, which I’m using in my job in research. 
On 3 Jan 2016, at 21:00, Rory Walsh <rorywalsh@EAR.IE> wrote:

Why bother rewriting all the perfectly ready-to-go C code in C++?

On 3 January 2016 at 19:35, Michael Gogins <michael.gogins@gmail.com> wrote:
Why should Karin reduplicate all the stuff in Csound that works fine
already (audio IO etc)? As I said it makes perfectly good sense to use
Csound as a framework, and to write performance critical code in C++
as plugin opcodes.

There is waaay too much re-invention of the wheel in this field...

Best,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie> wrote:
> Not sure why you need Csound in this case. Just keep it all in C.
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
> On 3 Jan 2016, at 18:42, MarieCurie <karin.daum@DESY.DE> wrote:
>
> this is what I expected.  The code is ready in C. Modifying  it to C++ and
> calling it from Csound seems to me easier that starting from scratch in
> Csound. As I tried to explain in my previous answer and as you can see in
> the example this may become difficult to get it completely flexible in
> Csound. But as I also said, I just started with Csound a few days ago and
> don’t know all it’s capabilities. In my C code I need to define only the
> virtual room (size & reflectivity) + sweet spot in the initialisation and
> then if the position/path of a given sound source is passed to the code
> everything  turns out automatically.
>
> And as I explained in the other thread computing power could be a
> limitation.
>
> On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
> wrote:
>
> Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
> Csound as a framework and writing critical opcodes in C++makes sense to me.
>
> Regards,
> Mike
>
> On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <<a
> href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=0"
> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>
>> You can do doppler and the other things in Csound by using variable delay
>> lines, filters,
>> etc. What I would suggest is this:
>>
>> 1) write the audio processing code in Csound.
>>
>> 2) Access Csound via its API in your C++
>> program, controlling the instruments that
>> you created. The C++ code can calculate all
>> the parameters / trajectories and pass it
>> to Csound to do the processing.
>>
>> Of course this makes sense if you are starting the project. If you have
>> all
>> the code already written in C++, redoing
>> things in Csound might be duplication. In that case just keep to C++.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>> > On 3 Jan 2016, at 15:09, MarieCurie <<a
>> > href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=1"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >
>> > well, I just learnt about Csound shortly before Xmas when I was
>> > discussing
>> > some problems with my project with a sound engineer from the TV. For the
>> > framework which I used so far which is primitive compared to Csound (and
>> > not
>> > supported since long) but had the capability of being accessed via
>> > script
>> > which is needed for my project. For this software I’ve written C code
>> > which
>> > does the simulation of a virtual room producing multichannel (surruound
>> > 5.1)
>> > output. This code allows for different multichannel panning schemes
>> > (similar
>> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>> > stereo
>> > case) and calculates the reverberation to a desired order of reflections
>> > depending on the dimensions of the virtual room, the reflectivity and
>> > the
>> > positions of the source and the sweet spot. The path of the source can
>> > be
>> > steered by a string for a valid arithmetic expression (standard
>> > arithmetics
>> > including the standard C-functions) such that the source can be moved
>> > almost
>> > freely in (x,y) coordinates of the virtual room. This code yields
>> > information on
>> >
>> > - the angle (or position) of the source,
>> > - the distance dependent volume,
>> > - the position dependent time delay between direct and reflected
>> > signals,
>> > - the position dependent volume ratio between direct and reflected
>> > signals,
>> > - the informations on the room contained in the reflections,
>> > - the information on the movement (Doppler effect and beats which differ
>> > for
>> > the different channels because of different relative velocities w.r.t.
>> > the
>> > different walls).
>> >
>> > As far as I understand by now the multichannel packages VBAP and
>> > Ambisonic
>> > address the first two points only. As far as I've understood Puckki's
>> > article and the source code of VBAP in Csound it does the panning of the
>> > phantom sources only between neighbouring loudspeakers which means you
>> > are
>> > not able to put a phantom source at any position. This should be
>> > possible
>> > with Ambisonic however it also does not include item 3-6 from the list
>> > above. I certainly will have a look to this code.
>> >
>> > An example of a source @440Hz moving with a velocity of 4m/sec in a room
>> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
>> > sweet spot until it reaches the wall behind the listener then it slowly
>> > moves until it reaches the right back corner, where it stops. (For
>> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>> >
>> > <http://csound.1045644.n5.nabble.com/file/n5745837/440HzDopplerSchwebung.jpg>
>> >
>> >
>> >
>> > -----
>> > cheers,
>> >
>> > Karin
>> > --
>> > View this message in context:
>> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >
>> > Csound mailing list
>> > <a
>> > href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=2"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>>
>> Csound mailing list
>> <a href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=3"
>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> 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
>
> Csound mailing list <a
> href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=4"
> target="_top" rel="nofollow" link="external" class="">[hidden email]
> 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
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
> To unsubscribe from Including own C++ code in Csound, click here.
> NAML
>
>
> cheers,
>
> Karin
>
> ________________________________
> View this message in context: Re: [Csnd] Including own C++ code in Csound
> Sent from the Csound - General mailing list archive at Nabble.com.
> 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
>
> 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

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

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


Date2016-01-04 09:01
FromOeyvind Brandtsegg
SubjectRe: Including own C++ code in Csound
It sounds like a very nice and interesting project. Do let us know how
you solve it.

But do test the spat3d opcode, it sounds as if it may be able to do a
lot of what you need. I guess it might become expensive CPU-wise if
you want to run dozens of independent trajectories. But that could
possibly be parallelized.

Also, perhaps you can get away with using a lower number of
independent trajectories, mixing each source sound to the closest
point in space to where you actually want it. A kind of spatial
downsampling. In my experience we humans are not capable of actually
following more than a few independently moving objects simultaneously,
much like we are not able to follow the details of more than a few
independent voices in music simultaneously. I have no scientific data
to back up this claim, but I would guess our polyphony of spatial
perception is usually less than 5 simultaneous trajectories. If you
have 40-50 independent voices, maybe you could mix them to 5-8
positions in the virtual room.


2016-01-04 9:37 GMT+01:00 Karin Daum :
> this is simple to answer: Csound seems to me so much superior to the
> primitive framework I used up to now. Csound enables me to include effects I
> didn’t think of so far.
>
> Time will be an issue in what I have in mind. The simulation of the sound in
> a virtual room including higher order reflections from the walls is time
> consuming. As an example I model a virtual room with dimensions of e.g. 20m
> X 50m which is more like a cathedral then a meeting room. If you want to
> simulate a reverberation time T60 of about one second you need to  calculate
> the reflections on a 21x21 grid of mirror spaces. You need to calculate 440
> reflections. Even with the technique of using mirror listeners on this grid
> the resulting computing requirement for a single sound source is  about
> 25-30% of the available time (using -o3 as compiler option) in a live
> performance. But the result doe not sound like a cathedral. The T60 is more
> what is recommended for a meeting room. If you want to simulate a T60 of
> about 3-4 seconds which is more like a cathedral without hearing a cutoff in
> the reverberation you need to perform this calculations on a grid with
> dimensions larger than 61x61 (>3720 reflections). The computing time is much
> larger than the time available in a live performance. This is no solution.
> Therefore for non-moving sound sources you need to do the convolution of the
> sound with the proper impulse response function (which you get very easily
> at a high speed from my program using a single ping with a length of
> 1/sampling rate). For moving sources you need to calculate the lower orders
> of reflections with this code and add to it the convolution of the dry sound
> with the pulse response of the higher order reflections which is not needed
> to be time dependent. The convolution is not available in the current scheme
> i have. I would have to implement it. It seems to me easier to convert my C
> code into C++, which I’m using in my job in research.
>
> On 3 Jan 2016, at 21:00, Rory Walsh  wrote:
>
> Why bother rewriting all the perfectly ready-to-go C code in C++?
>
> On 3 January 2016 at 19:35, Michael Gogins  wrote:
>>
>> Why should Karin reduplicate all the stuff in Csound that works fine
>> already (audio IO etc)? As I said it makes perfectly good sense to use
>> Csound as a framework, and to write performance critical code in C++
>> as plugin opcodes.
>>
>> There is waaay too much re-invention of the wheel in this field...
>>
>> Best,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>>  wrote:
>> > Not sure why you need Csound in this case. Just keep it all in C.
>> >
>> > Victor Lazzarini
>> > Dean of Arts, Celtic Studies, and Philosophy
>> > Maynooth University
>> > Ireland
>> >
>> > On 3 Jan 2016, at 18:42, MarieCurie  wrote:
>> >
>> > this is what I expected.  The code is ready in C. Modifying  it to C++
>> > and
>> > calling it from Csound seems to me easier that starting from scratch in
>> > Csound. As I tried to explain in my previous answer and as you can see
>> > in
>> > the example this may become difficult to get it completely flexible in
>> > Csound. But as I also said, I just started with Csound a few days ago
>> > and
>> > don’t know all it’s capabilities. In my C code I need to define only the
>> > virtual room (size & reflectivity) + sweet spot in the initialisation
>> > and
>> > then if the position/path of a given sound source is passed to the code
>> > everything  turns out automatically.
>> >
>> > And as I explained in the other thread computing power could be a
>> > limitation.
>> >
>> > On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
>> > wrote:
>> >
>> > Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
>> > Csound as a framework and writing critical opcodes in C++makes sense to
>> > me.
>> >
>> > Regards,
>> > Mike
>> >
>> > On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=0"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]>
>> > wrote:
>> >>
>> >> You can do doppler and the other things in Csound by using variable
>> >> delay
>> >> lines, filters,
>> >> etc. What I would suggest is this:
>> >>
>> >> 1) write the audio processing code in Csound.
>> >>
>> >> 2) Access Csound via its API in your C++
>> >> program, controlling the instruments that
>> >> you created. The C++ code can calculate all
>> >> the parameters / trajectories and pass it
>> >> to Csound to do the processing.
>> >>
>> >> Of course this makes sense if you are starting the project. If you have
>> >> all
>> >> the code already written in C++, redoing
>> >> things in Csound might be duplication. In that case just keep to C++.
>> >>
>> >> Victor Lazzarini
>> >> Dean of Arts, Celtic Studies, and Philosophy
>> >> Maynooth University
>> >> Ireland
>> >>
>> >> > On 3 Jan 2016, at 15:09, MarieCurie <> >> >
>> >> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=1"
>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]>
>> >> > wrote:
>> >> >
>> >> > well, I just learnt about Csound shortly before Xmas when I was
>> >> > discussing
>> >> > some problems with my project with a sound engineer from the TV. For
>> >> > the
>> >> > framework which I used so far which is primitive compared to Csound
>> >> > (and
>> >> > not
>> >> > supported since long) but had the capability of being accessed via
>> >> > script
>> >> > which is needed for my project. For this software I’ve written C code
>> >> > which
>> >> > does the simulation of a virtual room producing multichannel
>> >> > (surruound
>> >> > 5.1)
>> >> > output. This code allows for different multichannel panning schemes
>> >> > (similar
>> >> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>> >> > stereo
>> >> > case) and calculates the reverberation to a desired order of
>> >> > reflections
>> >> > depending on the dimensions of the virtual room, the reflectivity and
>> >> > the
>> >> > positions of the source and the sweet spot. The path of the source
>> >> > can
>> >> > be
>> >> > steered by a string for a valid arithmetic expression (standard
>> >> > arithmetics
>> >> > including the standard C-functions) such that the source can be moved
>> >> > almost
>> >> > freely in (x,y) coordinates of the virtual room. This code yields
>> >> > information on
>> >> >
>> >> > - the angle (or position) of the source,
>> >> > - the distance dependent volume,
>> >> > - the position dependent time delay between direct and reflected
>> >> > signals,
>> >> > - the position dependent volume ratio between direct and reflected
>> >> > signals,
>> >> > - the informations on the room contained in the reflections,
>> >> > - the information on the movement (Doppler effect and beats which
>> >> > differ
>> >> > for
>> >> > the different channels because of different relative velocities
>> >> > w.r.t.
>> >> > the
>> >> > different walls).
>> >> >
>> >> > As far as I understand by now the multichannel packages VBAP and
>> >> > Ambisonic
>> >> > address the first two points only. As far as I've understood Puckki's
>> >> > article and the source code of VBAP in Csound it does the panning of
>> >> > the
>> >> > phantom sources only between neighbouring loudspeakers which means
>> >> > you
>> >> > are
>> >> > not able to put a phantom source at any position. This should be
>> >> > possible
>> >> > with Ambisonic however it also does not include item 3-6 from the
>> >> > list
>> >> > above. I certainly will have a look to this code.
>> >> >
>> >> > An example of a source @440Hz moving with a velocity of 4m/sec in a
>> >> > room
>> >> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>> >> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing
>> >> > the
>> >> > sweet spot until it reaches the wall behind the listener then it
>> >> > slowly
>> >> > moves until it reaches the right back corner, where it stops. (For
>> >> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>> >> >
>> >> >
>> >> > 
>> >> >
>> >> >
>> >> >
>> >> > -----
>> >> > cheers,
>> >> >
>> >> > Karin
>> >> > --
>> >> > View this message in context:
>> >> >
>> >> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>> >> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >> >
>> >> > Csound mailing list
>> >> > > >> >
>> >> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=2"
>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> > 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
>> >>
>> >> Csound mailing list
>> >> > >> href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=3"
>> >> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> 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
>> >
>> > Csound mailing list > > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=4"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>> >
>> > ________________________________
>> > If you reply to this email, your message will be added to the discussion
>> > below:
>> >
>> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
>> > To unsubscribe from Including own C++ code in Csound, click here.
>> > NAML
>> >
>> >
>> > cheers,
>> >
>> > Karin
>> >
>> > ________________________________
>> > View this message in context: Re: [Csnd] Including own C++ code in
>> > Csound
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> > 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
>> >
>> > 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
>>
>> 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
>
>
> 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
>
>
> 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



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp

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

Date2016-01-04 09:07
FromVictor Lazzarini
SubjectRe: Including own C++ code in Csound
For Csound, it would be easier to keep the code in C, rather than convert into C++. It’s
the more established way of writing opcodes, and there is good documentation for
it. If you want my class notes, just contact me privately.

For convolution, you can use the convolution opcodes in Csound. As I suggested, there
is no need to re-implement partitioned convolution, it is simpler to use the existing 
implementations.

Regards
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 4 Jan 2016, at 08:37, Karin Daum  wrote:
> 
> this is simple to answer: Csound seems to me so much superior to the primitive framework I used up to now. Csound enables me to include effects I didn’t think of so far.
> 
> Time will be an issue in what I have in mind. The simulation of the sound in a virtual room including higher order reflections from the walls is time consuming. As an example I model a virtual room with dimensions of e.g. 20m X 50m which is more like a cathedral then a meeting room. If you want to simulate a reverberation time T60 of about one second you need to  calculate the reflections on a 21x21 grid of mirror spaces. You need to calculate 440 reflections. Even with the technique of using mirror listeners on this grid the resulting computing requirement for a single sound source is  about 25-30% of the available time (using -o3 as compiler option) in a live performance. But the result doe not sound like a cathedral. The T60 is more what is recommended for a meeting room. If you want to simulate a T60 of about 3-4 seconds which is more like a cathedral without hearing a cutoff in the reverberation you need to perform this calculations on a grid with dimensions larger than 61x61 (>3720 reflections). The computing time is much larger than the time available in a live performance. This is no solution. Therefore for non-moving sound sources you need to do the convolution of the sound with the proper impulse response function (which you get very easily at a high speed from my program using a single ping with a length of 1/sampling rate). For moving sources you need to calculate the lower orders of reflections with this code and add to it the convolution of the dry sound with the pulse response of the higher order reflections which is not needed to be time dependent. The convolution is not available in the current scheme i have. I would have to implement it. It seems to me easier to convert my C code into C++, which I’m using in my job in research. 
>> On 3 Jan 2016, at 21:00, Rory Walsh  wrote:
>> 
>> Why bother rewriting all the perfectly ready-to-go C code in C++? 
>> 
>> On 3 January 2016 at 19:35, Michael Gogins  wrote:
>> Why should Karin reduplicate all the stuff in Csound that works fine
>> already (audio IO etc)? As I said it makes perfectly good sense to use
>> Csound as a framework, and to write performance critical code in C++
>> as plugin opcodes.
>> 
>> There is waaay too much re-invention of the wheel in this field...
>> 
>> Best,
>> Mike
>> 
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>> 
>> 
>> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>>  wrote:
>> > Not sure why you need Csound in this case. Just keep it all in C.
>> >
>> > Victor Lazzarini
>> > Dean of Arts, Celtic Studies, and Philosophy
>> > Maynooth University
>> > Ireland
>> >
>> > On 3 Jan 2016, at 18:42, MarieCurie  wrote:
>> >
>> > this is what I expected.  The code is ready in C. Modifying  it to C++ and
>> > calling it from Csound seems to me easier that starting from scratch in
>> > Csound. As I tried to explain in my previous answer and as you can see in
>> > the example this may become difficult to get it completely flexible in
>> > Csound. But as I also said, I just started with Csound a few days ago and
>> > don’t know all it’s capabilities. In my C code I need to define only the
>> > virtual room (size & reflectivity) + sweet spot in the initialisation and
>> > then if the position/path of a given sound source is passed to the code
>> > everything  turns out automatically.
>> >
>> > And as I explained in the other thread computing power could be a
>> > limitation.
>> >
>> > On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
>> > wrote:
>> >
>> > Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
>> > Csound as a framework and writing critical opcodes in C++makes sense to me.
>> >
>> > Regards,
>> > Mike
>> >
>> > On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=0"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >>
>> >> You can do doppler and the other things in Csound by using variable delay
>> >> lines, filters,
>> >> etc. What I would suggest is this:
>> >>
>> >> 1) write the audio processing code in Csound.
>> >>
>> >> 2) Access Csound via its API in your C++
>> >> program, controlling the instruments that
>> >> you created. The C++ code can calculate all
>> >> the parameters / trajectories and pass it
>> >> to Csound to do the processing.
>> >>
>> >> Of course this makes sense if you are starting the project. If you have
>> >> all
>> >> the code already written in C++, redoing
>> >> things in Csound might be duplication. In that case just keep to C++.
>> >>
>> >> Victor Lazzarini
>> >> Dean of Arts, Celtic Studies, and Philosophy
>> >> Maynooth University
>> >> Ireland
>> >>
>> >> > On 3 Jan 2016, at 15:09, MarieCurie <> >> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=1"
>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >> >
>> >> > well, I just learnt about Csound shortly before Xmas when I was
>> >> > discussing
>> >> > some problems with my project with a sound engineer from the TV. For the
>> >> > framework which I used so far which is primitive compared to Csound (and
>> >> > not
>> >> > supported since long) but had the capability of being accessed via
>> >> > script
>> >> > which is needed for my project. For this software I’ve written C code
>> >> > which
>> >> > does the simulation of a virtual room producing multichannel (surruound
>> >> > 5.1)
>> >> > output. This code allows for different multichannel panning schemes
>> >> > (similar
>> >> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>> >> > stereo
>> >> > case) and calculates the reverberation to a desired order of reflections
>> >> > depending on the dimensions of the virtual room, the reflectivity and
>> >> > the
>> >> > positions of the source and the sweet spot. The path of the source can
>> >> > be
>> >> > steered by a string for a valid arithmetic expression (standard
>> >> > arithmetics
>> >> > including the standard C-functions) such that the source can be moved
>> >> > almost
>> >> > freely in (x,y) coordinates of the virtual room. This code yields
>> >> > information on
>> >> >
>> >> > - the angle (or position) of the source,
>> >> > - the distance dependent volume,
>> >> > - the position dependent time delay between direct and reflected
>> >> > signals,
>> >> > - the position dependent volume ratio between direct and reflected
>> >> > signals,
>> >> > - the informations on the room contained in the reflections,
>> >> > - the information on the movement (Doppler effect and beats which differ
>> >> > for
>> >> > the different channels because of different relative velocities w.r.t.
>> >> > the
>> >> > different walls).
>> >> >
>> >> > As far as I understand by now the multichannel packages VBAP and
>> >> > Ambisonic
>> >> > address the first two points only. As far as I've understood Puckki's
>> >> > article and the source code of VBAP in Csound it does the panning of the
>> >> > phantom sources only between neighbouring loudspeakers which means you
>> >> > are
>> >> > not able to put a phantom source at any position. This should be
>> >> > possible
>> >> > with Ambisonic however it also does not include item 3-6 from the list
>> >> > above. I certainly will have a look to this code.
>> >> >
>> >> > An example of a source @440Hz moving with a velocity of 4m/sec in a room
>> >> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>> >> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
>> >> > sweet spot until it reaches the wall behind the listener then it slowly
>> >> > moves until it reaches the right back corner, where it stops. (For
>> >> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>> >> >
>> >> > 
>> >> >
>> >> >
>> >> >
>> >> > -----
>> >> > cheers,
>> >> >
>> >> > Karin
>> >> > --
>> >> > View this message in context:
>> >> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>> >> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >> >
>> >> > Csound mailing list
>> >> > > >> > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=2"
>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> > 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
>> >>
>> >> Csound mailing list
>> >> > >> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> 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
>> >
>> > Csound mailing list > > href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=4"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>> >
>> > ________________________________
>> > If you reply to this email, your message will be added to the discussion
>> > below:
>> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
>> > To unsubscribe from Including own C++ code in Csound, click here.
>> > NAML
>> >
>> >
>> > cheers,
>> >
>> > Karin
>> >
>> > ________________________________
>> > View this message in context: Re: [Csnd] Including own C++ code in Csound
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> > 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
>> >
>> > 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
>> 
>> 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
>> 
>> 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
> 
> 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

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

Date2016-01-04 09:11
FromKarin Daum
SubjectRe: Including own C++ code in Csound
thank you for pointing me to this opcode. this looks interesting. I will have a closer look to it.
> On 3 Jan 2016, at 21:27, Oeyvind Brandtsegg  wrote:
> 
> also, just a thought,
> the spatialization and reverberation you want to do might be available
> by using the spat3d opcode(?)
> 
> 
> 2016-01-03 21:18 GMT+01:00 Victor Lazzarini :
>> If all you need is audio IO, just use one of the audio IO libs such as
>> portaudio, JUCE, jack. It would be over complicated to port a ready-to-go
>> C/C++ code as a Csound opcode, esp. if it involves memory management
>> etc, and have to learn Csound on top of that.
>> 
>> On the other hand, if you need any of oscillators, filters, delays, spectral
>> processing, etc, then it might be worth your while. However, I don’t think
>> it makes tremendous sense to re-write stuff that already exists in Csound,
>> such as partitioned convolution, etc. It is best to take a step back, modularise
>> your code into unit generators, and re-implement only the things Csound
>> does not have. This way you can re-use existing code, and allow for maximum
>> flexibility to create your instruments. There will not be a 3-1 loss in performance,
>> because all the code will still be in C/C++ (the 3-1 figure is when we do all
>> the DSP mathematics in Csound code, rather than re-implementing it as
>> opcodes).
>> 
>> If you want to go down that route, unfortunately the FLOSS manual quick
>> intro into opcode writing will not be sufficient (as it does not cover more
>> advanced things such as memory allocation etc.). However, you can contact me
>> privately and I can send you my class notes on the subject.
>> 
>> ========================
>> Dr Victor Lazzarini
>> Dean of Arts, Celtic Studies and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>> 
>>> On 3 Jan 2016, at 20:00, Rory Walsh  wrote:
>>> 
>>> Why bother rewriting all the perfectly ready-to-go C code in C++?
>>> 
>>> On 3 January 2016 at 19:35, Michael Gogins  wrote:
>>> Why should Karin reduplicate all the stuff in Csound that works fine
>>> already (audio IO etc)? As I said it makes perfectly good sense to use
>>> Csound as a framework, and to write performance critical code in C++
>>> as plugin opcodes.
>>> 
>>> There is waaay too much re-invention of the wheel in this field...
>>> 
>>> Best,
>>> Mike
>>> 
>>> -----------------------------------------------------
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>> 
>>> 
>>> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>>>  wrote:
>>>> Not sure why you need Csound in this case. Just keep it all in C.
>>>> 
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>> 
>>>> On 3 Jan 2016, at 18:42, MarieCurie  wrote:
>>>> 
>>>> this is what I expected.  The code is ready in C. Modifying  it to C++ and
>>>> calling it from Csound seems to me easier that starting from scratch in
>>>> Csound. As I tried to explain in my previous answer and as you can see in
>>>> the example this may become difficult to get it completely flexible in
>>>> Csound. But as I also said, I just started with Csound a few days ago and
>>>> don’t know all it’s capabilities. In my C code I need to define only the
>>>> virtual room (size & reflectivity) + sweet spot in the initialisation and
>>>> then if the position/path of a given sound source is passed to the code
>>>> everything  turns out automatically.
>>>> 
>>>> And as I explained in the other thread computing power could be a
>>>> limitation.
>>>> 
>>>> On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
>>>> wrote:
>>>> 
>>>> Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
>>>> Csound as a framework and writing critical opcodes in C++makes sense to me.
>>>> 
>>>> Regards,
>>>> Mike
>>>> 
>>>> On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <>>> href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=0"
>>>> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>>>> 
>>>>> You can do doppler and the other things in Csound by using variable delay
>>>>> lines, filters,
>>>>> etc. What I would suggest is this:
>>>>> 
>>>>> 1) write the audio processing code in Csound.
>>>>> 
>>>>> 2) Access Csound via its API in your C++
>>>>> program, controlling the instruments that
>>>>> you created. The C++ code can calculate all
>>>>> the parameters / trajectories and pass it
>>>>> to Csound to do the processing.
>>>>> 
>>>>> Of course this makes sense if you are starting the project. If you have
>>>>> all
>>>>> the code already written in C++, redoing
>>>>> things in Csound might be duplication. In that case just keep to C++.
>>>>> 
>>>>> Victor Lazzarini
>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>> Maynooth University
>>>>> Ireland
>>>>> 
>>>>>> On 3 Jan 2016, at 15:09, MarieCurie <>>>>> href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=1"
>>>>>> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>>>>> 
>>>>>> well, I just learnt about Csound shortly before Xmas when I was
>>>>>> discussing
>>>>>> some problems with my project with a sound engineer from the TV. For the
>>>>>> framework which I used so far which is primitive compared to Csound (and
>>>>>> not
>>>>>> supported since long) but had the capability of being accessed via
>>>>>> script
>>>>>> which is needed for my project. For this software I’ve written C code
>>>>>> which
>>>>>> does the simulation of a virtual room producing multichannel (surruound
>>>>>> 5.1)
>>>>>> output. This code allows for different multichannel panning schemes
>>>>>> (similar
>>>>>> to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>>>>>> stereo
>>>>>> case) and calculates the reverberation to a desired order of reflections
>>>>>> depending on the dimensions of the virtual room, the reflectivity and
>>>>>> the
>>>>>> positions of the source and the sweet spot. The path of the source can
>>>>>> be
>>>>>> steered by a string for a valid arithmetic expression (standard
>>>>>> arithmetics
>>>>>> including the standard C-functions) such that the source can be moved
>>>>>> almost
>>>>>> freely in (x,y) coordinates of the virtual room. This code yields
>>>>>> information on
>>>>>> 
>>>>>> - the angle (or position) of the source,
>>>>>> - the distance dependent volume,
>>>>>> - the position dependent time delay between direct and reflected
>>>>>> signals,
>>>>>> - the position dependent volume ratio between direct and reflected
>>>>>> signals,
>>>>>> - the informations on the room contained in the reflections,
>>>>>> - the information on the movement (Doppler effect and beats which differ
>>>>>> for
>>>>>> the different channels because of different relative velocities w.r.t.
>>>>>> the
>>>>>> different walls).
>>>>>> 
>>>>>> As far as I understand by now the multichannel packages VBAP and
>>>>>> Ambisonic
>>>>>> address the first two points only. As far as I've understood Puckki's
>>>>>> article and the source code of VBAP in Csound it does the panning of the
>>>>>> phantom sources only between neighbouring loudspeakers which means you
>>>>>> are
>>>>>> not able to put a phantom source at any position. This should be
>>>>>> possible
>>>>>> with Ambisonic however it also does not include item 3-6 from the list
>>>>>> above. I certainly will have a look to this code.
>>>>>> 
>>>>>> An example of a source @440Hz moving with a velocity of 4m/sec in a room
>>>>>> with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>>>>>> (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
>>>>>> sweet spot until it reaches the wall behind the listener then it slowly
>>>>>> moves until it reaches the right back corner, where it stops. (For
>>>>>> visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> -----
>>>>>> cheers,
>>>>>> 
>>>>>> Karin
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>>>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>>> 
>>>>>> Csound mailing list
>>>>>> >>>>> href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=2"
>>>>>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>>>>>> 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
>>>>> 
>>>>> Csound mailing list
>>>>> >>>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>>>>> 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
>>>> 
>>>> Csound mailing list >>> href="x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=4"
>>>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>>>> 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
>>>> 
>>>> ________________________________
>>>> If you reply to this email, your message will be added to the discussion
>>>> below:
>>>> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
>>>> To unsubscribe from Including own C++ code in Csound, click here.
>>>> NAML
>>>> 
>>>> 
>>>> cheers,
>>>> 
>>>> Karin
>>>> 
>>>> ________________________________
>>>> View this message in context: Re: [Csnd] Including own C++ code in Csound
>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>> 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
>>>> 
>>>> 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
>>> 
>>> 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
>>> 
>>> 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
>> 
>> 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
> 
> 
> 
> -- 
> 
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
> 
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://flyndresang.no/
> http://soundcloud.com/t-emp
> 
> 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

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

Date2016-01-04 09:53
FromMarieCurie
SubjectRe: Including own C++ code in Csound

I will have a close look to the spat3d opcode. 


Concerning our perception I agree, it’s difficult to follow the path of more than a few moving sound sources at the same time. And yes, it is also difficult to listen to many independent voices at the same time. The larger the reverberation time T60 the more difficult it is. However, a longer T60 makes it easier to distinguish between voices close-by from voices far away. If you take for example a voice at a distance of 2m compared to a voice at 20m this make a difference in the sound pressure of a factor of 10 and in intensity by a factor of 100 (40dB). However, our perception is about a factor of 16 only (10dB for a factor 2 change in loudness). This is where reverberation helps: the ratio of direct to reflected sound decreases with increasing distance and the time difference between direct sound and early reflections increases when the sound is coming closer. As long as normal multichannel sound is used, I need to find the optimum between clarity of the voices and spatial resolution which comes to a large extend from the reverberation. This would change if wave field synthesis would be used, but this is a completely different universe.

What I want to see/hear also is what happens if the chorus/cacophony is moving towards or away from the sweet spot. This would mean to move a couple of voices (20-50) simultaneously.   
On 4 Jan 2016, at 10:03, Oeyvind Brandtsegg-3 [via Csound] <[hidden email]> wrote:

It sounds like a very nice and interesting project. Do let us know how
you solve it.

But do test the spat3d opcode, it sounds as if it may be able to do a
lot of what you need. I guess it might become expensive CPU-wise if
you want to run dozens of independent trajectories. But that could
possibly be parallelized.

Also, perhaps you can get away with using a lower number of
independent trajectories, mixing each source sound to the closest
point in space to where you actually want it. A kind of spatial
downsampling. In my experience we humans are not capable of actually
following more than a few independently moving objects simultaneously,
much like we are not able to follow the details of more than a few
independent voices in music simultaneously. I have no scientific data
to back up this claim, but I would guess our polyphony of spatial
perception is usually less than 5 simultaneous trajectories. If you
have 40-50 independent voices, maybe you could mix them to 5-8
positions in the virtual room.


2016-01-04 9:37 GMT+01:00 Karin Daum <<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]>:

> this is simple to answer: Csound seems to me so much superior to the
> primitive framework I used up to now. Csound enables me to include effects I
> didn’t think of so far.
>
> Time will be an issue in what I have in mind. The simulation of the sound in
> a virtual room including higher order reflections from the walls is time
> consuming. As an example I model a virtual room with dimensions of e.g. 20m
> X 50m which is more like a cathedral then a meeting room. If you want to
> simulate a reverberation time T60 of about one second you need to  calculate
> the reflections on a 21x21 grid of mirror spaces. You need to calculate 440
> reflections. Even with the technique of using mirror listeners on this grid
> the resulting computing requirement for a single sound source is  about
> 25-30% of the available time (using -o3 as compiler option) in a live
> performance. But the result doe not sound like a cathedral. The T60 is more
> what is recommended for a meeting room. If you want to simulate a T60 of
> about 3-4 seconds which is more like a cathedral without hearing a cutoff in
> the reverberation you need to perform this calculations on a grid with
> dimensions larger than 61x61 (>3720 reflections). The computing time is much
> larger than the time available in a live performance. This is no solution.
> Therefore for non-moving sound sources you need to do the convolution of the
> sound with the proper impulse response function (which you get very easily
> at a high speed from my program using a single ping with a length of
> 1/sampling rate). For moving sources you need to calculate the lower orders
> of reflections with this code and add to it the convolution of the dry sound
> with the pulse response of the higher order reflections which is not needed
> to be time dependent. The convolution is not available in the current scheme
> i have. I would have to implement it. It seems to me easier to convert my C
> code into C++, which I’m using in my job in research.
>
> On 3 Jan 2016, at 21:00, Rory Walsh <<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>
> Why bother rewriting all the perfectly ready-to-go C code in C++?
>
> On 3 January 2016 at 19:35, Michael Gogins <<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=2" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>
>> Why should Karin reduplicate all the stuff in Csound that works fine
>> already (audio IO etc)? As I said it makes perfectly good sense to use
>> Csound as a framework, and to write performance critical code in C++
>> as plugin opcodes.
>>
>> There is waaay too much re-invention of the wheel in this field...
>>
>> Best,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>> <<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=3" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> > Not sure why you need Csound in this case. Just keep it all in C.
>> >
>> > Victor Lazzarini
>> > Dean of Arts, Celtic Studies, and Philosophy
>> > Maynooth University
>> > Ireland
>> >
>> > On 3 Jan 2016, at 18:42, MarieCurie <<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=4" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >
>> > this is what I expected.  The code is ready in C. Modifying  it to C++
>> > and
>> > calling it from Csound seems to me easier that starting from scratch in
>> > Csound. As I tried to explain in my previous answer and as you can see
>> > in
>> > the example this may become difficult to get it completely flexible in
>> > Csound. But as I also said, I just started with Csound a few days ago
>> > and
>> > don’t know all it’s capabilities. In my C code I need to define only the
>> > virtual room (size & reflectivity) + sweet spot in the initialisation
>> > and
>> > then if the position/path of a given sound source is passed to the code
>> > everything  turns out automatically.
>> >
>> > And as I explained in the other thread computing power could be a
>> > limitation.
>> >
>> > On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
>> > wrote:
>> >
>> > Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
>> > Csound as a framework and writing critical opcodes in C++makes sense to
>> > me.
>> >
>> > Regards,
>> > Mike
>> >
>> > On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <<a
>> > href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=0" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=0"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]>
>> > wrote:
>> >>
>> >> You can do doppler and the other things in Csound by using variable
>> >> delay
>> >> lines, filters,
>> >> etc. What I would suggest is this:
>> >>
>> >> 1) write the audio processing code in Csound.
>> >>
>> >> 2) Access Csound via its API in your C++
>> >> program, controlling the instruments that
>> >> you created. The C++ code can calculate all
>> >> the parameters / trajectories and pass it
>> >> to Csound to do the processing.
>> >>
>> >> Of course this makes sense if you are starting the project. If you have
>> >> all
>> >> the code already written in C++, redoing
>> >> things in Csound might be duplication. In that case just keep to C++.
>> >>
>> >> Victor Lazzarini
>> >> Dean of Arts, Celtic Studies, and Philosophy
>> >> Maynooth University
>> >> Ireland
>> >>
>> >> > On 3 Jan 2016, at 15:09, MarieCurie <<a
>> >> >
>> >> > href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=1" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=1"
>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]>
>> >> > wrote:
>> >> >
>> >> > well, I just learnt about Csound shortly before Xmas when I was
>> >> > discussing
>> >> > some problems with my project with a sound engineer from the TV. For
>> >> > the
>> >> > framework which I used so far which is primitive compared to Csound
>> >> > (and
>> >> > not
>> >> > supported since long) but had the capability of being accessed via
>> >> > script
>> >> > which is needed for my project. For this software I’ve written C code
>> >> > which
>> >> > does the simulation of a virtual room producing multichannel
>> >> > (surruound
>> >> > 5.1)
>> >> > output. This code allows for different multichannel panning schemes
>> >> > (similar
>> >> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>> >> > stereo
>> >> > case) and calculates the reverberation to a desired order of
>> >> > reflections
>> >> > depending on the dimensions of the virtual room, the reflectivity and
>> >> > the
>> >> > positions of the source and the sweet spot. The path of the source
>> >> > can
>> >> > be
>> >> > steered by a string for a valid arithmetic expression (standard
>> >> > arithmetics
>> >> > including the standard C-functions) such that the source can be moved
>> >> > almost
>> >> > freely in (x,y) coordinates of the virtual room. This code yields
>> >> > information on
>> >> >
>> >> > - the angle (or position) of the source,
>> >> > - the distance dependent volume,
>> >> > - the position dependent time delay between direct and reflected
>> >> > signals,
>> >> > - the position dependent volume ratio between direct and reflected
>> >> > signals,
>> >> > - the informations on the room contained in the reflections,
>> >> > - the information on the movement (Doppler effect and beats which
>> >> > differ
>> >> > for
>> >> > the different channels because of different relative velocities
>> >> > w.r.t.
>> >> > the
>> >> > different walls).
>> >> >
>> >> > As far as I understand by now the multichannel packages VBAP and
>> >> > Ambisonic
>> >> > address the first two points only. As far as I've understood Puckki's
>> >> > article and the source code of VBAP in Csound it does the panning of
>> >> > the
>> >> > phantom sources only between neighbouring loudspeakers which means
>> >> > you
>> >> > are
>> >> > not able to put a phantom source at any position. This should be
>> >> > possible
>> >> > with Ambisonic however it also does not include item 3-6 from the
>> >> > list
>> >> > above. I certainly will have a look to this code.
>> >> >
>> >> > An example of a source @440Hz moving with a velocity of 4m/sec in a
>> >> > room
>> >> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>> >> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing
>> >> > the
>> >> > sweet spot until it reaches the wall behind the listener then it
>> >> > slowly
>> >> > moves until it reaches the right back corner, where it stops. (For
>> >> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>> >> >
>> >> >
>> >> > <http://csound.1045644.n5.nabble.com/file/n5745837/440HzDopplerSchwebung.jpg>
>> >> >
>> >> >
>> >> >
>> >> > -----
>> >> > cheers,
>> >> >
>> >> > Karin
>> >> > --
>> >> > View this message in context:
>> >> >
>> >> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>> >> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >> >
>> >> > Csound mailing list
>> >> > <a
>> >> >
>> >> > href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=2" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=2"
>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> > 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
>> >>
>> >> Csound mailing list
>> >> <a
>> >> href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=3" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=3"
>> >> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> 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
>> >
>> > Csound mailing list <a
>> > href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=4" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=4"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>> >
>> > ________________________________
>> > If you reply to this email, your message will be added to the discussion
>> > below:
>> >
>> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
>> > To unsubscribe from Including own C++ code in Csound, click here.
>> > NAML
>> >
>> >
>> > cheers,
>> >
>> > Karin
>> >
>> > ________________________________
>> > View this message in context: Re: [Csnd] Including own C++ code in
>> > Csound
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> > Csound mailing list <a href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=5" target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>> >
>> > Csound mailing list <a href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=6" target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>>
>> Csound mailing list
>> <a href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=7" target="_top" rel="nofollow" link="external" class="">[hidden email]
>> 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
>
>
> Csound mailing list <a href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=8" target="_top" rel="nofollow" link="external" class="">[hidden email]
> 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
>
>
> Csound mailing list <a href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=9" target="_top" rel="nofollow" link="external" class="">[hidden email]
> 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


--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp

Csound mailing list
<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=10" target="_top" rel="nofollow" link="external" class="">[hidden email]
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



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745892.html
To unsubscribe from Including own C++ code in Csound, click here.
NAML

cheers,

Karin


View this message in context: Re: [Csnd] Including own C++ code in Csound
Sent from the Csound - General mailing list archive at Nabble.com.
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

Date2016-01-04 09:56
FromMarieCurie
SubjectRe: Including own C++ code in Csound

for the convolution I will certainly use the ftconv opcode from Csound. This was my starting point to look into Csound.

On 4 Jan 2016, at 10:09, Victor Lazzarini [via Csound] <[hidden email]> wrote:

For Csound, it would be easier to keep the code in C, rather than convert into C++. It’s
the more established way of writing opcodes, and there is good documentation for
it. If you want my class notes, just contact me privately.

For convolution, you can use the convolution opcodes in Csound. As I suggested, there
is no need to re-implement partitioned convolution, it is simpler to use the existing
implementations.

Regards
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 4 Jan 2016, at 08:37, Karin Daum <<a href="x-msg://61/user/SendEmail.jtp?type=node&amp;node=5745893&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>
> this is simple to answer: Csound seems to me so much superior to the primitive framework I used up to now. Csound enables me to include effects I didn’t think of so far.
>
> Time will be an issue in what I have in mind. The simulation of the sound in a virtual room including higher order reflections from the walls is time consuming. As an example I model a virtual room with dimensions of e.g. 20m X 50m which is more like a cathedral then a meeting room. If you want to simulate a reverberation time T60 of about one second you need to  calculate the reflections on a 21x21 grid of mirror spaces. You need to calculate 440 reflections. Even with the technique of using mirror listeners on this grid the resulting computing requirement for a single sound source is  about 25-30% of the available time (using -o3 as compiler option) in a live performance. But the result doe not sound like a cathedral. The T60 is more what is recommended for a meeting room. If you want to simulate a T60 of about 3-4 seconds which is more like a cathedral without hearing a cutoff in the reverberation you need to perform this calculations on a grid with dimensions larger than 61x61 (>3720 reflections). The computing time is much larger than the time available in a live performance. This is no solution. Therefore for non-moving sound sources you need to do the convolution of the sound with the proper impulse response function (which you get very easily at a high speed from my program using a single ping with a length of 1/sampling rate). For moving sources you need to calculate the lower orders of reflections with this code and add to it the convolution of the dry sound with the pulse response of the higher order reflections which is not needed to be time dependent. The convolution is not available in the current scheme i have. I would have to implement it. It seems to me easier to convert my C code into C++, which I’m using in my job in research.
>> On 3 Jan 2016, at 21:00, Rory Walsh <<a href="x-msg://61/user/SendEmail.jtp?type=node&amp;node=5745893&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>
>> Why bother rewriting all the perfectly ready-to-go C code in C++?
>>
>> On 3 January 2016 at 19:35, Michael Gogins <<a href="x-msg://61/user/SendEmail.jtp?type=node&amp;node=5745893&amp;i=2" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> Why should Karin reduplicate all the stuff in Csound that works fine
>> already (audio IO etc)? As I said it makes perfectly good sense to use
>> Csound as a framework, and to write performance critical code in C++
>> as plugin opcodes.
>>
>> There is waaay too much re-invention of the wheel in this field...
>>
>> Best,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>> <<a href="x-msg://61/user/SendEmail.jtp?type=node&amp;node=5745893&amp;i=3" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> > Not sure why you need Csound in this case. Just keep it all in C.
>> >
>> > Victor Lazzarini
>> > Dean of Arts, Celtic Studies, and Philosophy
>> > Maynooth University
>> > Ireland
>> >
>> > On 3 Jan 2016, at 18:42, MarieCurie <<a href="x-msg://61/user/SendEmail.jtp?type=node&amp;node=5745893&amp;i=4" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >
>> > this is what I expected.  The code is ready in C. Modifying  it to C++ and
>> > calling it from Csound seems to me easier that starting from scratch in
>> > Csound. As I tried to explain in my previous answer and as you can see in
>> > the example this may become difficult to get it completely flexible in
>> > Csound. But as I also said, I just started with Csound a few days ago and
>> > don’t know all it’s capabilities. In my C code I need to define only the
>> > virtual room (size & reflectivity) + sweet spot in the initialisation and
>> > then if the position/path of a given sound source is passed to the code
>> > everything  turns out automatically.
>> >
>> > And as I explained in the other thread computing power could be a
>> > limitation.
>> >
>> > On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
>> > wrote:
>> >
>> > Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
>> > Csound as a framework and writing critical opcodes in C++makes sense to me.
>> >
>> > Regards,
>> > Mike
>> >
>> > On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <<a
>> > href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=0" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=0"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >>
>> >> You can do doppler and the other things in Csound by using variable delay
>> >> lines, filters,
>> >> etc. What I would suggest is this:
>> >>
>> >> 1) write the audio processing code in Csound.
>> >>
>> >> 2) Access Csound via its API in your C++
>> >> program, controlling the instruments that
>> >> you created. The C++ code can calculate all
>> >> the parameters / trajectories and pass it
>> >> to Csound to do the processing.
>> >>
>> >> Of course this makes sense if you are starting the project. If you have
>> >> all
>> >> the code already written in C++, redoing
>> >> things in Csound might be duplication. In that case just keep to C++.
>> >>
>> >> Victor Lazzarini
>> >> Dean of Arts, Celtic Studies, and Philosophy
>> >> Maynooth University
>> >> Ireland
>> >>
>> >> > On 3 Jan 2016, at 15:09, MarieCurie <<a
>> >> > href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=1" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=1"
>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> >> >
>> >> > well, I just learnt about Csound shortly before Xmas when I was
>> >> > discussing
>> >> > some problems with my project with a sound engineer from the TV. For the
>> >> > framework which I used so far which is primitive compared to Csound (and
>> >> > not
>> >> > supported since long) but had the capability of being accessed via
>> >> > script
>> >> > which is needed for my project. For this software I’ve written C code
>> >> > which
>> >> > does the simulation of a virtual room producing multichannel (surruound
>> >> > 5.1)
>> >> > output. This code allows for different multichannel panning schemes
>> >> > (similar
>> >> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>> >> > stereo
>> >> > case) and calculates the reverberation to a desired order of reflections
>> >> > depending on the dimensions of the virtual room, the reflectivity and
>> >> > the
>> >> > positions of the source and the sweet spot. The path of the source can
>> >> > be
>> >> > steered by a string for a valid arithmetic expression (standard
>> >> > arithmetics
>> >> > including the standard C-functions) such that the source can be moved
>> >> > almost
>> >> > freely in (x,y) coordinates of the virtual room. This code yields
>> >> > information on
>> >> >
>> >> > - the angle (or position) of the source,
>> >> > - the distance dependent volume,
>> >> > - the position dependent time delay between direct and reflected
>> >> > signals,
>> >> > - the position dependent volume ratio between direct and reflected
>> >> > signals,
>> >> > - the informations on the room contained in the reflections,
>> >> > - the information on the movement (Doppler effect and beats which differ
>> >> > for
>> >> > the different channels because of different relative velocities w.r.t.
>> >> > the
>> >> > different walls).
>> >> >
>> >> > As far as I understand by now the multichannel packages VBAP and
>> >> > Ambisonic
>> >> > address the first two points only. As far as I've understood Puckki's
>> >> > article and the source code of VBAP in Csound it does the panning of the
>> >> > phantom sources only between neighbouring loudspeakers which means you
>> >> > are
>> >> > not able to put a phantom source at any position. This should be
>> >> > possible
>> >> > with Ambisonic however it also does not include item 3-6 from the list
>> >> > above. I certainly will have a look to this code.
>> >> >
>> >> > An example of a source @440Hz moving with a velocity of 4m/sec in a room
>> >> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>> >> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing the
>> >> > sweet spot until it reaches the wall behind the listener then it slowly
>> >> > moves until it reaches the right back corner, where it stops. (For
>> >> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>> >> >
>> >> > <http://csound.1045644.n5.nabble.com/file/n5745837/440HzDopplerSchwebung.jpg>
>> >> >
>> >> >
>> >> >
>> >> > -----
>> >> > cheers,
>> >> >
>> >> > Karin
>> >> > --
>> >> > View this message in context:
>> >> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>> >> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >> >
>> >> > Csound mailing list
>> >> > <a
>> >> > href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=2" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=2"
>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> > 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
>> >>
>> >> Csound mailing list
>> >> <a href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=3" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=3"
>> >> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> 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
>> >
>> > Csound mailing list <a
>> > href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=4" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=4"
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>> >
>> > ________________________________
>> > If you reply to this email, your message will be added to the discussion
>> > below:
>> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
>> > To unsubscribe from Including own C++ code in Csound, click here.
>> > NAML
>> >
>> >
>> > cheers,
>> >
>> > Karin
>> >
>> > ________________________________
>> > View this message in context: Re: [Csnd] Including own C++ code in Csound
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> > Csound mailing list <a href="x-msg://61/user/SendEmail.jtp?type=node&amp;node=5745893&amp;i=5" target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>> >
>> > Csound mailing list <a href="x-msg://61/user/SendEmail.jtp?type=node&amp;node=5745893&amp;i=6" target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>>
>> Csound mailing list
>> <a href="x-msg://61/user/SendEmail.jtp?type=node&amp;node=5745893&amp;i=7" target="_top" rel="nofollow" link="external" class="">[hidden email]
>> 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
>>
>> Csound mailing list <a href="x-msg://61/user/SendEmail.jtp?type=node&amp;node=5745893&amp;i=8" target="_top" rel="nofollow" link="external" class="">[hidden email] 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
>
> Csound mailing list <a href="x-msg://61/user/SendEmail.jtp?type=node&amp;node=5745893&amp;i=9" target="_top" rel="nofollow" link="external" class="">[hidden email] 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
Csound mailing list
<a href="x-msg://61/user/SendEmail.jtp?type=node&amp;node=5745893&amp;i=10" target="_top" rel="nofollow" link="external" class="">[hidden email]
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



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745893.html
To unsubscribe from Including own C++ code in Csound, click here.
NAML

cheers,

Karin


View this message in context: Re: [Csnd] Including own C++ code in Csound
Sent from the Csound - General mailing list archive at Nabble.com.
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

Date2016-01-04 13:13
FromOeyvind Brandtsegg
SubjectRe: Including own C++ code in Csound
Good point.
Maybe a reasonable spatial downmixing would be to use 4-5 voices close
up, and then 5-6 voices more in the distance, or something like that?
All in all maybe using 10-15 separate spatial points, instead of the
full 40-50 voices. *If* you want to save CPU.
all best
Oeyvind

2016-01-04 10:53 GMT+01:00 MarieCurie :
> I will have a close look to the spat3d opcode.
>
> Concerning our perception I agree, it’s difficult to follow the path of more
> than a few moving sound sources at the same time. And yes, it is also
> difficult to listen to many independent voices at the same time. The larger
> the reverberation time T60 the more difficult it is. However, a longer T60
> makes it easier to distinguish between voices close-by from voices far away.
> If you take for example a voice at a distance of 2m compared to a voice at
> 20m this make a difference in the sound pressure of a factor of 10 and in
> intensity by a factor of 100 (40dB). However, our perception is about a
> factor of 16 only (10dB for a factor 2 change in loudness). This is where
> reverberation helps: the ratio of direct to reflected sound decreases with
> increasing distance and the time difference between direct sound and early
> reflections increases when the sound is coming closer. As long as normal
> multichannel sound is used, I need to find the optimum between clarity of
> the voices and spatial resolution which comes to a large extend from the
> reverberation. This would change if wave field synthesis would be used, but
> this is a completely different universe.
>
> What I want to see/hear also is what happens if the chorus/cacophony is
> moving towards or away from the sweet spot. This would mean to move a couple
> of voices (20-50) simultaneously.
>
> On 4 Jan 2016, at 10:03, Oeyvind Brandtsegg-3 [via Csound] <[hidden email]>
> wrote:
>
> It sounds like a very nice and interesting project. Do let us know how
> you solve it.
>
> But do test the spat3d opcode, it sounds as if it may be able to do a
> lot of what you need. I guess it might become expensive CPU-wise if
> you want to run dozens of independent trajectories. But that could
> possibly be parallelized.
>
> Also, perhaps you can get away with using a lower number of
> independent trajectories, mixing each source sound to the closest
> point in space to where you actually want it. A kind of spatial
> downsampling. In my experience we humans are not capable of actually
> following more than a few independently moving objects simultaneously,
> much like we are not able to follow the details of more than a few
> independent voices in music simultaneously. I have no scientific data
> to back up this claim, but I would guess our polyphony of spatial
> perception is usually less than 5 simultaneous trajectories. If you
> have 40-50 independent voices, maybe you could mix them to 5-8
> positions in the virtual room.
>
>
> 2016-01-04 9:37 GMT+01:00 Karin Daum < href="x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=0"
> target="_top" rel="nofollow" link="external" class="">[hidden email]>:
>
>> this is simple to answer: Csound seems to me so much superior to the
>> primitive framework I used up to now. Csound enables me to include effects
>> I
>> didn’t think of so far.
>>
>> Time will be an issue in what I have in mind. The simulation of the sound
>> in
>> a virtual room including higher order reflections from the walls is time
>> consuming. As an example I model a virtual room with dimensions of e.g.
>> 20m
>> X 50m which is more like a cathedral then a meeting room. If you want to
>> simulate a reverberation time T60 of about one second you need to
>> calculate
>> the reflections on a 21x21 grid of mirror spaces. You need to calculate
>> 440
>> reflections. Even with the technique of using mirror listeners on this
>> grid
>> the resulting computing requirement for a single sound source is  about
>> 25-30% of the available time (using -o3 as compiler option) in a live
>> performance. But the result doe not sound like a cathedral. The T60 is
>> more
>> what is recommended for a meeting room. If you want to simulate a T60 of
>> about 3-4 seconds which is more like a cathedral without hearing a cutoff
>> in
>> the reverberation you need to perform this calculations on a grid with
>> dimensions larger than 61x61 (>3720 reflections). The computing time is
>> much
>> larger than the time available in a live performance. This is no solution.
>> Therefore for non-moving sound sources you need to do the convolution of
>> the
>> sound with the proper impulse response function (which you get very easily
>> at a high speed from my program using a single ping with a length of
>> 1/sampling rate). For moving sources you need to calculate the lower
>> orders
>> of reflections with this code and add to it the convolution of the dry
>> sound
>> with the pulse response of the higher order reflections which is not
>> needed
>> to be time dependent. The convolution is not available in the current
>> scheme
>> i have. I would have to implement it. It seems to me easier to convert my
>> C
>> code into C++, which I’m using in my job in research.
>>
>> On 3 Jan 2016, at 21:00, Rory Walsh <> href="x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=1"
>> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>
>> Why bother rewriting all the perfectly ready-to-go C code in C++?
>>
>> On 3 January 2016 at 19:35, Michael Gogins <> href="x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=2"
>> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>>
>>> Why should Karin reduplicate all the stuff in Csound that works fine
>>> already (audio IO etc)? As I said it makes perfectly good sense to use
>>> Csound as a framework, and to write performance critical code in C++
>>> as plugin opcodes.
>>>
>>> There is waaay too much re-invention of the wheel in this field...
>>>
>>> Best,
>>> Mike
>>>
>>> -----------------------------------------------------
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>>
>>>
>>> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>>> <>> href="x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=3"
>>> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>> > Not sure why you need Csound in this case. Just keep it all in C.
>>> >
>>> > Victor Lazzarini
>>> > Dean of Arts, Celtic Studies, and Philosophy
>>> > Maynooth University
>>> > Ireland
>>> >
>>> > On 3 Jan 2016, at 18:42, MarieCurie <>> > href="x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=4"
>>> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>> >
>>> > this is what I expected.  The code is ready in C. Modifying  it to C++
>>> > and
>>> > calling it from Csound seems to me easier that starting from scratch in
>>> > Csound. As I tried to explain in my previous answer and as you can see
>>> > in
>>> > the example this may become difficult to get it completely flexible in
>>> > Csound. But as I also said, I just started with Csound a few days ago
>>> > and
>>> > don’t know all it’s capabilities. In my C code I need to define only
>>> > the
>>> > virtual room (size & reflectivity) + sweet spot in the initialisation
>>> > and
>>> > then if the position/path of a given sound source is passed to the code
>>> > everything  turns out automatically.
>>> >
>>> > And as I explained in the other thread computing power could be a
>>> > limitation.
>>> >
>>> > On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
>>> > wrote:
>>> >
>>> > Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
>>> > Csound as a framework and writing critical opcodes in C++makes sense to
>>> > me.
>>> >
>>> > Regards,
>>> > Mike
>>> >
>>> > On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <>> > href=">> > href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=0"
>>> > class="">x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=0"
>>> > target="_top" rel="nofollow" link="external" class="">[hidden email]>
>>> > wrote:
>>> >>
>>> >> You can do doppler and the other things in Csound by using variable
>>> >> delay
>>> >> lines, filters,
>>> >> etc. What I would suggest is this:
>>> >>
>>> >> 1) write the audio processing code in Csound.
>>> >>
>>> >> 2) Access Csound via its API in your C++
>>> >> program, controlling the instruments that
>>> >> you created. The C++ code can calculate all
>>> >> the parameters / trajectories and pass it
>>> >> to Csound to do the processing.
>>> >>
>>> >> Of course this makes sense if you are starting the project. If you
>>> >> have
>>> >> all
>>> >> the code already written in C++, redoing
>>> >> things in Csound might be duplication. In that case just keep to C++.
>>> >>
>>> >> Victor Lazzarini
>>> >> Dean of Arts, Celtic Studies, and Philosophy
>>> >> Maynooth University
>>> >> Ireland
>>> >>
>>> >> > On 3 Jan 2016, at 15:09, MarieCurie <>> >> >
>>> >> > href=">> >> > href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=1"
>>> >> > class="">x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=1"
>>> >> > target="_top" rel="nofollow" link="external" class="">[hidden
>>> >> > email]>
>>> >> > wrote:
>>> >> >
>>> >> > well, I just learnt about Csound shortly before Xmas when I was
>>> >> > discussing
>>> >> > some problems with my project with a sound engineer from the TV. For
>>> >> > the
>>> >> > framework which I used so far which is primitive compared to Csound
>>> >> > (and
>>> >> > not
>>> >> > supported since long) but had the capability of being accessed via
>>> >> > script
>>> >> > which is needed for my project. For this software I’ve written C
>>> >> > code
>>> >> > which
>>> >> > does the simulation of a virtual room producing multichannel
>>> >> > (surruound
>>> >> > 5.1)
>>> >> > output. This code allows for different multichannel panning schemes
>>> >> > (similar
>>> >> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>>> >> > stereo
>>> >> > case) and calculates the reverberation to a desired order of
>>> >> > reflections
>>> >> > depending on the dimensions of the virtual room, the reflectivity
>>> >> > and
>>> >> > the
>>> >> > positions of the source and the sweet spot. The path of the source
>>> >> > can
>>> >> > be
>>> >> > steered by a string for a valid arithmetic expression (standard
>>> >> > arithmetics
>>> >> > including the standard C-functions) such that the source can be
>>> >> > moved
>>> >> > almost
>>> >> > freely in (x,y) coordinates of the virtual room. This code yields
>>> >> > information on
>>> >> >
>>> >> > - the angle (or position) of the source,
>>> >> > - the distance dependent volume,
>>> >> > - the position dependent time delay between direct and reflected
>>> >> > signals,
>>> >> > - the position dependent volume ratio between direct and reflected
>>> >> > signals,
>>> >> > - the informations on the room contained in the reflections,
>>> >> > - the information on the movement (Doppler effect and beats which
>>> >> > differ
>>> >> > for
>>> >> > the different channels because of different relative velocities
>>> >> > w.r.t.
>>> >> > the
>>> >> > different walls).
>>> >> >
>>> >> > As far as I understand by now the multichannel packages VBAP and
>>> >> > Ambisonic
>>> >> > address the first two points only. As far as I've understood
>>> >> > Puckki's
>>> >> > article and the source code of VBAP in Csound it does the panning of
>>> >> > the
>>> >> > phantom sources only between neighbouring loudspeakers which means
>>> >> > you
>>> >> > are
>>> >> > not able to put a phantom source at any position. This should be
>>> >> > possible
>>> >> > with Ambisonic however it also does not include item 3-6 from the
>>> >> > list
>>> >> > above. I certainly will have a look to this code.
>>> >> >
>>> >> > An example of a source @440Hz moving with a velocity of 4m/sec in a
>>> >> > room
>>> >> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>>> >> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing
>>> >> > the
>>> >> > sweet spot until it reaches the wall behind the listener then it
>>> >> > slowly
>>> >> > moves until it reaches the right back corner, where it stops. (For
>>> >> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>>> >> >
>>> >> >
>>> >> >
>>> >> > 
>>> >> >
>>> >> >
>>> >> >
>>> >> > -----
>>> >> > cheers,
>>> >> >
>>> >> > Karin
>>> >> > --
>>> >> > View this message in context:
>>> >> >
>>> >> >
>>> >> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>>> >> > Sent from the Csound - General mailing list archive at Nabble.com.
>>> >> >
>>> >> > Csound mailing list
>>> >> > >> >> >
>>> >> > href=">> >> > href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=2"
>>> >> > class="">x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=2"
>>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> >> > 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
>>> >>
>>> >> Csound mailing list
>>> >> >> >> href=">> >> href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=3"
>>> >> class="">x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=3"
>>> >> target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> >> 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
>>> >
>>> > Csound mailing list >> > href=">> > href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=4"
>>> > class="">x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=4"
>>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> > 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
>>> >
>>> > ________________________________
>>> > If you reply to this email, your message will be added to the
>>> > discussion
>>> > below:
>>> >
>>> >
>>> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
>>> > To unsubscribe from Including own C++ code in Csound, click here.
>>> > NAML
>>> >
>>> >
>>> > cheers,
>>> >
>>> > Karin
>>> >
>>> > ________________________________
>>> > View this message in context: Re: [Csnd] Including own C++ code in
>>> > Csound
>>> > Sent from the Csound - General mailing list archive at Nabble.com.
>>> > Csound mailing list >> > href="x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=5"
>>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> > 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
>>> >
>>> > Csound mailing list >> > href="x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=6"
>>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> > 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
>>>
>>> Csound mailing list
>>> >> href="x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=7"
>>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> 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
>>
>>
>> Csound mailing list > href="x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=8"
>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> 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
>>
>>
>> Csound mailing list > href="x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=9"
>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> 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
>
>
> --
>
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
>
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://flyndresang.no/
> http://soundcloud.com/t-emp
>
> Csound mailing list
>  target="_top" rel="nofollow" link="external" class="">[hidden email]
> 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
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745892.html
> To unsubscribe from Including own C++ code in Csound, click here.
> NAML
>
>
> cheers,
>
> Karin
>
> ________________________________
> View this message in context: Re: [Csnd] Including own C++ code in Csound
> Sent from the Csound - General mailing list archive at Nabble.com.
> 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



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp

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

Date2016-01-04 13:59
FromMarieCurie
SubjectRe: Including own C++ code in Csound

spat3d seems to be just what I was looking for. According to the descriptions it is just doing on a much more sophisticated level what I’m doing with my C code. It has much more effects implemented than my code. It’s really great!


Why the hell didn’t I spend time looking into Csound before? Someone was pointing me to it in autumn. This could have saved many hours of programming, debugging, testing.. At least I learnt something about aural perception and also went back to the textbook from my first term in experimental physics to recall what I’ve learnt about acoustics 45 years ago.

Now I will have to understand ambisonics which is apparently the framework of spat3d. Wave field synthesis is a nice idea physics wise but far, far beyond my capabilities.

I’m really impressed by what Csound offers. That’s great! Thanks to all of you contributing to it.

all the best

Karin
 
On 4 Jan 2016, at 14:14, Oeyvind Brandtsegg-3 [via Csound] <[hidden email]> wrote:

Good point.
Maybe a reasonable spatial downmixing would be to use 4-5 voices close
up, and then 5-6 voices more in the distance, or something like that?
All in all maybe using 10-15 separate spatial points, instead of the
full 40-50 voices. *If* you want to save CPU.
all best
Oeyvind

2016-01-04 10:53 GMT+01:00 MarieCurie <<a href="x-msg://78/user/SendEmail.jtp?type=node&amp;node=5745931&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]>:

> I will have a close look to the spat3d opcode.
>
> Concerning our perception I agree, it’s difficult to follow the path of more
> than a few moving sound sources at the same time. And yes, it is also
> difficult to listen to many independent voices at the same time. The larger
> the reverberation time T60 the more difficult it is. However, a longer T60
> makes it easier to distinguish between voices close-by from voices far away.
> If you take for example a voice at a distance of 2m compared to a voice at
> 20m this make a difference in the sound pressure of a factor of 10 and in
> intensity by a factor of 100 (40dB). However, our perception is about a
> factor of 16 only (10dB for a factor 2 change in loudness). This is where
> reverberation helps: the ratio of direct to reflected sound decreases with
> increasing distance and the time difference between direct sound and early
> reflections increases when the sound is coming closer. As long as normal
> multichannel sound is used, I need to find the optimum between clarity of
> the voices and spatial resolution which comes to a large extend from the
> reverberation. This would change if wave field synthesis would be used, but
> this is a completely different universe.
>
> What I want to see/hear also is what happens if the chorus/cacophony is
> moving towards or away from the sweet spot. This would mean to move a couple
> of voices (20-50) simultaneously.
>
> On 4 Jan 2016, at 10:03, Oeyvind Brandtsegg-3 [via Csound] <[hidden email]>
> wrote:
>
> It sounds like a very nice and interesting project. Do let us know how
> you solve it.
>
> But do test the spat3d opcode, it sounds as if it may be able to do a
> lot of what you need. I guess it might become expensive CPU-wise if
> you want to run dozens of independent trajectories. But that could
> possibly be parallelized.
>
> Also, perhaps you can get away with using a lower number of
> independent trajectories, mixing each source sound to the closest
> point in space to where you actually want it. A kind of spatial
> downsampling. In my experience we humans are not capable of actually
> following more than a few independently moving objects simultaneously,
> much like we are not able to follow the details of more than a few
> independent voices in music simultaneously. I have no scientific data
> to back up this claim, but I would guess our polyphony of spatial
> perception is usually less than 5 simultaneous trajectories. If you
> have 40-50 independent voices, maybe you could mix them to 5-8
> positions in the virtual room.
>
>
> 2016-01-04 9:37 GMT+01:00 Karin Daum <<a
> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=0" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=0"
> target="_top" rel="nofollow" link="external" class="">[hidden email]>:
>
>> this is simple to answer: Csound seems to me so much superior to the
>> primitive framework I used up to now. Csound enables me to include effects
>> I
>> didn’t think of so far.
>>
>> Time will be an issue in what I have in mind. The simulation of the sound
>> in
>> a virtual room including higher order reflections from the walls is time
>> consuming. As an example I model a virtual room with dimensions of e.g.
>> 20m
>> X 50m which is more like a cathedral then a meeting room. If you want to
>> simulate a reverberation time T60 of about one second you need to
>> calculate
>> the reflections on a 21x21 grid of mirror spaces. You need to calculate
>> 440
>> reflections. Even with the technique of using mirror listeners on this
>> grid
>> the resulting computing requirement for a single sound source is  about
>> 25-30% of the available time (using -o3 as compiler option) in a live
>> performance. But the result doe not sound like a cathedral. The T60 is
>> more
>> what is recommended for a meeting room. If you want to simulate a T60 of
>> about 3-4 seconds which is more like a cathedral without hearing a cutoff
>> in
>> the reverberation you need to perform this calculations on a grid with
>> dimensions larger than 61x61 (>3720 reflections). The computing time is
>> much
>> larger than the time available in a live performance. This is no solution.
>> Therefore for non-moving sound sources you need to do the convolution of
>> the
>> sound with the proper impulse response function (which you get very easily
>> at a high speed from my program using a single ping with a length of
>> 1/sampling rate). For moving sources you need to calculate the lower
>> orders
>> of reflections with this code and add to it the convolution of the dry
>> sound
>> with the pulse response of the higher order reflections which is not
>> needed
>> to be time dependent. The convolution is not available in the current
>> scheme
>> i have. I would have to implement it. It seems to me easier to convert my
>> C
>> code into C++, which I’m using in my job in research.
>>
>> On 3 Jan 2016, at 21:00, Rory Walsh <<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=1" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=1"
>> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>
>> Why bother rewriting all the perfectly ready-to-go C code in C++?
>>
>> On 3 January 2016 at 19:35, Michael Gogins <<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=2" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=2"
>> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>>
>>> Why should Karin reduplicate all the stuff in Csound that works fine
>>> already (audio IO etc)? As I said it makes perfectly good sense to use
>>> Csound as a framework, and to write performance critical code in C++
>>> as plugin opcodes.
>>>
>>> There is waaay too much re-invention of the wheel in this field...
>>>
>>> Best,
>>> Mike
>>>
>>> -----------------------------------------------------
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>>
>>>
>>> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>>> <<a
>>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=3" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=3"
>>> target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>> > Not sure why you need Csound in this case. Just keep it all in C.
>>> >
>>> > Victor Lazzarini
>>> > Dean of Arts, Celtic Studies, and Philosophy
>>> > Maynooth University
>>> > Ireland
>>> >
>>> > On 3 Jan 2016, at 18:42, MarieCurie <<a
>>> > href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=4" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=4"
>>> > target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>>> >
>>> > this is what I expected.  The code is ready in C. Modifying  it to C++
>>> > and
>>> > calling it from Csound seems to me easier that starting from scratch in
>>> > Csound. As I tried to explain in my previous answer and as you can see
>>> > in
>>> > the example this may become difficult to get it completely flexible in
>>> > Csound. But as I also said, I just started with Csound a few days ago
>>> > and
>>> > don’t know all it’s capabilities. In my C code I need to define only
>>> > the
>>> > virtual room (size & reflectivity) + sweet spot in the initialisation
>>> > and
>>> > then if the position/path of a given sound source is passed to the code
>>> > everything  turns out automatically.
>>> >
>>> > And as I explained in the other thread computing power could be a
>>> > limitation.
>>> >
>>> > On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden email]>
>>> > wrote:
>>> >
>>> > Efficiency is a goal. C++ runs about 3 times faster than Csound. Using
>>> > Csound as a framework and writing critical opcodes in C++makes sense to
>>> > me.
>>> >
>>> > Regards,
>>> > Mike
>>> >
>>> > On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <<a
>>> > href="<a
>>> > href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=0" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=0"
>>> > class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=0" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=0"
>>> > target="_top" rel="nofollow" link="external" class="">[hidden email]>
>>> > wrote:
>>> >>
>>> >> You can do doppler and the other things in Csound by using variable
>>> >> delay
>>> >> lines, filters,
>>> >> etc. What I would suggest is this:
>>> >>
>>> >> 1) write the audio processing code in Csound.
>>> >>
>>> >> 2) Access Csound via its API in your C++
>>> >> program, controlling the instruments that
>>> >> you created. The C++ code can calculate all
>>> >> the parameters / trajectories and pass it
>>> >> to Csound to do the processing.
>>> >>
>>> >> Of course this makes sense if you are starting the project. If you
>>> >> have
>>> >> all
>>> >> the code already written in C++, redoing
>>> >> things in Csound might be duplication. In that case just keep to C++.
>>> >>
>>> >> Victor Lazzarini
>>> >> Dean of Arts, Celtic Studies, and Philosophy
>>> >> Maynooth University
>>> >> Ireland
>>> >>
>>> >> > On 3 Jan 2016, at 15:09, MarieCurie <<a
>>> >> >
>>> >> > href="<a
>>> >> > href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=1" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=1"
>>> >> > class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=1" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=1"
>>> >> > target="_top" rel="nofollow" link="external" class="">[hidden
>>> >> > email]>
>>> >> > wrote:
>>> >> >
>>> >> > well, I just learnt about Csound shortly before Xmas when I was
>>> >> > discussing
>>> >> > some problems with my project with a sound engineer from the TV. For
>>> >> > the
>>> >> > framework which I used so far which is primitive compared to Csound
>>> >> > (and
>>> >> > not
>>> >> > supported since long) but had the capability of being accessed via
>>> >> > script
>>> >> > which is needed for my project. For this software I’ve written C
>>> >> > code
>>> >> > which
>>> >> > does the simulation of a virtual room producing multichannel
>>> >> > (surruound
>>> >> > 5.1)
>>> >> > output. This code allows for different multichannel panning schemes
>>> >> > (similar
>>> >> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article for the
>>> >> > stereo
>>> >> > case) and calculates the reverberation to a desired order of
>>> >> > reflections
>>> >> > depending on the dimensions of the virtual room, the reflectivity
>>> >> > and
>>> >> > the
>>> >> > positions of the source and the sweet spot. The path of the source
>>> >> > can
>>> >> > be
>>> >> > steered by a string for a valid arithmetic expression (standard
>>> >> > arithmetics
>>> >> > including the standard C-functions) such that the source can be
>>> >> > moved
>>> >> > almost
>>> >> > freely in (x,y) coordinates of the virtual room. This code yields
>>> >> > information on
>>> >> >
>>> >> > - the angle (or position) of the source,
>>> >> > - the distance dependent volume,
>>> >> > - the position dependent time delay between direct and reflected
>>> >> > signals,
>>> >> > - the position dependent volume ratio between direct and reflected
>>> >> > signals,
>>> >> > - the informations on the room contained in the reflections,
>>> >> > - the information on the movement (Doppler effect and beats which
>>> >> > differ
>>> >> > for
>>> >> > the different channels because of different relative velocities
>>> >> > w.r.t.
>>> >> > the
>>> >> > different walls).
>>> >> >
>>> >> > As far as I understand by now the multichannel packages VBAP and
>>> >> > Ambisonic
>>> >> > address the first two points only. As far as I've understood
>>> >> > Puckki's
>>> >> > article and the source code of VBAP in Csound it does the panning of
>>> >> > the
>>> >> > phantom sources only between neighbouring loudspeakers which means
>>> >> > you
>>> >> > are
>>> >> > not able to put a phantom source at any position. This should be
>>> >> > possible
>>> >> > with Ambisonic however it also does not include item 3-6 from the
>>> >> > list
>>> >> > above. I certainly will have a look to this code.
>>> >> >
>>> >> > An example of a source @440Hz moving with a velocity of 4m/sec in a
>>> >> > room
>>> >> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1 channels
>>> >> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source passing
>>> >> > the
>>> >> > sweet spot until it reaches the wall behind the listener then it
>>> >> > slowly
>>> >> > moves until it reaches the right back corner, where it stops. (For
>>> >> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>>> >> >
>>> >> >
>>> >> >
>>> >> > <http://csound.1045644.n5.nabble.com/file/n5745837/440HzDopplerSchwebung.jpg>
>>> >> >
>>> >> >
>>> >> >
>>> >> > -----
>>> >> > cheers,
>>> >> >
>>> >> > Karin
>>> >> > --
>>> >> > View this message in context:
>>> >> >
>>> >> >
>>> >> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>>> >> > Sent from the Csound - General mailing list archive at Nabble.com.
>>> >> >
>>> >> > Csound mailing list
>>> >> > <a
>>> >> >
>>> >> > href="<a
>>> >> > href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=2" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=2"
>>> >> > class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=2" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=2"
>>> >> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> >> > 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
>>> >>
>>> >> Csound mailing list
>>> >> <a
>>> >> href="<a
>>> >> href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=3" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=3"
>>> >> class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=3" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=3"
>>> >> target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> >> 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
>>> >
>>> > Csound mailing list <a
>>> > href="<a
>>> > href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=4" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=4"
>>> > class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=4" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=4"
>>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> > 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
>>> >
>>> > ________________________________
>>> > If you reply to this email, your message will be added to the
>>> > discussion
>>> > below:
>>> >
>>> >
>>> > http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
>>> > To unsubscribe from Including own C++ code in Csound, click here.
>>> > NAML
>>> >
>>> >
>>> > cheers,
>>> >
>>> > Karin
>>> >
>>> > ________________________________
>>> > View this message in context: Re: [Csnd] Including own C++ code in
>>> > Csound
>>> > Sent from the Csound - General mailing list archive at Nabble.com.
>>> > Csound mailing list <a
>>> > href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=5" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=5"
>>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> > 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
>>> >
>>> > Csound mailing list <a
>>> > href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=6" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=6"
>>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> > 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
>>>
>>> Csound mailing list
>>> <a
>>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=7" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=7"
>>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>>> 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
>>
>>
>> Csound mailing list <a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=8" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=8"
>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> 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
>>
>>
>> Csound mailing list <a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=9" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=9"
>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> 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
>
>
> --
>
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
>
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://flyndresang.no/
> http://soundcloud.com/t-emp
>
> Csound mailing list
> <a href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=10" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=10"
> target="_top" rel="nofollow" link="external" class="">[hidden email]
> 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
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745892.html
> To unsubscribe from Including own C++ code in Csound, click here.
> NAML
>
>
> cheers,
>
> Karin
>
> ________________________________
> View this message in context: Re: [Csnd] Including own C++ code in Csound
> Sent from the Csound - General mailing list archive at Nabble.com.
> Csound mailing list <a href="x-msg://78/user/SendEmail.jtp?type=node&amp;node=5745931&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]
> 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


--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp

Csound mailing list
<a href="x-msg://78/user/SendEmail.jtp?type=node&amp;node=5745931&amp;i=2" target="_top" rel="nofollow" link="external" class="">[hidden email]
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



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745931.html
To unsubscribe from Including own C++ code in Csound, click here.
NAML

cheers,

Karin


View this message in context: Re: [Csnd] Including own C++ code in Csound
Sent from the Csound - General mailing list archive at Nabble.com.
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

Date2016-01-04 16:24
FromMarieCurie
SubjectRe: Including own C++ code in Csound
I was a bit too optimistic. But this does not change my impression I got
about Csound. 

spat3d is more sophisticated than my code. I did not test all features like
doppler and beats or how the reflections are distributed when using more
than just two channels. With my first tests I observe that spat3d reaches
already almost 100% CPU when calculating reflections up to 8th order for
stereo while my code uses about 10-12% CPU (running it outside of Csound)
for the same order and surround 5.1 output. Maybe it was not a complete
waste of time I spent recently on my code. 



-----
cheers,

Karin
--
View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745939.html
Sent from the Csound - General mailing list archive at Nabble.com.

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

Date2016-01-04 16:55
FromMichael Gogins
SubjectRe: Including own C++ code in Csound
I repeat, Csound code runs about 2.5 to 3 times slower than C/C++
code. Writing performance critical code as plugin opcodes makes a lot
of sense. Taking advantage of multithreading also makes sense but
requires large granularity and experimentation, and does not scale by
cores x 2, but more like cores x 1.25 or so.

Another option not so far mentioned is using the GPU to compute. This
could be done with plugin opcodes compiled to use GPU libraries. And I
think Csound has some experimental CUDA opcodes. I have not tried GPU
computing myself.

By the way, I have a system of spatialization realized in Csound code
that you might want to look at it. I will post it later. It uses
Ambisonics or binaural encodings and models early reflections, Doppler
effects, diffusion, and so on. This is my port of Jan Jacob Hofmann's
excellent system of spatialization used in his pieces that you might
want to check out.here
http://www.sonicarchitecture.de/en/index_janja.html.

Regards,
Mike


Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Mon, Jan 4, 2016 at 11:24 AM, MarieCurie  wrote:
> I was a bit too optimistic. But this does not change my impression I got
> about Csound.
>
> spat3d is more sophisticated than my code. I did not test all features like
> doppler and beats or how the reflections are distributed when using more
> than just two channels. With my first tests I observe that spat3d reaches
> already almost 100% CPU when calculating reflections up to 8th order for
> stereo while my code uses about 10-12% CPU (running it outside of Csound)
> for the same order and surround 5.1 output. Maybe it was not a complete
> waste of time I spent recently on my code.
>
>
>
> -----
> cheers,
>
> Karin
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745939.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
> 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

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

Date2016-01-04 17:12
FromVictor Lazzarini
SubjectRe: Including own C++ code in Csound
But spat3d is not Csound code. It is a C binary called from Csound. Your figures do not apply here.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 4 Jan 2016, at 16:55, Michael Gogins  wrote:
> 
> I repeat, Csound code runs about 2.5 to 3 times slower than C/C++
> code. Writing performance critical code as plugin opcodes makes a lot
> of sense. Taking advantage of multithreading also makes sense but
> requires large granularity and experimentation, and does not scale by
> cores x 2, but more like cores x 1.25 or so.
> 
> Another option not so far mentioned is using the GPU to compute. This
> could be done with plugin opcodes compiled to use GPU libraries. And I
> think Csound has some experimental CUDA opcodes. I have not tried GPU
> computing myself.
> 
> By the way, I have a system of spatialization realized in Csound code
> that you might want to look at it. I will post it later. It uses
> Ambisonics or binaural encodings and models early reflections, Doppler
> effects, diffusion, and so on. This is my port of Jan Jacob Hofmann's
> excellent system of spatialization used in his pieces that you might
> want to check out.here
> http://www.sonicarchitecture.de/en/index_janja.html.
> 
> Regards,
> Mike
> 
> 
> Regards,
> Mike
> 
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
>> On Mon, Jan 4, 2016 at 11:24 AM, MarieCurie  wrote:
>> I was a bit too optimistic. But this does not change my impression I got
>> about Csound.
>> 
>> spat3d is more sophisticated than my code. I did not test all features like
>> doppler and beats or how the reflections are distributed when using more
>> than just two channels. With my first tests I observe that spat3d reaches
>> already almost 100% CPU when calculating reflections up to 8th order for
>> stereo while my code uses about 10-12% CPU (running it outside of Csound)
>> for the same order and surround 5.1 output. Maybe it was not a complete
>> waste of time I spent recently on my code.
>> 
>> 
>> 
>> -----
>> cheers,
>> 
>> Karin
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745939.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>> 
>> 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
> 
> 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

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

Date2016-01-04 17:36
FromMichael Gogins
SubjectRe: Including own C++ code in Csound

Of course you are correct.  I suppose I was thinking Karin would still write a fair amount of orc code. If spat3d does the job then off course there is no reason not to use it.

Regards,
Mike

On Jan 4, 2016 12:14 PM, "Victor Lazzarini" <Victor.Lazzarini@nuim.ie> wrote:
But spat3d is not Csound code. It is a C binary called from Csound. Your figures do not apply here.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 4 Jan 2016, at 16:55, Michael Gogins <michael.gogins@GMAIL.COM> wrote:
>
> I repeat, Csound code runs about 2.5 to 3 times slower than C/C++
> code. Writing performance critical code as plugin opcodes makes a lot
> of sense. Taking advantage of multithreading also makes sense but
> requires large granularity and experimentation, and does not scale by
> cores x 2, but more like cores x 1.25 or so.
>
> Another option not so far mentioned is using the GPU to compute. This
> could be done with plugin opcodes compiled to use GPU libraries. And I
> think Csound has some experimental CUDA opcodes. I have not tried GPU
> computing myself.
>
> By the way, I have a system of spatialization realized in Csound code
> that you might want to look at it. I will post it later. It uses
> Ambisonics or binaural encodings and models early reflections, Doppler
> effects, diffusion, and so on. This is my port of Jan Jacob Hofmann's
> excellent system of spatialization used in his pieces that you might
> want to check out.here
> http://www.sonicarchitecture.de/en/index_janja.html.
>
> Regards,
> Mike
>
>
> Regards,
> Mike
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
>> On Mon, Jan 4, 2016 at 11:24 AM, MarieCurie <karin.daum@desy.de> wrote:
>> I was a bit too optimistic. But this does not change my impression I got
>> about Csound.
>>
>> spat3d is more sophisticated than my code. I did not test all features like
>> doppler and beats or how the reflections are distributed when using more
>> than just two channels. With my first tests I observe that spat3d reaches
>> already almost 100% CPU when calculating reflections up to 8th order for
>> stereo while my code uses about 10-12% CPU (running it outside of Csound)
>> for the same order and surround 5.1 output. Maybe it was not a complete
>> waste of time I spent recently on my code.
>>
>>
>>
>> -----
>> cheers,
>>
>> Karin
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745939.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>> 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
>
> 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

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
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

Date2016-01-04 18:44
FromMarieCurie
SubjectRe: Including own C++ code in Csound

I think the main difference is that spat3d does the reflections in 3D (as the name says) and my code does it only in 2D. If I switch off the ceiling and the floor in spat3d it becomes significantly faster - at least as fast as my code. 


The strategy is clear (this is also what a sound engineer  at a German TV advised me to do):
For moving sound  I need to do only a few orders of early reflections and then do the folding of the result of this operation with  impulse response functions which contains only the part cut off in the first step. This can be produced easily offline. This is very fast up to any desired order because one needs to calculate it for a single ping (a single sampling tick). For stationary sound I would do the folding with ftconv using complete impulse response functions calculated offline and collected in some kind of data base. This should work because the early reflections contain information on the position in space of source and listener while the higher order reflections contain mainly less position dependent information on spatial dimensions of the room.

Regards,

Karin
 
On 4 Jan 2016, at 18:14, Victor Lazzarini [via Csound] <[hidden email]> wrote:

But spat3d is not Csound code. It is a C binary called from Csound. Your figures do not apply here.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 4 Jan 2016, at 16:55, Michael Gogins <<a href="x-msg://82/user/SendEmail.jtp?type=node&amp;node=5745943&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>
> I repeat, Csound code runs about 2.5 to 3 times slower than C/C++
> code. Writing performance critical code as plugin opcodes makes a lot
> of sense. Taking advantage of multithreading also makes sense but
> requires large granularity and experimentation, and does not scale by
> cores x 2, but more like cores x 1.25 or so.
>
> Another option not so far mentioned is using the GPU to compute. This
> could be done with plugin opcodes compiled to use GPU libraries. And I
> think Csound has some experimental CUDA opcodes. I have not tried GPU
> computing myself.
>
> By the way, I have a system of spatialization realized in Csound code
> that you might want to look at it. I will post it later. It uses
> Ambisonics or binaural encodings and models early reflections, Doppler
> effects, diffusion, and so on. This is my port of Jan Jacob Hofmann's
> excellent system of spatialization used in his pieces that you might
> want to check out.here
> http://www.sonicarchitecture.de/en/index_janja.html.
>
> Regards,
> Mike
>
>
> Regards,
> Mike
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
>> On Mon, Jan 4, 2016 at 11:24 AM, MarieCurie <<a href="x-msg://82/user/SendEmail.jtp?type=node&amp;node=5745943&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>> I was a bit too optimistic. But this does not change my impression I got
>> about Csound.
>>
>> spat3d is more sophisticated than my code. I did not test all features like
>> doppler and beats or how the reflections are distributed when using more
>> than just two channels. With my first tests I observe that spat3d reaches
>> already almost 100% CPU when calculating reflections up to 8th order for
>> stereo while my code uses about 10-12% CPU (running it outside of Csound)
>> for the same order and surround 5.1 output. Maybe it was not a complete
>> waste of time I spent recently on my code.
>>
>>
>>
>> -----
>> cheers,
>>
>> Karin
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745939.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>> Csound mailing list
>> <a href="x-msg://82/user/SendEmail.jtp?type=node&amp;node=5745943&amp;i=2" target="_top" rel="nofollow" link="external" class="">[hidden email]
>> 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
>
> Csound mailing list
> <a href="x-msg://82/user/SendEmail.jtp?type=node&amp;node=5745943&amp;i=3" target="_top" rel="nofollow" link="external" class="">[hidden email]
> 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
Csound mailing list
<a href="x-msg://82/user/SendEmail.jtp?type=node&amp;node=5745943&amp;i=4" target="_top" rel="nofollow" link="external" class="">[hidden email]
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



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745943.html
To unsubscribe from Including own C++ code in Csound, click here.
NAML

cheers,

Karin


View this message in context: Re: [Csnd] Including own C++ code in Csound
Sent from the Csound - General mailing list archive at Nabble.com.
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

Date2016-01-04 18:48
FromVictor Lazzarini
SubjectRe: Including own C++ code in Csound
Your code looks a lot more efficient. If you can contribute it to Csound, 
it would be great.

Regards
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 4 Jan 2016, at 16:24, MarieCurie  wrote:
> 
> I was a bit too optimistic. But this does not change my impression I got
> about Csound. 
> 
> spat3d is more sophisticated than my code. I did not test all features like
> doppler and beats or how the reflections are distributed when using more
> than just two channels. With my first tests I observe that spat3d reaches
> already almost 100% CPU when calculating reflections up to 8th order for
> stereo while my code uses about 10-12% CPU (running it outside of Csound)
> for the same order and surround 5.1 output. Maybe it was not a complete
> waste of time I spent recently on my code. 
> 
> 
> 
> -----
> cheers,
> 
> Karin
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745939.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 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

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

Date2016-01-04 21:37
Fromjoachim heintz
SubjectRe: Including own C++ code in Csound
if you want to dive in ambisonics, you should have a look at the 
excellent stuff which martin neukom contributed to the floss manual:
http://floss.booktype.pro/csound/b-panning-and-spatialization/
(section "Ambisonic UDOs", going to examples 05B10 pp)

	joachim


On 04/01/16 14:59, MarieCurie wrote:
> spat3d seems to be just what I was looking for. According to the
> descriptions it is just doing on a much more sophisticated level what
> I’m doing with my C code. It has much more effects implemented than my
> code. It’s really great!
>
> Why the hell didn’t I spend time looking into Csound before? Someone was
> pointing me to it in autumn. This could have saved many hours of
> programming, debugging, testing.. At least I learnt something about
> aural perception and also went back to the textbook from my first term
> in experimental physics to recall what I’ve learnt about acoustics 45
> years ago.
>
> Now I will have to understand ambisonics which is apparently the
> framework of spat3d. Wave field synthesis is a nice idea physics wise
> but far, far beyond my capabilities.
>
> I’m really impressed by what Csound offers. That’s great! Thanks to all
> of you contributing to it.
>
> all the best
>
> Karin
>
>> On 4 Jan 2016, at 14:14, Oeyvind Brandtsegg-3 [via Csound] <[hidden
>> email] > wrote:
>>
>> Good point.
>> Maybe a reasonable spatial downmixing would be to use 4-5 voices close
>> up, and then 5-6 voices more in the distance, or something like that?
>> All in all maybe using 10-15 separate spatial points, instead of the
>> full 40-50 voices. *If* you want to save CPU.
>> all best
>> Oeyvind
>>
>> 2016-01-04 10:53 GMT+01:00 MarieCurie <> href="x-msg://78/user/SendEmail.jtp?type=node&node=5745931&i=0" target="_top"
>> rel="nofollow" link="external" class="">[hidden email]>:
>>
>> > I will have a close look to the spat3d opcode.
>> >
>> > Concerning our perception I agree, it’s difficult to follow the path
>> of more
>> > than a few moving sound sources at the same time. And yes, it is also
>> > difficult to listen to many independent voices at the same time. The
>> larger
>> > the reverberation time T60 the more difficult it is. However, a
>> longer T60
>> > makes it easier to distinguish between voices close-by from voices
>> far away.
>> > If you take for example a voice at a distance of 2m compared to a
>> voice at
>> > 20m this make a difference in the sound pressure of a factor of 10
>> and in
>> > intensity by a factor of 100 (40dB). However, our perception is about a
>> > factor of 16 only (10dB for a factor 2 change in loudness). This is
>> where
>> > reverberation helps: the ratio of direct to reflected sound
>> decreases with
>> > increasing distance and the time difference between direct sound and
>> early
>> > reflections increases when the sound is coming closer. As long as
>> normal
>> > multichannel sound is used, I need to find the optimum between
>> clarity of
>> > the voices and spatial resolution which comes to a large extend from
>> the
>> > reverberation. This would change if wave field synthesis would be
>> used, but
>> > this is a completely different universe.
>> >
>> > What I want to see/hear also is what happens if the chorus/cacophony is
>> > moving towards or away from the sweet spot. This would mean to move
>> a couple
>> > of voices (20-50) simultaneously.
>> >
>> > On 4 Jan 2016, at 10:03, Oeyvind Brandtsegg-3 [via Csound] <[hidden
>> email]>
>> > wrote:
>> >
>> > It sounds like a very nice and interesting project. Do let us know how
>> > you solve it.
>> >
>> > But do test the spat3d opcode, it sounds as if it may be able to do a
>> > lot of what you need. I guess it might become expensive CPU-wise if
>> > you want to run dozens of independent trajectories. But that could
>> > possibly be parallelized.
>> >
>> > Also, perhaps you can get away with using a lower number of
>> > independent trajectories, mixing each source sound to the closest
>> > point in space to where you actually want it. A kind of spatial
>> > downsampling. In my experience we humans are not capable of actually
>> > following more than a few independently moving objects simultaneously,
>> > much like we are not able to follow the details of more than a few
>> > independent voices in music simultaneously. I have no scientific data
>> > to back up this claim, but I would guess our polyphony of spatial
>> > perception is usually less than 5 simultaneous trajectories. If you
>> > have 40-50 independent voices, maybe you could mix them to 5-8
>> > positions in the virtual room.
>> >
>> >
>> > 2016-01-04 9:37 GMT+01:00 Karin Daum <> > href="> href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=0"
>> class="">x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=0"
>>
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]>:
>> >
>> >> this is simple to answer: Csound seems to me so much superior to the
>> >> primitive framework I used up to now. Csound enables me to include
>> effects
>> >> I
>> >> didn’t think of so far.
>> >>
>> >> Time will be an issue in what I have in mind. The simulation of the
>> sound
>> >> in
>> >> a virtual room including higher order reflections from the walls is
>> time
>> >> consuming. As an example I model a virtual room with dimensions of
>> e.g.
>> >> 20m
>> >> X 50m which is more like a cathedral then a meeting room. If you
>> want to
>> >> simulate a reverberation time T60 of about one second you need to
>> >> calculate
>> >> the reflections on a 21x21 grid of mirror spaces. You need to
>> calculate
>> >> 440
>> >> reflections. Even with the technique of using mirror listeners on this
>> >> grid
>> >> the resulting computing requirement for a single sound source is
>>  about
>> >> 25-30% of the available time (using -o3 as compiler option) in a live
>> >> performance. But the result doe not sound like a cathedral. The T60 is
>> >> more
>> >> what is recommended for a meeting room. If you want to simulate a
>> T60 of
>> >> about 3-4 seconds which is more like a cathedral without hearing a
>> cutoff
>> >> in
>> >> the reverberation you need to perform this calculations on a grid with
>> >> dimensions larger than 61x61 (>3720 reflections). The computing
>> time is
>> >> much
>> >> larger than the time available in a live performance. This is no
>> solution.
>> >> Therefore for non-moving sound sources you need to do the
>> convolution of
>> >> the
>> >> sound with the proper impulse response function (which you get very
>> easily
>> >> at a high speed from my program using a single ping with a length of
>> >> 1/sampling rate). For moving sources you need to calculate the lower
>> >> orders
>> >> of reflections with this code and add to it the convolution of the dry
>> >> sound
>> >> with the pulse response of the higher order reflections which is not
>> >> needed
>> >> to be time dependent. The convolution is not available in the current
>> >> scheme
>> >> i have. I would have to implement it. It seems to me easier to
>> convert my
>> >> C
>> >> code into C++, which I’m using in my job in research.
>> >>
>> >> On 3 Jan 2016, at 21:00, Rory Walsh <> >> href="> href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=1"
>> class="">x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=1"
>>
>> >> target="_top" rel="nofollow" link="external" class="">[hidden
>> email]> wrote:
>> >>
>> >> Why bother rewriting all the perfectly ready-to-go C code in C++?
>> >>
>> >> On 3 January 2016 at 19:35, Michael Gogins <> >> href="> href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=2"
>> class="">x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=2"
>>
>> >> target="_top" rel="nofollow" link="external" class="">[hidden
>> email]> wrote:
>> >>>
>> >>> Why should Karin reduplicate all the stuff in Csound that works fine
>> >>> already (audio IO etc)? As I said it makes perfectly good sense to
>> use
>> >>> Csound as a framework, and to write performance critical code in C++
>> >>> as plugin opcodes.
>> >>>
>> >>> There is waaay too much re-invention of the wheel in this field...
>> >>>
>> >>> Best,
>> >>> Mike
>> >>>
>> >>> -----------------------------------------------------
>> >>> Michael Gogins
>> >>> Irreducible Productions
>> >>> http://michaelgogins.tumblr.com 
>> >>> Michael dot Gogins at gmail dot com
>> >>>
>> >>>
>> >>> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>> >>> <> >>> href="> href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=3"
>> class="">x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=3"
>>
>> >>> target="_top" rel="nofollow" link="external" class="">[hidden
>> email]> wrote:
>> >>> > Not sure why you need Csound in this case. Just keep it all in C.
>> >>> >
>> >>> > Victor Lazzarini
>> >>> > Dean of Arts, Celtic Studies, and Philosophy
>> >>> > Maynooth University
>> >>> > Ireland
>> >>> >
>> >>> > On 3 Jan 2016, at 18:42, MarieCurie <> >>> > href="> href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=4"
>> class="">x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=4"
>>
>> >>> > target="_top" rel="nofollow" link="external" class="">[hidden
>> email]> wrote:
>> >>> >
>> >>> > this is what I expected.  The code is ready in C. Modifying  it
>> to C++
>> >>> > and
>> >>> > calling it from Csound seems to me easier that starting from
>> scratch in
>> >>> > Csound. As I tried to explain in my previous answer and as you
>> can see
>> >>> > in
>> >>> > the example this may become difficult to get it completely
>> flexible in
>> >>> > Csound. But as I also said, I just started with Csound a few
>> days ago
>> >>> > and
>> >>> > don’t know all it’s capabilities. In my C code I need to define
>> only
>> >>> > the
>> >>> > virtual room (size & reflectivity) + sweet spot in the
>> initialisation
>> >>> > and
>> >>> > then if the position/path of a given sound source is passed to
>> the code
>> >>> > everything  turns out automatically.
>> >>> >
>> >>> > And as I explained in the other thread computing power could be a
>> >>> > limitation.
>> >>> >
>> >>> > On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden
>> email]>
>> >>> > wrote:
>> >>> >
>> >>> > Efficiency is a goal. C++ runs about 3 times faster than Csound.
>> Using
>> >>> > Csound as a framework and writing critical opcodes in C++makes
>> sense to
>> >>> > me.
>> >>> >
>> >>> > Regards,
>> >>> > Mike
>> >>> >
>> >>> > On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <> >>> > href="> >>> > href="> href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=0"
>> class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=0"
>>
>> >>> > class="">> href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=0"
>> class="">x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=0"
>>
>> >>> > target="_top" rel="nofollow" link="external" class="">[hidden
>> email]>
>> >>> > wrote:
>> >>> >>
>> >>> >> You can do doppler and the other things in Csound by using
>> variable
>> >>> >> delay
>> >>> >> lines, filters,
>> >>> >> etc. What I would suggest is this:
>> >>> >>
>> >>> >> 1) write the audio processing code in Csound.
>> >>> >>
>> >>> >> 2) Access Csound via its API in your C++
>> >>> >> program, controlling the instruments that
>> >>> >> you created. The C++ code can calculate all
>> >>> >> the parameters / trajectories and pass it
>> >>> >> to Csound to do the processing.
>> >>> >>
>> >>> >> Of course this makes sense if you are starting the project. If you
>> >>> >> have
>> >>> >> all
>> >>> >> the code already written in C++, redoing
>> >>> >> things in Csound might be duplication. In that case just keep
>> to C++.
>> >>> >>
>> >>> >> Victor Lazzarini
>> >>> >> Dean of Arts, Celtic Studies, and Philosophy
>> >>> >> Maynooth University
>> >>> >> Ireland
>> >>> >>
>> >>> >> > On 3 Jan 2016, at 15:09, MarieCurie <> >>> >> >
>> >>> >> > href="> >>> >> > href="> href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=1"
>> class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=1"
>>
>> >>> >> > class="">> href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=1"
>> class="">x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=1"
>>
>> >>> >> > target="_top" rel="nofollow" link="external" class="">[hidden
>> >>> >> > email]>
>> >>> >> > wrote:
>> >>> >> >
>> >>> >> > well, I just learnt about Csound shortly before Xmas when I was
>> >>> >> > discussing
>> >>> >> > some problems with my project with a sound engineer from the
>> TV. For
>> >>> >> > the
>> >>> >> > framework which I used so far which is primitive compared to
>> Csound
>> >>> >> > (and
>> >>> >> > not
>> >>> >> > supported since long) but had the capability of being
>> accessed via
>> >>> >> > script
>> >>> >> > which is needed for my project. For this software I’ve written C
>> >>> >> > code
>> >>> >> > which
>> >>> >> > does the simulation of a virtual room producing multichannel
>> >>> >> > (surruound
>> >>> >> > 5.1)
>> >>> >> > output. This code allows for different multichannel panning
>> schemes
>> >>> >> > (similar
>> >>> >> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article
>> for the
>> >>> >> > stereo
>> >>> >> > case) and calculates the reverberation to a desired order of
>> >>> >> > reflections
>> >>> >> > depending on the dimensions of the virtual room, the
>> reflectivity
>> >>> >> > and
>> >>> >> > the
>> >>> >> > positions of the source and the sweet spot. The path of the
>> source
>> >>> >> > can
>> >>> >> > be
>> >>> >> > steered by a string for a valid arithmetic expression (standard
>> >>> >> > arithmetics
>> >>> >> > including the standard C-functions) such that the source can be
>> >>> >> > moved
>> >>> >> > almost
>> >>> >> > freely in (x,y) coordinates of the virtual room. This code
>> yields
>> >>> >> > information on
>> >>> >> >
>> >>> >> > - the angle (or position) of the source,
>> >>> >> > - the distance dependent volume,
>> >>> >> > - the position dependent time delay between direct and reflected
>> >>> >> > signals,
>> >>> >> > - the position dependent volume ratio between direct and
>> reflected
>> >>> >> > signals,
>> >>> >> > - the informations on the room contained in the reflections,
>> >>> >> > - the information on the movement (Doppler effect and beats
>> which
>> >>> >> > differ
>> >>> >> > for
>> >>> >> > the different channels because of different relative velocities
>> >>> >> > w.r.t.
>> >>> >> > the
>> >>> >> > different walls).
>> >>> >> >
>> >>> >> > As far as I understand by now the multichannel packages VBAP and
>> >>> >> > Ambisonic
>> >>> >> > address the first two points only. As far as I've understood
>> >>> >> > Puckki's
>> >>> >> > article and the source code of VBAP in Csound it does the
>> panning of
>> >>> >> > the
>> >>> >> > phantom sources only between neighbouring loudspeakers which
>> means
>> >>> >> > you
>> >>> >> > are
>> >>> >> > not able to put a phantom source at any position. This should be
>> >>> >> > possible
>> >>> >> > with Ambisonic however it also does not include item 3-6 from
>> the
>> >>> >> > list
>> >>> >> > above. I certainly will have a look to this code.
>> >>> >> >
>> >>> >> > An example of a source @440Hz moving with a velocity of
>> 4m/sec in a
>> >>> >> > room
>> >>> >> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1
>> channels
>> >>> >> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source
>> passing
>> >>> >> > the
>> >>> >> > sweet spot until it reaches the wall behind the listener then it
>> >>> >> > slowly
>> >>> >> > moves until it reaches the right back corner, where it stops.
>> (For
>> >>> >> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> 
>>
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > -----
>> >>> >> > cheers,
>> >>> >> >
>> >>> >> > Karin
>> >>> >> > --
>> >>> >> > View this message in context:
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>> >>> >> > Sent from the Csound - General mailing list archive at
>> Nabble.com .
>> >>> >> >
>> >>> >> > Csound mailing list
>> >>> >> > > >>> >> >
>> >>> >> > href="> >>> >> > href="> href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=2"
>> class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=2"
>>
>> >>> >> > class="">> href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=2"
>> class="">x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=2"
>>
>> >>> >> > target="_top" rel="nofollow" link="external" class="">[hidden
>> email]
>> >>> >> > 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
>> >>> >>
>> >>> >> Csound mailing list
>> >>> >> > >>> >> href="> >>> >> href="> href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=3"
>> class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=3"
>>
>> >>> >> class="">> href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=3"
>> class="">x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=3"
>>
>> >>> >> target="_top" rel="nofollow" link="external" class="">[hidden
>> email]
>> >>> >> 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
>> >>> >
>> >>> > Csound mailing list > >>> > href="> >>> > href="> href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=4"
>> class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=4"
>>
>> >>> > class="">> href="x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=4"
>> class="">x-msg://51/user/SendEmail.jtp?type=node&node=5745861&i=4"
>>
>> >>> > target="_top" rel="nofollow" link="external" class="">[hidden
>> email]
>> >>> > 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
>> >>> >
>> >>> > ________________________________
>> >>> > If you reply to this email, your message will be added to the
>> >>> > discussion
>> >>> > below:
>> >>> >
>> >>> >
>> >>> >
>> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
>> >>> > To unsubscribe from Including own C++ code in Csound, click here.
>> >>> > NAML
>> >>> >
>> >>> >
>> >>> > cheers,
>> >>> >
>> >>> > Karin
>> >>> >
>> >>> > ________________________________
>> >>> > View this message in context: Re: [Csnd] Including own C++ code in
>> >>> > Csound
>> >>> > Sent from the Csound - General mailing list archive at
>> Nabble.com .
>> >>> > Csound mailing list > >>> > href="> href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=5"
>> class="">x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=5"
>>
>> >>> > target="_top" rel="nofollow" link="external" class="">[hidden
>> email]
>> >>> > 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
>> >>> >
>> >>> > Csound mailing list > >>> > href="> href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=6"
>> class="">x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=6"
>>
>> >>> > target="_top" rel="nofollow" link="external" class="">[hidden
>> email]
>> >>> > 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
>> >>>
>> >>> Csound mailing list
>> >>> > >>> href="> href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=7"
>> class="">x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=7"
>>
>> >>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >>> 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
>> >>
>> >>
>> >> Csound mailing list > >> href="> href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=8"
>> class="">x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=8"
>>
>> >> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> 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
>> >>
>> >>
>> >> Csound mailing list > >> href="> href="x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=9"
>> class="">x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=9"
>>
>> >> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> 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
>> >
>> >
>> > --
>> >
>> > Oeyvind Brandtsegg
>> > Professor of Music Technology
>> > NTNU
>> > 7491 Trondheim
>> > Norway
>> > Cell: +47 92 203 205
>> >
>> > http://www.partikkelaudio.com/
>> > http://soundcloud.com/brandtsegg
>> > http://flyndresang.no/
>> > http://soundcloud.com/t-emp
>> >
>> > Csound mailing list
>> > > class="">x-msg://59/user/SendEmail.jtp?type=node&node=5745892&i=10"
>>
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>> >
>> >
>> > ________________________________
>> > If you reply to this email, your message will be added to the
>> discussion
>> > below:
>> >
>> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745892.html
>> > To unsubscribe from Including own C++ code in Csound, click here.
>> > NAML
>> >
>> >
>> > cheers,
>> >
>> > Karin
>> >
>> > ________________________________
>> > View this message in context: Re: [Csnd] Including own C++ code in
>> Csound
>> > Sent from the Csound - General mailing list archive at Nabble.com
>> .
>> > Csound mailing list > href="x-msg://78/user/SendEmail.jtp?type=node&node=5745931&i=1" target="_top"
>> rel="nofollow" link="external" class="">[hidden email]
>> > 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
>>
>>
>> --
>>
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>> Cell: +47 92 203 205
>>
>> http://www.partikkelaudio.com/
>> http://soundcloud.com/brandtsegg
>> http://flyndresang.no/
>> http://soundcloud.com/t-emp
>>
>> Csound mailing list
>> > href="x-msg://78/user/SendEmail.jtp?type=node&node=5745931&i=2" target="_top"
>> rel="nofollow" link="external" class="">[hidden email]
>> 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
>>
>>
>> ------------------------------------------------------------------------
>> If you reply to this email, your message will be added to the
>> discussion below:
>> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745931.html
>>
>> To unsubscribe from Including own C++ code in Csound, click here.
>> NAML
>> 
>>
>
> cheers,
>
> Karin
>
> ------------------------------------------------------------------------
> View this message in context: Re: [Csnd] Including own C++ code in
> Csound
> 
> Sent from the Csound - General mailing list archive
>  at
> Nabble.com.
> 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

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

Date2016-01-05 08:28
FromMarieCurie
SubjectRe: Including own C++ code in Csound

Thanks, this is what I was looking at. The chapter on panning, convolution and FFT was the first reason for me to buy this manual. I need manuals on paper. I hate switching screens, clicking and scrolling when I try to do something on the computer.


Karin
 
On 4 Jan 2016, at 22:37, joachim-3 [via Csound] <[hidden email]> wrote:

if you want to dive in ambisonics, you should have a look at the
excellent stuff which martin neukom contributed to the floss manual:
http://floss.booktype.pro/csound/b-panning-and-spatialization/
(section "Ambisonic UDOs", going to examples 05B10 pp)

        joachim


On 04/01/16 14:59, MarieCurie wrote:

> spat3d seems to be just what I was looking for. According to the
> descriptions it is just doing on a much more sophisticated level what
> I’m doing with my C code. It has much more effects implemented than my
> code. It’s really great!
>
> Why the hell didn’t I spend time looking into Csound before? Someone was
> pointing me to it in autumn. This could have saved many hours of
> programming, debugging, testing.. At least I learnt something about
> aural perception and also went back to the textbook from my first term
> in experimental physics to recall what I’ve learnt about acoustics 45
> years ago.
>
> Now I will have to understand ambisonics which is apparently the
> framework of spat3d. Wave field synthesis is a nice idea physics wise
> but far, far beyond my capabilities.
>
> I’m really impressed by what Csound offers. That’s great! Thanks to all
> of you contributing to it.
>
> all the best
>
> Karin
>
>> On 4 Jan 2016, at 14:14, Oeyvind Brandtsegg-3 [via Csound] <[hidden
>> email] </user/SendEmail.jtp?type=node&node=5745935&i=0>> wrote:
>>
>> Good point.
>> Maybe a reasonable spatial downmixing would be to use 4-5 voices close
>> up, and then 5-6 voices more in the distance, or something like that?
>> All in all maybe using 10-15 separate spatial points, instead of the
>> full 40-50 voices. *If* you want to save CPU.
>> all best
>> Oeyvind
>>
>> 2016-01-04 10:53 GMT+01:00 MarieCurie <<a
>> href="<a href="x-msg://78/user/SendEmail.jtp?type=node&amp;amp;node=5745931&amp;amp;i=0" class="">x-msg://78/user/SendEmail.jtp?type=node&amp;node=5745931&amp;i=0" target="_top"
>> rel="nofollow" link="external" class="">[hidden email]>:
>>
>> > I will have a close look to the spat3d opcode.
>> >
>> > Concerning our perception I agree, it’s difficult to follow the path
>> of more
>> > than a few moving sound sources at the same time. And yes, it is also
>> > difficult to listen to many independent voices at the same time. The
>> larger
>> > the reverberation time T60 the more difficult it is. However, a
>> longer T60
>> > makes it easier to distinguish between voices close-by from voices
>> far away.
>> > If you take for example a voice at a distance of 2m compared to a
>> voice at
>> > 20m this make a difference in the sound pressure of a factor of 10
>> and in
>> > intensity by a factor of 100 (40dB). However, our perception is about a
>> > factor of 16 only (10dB for a factor 2 change in loudness). This is
>> where
>> > reverberation helps: the ratio of direct to reflected sound
>> decreases with
>> > increasing distance and the time difference between direct sound and
>> early
>> > reflections increases when the sound is coming closer. As long as
>> normal
>> > multichannel sound is used, I need to find the optimum between
>> clarity of
>> > the voices and spatial resolution which comes to a large extend from
>> the
>> > reverberation. This would change if wave field synthesis would be
>> used, but
>> > this is a completely different universe.
>> >
>> > What I want to see/hear also is what happens if the chorus/cacophony is
>> > moving towards or away from the sweet spot. This would mean to move
>> a couple
>> > of voices (20-50) simultaneously.
>> >
>> > On 4 Jan 2016, at 10:03, Oeyvind Brandtsegg-3 [via Csound] <[hidden
>> email]>
>> > wrote:
>> >
>> > It sounds like a very nice and interesting project. Do let us know how
>> > you solve it.
>> >
>> > But do test the spat3d opcode, it sounds as if it may be able to do a
>> > lot of what you need. I guess it might become expensive CPU-wise if
>> > you want to run dozens of independent trajectories. But that could
>> > possibly be parallelized.
>> >
>> > Also, perhaps you can get away with using a lower number of
>> > independent trajectories, mixing each source sound to the closest
>> > point in space to where you actually want it. A kind of spatial
>> > downsampling. In my experience we humans are not capable of actually
>> > following more than a few independently moving objects simultaneously,
>> > much like we are not able to follow the details of more than a few
>> > independent voices in music simultaneously. I have no scientific data
>> > to back up this claim, but I would guess our polyphony of spatial
>> > perception is usually less than 5 simultaneous trajectories. If you
>> > have 40-50 independent voices, maybe you could mix them to 5-8
>> > positions in the virtual room.
>> >
>> >
>> > 2016-01-04 9:37 GMT+01:00 Karin Daum <<a
>> > href="<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745892&amp;amp;amp;i=0" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=0"
>> class=""><a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=0" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=0"
>>
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]>:
>> >
>> >> this is simple to answer: Csound seems to me so much superior to the
>> >> primitive framework I used up to now. Csound enables me to include
>> effects
>> >> I
>> >> didn’t think of so far.
>> >>
>> >> Time will be an issue in what I have in mind. The simulation of the
>> sound
>> >> in
>> >> a virtual room including higher order reflections from the walls is
>> time
>> >> consuming. As an example I model a virtual room with dimensions of
>> e.g.
>> >> 20m
>> >> X 50m which is more like a cathedral then a meeting room. If you
>> want to
>> >> simulate a reverberation time T60 of about one second you need to
>> >> calculate
>> >> the reflections on a 21x21 grid of mirror spaces. You need to
>> calculate
>> >> 440
>> >> reflections. Even with the technique of using mirror listeners on this
>> >> grid
>> >> the resulting computing requirement for a single sound source is
>>  about
>> >> 25-30% of the available time (using -o3 as compiler option) in a live
>> >> performance. But the result doe not sound like a cathedral. The T60 is
>> >> more
>> >> what is recommended for a meeting room. If you want to simulate a
>> T60 of
>> >> about 3-4 seconds which is more like a cathedral without hearing a
>> cutoff
>> >> in
>> >> the reverberation you need to perform this calculations on a grid with
>> >> dimensions larger than 61x61 (>3720 reflections). The computing
>> time is
>> >> much
>> >> larger than the time available in a live performance. This is no
>> solution.
>> >> Therefore for non-moving sound sources you need to do the
>> convolution of
>> >> the
>> >> sound with the proper impulse response function (which you get very
>> easily
>> >> at a high speed from my program using a single ping with a length of
>> >> 1/sampling rate). For moving sources you need to calculate the lower
>> >> orders
>> >> of reflections with this code and add to it the convolution of the dry
>> >> sound
>> >> with the pulse response of the higher order reflections which is not
>> >> needed
>> >> to be time dependent. The convolution is not available in the current
>> >> scheme
>> >> i have. I would have to implement it. It seems to me easier to
>> convert my
>> >> C
>> >> code into C++, which I’m using in my job in research.
>> >>
>> >> On 3 Jan 2016, at 21:00, Rory Walsh <<a
>> >> href="<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745892&amp;amp;amp;i=1" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=1"
>> class=""><a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=1" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=1"
>>
>> >> target="_top" rel="nofollow" link="external" class="">[hidden
>> email]> wrote:
>> >>
>> >> Why bother rewriting all the perfectly ready-to-go C code in C++?
>> >>
>> >> On 3 January 2016 at 19:35, Michael Gogins <<a
>> >> href="<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745892&amp;amp;amp;i=2" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=2"
>> class=""><a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=2" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=2"
>>
>> >> target="_top" rel="nofollow" link="external" class="">[hidden
>> email]> wrote:
>> >>>
>> >>> Why should Karin reduplicate all the stuff in Csound that works fine
>> >>> already (audio IO etc)? As I said it makes perfectly good sense to
>> use
>> >>> Csound as a framework, and to write performance critical code in C++
>> >>> as plugin opcodes.
>> >>>
>> >>> There is waaay too much re-invention of the wheel in this field...
>> >>>
>> >>> Best,
>> >>> Mike
>> >>>
>> >>> -----------------------------------------------------
>> >>> Michael Gogins
>> >>> Irreducible Productions
>> >>> http://michaelgogins.tumblr.com <http://michaelgogins.tumblr.com/>
>> >>> Michael dot Gogins at gmail dot com
>> >>>
>> >>>
>> >>> On Sun, Jan 3, 2016 at 2:00 PM, Victor Lazzarini
>> >>> <<a
>> >>> href="<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745892&amp;amp;amp;i=3" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=3"
>> class=""><a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=3" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=3"
>>
>> >>> target="_top" rel="nofollow" link="external" class="">[hidden
>> email]> wrote:
>> >>> > Not sure why you need Csound in this case. Just keep it all in C.
>> >>> >
>> >>> > Victor Lazzarini
>> >>> > Dean of Arts, Celtic Studies, and Philosophy
>> >>> > Maynooth University
>> >>> > Ireland
>> >>> >
>> >>> > On 3 Jan 2016, at 18:42, MarieCurie <<a
>> >>> > href="<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745892&amp;amp;amp;i=4" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=4"
>> class=""><a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=4" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=4"
>>
>> >>> > target="_top" rel="nofollow" link="external" class="">[hidden
>> email]> wrote:
>> >>> >
>> >>> > this is what I expected.  The code is ready in C. Modifying  it
>> to C++
>> >>> > and
>> >>> > calling it from Csound seems to me easier that starting from
>> scratch in
>> >>> > Csound. As I tried to explain in my previous answer and as you
>> can see
>> >>> > in
>> >>> > the example this may become difficult to get it completely
>> flexible in
>> >>> > Csound. But as I also said, I just started with Csound a few
>> days ago
>> >>> > and
>> >>> > don’t know all it’s capabilities. In my C code I need to define
>> only
>> >>> > the
>> >>> > virtual room (size & reflectivity) + sweet spot in the
>> initialisation
>> >>> > and
>> >>> > then if the position/path of a given sound source is passed to
>> the code
>> >>> > everything  turns out automatically.
>> >>> >
>> >>> > And as I explained in the other thread computing power could be a
>> >>> > limitation.
>> >>> >
>> >>> > On 3 Jan 2016, at 19:22, Michael Gogins-2 [via Csound] <[hidden
>> email]>
>> >>> > wrote:
>> >>> >
>> >>> > Efficiency is a goal. C++ runs about 3 times faster than Csound.
>> Using
>> >>> > Csound as a framework and writing critical opcodes in C++makes
>> sense to
>> >>> > me.
>> >>> >
>> >>> > Regards,
>> >>> > Mike
>> >>> >
>> >>> > On Jan 3, 2016 12:21 PM, "Victor Lazzarini" <<a
>> >>> > href="<a
>> >>> > href="<a
>> href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;amp;node=5745861&amp;amp;amp;amp;i=0" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=0"
>> class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=0" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=0"
>>
>> >>> > class=""><a
>> href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=0" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=0"
>> class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=0" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=0"
>>
>> >>> > target="_top" rel="nofollow" link="external" class="">[hidden
>> email]>
>> >>> > wrote:
>> >>> >>
>> >>> >> You can do doppler and the other things in Csound by using
>> variable
>> >>> >> delay
>> >>> >> lines, filters,
>> >>> >> etc. What I would suggest is this:
>> >>> >>
>> >>> >> 1) write the audio processing code in Csound.
>> >>> >>
>> >>> >> 2) Access Csound via its API in your C++
>> >>> >> program, controlling the instruments that
>> >>> >> you created. The C++ code can calculate all
>> >>> >> the parameters / trajectories and pass it
>> >>> >> to Csound to do the processing.
>> >>> >>
>> >>> >> Of course this makes sense if you are starting the project. If you
>> >>> >> have
>> >>> >> all
>> >>> >> the code already written in C++, redoing
>> >>> >> things in Csound might be duplication. In that case just keep
>> to C++.
>> >>> >>
>> >>> >> Victor Lazzarini
>> >>> >> Dean of Arts, Celtic Studies, and Philosophy
>> >>> >> Maynooth University
>> >>> >> Ireland
>> >>> >>
>> >>> >> > On 3 Jan 2016, at 15:09, MarieCurie <<a
>> >>> >> >
>> >>> >> > href="<a
>> >>> >> > href="<a
>> href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;amp;node=5745861&amp;amp;amp;amp;i=1" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=1"
>> class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=1" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=1"
>>
>> >>> >> > class=""><a
>> href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=1" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=1"
>> class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=1" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=1"
>>
>> >>> >> > target="_top" rel="nofollow" link="external" class="">[hidden
>> >>> >> > email]>
>> >>> >> > wrote:
>> >>> >> >
>> >>> >> > well, I just learnt about Csound shortly before Xmas when I was
>> >>> >> > discussing
>> >>> >> > some problems with my project with a sound engineer from the
>> TV. For
>> >>> >> > the
>> >>> >> > framework which I used so far which is primitive compared to
>> Csound
>> >>> >> > (and
>> >>> >> > not
>> >>> >> > supported since long) but had the capability of being
>> accessed via
>> >>> >> > script
>> >>> >> > which is needed for my project. For this software I’ve written C
>> >>> >> > code
>> >>> >> > which
>> >>> >> > does the simulation of a virtual room producing multichannel
>> >>> >> > (surruound
>> >>> >> > 5.1)
>> >>> >> > output. This code allows for different multichannel panning
>> schemes
>> >>> >> > (similar
>> >>> >> > to those in EXAMPLE 05B1 and eqn. 3 from V. Pulkki's article
>> for the
>> >>> >> > stereo
>> >>> >> > case) and calculates the reverberation to a desired order of
>> >>> >> > reflections
>> >>> >> > depending on the dimensions of the virtual room, the
>> reflectivity
>> >>> >> > and
>> >>> >> > the
>> >>> >> > positions of the source and the sweet spot. The path of the
>> source
>> >>> >> > can
>> >>> >> > be
>> >>> >> > steered by a string for a valid arithmetic expression (standard
>> >>> >> > arithmetics
>> >>> >> > including the standard C-functions) such that the source can be
>> >>> >> > moved
>> >>> >> > almost
>> >>> >> > freely in (x,y) coordinates of the virtual room. This code
>> yields
>> >>> >> > information on
>> >>> >> >
>> >>> >> > - the angle (or position) of the source,
>> >>> >> > - the distance dependent volume,
>> >>> >> > - the position dependent time delay between direct and reflected
>> >>> >> > signals,
>> >>> >> > - the position dependent volume ratio between direct and
>> reflected
>> >>> >> > signals,
>> >>> >> > - the informations on the room contained in the reflections,
>> >>> >> > - the information on the movement (Doppler effect and beats
>> which
>> >>> >> > differ
>> >>> >> > for
>> >>> >> > the different channels because of different relative velocities
>> >>> >> > w.r.t.
>> >>> >> > the
>> >>> >> > different walls).
>> >>> >> >
>> >>> >> > As far as I understand by now the multichannel packages VBAP and
>> >>> >> > Ambisonic
>> >>> >> > address the first two points only. As far as I've understood
>> >>> >> > Puckki's
>> >>> >> > article and the source code of VBAP in Csound it does the
>> panning of
>> >>> >> > the
>> >>> >> > phantom sources only between neighbouring loudspeakers which
>> means
>> >>> >> > you
>> >>> >> > are
>> >>> >> > not able to put a phantom source at any position. This should be
>> >>> >> > possible
>> >>> >> > with Ambisonic however it also does not include item 3-6 from
>> the
>> >>> >> > list
>> >>> >> > above. I certainly will have a look to this code.
>> >>> >> >
>> >>> >> > An example of a source @440Hz moving with a velocity of
>> 4m/sec in a
>> >>> >> > room
>> >>> >> > with (x,y) 20m x 50m (speed of sound 343,2 m/sec) for 5.1
>> channels
>> >>> >> > (L-R-C-LFE-SL-SR) is shown below. One nicely sees the source
>> passing
>> >>> >> > the
>> >>> >> > sweet spot until it reaches the wall behind the listener then it
>> >>> >> > slowly
>> >>> >> > moves until it reaches the right back corner, where it stops.
>> (For
>> >>> >> > visualisation I've used Praat)Doppler and beats 440 Hz, 4m/sec
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> <http://csound.1045644.n5.nabble.com/file/n5745837/440HzDopplerSchwebung.jpg>
>>
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > -----
>> >>> >> > cheers,
>> >>> >> >
>> >>> >> > Karin
>> >>> >> > --
>> >>> >> > View this message in context:
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745837.html
>> >>> >> > Sent from the Csound - General mailing list archive at
>> Nabble.com <http://Nabble.com>.
>> >>> >> >
>> >>> >> > Csound mailing list
>> >>> >> > <a
>> >>> >> >
>> >>> >> > href="<a
>> >>> >> > href="<a
>> href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;amp;node=5745861&amp;amp;amp;amp;i=2" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=2"
>> class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=2" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=2"
>>
>> >>> >> > class=""><a
>> href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=2" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=2"
>> class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=2" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=2"
>>
>> >>> >> > target="_top" rel="nofollow" link="external" class="">[hidden
>> email]
>> >>> >> > 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
>> >>> >>
>> >>> >> Csound mailing list
>> >>> >> <a
>> >>> >> href="<a
>> >>> >> href="<a
>> href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;amp;node=5745861&amp;amp;amp;amp;i=3" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=3"
>> class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=3" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=3"
>>
>> >>> >> class=""><a
>> href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=3" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=3"
>> class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=3" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=3"
>>
>> >>> >> target="_top" rel="nofollow" link="external" class="">[hidden
>> email]
>> >>> >> 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
>> >>> >
>> >>> > Csound mailing list <a
>> >>> > href="<a
>> >>> > href="<a
>> href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;amp;node=5745861&amp;amp;amp;amp;i=4" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=4"
>> class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=4" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=4"
>>
>> >>> > class=""><a
>> href="<a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745861&amp;amp;amp;i=4" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=4"
>> class=""><a href="x-msg://51/user/SendEmail.jtp?type=node&amp;amp;node=5745861&amp;amp;i=4" class="">x-msg://51/user/SendEmail.jtp?type=node&amp;node=5745861&amp;i=4"
>>
>> >>> > target="_top" rel="nofollow" link="external" class="">[hidden
>> email]
>> >>> > 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
>> >>> >
>> >>> > ________________________________
>> >>> > If you reply to this email, your message will be added to the
>> >>> > discussion
>> >>> > below:
>> >>> >
>> >>> >
>> >>> >
>> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745861.html
>> >>> > To unsubscribe from Including own C++ code in Csound, click here.
>> >>> > NAML
>> >>> >
>> >>> >
>> >>> > cheers,
>> >>> >
>> >>> > Karin
>> >>> >
>> >>> > ________________________________
>> >>> > View this message in context: Re: [Csnd] Including own C++ code in
>> >>> > Csound
>> >>> > Sent from the Csound - General mailing list archive at
>> Nabble.com <http://Nabble.com>.
>> >>> > Csound mailing list <a
>> >>> > href="<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745892&amp;amp;amp;i=5" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=5"
>> class=""><a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=5" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=5"
>>
>> >>> > target="_top" rel="nofollow" link="external" class="">[hidden
>> email]
>> >>> > 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
>> >>> >
>> >>> > Csound mailing list <a
>> >>> > href="<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745892&amp;amp;amp;i=6" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=6"
>> class=""><a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=6" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=6"
>>
>> >>> > target="_top" rel="nofollow" link="external" class="">[hidden
>> email]
>> >>> > 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
>> >>>
>> >>> Csound mailing list
>> >>> <a
>> >>> href="<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745892&amp;amp;amp;i=7" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=7"
>> class=""><a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=7" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=7"
>>
>> >>> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >>> 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
>> >>
>> >>
>> >> Csound mailing list <a
>> >> href="<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745892&amp;amp;amp;i=8" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=8"
>> class=""><a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=8" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=8"
>>
>> >> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> 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
>> >>
>> >>
>> >> Csound mailing list <a
>> >> href="<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745892&amp;amp;amp;i=9" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=9"
>> class=""><a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=9" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=9"
>>
>> >> target="_top" rel="nofollow" link="external" class="">[hidden email]
>> >> 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
>> >
>> >
>> > --
>> >
>> > Oeyvind Brandtsegg
>> > Professor of Music Technology
>> > NTNU
>> > 7491 Trondheim
>> > Norway
>> > Cell: +47 92 203 205
>> >
>> > http://www.partikkelaudio.com/
>> > http://soundcloud.com/brandtsegg
>> > http://flyndresang.no/
>> > http://soundcloud.com/t-emp
>> >
>> > Csound mailing list
>> > <a href="<a
>> href="<a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;amp;node=5745892&amp;amp;amp;i=10" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=10"
>> class=""><a href="x-msg://59/user/SendEmail.jtp?type=node&amp;amp;node=5745892&amp;amp;i=10" class="">x-msg://59/user/SendEmail.jtp?type=node&amp;node=5745892&amp;i=10"
>>
>> > target="_top" rel="nofollow" link="external" class="">[hidden email]
>> > 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
>> >
>> >
>> > ________________________________
>> > If you reply to this email, your message will be added to the
>> discussion
>> > below:
>> >
>> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745892.html
>> > To unsubscribe from Including own C++ code in Csound, click here.
>> > NAML
>> >
>> >
>> > cheers,
>> >
>> > Karin
>> >
>> > ________________________________
>> > View this message in context: Re: [Csnd] Including own C++ code in
>> Csound
>> > Sent from the Csound - General mailing list archive at Nabble.com
>> <http://Nabble.com>.
>> > Csound mailing list <a
>> href="<a href="x-msg://78/user/SendEmail.jtp?type=node&amp;amp;node=5745931&amp;amp;i=1" class="">x-msg://78/user/SendEmail.jtp?type=node&amp;node=5745931&amp;i=1" target="_top"
>> rel="nofollow" link="external" class="">[hidden email]
>> > 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
>>
>>
>> --
>>
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>> Cell: +47 92 203 205
>>
>> http://www.partikkelaudio.com/
>> http://soundcloud.com/brandtsegg
>> http://flyndresang.no/
>> http://soundcloud.com/t-emp
>>
>> Csound mailing list
>> <a
>> href="<a href="x-msg://78/user/SendEmail.jtp?type=node&amp;amp;node=5745931&amp;amp;i=2" class="">x-msg://78/user/SendEmail.jtp?type=node&amp;node=5745931&amp;i=2" target="_top"
>> rel="nofollow" link="external" class="">[hidden email]
>> 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
>>
>>
>> ------------------------------------------------------------------------
>> If you reply to this email, your message will be added to the
>> discussion below:
>> http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745931.html
>>
>> To unsubscribe from Including own C++ code in Csound, click here.
>> NAML
>> <http://csound.1045644.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
> cheers,
>
> Karin
>
> ------------------------------------------------------------------------
> View this message in context: Re: [Csnd] Including own C++ code in
> Csound
> <http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745935.html>
> Sent from the Csound - General mailing list archive
> <http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html> at
> Nabble.com.
> Csound mailing list <a href="x-msg://90/user/SendEmail.jtp?type=node&amp;node=5745965&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]
> <mailto:<a href="x-msg://90/user/SendEmail.jtp?type=node&amp;node=5745965&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]>
> 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
Csound mailing list
<a href="x-msg://90/user/SendEmail.jtp?type=node&amp;node=5745965&amp;i=2" target="_top" rel="nofollow" link="external" class="">[hidden email]
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



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Including-own-C-code-in-Csound-tp5745799p5745965.html
To unsubscribe from Including own C++ code in Csound, click here.
NAML

cheers,

Karin


View this message in context: Re: [Csnd] Including own C++ code in Csound
Sent from the Csound - General mailing list archive at Nabble.com.
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