C++ :: Audio Programming (wave Format)

May 31, 2012

I have problem with this code:

Code:
#include <string>
#include <fstream>
#include <iostream>
#include <cstdlib>
using namespace std;
// multiplier
const double MULTIPLIER = 0.0000001;

[Code] .....

It should cut wav files into smaller pieces using text file .lab (the values multiplied by * 0.0000001 gives time in second. For example, i have such file with recorded yes and no: [URL] ..... and such boundaries [URL] .... It all should be in the same folder, then, after puting "yesno.wav" into command line and press enter it should gives 2 files with yes and no words. But it doesnt - i obtained one file with silent and one short sound. The record is recorded by Audacity, default sample rate 44100, default sample format 16-bit.

View 10 Replies


ADVERTISEMENT

Visual C++ :: Make Transition From Console Programming To GUI Programming?

Nov 30, 2013

my a book or website where I can make a transition from console programming to GUI programming. I'm totally confused about this. I know how to program in console and can make a whole program based on console. I also know the OPP programming, but it's clear that nobody uses console programming anymore.

View 10 Replies View Related

C++ :: Mixer With Wave Files

Mar 11, 2013

I'm doing a mixer with wave files. I can play and even apply the reverse effect to them. the logarithm is like this:

for( unsigned int i=0; i<sampleCount/2; i++ )
{
// swapping with the other half
double temp = samples[i];
samples[i] = samples[sampleCount-i-1];
samples[sampleCount-i-1] = temp;
}

Now I want to apply these effects to the files: delay, slow, and fast but I don't know how to do it. The teacher told me that to do it slow I need to double the Samples so I tried to do this samples[i] = samples[sampleCount*2]; it does not work......Also I apply the contrary to do make the sound fast samples[i] = samples[sampleCount/2]; the samething I don't get the sound desired.

For the daley part I'm thinking on play the audio one without touch it and then repit it 8 times or more to create the delay.... I did it like this:

double temp = samples[i];
samples[i] = samples[sampleCount-i-1]+ (samples[sampleCount -i-1]*8);

It didn't work..why the use of -i-1 after sampleCount!!

View 1 Replies View Related

C++ :: How To Calculate X And Y In Sine Wave

Apr 24, 2012

I have the following initial code:

Code:
double objectAngle = -90.0f;
double objectSpeed = 3.0f; // meters per second
double objectDistance = 300.0f;
double objectTime = 0.0f;
double objectHeading = 90.0f;
double elapsedTimePerCycle = 1.0f;

My coordinate system looks like this:

Code:
90 y
|
|
|
+-180 -------------------- 0 x
|
|
|
-90

I want to calculate a new x,y such that it follows a sine wave like pattern until it gets to point (0,0). I want the width of the arc to go out to about -45 degrees, and the same on the other side to about -135 degrees.

How can I compute these new x,y coordinates in C++?

View 14 Replies View Related

C++ :: Sine Wave Movement With The Saucer

May 4, 2014

I am currently working on an arcade game for my final assignment this year. I am struggling to get a sine wave movement with the saucer. Here is the code for it:

void ArcadeGame::spawnSaucer() {
Texture* pTexture = getTexture("saucertexture");
m_pSaucer = new GameObject(pTexture, "saucer");
m_pSaucer -> setPosition(1000, 300);
m_pSaucer -> setVelocity(-1, 10 * sin(1 * 3 * PI / 180), sin(1) * OBJECT_DEFAULT_SPEED);
addGameObject(m_pSaucer);
m_pSaucer->setSolid(true);
}

View 8 Replies View Related

C/C++ :: Sine Wave - Printing Files To Excel

Mar 7, 2014

I need to create a sinewave. I have the values in an Excel file. The code reads the excel file and prints the values in the cmd but I need it to print back into excel as a sine wave. Pretty sure its currently values for a triangle wave but whatever I want a wave before I care about the type.

Description: Creates an array of values of a triangle wave, prints the result to the screen and creates a CSV (comma separated variable) file of data points. Allows user to enter number of amplitude and number of cycles

#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#define N_SAMPLES 1000 // crashes if array size > 1000?
#define UP 1
#define DOWN 0

[Code] ....

View 11 Replies View Related

C++ :: Boost Wave Tool Not Find Default Include Directory?

Jun 2, 2013

I have built the wave tool and now am trying to run my source code through it. But it just doesn't want to find the include directory. I just don't understand. Here's my command:

#include <stdio.h>
#include <vector>
#include <map>
#include <string>

Perhaps it how I built it since there is no info on how to do this? I just ran ../b2.exe from the boost_1_53_0/tools directory.

I'm running CYGWIN_NT-6.1-WOW64 TARDIS 1.7.18(0.263/5/3) 2013-04-19 10:39 i686 Cygwin with a g++ version of 4.5.3. g++ has no problem finding the default include directory (I don't have to specify the -I switch). The -I switch doesn't seem to work for any of the other include directories that I wan to use either, but I want this cleared up before I get into that since it might be related.

