在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:ssfrr/AudioIO.jl开源软件地址:https://github.com/ssfrr/AudioIO.jl开源编程语言:Julia 100.0%开源软件介绍:AudioIO.jlJuliaAudio family of packages for audio-related work in JuliaThis package is no longer being maintained. I suggest you check out theAudioIO interfaces to audio streams, including real-time recording, audio
processing, and playback through your sound card using PortAudio. It also
supports reading and writing audio files in a variety of formats. It is under
active development and the low-level API could change, but the basic
functionality (reading and writing files, the File I/OFile I/O is handled by libsndfile, so
we can support a wide variety of file and sample formats. Use the
f = AudioIO.open("data/never_gonna_give_you_up.wav")
data = read(f)
close(f) Or to hand closing the file automatically (including in the case of unexpected
exceptions), we support the data = AudioIO.open("data/never_gonna_let_you_down.wav") do f
read(f)
end By default the returned array will be in whatever format the original audio file is (Float32, UInt16, etc.). We also support automatic conversion by supplying a type: data = AudioIO.open("data/never_gonna_run_around.wav") do f
read(f, Float32)
end Basic Array PlaybackArrays in various formats can be played through your soundcard. Currently the native format that is delivered to the PortAudio backend is Float32 in the range of [-1, 1]. Arrays in other sizes of float are converted. Arrays in Signed or Unsigned Integer types are scaled so that the full range is mapped to [-1, 1] floating point values. To play a 1-second burst of noise: julia> v = rand(44100) * 0.1
julia> play(v) AudioNodesIn addition to the basic To explictly do the same as above: julia> v = rand(44100) * 0.1
julia> player = ArrayPlayer(v)
julia> play(player) To generate 2 sin tones: julia> osc1 = SinOsc(440)
julia> osc2 = SinOsc(660)
julia> play(osc1)
julia> play(osc2)
julia> stop(osc1)
julia> stop(osc2) All AudioNodes must implement a AudioStreamsAudioStreams represent an external source or destination for audio, such as the
sound card. The AudioStream is an abstract type, which currently has a PortAudioStream subtype that writes to the sound card, and a TestAudioStream that is used in the unit tests. Currently only 1 stream at a time is supported so there's no reason to provide
an explicit stream to the InstallationTo install the latest release version, simply run julia> Pkg.add("AudioIO") If you want to install the lastest master, it's almost as easy: julia> Pkg.clone("AudioIO")
julia> Pkg.build("AudioIO") |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论