Skip to content

Instantly share code, notes, and snippets.

@josephernest
josephernest / wave.py
Last active March 24, 2022 17:23
wave.py (enhanced)
# wave.py (Enhanced)
# Date: 2018/04/30 Joseph Ernest
#
# URL: https://gist.github.com/josephernest/e3903ba30b820cd199500e50f145a11f
# Source: Lib/wave.py
#
# Added:
# * IEEE support
# * 24 bit support
# * cue + loops markers support
@josephernest
josephernest / wavfile.py
Last active March 17, 2024 02:54
wavfile.py (enhanced)
# wavfile.py (Enhanced)
# Date: 20190213_2328 Joseph Ernest
#
# URL: https://gist.github.com/josephernest/3f22c5ed5dabf1815f16efa8fa53d476
# Source: scipy/io/wavfile.py
#
# Added:
# * read: also returns bitrate, cue markers + cue marker labels (sorted), loops, pitch
# See https://web.archive.org/web/20141226210234/http://www.sonicspot.com/guide/wavefiles.html#labl
# * read: 24 bit & 32 bit IEEE files support (inspired from wavio_weckesser.py from Warren Weckesser)
/*
* Copyright (C) 2004 Baron Schwartz <baron at sequent dot org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, version 2.1.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more