Home

Awesome

Bap

Join the chat at https://gitter.im/adamrenklint/bap npm npm GitHub stars GitHub forks

Travis branch Code Climate Code Climate David dependencies David devDependencies

Bap is a toolkit for making beats and composing sequences with Javascript and Web Audio for playback in modern browsers. It is inspired by the classic "MPC workflow" and built to make all aspects of beatmaking completely modular and reusable.

Made by Adam Renklint, Berlin april 2015

Install and import

From npm

$ npm install --save bap

From rawgit CDN

<script src="https://cdn.rawgit.com/adamrenklint/bap/v0.8.0/bap.min.js"></script>

Usage

var bap = require('bap'); // or window.bap

// a kit is like an instrument, or program in mpc terms
var kit = bap.kit();
var oscillator = bap.oscillator({
  frequency: 440
});
// a kit connects infinite slots with infinite layers
kit.slot('Q').layer(oscillator);
kit.slot('W').layer(oscillator.with({ frequency: 330 }));
kit.slot('E').layer(bap.sample('foo.wav'));

// a pattern is a loop made up of channels and notes
var pattern = bap.pattern();
pattern.channel(1).add(
  ['1.*.01', '1Q', 48, 70, 0, -50],
  ['1.2.01', '1W', 96, 100, 0, 50],
  ['1.4.01', '1E']
);

// connect the kit, and play
pattern.kit(1, kit).start();

Basic concepts

Known issues

Resources

API

bap

params

events

clock

kit

slot

layer

oscillator

sample

pattern

sequence

channel

note

reverb

delay

compressor

overdrive

filter

chorus

phaser

ping pong delay

Feedback and issues

Develop

Contribute

Props

License

MIT © 2015 Adam Renklint


Generated with redok @ Thursday July 23rd, 2020 - 11:44:40 PM