Releases: audiojs/audio-buffer
Releases · audiojs/audio-buffer
7.3.0
from accepts fill value or map function as second arg, like Array.from:
from(1024, 0.5) // filled buffer
from(1024, (s, i) => Math.sin(i * 0.1)) // generate
from(buf, v => v * 0.5) // clone + transform
from(buf, 0) // zeroed clone (replaces like)Removed like and resize — covered by from and slice/pad.
v7.2.0
- Moved
slice,concat,set,likeout of AudioBuffer class intoaudio-buffer/util - AudioBuffer class now spec-only (constructor, properties, getChannelData, copyFromChannel, copyToChannel, Symbol.iterator)
- Absorbed
is-audio-buffer— available asisAudioBufferfromaudio-buffer/util equalrenamed toisEqualfromArrayfolded intofrom(eliminated double-copy)filledWithValremoved — usefill(from(...), val)concatnow variadic —concat(a, b, c, ...)from(null)throws instead of silently creating 1-sample buffermixthrowsRangeErroron out-of-bounds offset- Removed
noise— usefill(buf, () => Math.random() * 2 - 1) - Removed
invert— usefill(buf, v => -v) - Removed
options.channelsalias — usenumberOfChannels
Full Changelog: v7.1.0...v7.2.0
v7.1.0
- Add
isAudioBuffer(value)named export — duck-typed predicate, absorbsis-audio-buffer - Rewrite
audio-buffer/play: Web Audio API in browsers, dynamicimport('audio-speaker')in Node - Fix AudioContext leak — reuse single context across calls
- Fix replay after stop and natural end
- Remove
audio-speakerfrom runtime dependencies — zero deps - Add
filesfield to package.json — clean tarball - Fix README lead example —
buf = normalize(trim(buf))instead of discarded result
Full Changelog: v7.0.0...v7.1.0
v7.0.0
- Add
audio-buffer/utilsubpath — 15 pure sample operations:from,fill,mix,normalize,trim,reverse,equal,noise,remix,pad,invert,rotate,repeat,resize,removeDC - Add
audio-buffer/playsubpath — playback helper - Add subpath exports (
.,./util,./play) - Add
slice,concat,setinstance methods - Add
fromArray,like,filledWithValstatic factories - Absorbs
audio-buffer-utils,audio-buffer-from,audio-buffer-remix,audio-play - Move tests to test directory
Full Changelog: v6.0.1...v7.0.0
v6.0.0
- private fields, read-only properties
- positional constructor form
- slice, concat, set methods
- fromArray, filledWithVal factories
- engine-optimized copyFromChannel/copyToChannel
- channel bounds validation on all methods
- esm-only, zero deps
Full Changelog: v5.0.0...v6.0.0