Audio Manipulation in C++

Audio software developers forum.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
JamesBranstonMusic
Posts: 4
Joined: Wed Dec 01, 2010 4:04 pm
Operating System: Please select

Audio Manipulation in C++

Post by JamesBranstonMusic » Mon Mar 21, 2011 3:11 pm

Hi all. I hope this is the right place to post this.

I am a music technology student and I've recently picked up learning C++ as it would greatly help my career knowing a programming language, especially this one since it is used in the video games industry.

Anyways onto the main topic. What I want to create is a program (in C++) that lets the user load a 16bit linear PCM WAVE file. Then I want to manipulate the audio sample data within that wave file. I want to either remove every nth sample or randomise them within a certain parameter (±10%). Then write it as a new WAVE file.

I am familier with the structure of WAVE files and the RIFF header. I also at the moment use Xcode as my IDE (since my macbook pro is my work computer), but I can code on my PC if necessary using codeblocks.


So in simple terms it should display something similar to this? I know there are errors in this, just so you get an idea of what I'm after:

Code: Select all

#include <iostream>
using namespace std;

class main()	//function start
{
	string fileinput;	//variable
	string outlocation;	//variable
	
	cout << "please type file path directory: n n";
	cin >> fileinput;	//navigate to file by typing
	
	cout << "Where would you like to save new file? n n";
	cin >> outlocation;	//select output by typing
	
	// Then all the maths and manipulation is done
	
	cout << "Your file has been created at ";
	cout << outlocation;
	cout << "n n";
	
	system("pause");
	
	return 0;
}


Is it possible to do this in Xcode, if at all? What libraries would I need? I hope its simpler than I think it is.

Thankyou for your help and time.

James

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Audio Manipulation in C++

Post by Gale Andrews » Wed Mar 23, 2011 10:20 pm

James,

Mac developers rarely hang round on the Forum. You could try subscribing to audacity-devel mailing list and asking (gently) for a few pointers. We are very busy working up to a new 1.3.13 Beta release.

Thanks


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Post Reply