View 2 Replies View Related

C/C++ :: Immediate Audio Playback From Mic?

Sep 25, 2012

I want to develop a soft like Microphone,Other words for that I speak some words for mic, play from earphone immediately!

.h file

#define InBlocks 4 //input buffer numbers
#define OutBlocks 4  //output buffer numbers
#define  INP_BUFFER_SIZE 160  
pWaveHdr1=reinterpret_cast<PWAVEHDR>(malloc(sizeof(WAVEHDR)));
pWaveHdr2=reinterpret_cast<PWAVEHDR>(malloc(sizeof(WAVEHDR)));

[code].....

View 5 Replies View Related

C++ :: Audio Input / Output?

Feb 5, 2015

So I have a project in which I am processing audio signals in real-time. I want to create a class to do this using the ASIO driver. I don't want to use a cross platform library nor do I want to use windows API as it is very slow.

View 2 Replies View Related

C++ :: Playing Audio File?

Jan 5, 2013

i have a audio file that i want to play via C+.

View 4 Replies View Related

C# :: Possible To Send Audio Over Mic Stream?

Mar 10, 2014

I'd like to be able to output sound over skype as if it were coming from my headset, how would I go about this?

View 1 Replies View Related

C# :: Audio Visualization For RGB STRIP

Apr 7, 2015

I have a RGB STRIP connected to Arduino, when im communicating via Serial. All works great! So next i wanted to make some audio visualisation.. So i found some samples etc.. and then i created the Audio Visualisation via C# using BASS.NET, when R has been BASSes, G medium frequency and B high frequency. But isnt looking good, so i started thinking, what 3 variables in song has can use, but this is bad idea.. I got idea to change to random color when its get "beat" or BASS hit some value. I tryied 4 hours of doing it, searching, programming... But i cant do it...

So, my question is how to detect the beat or just anything event for Audio Visualisation. Best output form WASAPI. Only what i can do is get FFT and Audio Spectrum from WASAPI by BASS.NET, but thats all. My audio skills is so low for this.

View 4 Replies View Related

C/C++ :: Audio Playing With Irrklang?

Apr 4, 2014

I tried playing audio using irrKlang in openGL.But i ended up with some problems.

I have attach my source file and also my output file here.

View 2 Replies View Related

C :: Creating Custom Audio Function

Apr 2, 2013

I'm trying to make a windows-focused , I will make it portable after , audio function that plays sounds according to my midi file. I know there is playsound, but it's not what I desire. I'm curious if Beep plays through the sound card or is similar to printf("a") ? I'm just looking for a low level solution.

View 1 Replies View Related

C :: Opening Audio File Using Language

Sep 6, 2013

how to open an audio file using c. write a code to open an audio file.

View 2 Replies View Related

C++ :: Giving Audio Input To A Program

Sep 27, 2013

