wav

Playing a .WAV file in .NET

…衆ロ難τιáo~ 提交于 2019-11-28 23:43:20
I'm trying to write a SAMPLER program, where each key has a different sound (a WAV file). Can someone explain to me or give me a link to an explanation where i can learn how to play the WAV files? If it matters, I'm working with Microsoft Visual C# and using WinForms. SoundPlayer simpleSound = new SoundPlayer(strAudioFilePath); simpleSound.Play(); use fmod, which is simply the best sound library in the whole universe fortunately, they seem to provide a C# wrapper for the best audio API you could try to imagine, and you won't have to change a single line of code to make your code working on

ffmpeg to convert from flac to wav

青春壹個敷衍的年華 提交于 2019-11-28 23:17:32
I need to convert a flac file to a wav file without changing sample rate and bit depth. As far as I know changing these properties may distort the audio, so how do i specify them not to be changed? Also, is there any way to prevent metadata to be written to the output file? Multimedia Mike As rogerdpack commented, the command line: ffmpeg -i inputfile.flac output.wav should do exactly what you want. Addressing your concerns about keeping the resulting audio intact, FLAC is a lossless format and decoding it to raw PCM stored in a WAV file will keep perfect fidelity. The only thing you might

Processing Audio Data using Fourier Transforms in Java

余生颓废 提交于 2019-11-28 22:59:07
问题 I'm trying to process audio data. I'm working with Java. I've extracted the audio data to an array. Now I should pass N data samples to a function that calculates the Discrete Fourier Transform (or Fast Fourier Transform, which is more efficient). I've read documentation but I'm getting more and more confused. What I'm trying to calculate is the magnitude spectrum (|X(k)|). Can anyone help me? Thanks 回答1: Richard G. Baldwin has a number of very good articles on Fast Fourier Transform

wav-to-midi conversion

情到浓时终转凉″ 提交于 2019-11-28 20:52:09
I'm new to this field - but I need to perform a WAV-to-MIDI conversion in java. Is there a way to know what exactly are the steps involved in WAV-to-MIDI conversion? I have a very rough idea as in you need to; sample the wav file, filter it, use FFT for spectral analysis, feature extraction and then write the extracted features on to MIDI. But I cannot find solid sources or papers as in how to do all that? Can some one give me clues as in how and where to start? Are there any Open Source APIs available for this WAV-to-MIDI conversion process? Advance thanks It's a more involved process than

Real low level sound generation in C#?

China☆狼群 提交于 2019-11-28 19:42:34
Anyone knows of a sensible way to create an ARBITRARY sound wave in C# and play it back from the speakers? This issue has been coming back to every now and then for years, I always end up giving it up after a lot of failure without finding a solution. What I want to do is like a reverse-visualizer, that is, I don't want to generate "numbers" from sound, I want to generate sound from numbers. Like get a function that I provide with sample rate, sample size, and the sound data (an array of integers for example), and it would generate the appropriate wav file from it (real-time sound playback

How to extract semi-precise frequencies from a WAV file using Fourier Transforms

陌路散爱 提交于 2019-11-28 18:26:43
Let us say that I have a WAV file. In this file, is a series of sine tones at precise 1 second intervals. I want to use the FFTW library to extract these tones in sequence. Is this particularly hard to do? How would I go about this? Also, what is the best way to write tones of this kind into a WAV file? I assume I would only need a simple audio library for the output. My language of choice is C To get the power spectrum of a section of your file: collect N samples, where N is a power of 2 - if your sample rate is 44.1 kHz for example and you want to sample approx every second then go for say N

Converting WAV to any compressed audio format in client-side JavaScript

孤街醉人 提交于 2019-11-28 16:13:41
I am recording audio from getUserMedia({audio:true}); in the browser using Recorder.js and then exporting it as a WAV file because that's the only option the library provides. A 1 minute 20 seconds file is 14.1 MB large. I need to upload the audio to a server and I need to do it fast. How do I convert the WAV audio in any other compressed format to lower the file size? I don't mind converting to: MP3 Opus WebM Ogg FLAC any other format you know of If there is no way as of now to convert to any of these formats, how can I compress the WAV file on the client? PS: I did a lot of searches to find

Android MediaPlayer.Create() returns null

北城余情 提交于 2019-11-28 13:56:24
I am developing an Android App that plays some sounds. For that I am creating an object of MediaPlayer. Below is the code: mp = MediaPlayer.create(this, R.raw.testSound); Here mp is null for Android 2.3.3 (API Level 10), i tried with other versions of Android (2.1, 2.2 etc.) it works fine. However with Android 2.3.3 (API Level 10) MediaPlayer.create() call returns null. The sound file (testSound.wav) is a wav file. I tried parsing the wav file to see if it is corrupted or not. It seems just fine. Also, I could play this sound file using Windows Media Player. Here's the testSound.wav file:

how to convert or record .wav file in 16khz 16bit mono little-endian?

微笑、不失礼 提交于 2019-11-28 12:36:05
I m just implementing sphinx4 speech recognition in java..whta i need is how to record sound or convert any sound .wave file in to 16khz 16bit mono little-endian file. had search a lot for this..but no specific guidance i have got..hope anyone from stack overflow family can help me out or give me a proper guidance in that. 1). i need to just record audio in android with the 16khz 16bit mono little-endian file format in wave file or 2). i need to convert the prerecorded file with any sampling rate with the 16khz 16bit mono little-endian format in java.. i need to implement one of above feature.

How do I write a 24-bit WAV file in Python?

末鹿安然 提交于 2019-11-28 12:02:04
I want to generate a 24-bit WAV-format audio file using Python 2.7 from an array of floating point values between -1 and 1. I can't use scipy.io.wavfile.write because it only supports 16 or 32 bits. The documentation for Python's own wave module doesn't specify what format of data it takes. So is it possible to do this in Python? Another option is available in wavio (also on PyPI: https://pypi.python.org/pypi/wavio ), a small module I created as a work-around to the problem of scipy not yet supporting 24 bit WAV files. The file wavio.py contains the function write , which writes a numpy array