Csound Csound-dev Csound-tekno Search About

[Csnd] CSound vs C++

Date2013-08-03 04:52
Fromlppier
Subject[Csnd] CSound vs C++
Hi, 

Not sure if this is an appropriate place to ask, but I'll ask anyway. 
For an iOS/Android synth app, I was wondering if it would be more efficient
CPU-wise for a synth app to be coded in pure c++ rather than implementing it
in CSound? Or would the CPU utilisation be roughly the same for the same
kind of synth/effects? 
I know CSound runs from a command-line, and the opcodes are coded internally
in C. Has anyone compared these two cases side-by-side? (similar app, CSound
vs C++)

Thank you. 



--
View this message in context: http://csound.1045644.n5.nabble.com/CSound-vs-C-tp5726262.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-08-03 12:24
FromMichael Gogins
SubjectRe: [Csnd] CSound vs C++

Some years ago I did such a test. Pure c++ can be faster than csound but not by much. The speedup from computing samples in blocks rather than one at a time is much greater, so if you choose c++ be sure to work with blocks of samples, similar to ksmps = 10 or 100.

LuaJIT is capable of running faster than orc code and can be used in Csound. In fact my paper on the Lua opcodes compared speeds also.

If you do use c++ write your piece itself in c++ and include your opcode code in your piece's code and just call the Csound API to register the opcodes, I think that would work, if not I will change the API to enable it.

On Aug 2, 2013 11:52 PM, "lppier" <madstrum@gmail.com> wrote:
Hi,

Not sure if this is an appropriate place to ask, but I'll ask anyway.
For an iOS/Android synth app, I was wondering if it would be more efficient
CPU-wise for a synth app to be coded in pure c++ rather than implementing it
in CSound? Or would the CPU utilisation be roughly the same for the same
kind of synth/effects?
I know CSound runs from a command-line, and the opcodes are coded internally
in C. Has anyone compared these two cases side-by-side? (similar app, CSound
vs C++)

Thank you.



--
View this message in context: http://csound.1045644.n5.nabble.com/CSound-vs-C-tp5726262.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-08-04 06:43
FromPier
SubjectRe: [Csnd] CSound vs C++
Thanks Michael for the information. So the cpu limitations I see are more a function of the tablet's processing limitations, rather than the overhead of running CSound I guess. 



On 3 Aug, 2013, at 7:24 PM, Michael Gogins <michael.gogins@gmail.com> wrote:

Some years ago I did such a test. Pure c++ can be faster than csound but not by much. The speedup from computing samples in blocks rather than one at a time is much greater, so if you choose c++ be sure to work with blocks of samples, similar to ksmps = 10 or 100.

LuaJIT is capable of running faster than orc code and can be used in Csound. In fact my paper on the Lua opcodes compared speeds also.

If you do use c++ write your piece itself in c++ and include your opcode code in your piece's code and just call the Csound API to register the opcodes, I think that would work, if not I will change the API to enable it.

On Aug 2, 2013 11:52 PM, "lppier" <madstrum@gmail.com> wrote:
Hi,

Not sure if this is an appropriate place to ask, but I'll ask anyway.
For an iOS/Android synth app, I was wondering if it would be more efficient
CPU-wise for a synth app to be coded in pure c++ rather than implementing it
in CSound? Or would the CPU utilisation be roughly the same for the same
kind of synth/effects?
I know CSound runs from a command-line, and the opcodes are coded internally
in C. Has anyone compared these two cases side-by-side? (similar app, CSound
vs C++)

Thank you.



--
View this message in context: http://csound.1045644.n5.nabble.com/CSound-vs-C-tp5726262.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"