4.0.1 • Published 8 years ago

audio-through v4.0.1

Weekly downloads
206
License
MIT
Repository
github
Last release
8 years ago

audio-through Build Status unstable

Audio processor or generator constructor.

npm install audio-through

let createThrough = require('audio-through')
let write = require('audio-speaker')()

// panned sine generator
let through = createThrough(
  (channelData, state, ...args) => {
  let [left, right, ...rest] = channelData
  let {time, count, format} = state

  // modify channels data here
}, 'stereo audiobuffer')

// hook up createThrough → speaker loop
(function tick () {
	write(through(), tick);
})()

createThrough(fn, format='array')

Takes channel processing function and format, returns a function generating audio data of the indicated format.

Output data format can be a string 'planar stereo array', '5.1 audiobuffer 44100' etc., or an object with format properties. See audio-format for full disclosure.

through(target|length=1024)

Fill passed target or create a new one of the length, based on fn from the constructor. Target type is defined by format.

Related

See audio-through-stream for previous (stream) version of audio-through.

License

(c) 2017 Dmitry Yvanov @ audiojs. MIT License

4.0.1

8 years ago

4.0.0

8 years ago

2.2.3

8 years ago

2.2.2

8 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.9

9 years ago

2.1.8

9 years ago

2.1.7

9 years ago

2.1.6

9 years ago

2.1.5

9 years ago

2.1.4

9 years ago

2.1.3

9 years ago

2.1.2

9 years ago

2.1.1

9 years ago

2.1.0

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.2.0

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.11

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.0

10 years ago