[music-dsp] C# Interpolation Code
gogins at pipeline.com
Wed Jan 28 21:25:48 EST 2004
C++ is the best language for complex software that also has to run fast. C++
is also difficult to learn. C# is not as fast because C# source code is
compiled to intermediate language, which is object language for a virtual
machine. So when a C# program is executing, the host computer runs a virtual
machine, and the virtual machine runs the intermediate language. C++ code
compiles directly to object language for the host computer, so there is one
less layer of abstraction between your ideas and the microprocessor. The
actual speed difference would depend on the type of code you write, and in
many cases C# would actually be almost as fast as C++. However, most
existing audio processing code is written in C or C++, which links directly
with C++ code. Those same libraries can be used from C# programs, but again,
only by going through an extra step of translation, either by writing
"managed C++" wrappers, or using the PINVOKE facility to call from C# code
into a DLL that would probably be compiled in C++.
The speed advantage and libraries advantage of C++ are likely to be reduced
as time goes on, but they are not going to vanish as long as C# depends on a
virtual machine, so C++ or C are going to be the recommended languages for
efficient application programming, especially in audio and multimedia, for
the foreseeable future.
gogins at pipeline period com
CsoundVST, an extended version of Csound for programming music and sound
Available at http://sourceforge.net/projects/csound/
----- Original Message -----
From: "Roger Waters" <rogerwaters at fastmail.fm>
To: "a list for musical digital signal processing"
<music-dsp at shoko.calarts.edu>
Sent: Wednesday, January 28, 2004 6:07 PM
Subject: RE: [music-dsp] C# Interpolation Code
> Thank you for your replies!
> The company I work for uses .NET as their main development platform.
> Angelo, why exactly is C# slower? Would you recommend C++ instead? What
> about VC++?
> On Tue, 27 Jan 2004 17:07:00 +0100, "Angelo Farina"
> <farina at pcfarina.eng.unipr.it> said:
> > I don't think that C# is a good programming language for DSP... We
> > it
> > some months ago, and in the benchmark it was approximately slower by a
> > factor ten than the good, old, "unmanaged" C. We tested with FFT
> > algorithms
> > and linear convolutions, but I suppose that the same hold approximately
> > for
> > any algorithm.
> > Why hell are You planning to use C# for DSP ???
> > Bye!
> > Angelo Farina
> > > -----Original Message-----
> > > From: music-dsp-bounces at shoko.calarts.edu
> > > [mailto:music-dsp-bounces at shoko.calarts.edu] On Behalf Of Roger Waters
> > > Sent: 27 January 2004 01:52
> > > To: music-dsp at shoko.calarts.edu
> > > Subject: [music-dsp] C# Interpolation Code
> > >
> > > I'm new to C# and am looking for a linear or spline
> > > interpolation code in C#. Does anybody know of a site where
> > > I can view similar code, or would anybody be willing to share
> > > some code for me to study?
> > >
> > > Thank you :)
> > >
> > > --
> > > http://www.fastmail.fm - Choose from over 50 domains or use
> > > your own dupswapdrop -- the music-dsp mailing list and website:
> > > subscription info, FAQ, source code archive, list archive,
> > > book reviews, dsp links http://shoko.calarts.edu/musicdsp
> > > http://ceait.calarts.edu/mailman/listinfo/music-dsp
> > >
> > dupswapdrop -- the music-dsp mailing list and website:
> > subscription info, FAQ, source code archive, list archive, book reviews,
> > dsp links
> > http://shoko.calarts.edu/musicdsp
> > http://ceait.calarts.edu/mailman/listinfo/music-dsp
> http://www.fastmail.fm - Does exactly what it says on the tin
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews,
More information about the music-dsp