Questions tagged [wave]

This tag is for questions about the Python module wave - for working with the .wav sound format. FOR GENERAL WAV QUESTIONS, not related to Python, please use the [wav] tag.

The wave module provides a convenient interface to the WAV sound format. It does not support compression/decompression, but it does support mono/stereo.

It's recommended to use this tag in connection with , due to the colloquial meaning of wave (ex. in math or physics)

498 questions
2
votes
1 answer

Cleaning generated Sinewave artifacts for smooth frequency transitions

I'm a python beginner and as a learning project I'm doing a SSTV encoder using Wraase SC2-120 methods. SSTV for those who don't know is a technique sending images through radio as sound and to be decoded in the receiving end back to an image. Wraase…
John Rudy
  • 23
  • 3
2
votes
1 answer

Compare similarity between two audio signals (singing recordings) in Python

I'm working on a project to compare how similar someone's singing is to the original artist. Mostly interested in the pitch of the voice to see if they're in tune. The audio files are in .wav format and I've been able to load them with the wave…
ortunoa
  • 345
  • 4
  • 11
2
votes
1 answer

Combining wav files with space between in Python

I'm looking to combine wave files in Python with silence between them. The code here using wave works perfectly well: How to join two wav files using python? But I need to put some space between the files so that different pairs of files are spaced…
2
votes
2 answers

Defference of wave.readframes() and librosa.load()

I am loading the wave file in both method wave.readframes() and librosa.load() import librosa import wave sample_wave = './data/mywave.wav' #open file and stft by librosa a, sr = librosa.load(sample_wave,sr=44100) print(len(a)) print(a) #open…
whitebear
  • 11,200
  • 24
  • 114
  • 237
2
votes
1 answer

Making a wavetable synth for the first time...Can somebody point me in the right direction?

I'm trying to make a wavetable synthesizer in Python for the first time (based off an example I found here https://blamsoft.com/tutorials/expanse-creating-wavetables/) but the resultant sound I'm getting doesn't sound tonal at all. My output is just…
2
votes
2 answers

Java - Trouble combining more than 2 .wav files

for a project I'm working on, I want to be able to concatenate multiple .wav files. Through my research I was able to come up with this code: File sample1 = new File("F:\\Programming\\Resources\\Java_Sound\\trumpet1.wav"); File sample2 = new…
Pojo226
  • 45
  • 1
  • 5
2
votes
1 answer

Create infinite WAV file in python

Is it possible to create an "infinite" WAV file, that can be appended? I want to continously record audio and write it into a WAV file, but I can't overwrite the file to save it as new. The reason is that I want to use ist as basis of streaming with…
2
votes
0 answers

Can I raise from wave.open() without it trying to close the file?

I have some code that generates audio, and sometimes raises due to different reasons. I want to write the audio generated straight into a wav file. However, due to being inside the waves context via with, wave tried to close the file. Now that is…
BIOStheZerg
  • 396
  • 4
  • 19
2
votes
1 answer

find wave discontinuity by using fourier transform( wav file's tick noise)

audio_sample, sampling_rate = librosa.load('a.wav', sr=None) S = np.abs(librosa.stft(audio_sample, n_fft=1024, hop_length=512, win_length=1024, window=signal.hann)) mag_db = librosa.amplitude_to_db(S) mag_n =…
2
votes
4 answers

Convert .wav file to binary and then back to .wav?

I'm doing a project in java which requires me to encrypt a wave file. So, is there a straight forward process to convert a wave file into binary and back? I'll be applying an encryption algorithm on the binary data.
Uday Kanth
  • 361
  • 3
  • 9
  • 16
2
votes
0 answers

Trying to write a shader for grass with one motionless and one swingin end

This is a shader for algae, I need to result so that one end is almost motionless and the other is swinging. The Problem: Currently everything is swinging. How can I change this so only one end is swinging? Shader "Custom/SwayingGrassHalloween" { …
Raistlin
  • 31
  • 2
2
votes
1 answer

Using FFMPEG to extract multichannel audio from Quicktime

So I have a quicktime file with proxy video content and 8 audio tracks. I need to extract the audio into a single multichannel wave file. I think this is probably pretty simple, but I can't find the solution. What I have: ffmpeg -i input.mov -c:a…
2
votes
0 answers

Smoothly transitioning audio sinewave using python

I‘m a python noobie and I‘m looking to create a sinewave tone generator in python. I would like it to transition smoothly (between frequencies) in realtime. Pseudo-Code: i = 1 while i <= 1000: play(frequency_hz = i) i =+ 1 You would hear a…
Syirrus
  • 61
  • 1
  • 4
2
votes
1 answer

Advice for decoding binary/hex WAV file metadata - Pro Tools UMID chunk

Pro Tools (AVID's DAW software) has a process for managing and linking to all of it's unique media using a Unique ID field, which gets embedded in to the WAV file in the form of a umid metadata chunk. Examining a particular file inside Pro Tools, I…
2
votes
1 answer

Sawtooth wave Function for integers Javascript

Saby people, I'm trying to write the function which will map this --> ...-5|-4|-3|-2|-1| 0| 1| 2| 3| 4| 5| 6| 7| 8| 9... to this --> ... 3| 0| 1| 2| 3| 0| 1| 2| 3| 0| 1| 2| 3| 0| 1... Ideally if I enter myFunc(-1,4) it will return 3 the second…
Manvel A.
  • 33
  • 5