views:

382

answers:

6

i want to write a music software that can play music, can detect pitch of the sound taken from the computer's microphone(with an algorithm that uses sound filters to filter out frequencies), and enables a good user interface. something similar to smartmusic: http://smartmusic.com

any suggestions for what might be the most appropriate language to write this kind of software ? does anyone know what language smartmusic was coded in?

thanks

A: 

I'd suggest Java.

It has its own API for sound processing and is fairly easy to learn.

http://java.sun.com/products/java-media/sound/

'Tux Guitar' (open source) is written in Java, and illustrates what is possible:

http://tuxguitar.herac.com.ar/

Steven
If real-time performance is an issue, then you might be best looking at C++.
Steven
+1  A: 

I'm assuming that you're trying to do the above in real time or near-realtime? In that case you're looking definitely looking at compiled languages and not interpreted scripting languages as the maths required for this sort of analysis would most likely require too much processing power in an interpreted language.

Most software dealing with this sort of signal processing tends to be written in quite low-level languages like C. You might even find that there are libraries available for this sort of processing for your specific platform. That is certainly where I'd start looking first unless you want to implement these algorithms out of intellectual curiosity. Based on what libraries you find, you can then go and find a programming language that can use them, which might or might not lead you back to the C family of languages (ie, C, C++, Objective-C depending on your platform).

Timo Geusch
+4  A: 

The best language is most likely the one you know best, as long as it's a good multipurpose language that provides easy access to audio (microphone/speaker) hardware. Visual Basic, C#, C++, Java are all quick and easy to write, and give you great access to hardware etc.

But ultimately, audio processing is very straightforward, and recording/playback APIs are very commonplace - so the best language is probably the one you feel most confident in using. You can always start with a basic experiment (record and play back some audio) - if you're happy with how that goes, the audio processing side of it will be much the same in any language.

Jason Williams
+1  A: 

It doesn't seem that you need to code complex effects and Digital Sound Processing functionalities... So you don't need low level languages like C++. I think you should focus most on User Interface and Usability. I see that Java has been suggested. Even if Java is easy to use, Java user interface programming is something that's not really very practical. I'd rather go for a very high level language like Python, C# or Java and use a more practical toolkit. For example you can use WPF or Winforms with C#. Or Qt or Gtk for Python (there are even Java bindings... but I'm not sure about the state of it.). Anyway use something that lets you code easily so that you may concentrate on usability and stuff.

gotch4
A: 

I use Delphi. It combines all the features above, it is compiled, it has a powerful audio processing library (BASS), and has wonderful user interface capabilities. With it, I have written a mixer, a command line player, an spectrum analizer, a sound and silence searcher, and a music comparer.

PA
+1  A: 

Use a language specialised for computer music and dsp, otherwise you'll be reinventing the wheel.

yaxu