Easy to use Audio / Midi beat sequencer.
Still a work in progress, tested in Chrome and Safari, planned to be working on all browsers.
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.
Start playing as soon as it is ready.
Default: true
Create a visual representation of the sequencer.
Default: true
Create inputs to control the sequencer.
Default: true
Array of audio samples urls for the audio mode.
Default: empty array
Send midi notes to a midi port. Will active some inputs to configure Midi.
Default: false
Play the samples set in the sampleSet option.
Default: true
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
Same as audioLatency but for the midi.
Default: 0
Number of bars in the sequence. Currently not used.
Default: 1
Number of steps in each bar. Some work to do still.
Default: 16
The bpm obviously.
Default: 110
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]]
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]
Set the midi clock mode to sync the sequencer with other devices.
Possible values: "standalone", "master", "slave"
Default: "standalone"
- 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 ...