Git Product home page Git Product logo

wav.jl's Introduction

WAV.jl

Build status codecov

This is a Julia package to read and write the WAV audio file format.

WAV provides wavread, wavwrite and wavappend functions to read, write, and append to WAV files. The function wavplay provides simple audio playback.

These functions behave similarly to the former MATLAB functions of the same name.

Installation

julia> ]
pkg> add WAV

Getting Started

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)

News

Experimental support for reading and writing CUE and INFO chunks has been added in version 1, via the functions wav_cue_read, wav_cue_write, wav_info_read, wav_info_write. See their respective help text for details.

Other Julia Audio Packages

LibSndFile is another Julia audio file library. It supports more file formats (including WAV) and implements a more powerful playback interface, all based on libsndfile.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.