wave

Generating waveform from any music file ios

非 Y 不嫁゛ 提交于 2019-12-02 16:56:53
I'm looking for how to draw the sound waves according to music. I want waves like this image here is some discussion about displaying Waves from music WaveForm on IOS rendering a waveform on an iphone audio waveform visualisation with iPhone Github Example Links https://github.com/gyetvan-andras/cocoa-waveform https://github.com/benalavi/waveform https://github.com/JingWZ/WaveView https://github.com/gyetvan-andras/cocoa-waveform https://github.com/ioslovers/ATTabandHoldAudioRecord https://github.com/hezone/ECGWavesPlayer https://github.com/iluvcapra/JHWaveform But not getting any idea about

Issues with scipy.io wave file processing after applying fourier transforms

大兔子大兔子 提交于 2019-12-01 11:01:23
I'm working with some audio files in Python using scipy.fftpack and scipy.io packages. What this implies is I have wave files that I am importing, playing around with them using Fourier transforms, and then outputting to a new wave file. I am however having running into issues where in after running these transforms, the wave file will not play and is roughly 4 times the size of the original file. Currently I'm just importing the song, taking the rate, data pieces from the import, doing ifft(fft(data)) and then outputting this. I have tried taking these float values and converting it to

Issues with scipy.io wave file processing after applying fourier transforms

前提是你 提交于 2019-12-01 08:14:29
问题 I'm working with some audio files in Python using scipy.fftpack and scipy.io packages. What this implies is I have wave files that I am importing, playing around with them using Fourier transforms, and then outputting to a new wave file. I am however having running into issues where in after running these transforms, the wave file will not play and is roughly 4 times the size of the original file. Currently I'm just importing the song, taking the rate, data pieces from the import, doing ifft

reading a WAV file from TIMIT database in python

风格不统一 提交于 2019-12-01 05:55:22
I'm trying to read a wav file from the TIMIT database in python but I get an error: When I'm using wave: wave.Error: file does not start with RIFF id When I'm using scipy: ValueError: File format b'NIST'... not understood. and when I'm using librosa, the program got stuck. I tried to convert it to wav using sox: cmd = "sox " + wav_file + " -t wav " + new_wav subprocess.call(cmd, shell=True) and it didn't help. I saw an old answer referencing to the package scikits.audiolab but it looks like it is no longer supported. How can I read these file to get a ndarray of the data? Thanks Your file is

reading a WAV file from TIMIT database in python

≯℡__Kan透↙ 提交于 2019-12-01 03:34:11
问题 I'm trying to read a wav file from the TIMIT database in python but I get an error: When I'm using wave: wave.Error: file does not start with RIFF id When I'm using scipy: ValueError: File format b'NIST'... not understood. and when I'm using librosa, the program got stuck. I tried to convert it to wav using sox: cmd = "sox " + wav_file + " -t wav " + new_wav subprocess.call(cmd, shell=True) and it didn't help. I saw an old answer referencing to the package scikits.audiolab but it looks like

Drawing sine waves effeciently in android

半世苍凉 提交于 2019-11-30 16:08:16
问题 I am making an app where I need to draw a sine wave between two given points. I have Google'd, and Google'd, and I haven't found anything that I have found suitable. So my question is, is there an efficient way in android to use some pre defined points to draw a smooth wave like form? thank you for any help in advance 回答1: You can use the android.graphics.Path class to construct a set of quadratic or cubic Bézier spline curves between your set of control points. 来源: https://stackoverflow.com

Drawing sine waves effeciently in android

泄露秘密 提交于 2019-11-30 15:59:47
I am making an app where I need to draw a sine wave between two given points. I have Google'd, and Google'd, and I haven't found anything that I have found suitable. So my question is, is there an efficient way in android to use some pre defined points to draw a smooth wave like form? thank you for any help in advance You can use the android.graphics.Path class to construct a set of quadratic or cubic Bézier spline curves between your set of control points. 来源: https://stackoverflow.com/questions/6501183/drawing-sine-waves-effeciently-in-android

Simultaneous record audio from mic and play it back with effect in python

天涯浪子 提交于 2019-11-30 15:57:30
My goal is to record my voice through the laptop mic and simultaneously adding an effect to it, in python. What I need is similar to a music effects pedal where you connect a guitar or mic and it adds reverb or echo or distortion, etc. I am using 'pyaudio' and 'wave' to record and play back audio. Using 'scikits.audiolab' to import audio as a array and to be able to edit this array with with functions such as invert, clip, tile, etc. This manipulation of the audio array lets me "add" effects to the original audio. I am having a problem, which isn't really a problem, it's just not the effect I

Change the volume of a wav file in python

倖福魔咒の 提交于 2019-11-30 07:03:17
I have a 2 seconds 16bit single channel 8khz wav file and I need to change its volume. It should be quite straightforward, because changing the volume is the same as changing the amplitude of the signal, and I just need to attenuate it, that is to multiply it for a number between 0 and 1. But it doesn't work: the new sound is lower but VERY full of noise. What am I doing wrong? Here is my code: import wave, numpy, struct # Open w = wave.open("input.wav","rb") p = w.getparams() f = p[3] # number of frames s = w.readframes(f) w.close() # Edit s = numpy.fromstring(s, numpy.int16) * 5 / 10 # half

how to convert wav file to float amplitude

元气小坏坏 提交于 2019-11-30 02:28:30
so I asked everything in the title: I have a wav file (written by PyAudio from an input audio) and I want to convert it in float data corresponding of the sound level (amplitude) to do some fourier transformation etc... Anyone have an idea to convert WAV data to float? I have identified two decent ways of doing this. Method 1: using the wavefile module Use this method if you don't mind installing some extra libraries which involved a bit of messing around on my Mac but which was easy on my Ubuntu server. https://github.com/vokimon/python-wavefile import wavefile # returns the contents of the