This is a Julia package to read and write the WAV audio file format.
wavappend functions to read,
write, and append to WAV files. The function
wavplay provides simple
These functions behave similarly to the former MATLAB functions of the same name.
julia> ] pkg> add WAV
The following example generates waveform data for a one second long 1 kHz sine tone, at a sampling frequency of 8 kHz, writes it to a WAV file and then reads the data back. It then appends a 2 kHz tone to the same file and plays the result.
using WAV fs = 8e3 t = 0.0:1/fs:prevfloat(1.0) f = 1e3 y = sin.(2pi * f * t) * 0.1 wavwrite(y, "example.wav", Fs=fs) y, fs = wavread("example.wav") y = sin.(2pi * 2f * t) * 0.1 wavappend(y, "example.wav") y, fs = wavread("example.wav") wavplay(y, fs)
Experimental support for reading and writing
chunks has been added in version 1, via the functions
wav_info_write. See their
respective help text for details.
4 days ago