Published
Edited
Jun 13, 2018
1 fork
Importers
11 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function abc(tune, midi = false, notation = true) {
const result = html`<div/>`;
if (notation) {
const notation = result.appendChild(html`<div/>`);
abcjs.renderAbc(notation, tune);
}
if (midi) {
result.appendChild(html`<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"/><link rel="stylesheet" type="text/css" href="https://unpkg.com/abcjs@5.1.2/abcjs-midi.css"/>`);
const midi = result.appendChild(html`<div/>`);
abcjs.renderMidi(midi, tune);
}
return result;
}
Insert cell