Comments (5)
i should add that were this a write problem, then it might be related to issue #7. also, here's my version info:
julia> versioninfo()
Julia Version 0.3.0-prerelease+1578
Commit 052869f* (2014-02-14 13:00 UTC)
Platform Info:
System: Linux (x86_64-redhat-linux)
CPU: Intel(R) Xeon(R) CPU E5645 @ 2.40GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
LAPACK: libopenblas
LIBM: libopenlibm
julia> Pkg.status()
6 required packages:
- ClusterManagers 0.0.1
- Debug 0.0.0
- Devectorize 0.2.1
- Distributions 0.3.4
- MAT 0.2.2
- WAV 0.2.2
7 additional packages:
- ArrayViews 0.4.0
- BinDeps 0.2.12
- HDF5 0.2.17
- NumericExtensions 0.4.3
- StatsBase 0.3.6
- URIParser 0.0.1
- Zlib 0.1.3
from wav.jl.
The wavwrite function uses the PCM format by default. You need to specify IEEE float (compression=WAVE_FORMAT_IEEE_FLOAT) when you write the file:
wavwrite(tmp,"foo.wav"; nbits=32, compression=WAVE_FORMAT_IEEE_FLOAT)
from wav.jl.
ahah, that works. the documentation though says that if the data are floats and nbits is 32 then the output format is single, and makes no mention of the compression format there. perhaps the table needs to be updated?
also, i've uncovered another related error:
julia> tmp=rand(Float32,(10,2))
10x2 Array{Float32,2}:
0.402853 0.359412
0.839331 0.918946
0.37568 0.355417
0.631095 0.914516
0.529367 0.796124
0.771321 0.21159
0.464903 0.874699
0.396011 0.121397
0.149417 0.0536192
0.470153 0.17993
julia> wavwrite(tmp,"foo.wav"; compression=WAVE_FORMAT_IEEE_FLOAT)
ERROR: 16 bits is not supported for WAVE_FORMAT_IEEE_FLOAT.
in error at error.jl:21
in ieee_float_container_type at /Users/arthurb/.julia/WAV/src/WAV.jl:201
in write_ieee_float_samples at /Users/arthurb/.julia/WAV/src/WAV.jl:322
in write_data at /Users/arthurb/.julia/WAV/src/WAV.jl:348
in wavwrite at /Users/arthurb/.julia/WAV/src/WAV.jl:436
in wavwrite at /Users/arthurb/.julia/WAV/src/WAV.jl:442
from wav.jl.
I will look into changing the default nbits value when the compression is set to WAVE_FORMAT_IEEE_FLOAT.
I will also push a change into the documentation, unless you submit a pull request first. You can edit README.md through the github web interface and create a pull request.
from wav.jl.
I finally got around to working on this. Let me know if I missed anything.
from wav.jl.
Related Issues (20)
- Caption for WAV display HOT 3
- Extra \0 bytes in RIFF INFO tags causes wav_info_read() to raise ArgumentError HOT 2
- Buggy interaction with Gtk.jl HOT 2
- wavread needs a "float" data type
- WAV.jl not reading wav files with incorrect file size in header HOT 3
- 256x smaller values using "native" format HOT 5
- wavrecord and simultaneous play and record HOT 7
- Support Julia v0.7? HOT 9
- Artifacts in sound played by wavplay HOT 8
- Playing with @async is blocking HOT 7
- wavplay example not working on Linux HOT 16
- wavread with subrange of step >1 gives wrong result HOT 4
- Add some support for reading from pipe HOT 2
- `wavplay(y, fs)` does not work HOT 11
- Chunk padding not recognized HOT 3
- TagBot trigger issue HOT 3
- Slower loading because of GC issue
- Affiliate this package with JuliaAudio HOT 4
- Read operations do not start at the start of the file
- wavread cannot access a sample number 59614786 or higher HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wav.jl.