1.0.0 • Published 8 years ago

duolet.bundle v1.0.0

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

duolet.bundle

NPM Version License

All components in the main thread. This architecture works on the browser and the Node.js

duolet.bundle

Installation

$ npm install duolet.bundle

Example

in the main thread

const duolet = require("duolet.bundle")();
const Driver = require("pico.driver.webaudio");
const DSP = require("./dsp");

let audioContext = new AudioContext();

duolet.compose({ dsp: new DSP(), driver: new Driver() });
duolet.setup({ context: audioContext, bufferLength: 1024 });

duolet.start();

API

Duolet

  • constructor()

Instance attributes

  • dsp: duoletDSP
  • driver: pico.driver
  • sampleRate: number (implicit readonly)
  • bufferLength: number (implicit readonly)

Instance methods

  • compose(spec: object): self
  • setup(opts: object): self
  • start(): self
  • stop(): self
  • sendToServer(data: any): void

Interfaces

interface duoletDSP {
  optional setup(opts: object) => void;
  optional start() => void;
  optional stop() => void;
  process(bufL: Float32Array, bufR: Float32Array) => void;
}

Audio Drivers

License

MIT

1.0.0

8 years ago

0.8.0

8 years ago

0.7.0

8 years ago