Skip to content

juniorheptachords/da-beat-sequencer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Da Beat Sequencer

Easy to use Audio / Midi beat sequencer.

Still a work in progress, tested in Chrome and Safari, planned to be working on all browsers.

How to use

Include the 2 files da-beat-sequecer.js and da-beat-sequencer.css and instantiate the sequencer like this:

var sequencer = new DaBeatSequencer();

For examples see in the demo folder.

Properties

autoplay

Start playing as soon as it is ready.
Default: true

showVisual

Create a visual representation of the sequencer.
Default: true

showControls

Create inputs to control the sequencer.
Default: true

samplesSet

Array of audio samples urls for the audio mode.
Default: empty array

sendMidi

Send midi notes to a midi port. Will active some inputs to configure Midi.
Default: false

playSound

Play the samples set in the sampleSet option.
Default: true

audioLatency

When playSound true and sendMidi true to play sound and send midi together, there could be latency between the audio in the browser and in the synthesizer connected to the midi out. This parameter allow to set a latency on the audio in milliseconds.
Default: 0

midiLatency

Same as audioLatency but for the midi.
Default: 0

bars

Number of bars in the sequence. Currently not used.
Default: 1

stepsInBar

Number of steps in each bar. Some work to do still.
Default: 16

bpm

The bpm obviously.
Default: 110

steps

2D array representing the steps.
Default:

[[1,1,0,1,0,0,1,1,0,1,1,0,0,0,0,0],
[0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0],
[1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,1],
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0]]

midiNotes

Array of midi notes used when sending midi. The order in the array is related to the array of steps.
Default:

 [36, 38, 42, 43]

midiClockMode

Set the midi clock mode to sync the sequencer with other devices.
Possible values: "standalone", "master", "slave"
Default: "standalone"

To do

  • Make it work on all browser!
  • Still improve the midi clock sync
  • Allow more bars to be defined
  • Allow more flexibility on customization/override
  • Make some more css ...