Public
Edited
May 2, 2023
Fork of ABC
Insert cell
Insert cell
Insert cell
abc("CECEG2G2|CECEG2G2|C'BAGF2A2|GFEDC2C2|]", true)
Insert cell
abc(abcIanPullmanString, true)
Insert cell
abcjs = require('https://bundle.run/abcjs@5.1.2/midi.js')
Insert cell
Insert cell
abcjs.parseOnly(abcIanPullmanString)
Insert cell
Insert cell
navigator.mediaDevices.getUserMedia({audio: true, video: true})
.then((mediaStream) => {
document.querySelector('video').srcObject = mediaStream;
// Stop the audio stream after 5 seconds
setTimeout(() => {
const tracks = mediaStream.getAudioTracks()
tracks[0].stop()
}, 5000)
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function square(number) {
return number * number;
}
Insert cell
Insert cell
square(3)
Insert cell
testObjectArray = tuneObjectArray[0];
Insert cell
tuneObjectArray[0] = abcjs.renderAbc("*",abcString);
Insert cell
Insert cell
abcString = "X:1\nT:ExampleDoesThisComeThroughTheParser?\nK:Bb\nBcde|\n";
Insert cell
abcIanPullmanString ="X: 1 \nT: Ian Pullman's Special \nC: Peter Elmes \nR: polka, reel \nZ: John Chambers \nM: C| \nL: 1/8 \nF:http://john-chambers.us/~jc/music/abc/Contra/KC/march/IanPullmansSpecial.abc 2023-02-05 135723 UT \nK: D\n[A2][|d2FABAFA|f2e2d2A2|BAFAd2F2|G6EF|GAGFEFGE|e3fe2c2|ABcBAceA|f6FG||\nA2FABAFA|fAFAB2A2|DFAFDA^GA|B6GF|E2GAcA^GA|e2d2c2A2|EFGAcABc|d6FG||\nA2DFA2FG|AfedA2F2|DEFAd2c2|G6EF|GA,CEGE^DE|CEGAe2c2|ABAGFEDE|F6FG||\nA2DFA2FG|AfedA2F2|DEFAd2A2|B6EF|GECEA,CEG|c2A2G2E2|CEGAcAfe|d6z2|]"
Insert cell
tuneObjectArray[0] = abcjs.renderAbc(abcString2tunes,"*");
Insert cell
abcString2tunes = "X:1\nK:C\nCDEF|CEGc|A2FABAFA|fAFAB2A2|DFAFDA^GA|B6GF\n|E2GAcA^GA|e2d2c2A2|EFGAcABc|d6FG|\n\nX:2\nK:G\nGABc|\n";
Insert cell
Insert cell
Insert cell
Insert cell
tuneObjectArray2tunes[0].getBarLength()
Insert cell
tuneObjectArray2tunes[0].getLastNote()
Insert cell
tuneObjectArray2tunes[0].getPickupLength()
Insert cell
visualObjs2 = abcjs.renderAbc(
["id-for-tune-1", "id-for-tune-2"],
abcString2tunes,
{ add_classes: true }
)
Insert cell
abcjs.parseOnly("target",abcString);
Insert cell
abcjs.renderAbc(abcIanPullmanString,"*");
Insert cell
abcjs.renderAbc(abcString, "*");
Insert cell
renderObj = abcjs.parseOnly(abcIanPullmanString,"*");
Insert cell
renderObj[0].getBarLength()
Insert cell
abcjs.parseOnly("",abcString);
Insert cell
tuneObjectArray[0] = abcjs.renderAbc("*",abcString);
Insert cell
tuneObjectArray = abcjs.renderAbc("*", abcString);
Insert cell
Insert cell
NRF.requestDevice({ filters: [{ namePrefix: 'Puck.js' }] }).then(function(device) {
require("ble_simple_uart").write(device, "digitalPulse(LED3,1,1000)\n", function() {
print('Done!');
});
});
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more