I want to give audio-input to a FFT code (KissFFT) written in C, on a real-time basis. While I can give a simple test signal (like sine wave) by writing the sine function as input, I am not sure how I should convert an audio-signal (e.g.: song) into a form that can be taken as input by the KissFFT C code.

View 3 Replies View Related

C++ :: How To Start Coding Audio Synthesizers

Mar 20, 2013

I'm interested in learning how to write the software for audio synthesizers. a friend of mine started on the hardware side for them and, as i have no experience with this type of code.

View 7 Replies View Related

C++ :: Radio Station - Streaming Audio On The Web

Jan 22, 2013

work for a radio station as their webmaster, and we have been looking into online streaming options for the last few months for our website. Pretty much everyone charges a monthly fee for this type of service and I feel like it is something I am capable of doing myself.

At the station we have a computer dedicated to operating the music/talk. On this computer there is a program that ques all the music, ads, ect.. This would be my audio source: Either the program playing all the music, or the computer itself.

The problem I have been pondering all night is how would I access this input source? The only audio input I am familiar with accessing is .mp3 or .wav files. How can I code my program to access this audio the program is producing and stream it to people on the web?

View 1 Replies View Related

C++ :: WaveinOpen - How To Choose Audio Channel

Feb 12, 2015

I'm using waveinOpen to capture sound from my microphone. I know how to set how many channels to use, but how do you tell it what channel to use - left or right?

View 6 Replies View Related

C++ :: Pulse Output Through The Audio Jack?

Dec 12, 2014

know of a code snippet that will send a pulse to either the left or right channel of the audio jack and stop the pulse when desired?

Platform is windows 7 or 8.

View 1 Replies View Related

C/C++ :: Convert Video To Audio File?

Jan 23, 2014

I making a application which convert video to audio in MFC. i want make it without using FFMPEG . How can it possible.

View 1 Replies View Related

C :: Can Play Audio Without Extra Window Showing?

Jul 7, 2013

I got this code from a wiki that taught me how to make C code that plays audio, and with a few changes I was able to get it to take a command-line argument as the music file name. Here it is

Code:
#include <stdio.h>
#include <stdlib.h>
#include <SDL/SDL.h>
#include <SDL/SDL_mixer.h>

int main(int argc, char *argv[])

[Code] ....

The only problem is, even though I guess it needs to create a window to work with SDL, is there any way you could hide it or something so the user can't see it? I don't really want to see it ( I'm planning on running it from Batch files or C applications as an easy way to play an audio file once ), because if I did, I might as well just use a default audio player instead.

View 3 Replies View Related

C/C++ :: How To Get Audio Input And Store In Text File

Feb 20, 2015

I am trying to get user's voice as an audio input to a c++ program and store it in a text file (.txt)

I have been searching over the web to find some kind of library or something like OpenCV(video library) for while now but nothing seems to be there.

View 2 Replies View Related

C++ :: Convert File (Audio / Image / Video) To Base64?

Sep 7, 2014

I'm looking to convert audio, images, video to base64 in c++, and through many searches on the web I've only seem to come up with string > base64.

When I view a .mp3 file for example, there are many characters there that are not available to be used in my string to encode.

[URL] ....

I have this code set up in my project, and all I want is to be able to give the location of any file and have it encode (could just encode to a string, I can handle writing it to a file), and then give a location to put the decoded file as well.

I'm not sure exactly where to even start.

View 6 Replies View Related

C++ :: Play Audio File As Background While Executing Other Operations

Jun 6, 2013

I need to make a program which can play a audio file as background while executing other operations .

View 4 Replies View Related

C :: Program That Implements Audio Effect / Process Without Using External Libraries

Aug 1, 2013

The brief is to write a program that implements a musically-interesting or musically-useful audio effect/process in C without external libraries other than those prescribed (PortMedia/PortMIDI/PortSMF/PortAudio, Libsndfile).

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved