wav

Audio Equalizer in Ruby

怎甘沉沦 提交于 2019-12-10 10:54:52
问题 I am working (well, playing...) in ruby, attempting to create some useful audio tools. Not anything live, not something like a midi synthesizer or live action filters or an mp3 player. What I am making are simple tools that open a .wav file, modify it, and save it. I have good generators (square, sine, noise, triangular, sawtooth, etc... and more!). I have an envelope filter with which I am comfortable. I have a good tremolo (automatic envelope filter). The closest thing I have to a low-pass,

How To Track No Sound Area In A Wav File?

梦想的初衷 提交于 2019-12-10 10:45:02
问题 How to track sections without sounds in a wav file? a small software what I want to develop is deviding a wav file, and it consider a no volume area as a deviding point. how can a program know that volume of a wav file is low? I'll use Java or MFC. 回答1: I've had success with silence detection by calculating RMS of the signal. This is done in the following manner (assuming you have an array of audio samples): long sumOfSquares = 0; for (int i = startindex; i <= endindex; i++) { sumOfSquares =

iPhone SDK: Play a single WAV from a button

对着背影说爱祢 提交于 2019-12-10 10:38:19
问题 I am currently trying out this code: NSString *path = [[NSBundle mainBundle] pathForResource:@"dream" ofType:@"m4a"]; AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; theAudio.delegate = self; [theAudio play]; However, the SDK says that the ViewController does not implement the AVAudioPlayer Delegate. Any body any ideas on how to play a WAV (or M4a) using the 2.2 SDK? 回答1: You need to add <AVAudioPlayerDelegate> to the end of your

Simple Wav comparison in Java

╄→尐↘猪︶ㄣ 提交于 2019-12-10 10:25:27
问题 I seem to be having a huge problem with something that seems very trivial. Goal : Try to compare two Wav files and see if one(small file) is part of the other(large file). Test : First, I took a 1 minute long piece of audio and exported 30 seconds of it to another file. I first tried to simply read in the byte[] data and look at it via logs, and there's absolutely no correlation even though they are both from the same source file? I then tried using libraries such as WavFile, and MusicG but I

Playing wav sound file with AVFoundation

心已入冬 提交于 2019-12-10 10:18:10
问题 I am using AVFoundation to play wav files. But i could not make it play. Also no errors or warnings showed up. XCode is 4.2 and device is iOS 5. - (IBAction) playSelectedAlarm:(id)sender { UIButton *button = (UIButton *)sender; int bTag = button.tag; NSString *fileName = [NSString stringWithFormat:@"%d23333", bTag]; NSLog(@"%@", fileName); NSString *path = [[NSBundle mainBundle] pathForResource:fileName ofType:@"wav"]; NSURL *fileURL = [[NSURL alloc] initFileURLWithPath: path]; AVAudioPlayer

wav amplitude in java (stereo or more channels)

安稳与你 提交于 2019-12-10 10:12:27
问题 Hi does anyone know how to find the amplitudes within a WAV file in Java? If the file was stereo (or has more channels) how can the data be put into arrays? Thanks! 回答1: Processing a WAV file header Next trick is a bit more of a challenge as the internal data format could be a variety of data types. If you are looking at your classic windows WAV file, it is probably just PCM 16 bit or maybe 8 bit. Which, means, you can easily load the data into a byte or short array. However, you will find

Coverting PCM 16bit LE to WAV

北城以北 提交于 2019-12-10 10:06:48
问题 I'm trying to write a program in C that converts a captured Raw 16kHz PCM 16-bit file to a 16-bit WAV . I've read some posts and people recommended using libsox . Installed it and now i'm really struggling with understanding the man-page. So far (by reading the example in the source dist) I've figured out that the structs : sox_format_t sox_signalinfo_t can probably be used to describe the data I'm inputting. I also know how much info i'm processing (time) if that is somehow necessary? Some

Increase/Decrease Play Speed of a WAV file Python

半世苍凉 提交于 2019-12-10 09:23:48
问题 I want to change play speed (increase or decrease) of a certain WAV audio file using python wave module. I tried below thing : Read frame rate of input file. Double the frame rate. Write a new wave file with increased frame rate using output_wave.setparams() function. But its not working out. Please suggest. Thanks in Advance, 回答1: WOW! if you no matter to change the pitch when you increase or decrease the speed, you can just change the sample rate ! Can be very simple using python: import

How create .wav file with a custom frequency tone / wave?

不羁的心 提交于 2019-12-10 09:07:54
问题 I have a problem with my wave generator. I'm trying to create a .wav file with sound of given frequency. The code I use: $freqOfTone = 21000; $sampleRate = 44100; $samplesCount = 80000; $amplitude = 0.25 * 32768; $w = 2 * pi() * $freqOfTone / $sampleRate; for ($n = 0; $n < $samplesCount; $n++) { $data->samples[1][] = 32768 + (int)($amplitude * sin($n * $w)); } Unfortunately, the output wave is incorrect, I get few frequencies instead of one: http://i49.tinypic.com/ab1nx0.png It should look

Finding the 'volume' of a .wav at a given time

天涯浪子 提交于 2019-12-10 06:28:04
问题 I am working on a small example application for my fourth year project (dealing with Functional Reactive Programming). The idea is to create a simple program that can play a .wav file and then shows a 'bouncing' animation of the current volume of the playing song (like in audio recording software). I'm building this in Scala so have mainly been looking at Java libraries and existing solutions. Currently, I have managed to play a .wav file easily but I can't seem to achieve the second goal.