surikov / webaudiofont

Use full GM set of musical instruments to play MIDI and single sounds or effects. Support for reverberation and equaliser. No plugins, no Flash. Pure HTML5 implementation compatible with desktop and mobile browser. See live examples.
https://surikov.github.io/webaudiofont/
GNU General Public License v3.0
882 stars 92 forks source link

Converting to webaudiofont from another library #52

Closed bbevren closed 4 years ago

bbevren commented 4 years ago

Hi, i am using midi-js and want to convert it to webaudiofont... is there easy way to immigrate? Midi-js has chords like this { "C:maj": [ 60, 64, 67 ], "C:min": [ 60, 63, 67 ], "C:dim": [ 60, 63, 66 ], "C:maj7": [ 60, 64, 67, 71 ], "C:min7": [ 60, 63, 67, 70 ] while webaudiofont has var fretsAm = [-1, 0, 2, 2, 1, 0]; var fretsC = [-1, 3, 2, 0, 1, 0]; var fretsE = [ 0, 2, 2, 1, 0, 0]; var fretsG = [ 3, 2, 0, 0, 0, 3]; var fretsDm = [-1,-1, 0, 2, 3, 1];

Thanks

surikov commented 4 years ago

send notes one by one via queueWaveTable or use queueChord. read description here https://github.com/surikov/webaudiofont/wiki listen to examples here https://surikov.github.io/webaudiofont/examples/strum.html