Thread: Is C++ the best language for my project?

  1. #1
    Registered User
    Join Date
    Aug 2015
    Posts
    6

    Is C++ the best language for my project?

    I'm an experienced Programmer/Analyst and I'm fluent in many languages, but C++ isn't one of them, yet.

    I've got a project that involves .wav audio files. I need to evaluate 16bit .wav files for amplitude and be able to parse out sections of the .wav files and create new files of the selected sub-sections, based on amplitude.

    Is C++ a good language to use for this type of project? Any thoughts about Microsoft's Visual Studio/Express C++? And do you know if I will be able to use wxWidgets with MS Express C++? Any other suggestions, based on my project outline would be appreciated.

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Welcome to the forum.

    C++ is an excellent choice for such a project, as it puts no unnecessary layers between the code and the raw data. C is also excellent for the same reason. Visual C++ is a great choice for building windows programs, but GCC and Clang are also great compilers, and there is a great multitude of powerful IDEs to go with them, including Code::Blocks, Eclipse, and NetBeans.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  3. #3
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    but C++ isn't one of them
    O_o

    I'd say then that C++ isn't a good choice. Plenty of languages can be a bad fit for a project, but I'm really left asking if none of the "many" is a good fit for the project. The information Elkvis provided isn't wrong, but you shouldn't be afraid of letting the languages with which you are familiar inform your choice of language for a new project.

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  4. #4
    Registered User
    Join Date
    Aug 2015
    Posts
    6
    Great. Thanks for the input. This will be a Windows 7 application, at least to start off with. Do you think the Microsoft Express version C++ would be sufficient. Do you know anything about the 'community' version? Does C++ have a lot of objects that can be used for .wav file manipulation?

  5. #5
    Registered User
    Join Date
    Aug 2015
    Posts
    6
    Quote Originally Posted by phantomotap View Post
    O_o

    I'd say then that C++ isn't a good choice. Plenty of languages can be a bad fit for a project, but I'm really left asking if none of the "many" is a good fit for the project. The information Elkvis provided isn't wrong, but you shouldn't be afraid of letting the languages with which you are familiar inform your choice of language for a new project.

    Soma
    Well, I need a language that has strong audio-manipulation components. Visual Basic (VB.NET) is probably the closest that I know, but I don't know how strong it is with .wav files. It's fine for Windows GUI applications and great for MS office and business applications. The other languages I know don't have strong audio components.

  6. #6
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    Well, I need a language that has strong audio-manipulation components.
    O_o

    The C++ language has no such standard components.

    You can certainly use the C++ language if you wish, but you will have to write the components yourself or find a third-party library to provide such components, and the requirement for third-party libraries returns me to "you shouldn't be afraid of letting the languages with which you are familiar inform your choice of language for a new project". Seriously, have you looked for third-party Waveform audio libraries for the languages you know?

    Of course, you can continue to search for a language which has support for Waveform audio in the standard libraries if you want. The Python language, for example, has support for loading and manipulating Waveform audio files.

    [Edit]
    I like Python, but I'm not trying to discourage you from the C++ language.

    The Waveform support in the Python language is more of a coincidence that anything.
    [/Edit]

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  7. #7
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by LoneRanger View Post
    Great. Thanks for the input. This will be a Windows 7 application, at least to start off with. Do you think the Microsoft Express version C++ would be sufficient. Do you know anything about the 'community' version? Does C++ have a lot of objects that can be used for .wav file manipulation?
    There are plenty of audio processing (DSP) libraries for C++, but none of them is built into the language or standard library. The free community version of Visual Studio, as I understand it, is the same as the paid standard version, and it should be more than adequate for your needs.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  8. #8
    Registered User
    Join Date
    Aug 2015
    Posts
    6
    Quote Originally Posted by Elkvis View Post
    There are plenty of audio processing (DSP) libraries for C++, but none of them is built into the language or standard library. The free community version of Visual Studio, as I understand it, is the same as the paid standard version, and it should be more than adequate for your needs.
    Thanks Elkvis,

    That's fine, if it needs to be a separate library. I'm researching the wxWidgets library now. It was used to create Audacity, which is a great open-source audio program that I use quite a lot. Are there any other C++ IDE's out there besides Microsoft's visual studio? Or is C++ just a Microsoft product?

  9. #9
    Registered User
    Join Date
    Aug 2015
    Posts
    6
    Quote Originally Posted by phantomotap View Post
    O_o

    The C++ language has no such standard components.

    You can certainly use the C++ language if you wish, but you will have to write the components yourself or find a third-party library to provide such components, and the requirement for third-party libraries returns me to "you shouldn't be afraid of letting the languages with which you are familiar inform your choice of language for a new project". Seriously, have you looked for third-party Waveform audio libraries for the languages you know?

    Of course, you can continue to search for a language which has support for Waveform audio in the standard libraries if you want. The Python language, for example, has support for loading and manipulating Waveform audio files.

    [Edit]
    I like Python, but I'm not trying to discourage you from the C++ language.

    The Waveform support in the Python language is more of a coincidence that anything.
    [/Edit]

    Soma
    I'm just starting out on researching this. So, no, I haven't done a whole lot of research on 3rd party DSP libraries. I did see some info. on VB.NET for wav files, but I thought I would investigate C++ because of the fact that Audacity was written in C++. I looked into Python about 9 years ago, and I was very impressed with the string manipulation capabilities, but it fell short in some other areas. But, that was for a business application. I am considering all the languages that I know. Like I said, VB.net is probably the only other language that I know, that would come close to doing what I need to do for this project... But, that's a good comment about searching around for 3rd party DSP libraries (maybe for VB.net)... I'll check Python too. I actually have a book on it...

  10. #10
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by LoneRanger View Post
    That's fine, if it needs to be a separate library. I'm researching the wxWidgets library now. It was used to create Audacity, which is a great open-source audio program that I use quite a lot.
    wxWidgets doesn't really have a lot in the way of audio processing capability. The DSP engine in Audacity is likely a separate component of the program, if not a third-party library. You would probably do well to study the Audacity source, if you are interested in DSP software.

    Quote Originally Posted by LoneRanger View Post
    Are there any other C++ IDE's out there besides Microsoft's visual studio? Or is C++ just a Microsoft product?
    C++ is an international standard, maintained by a group of scholars, engineers, and compiler vendors (the C++ Standards Committee). Microsoft Visual C++ is just one implementation of the language. As I mentioned in my first reply, there are other compilers and other IDEs (the two are not the same thing).
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  11. #11
    Registered User
    Join Date
    Aug 2015
    Posts
    6
    Quote Originally Posted by Elkvis View Post
    wxWidgets doesn't really have a lot in the way of audio processing capability. The DSP engine in Audacity is likely a separate component of the program, if not a third-party library. You would probably do well to study the Audacity source, if you are interested in DSP software.



    C++ is an international standard, maintained by a group of scholars, engineers, and compiler vendors (the C++ Standards Committee). Microsoft Visual C++ is just one implementation of the language. As I mentioned in my first reply, there are other compilers and other IDEs (the two are not the same thing).
    Thanks Elkvis,

    I'm getting a better picture of everything now... I think you're right, Audacity is most likely using some 3rd party libraries for the DSP stuff. I will hunt down the source and take a peek.

  12. #12
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    C++ is too awesome to be a Microsoft product.

  13. #13
    Registered User FourAngels's Avatar
    Join Date
    Aug 2015
    Location
    Canada
    Posts
    130
    The .Net library can be used by any intermediate language, but Microsoft C++ might allow you to also use the Win32 API, ...or at least it used to. The .Net framework would be the easiest way to go if you can find the location of the objects that you can use with audio files and if those objects contained functionality to work with an audio file input file (open the file, read, write, close the file, etc), it more than likely does support that although the file might have to be in a certain format? The open source file formats are probably different so is .wav format an open standard? What is the compression algorithm used, and are there better formats that you might want to convert the file in an out of?

    I recently installed the Visual Studio 2015 Community edition. It seems to support modern C++ (I'm currently reading a textbook on C++ and using VS 2015), but if you are working with a Windows API than Microsoft C++ is used instead of modern C++ for low level access with Win32 function calls and lots of macros... Way back when that was what people used, I refused to bow down to it.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You don't need Win32 API to read and write files.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Registered User FourAngels's Avatar
    Join Date
    Aug 2015
    Location
    Canada
    Posts
    130
    Quote Originally Posted by Elysia View Post
    You don't need Win32 API to read and write files.
    I learned how to open,close,read,write to text files and binary files, but not audio files. Does anyone know how to handle audio files?

    I think that I had heard that input and output in C++ was enhanced by the creation of the iostream library. Is iostream used only for text input and output?

    Do any protocols exist for reading audio input and output or streams? Is .wav format a stream? and therefore it can be converted into another type of format which is more descriptive?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Importance of english language in programming language
    By Lea Pi in forum General Discussions
    Replies: 10
    Last Post: 04-17-2015, 07:43 AM
  2. Replies: 4
    Last Post: 08-02-2013, 06:45 PM
  3. Replies: 1
    Last Post: 12-29-2011, 01:41 AM
  4. Replies: 0
    Last Post: 08-09-2007, 10:59 AM
  5. multiple language project
    By TankCDR in forum C# Programming
    Replies: 11
    Last Post: 02-09-2005, 06:33 AM