blue.js/index.html

52 lines
2.4 KiB
HTML

<html>
<head>
<title>bluelibs</title>
<link href="css/css.css" rel="stylesheet" />
<script src="libs/bluecore.js"></script>
<script src="libs/blueaudio.js"></script>
</head>
<body>
<p>
This project is to develop and test my own small private javascript libraries.
</p>
<p>
bluecore.js - 1.7.2 - This is as its named very basic functions like grabbing things asynchronously and such. All libraries will require this basic library.
</p>
<p>
blueaudio.js - 1.0.4 - This is for adding/loading audio assets to a project.
</p>
<p>
bluepixle.js - Planned - This will be for adding/loading/handling graphical assets within a HTML5 canvas context.
</p>
</body>
</html>
<script>
document.body.innerHTML = "";
elementPlace("body","disc",null,"div",null);
elementPlace("#disc",null,null,"p",null).innerText = "This project is to develop and test my own small private javascript libraries.";
elementPlace("#disc","bluecore","library","p",null).innerText = "bluecore.js - 1.7.2 - This is as its named very basic functions like grabbing things asynchronously and such. All libraries will require this basic library.";
elementPlace("#disc","blueaudio","library","p",null).innerText = "blueaudio.js - 1.0.4 - This is for adding/loading audio assets to a project.";
elementPlace("#disc","bluepixle","library","p",null).innerText = "bluepixle.js - Planned - This will be for adding/loading/handling graphical assets within a HTML5 canvas context.";
var mySound = elementPlace("#blueaudio",null,"button","a",null);
var mySequence = elementPlace("#blueaudio","sequenceText",null,"input",null);
mySequence.style.width = "100%";
mySequence.style.textAlign = "center";
mySequence.value = "5ab1/8;5g1/8;5e1/8;4bb1/8;4an1/8;5f1/8;5an1/8;6db3/8";
mySound.innerText = "Click Me for blueaudio.js demo";
var bluePlayer = new AudioContext();
mySound.onclick = function () {
playSequence(window.bluePlayer,parseSequence(mySequence.value),"triangle",60
//[
// {"note":8,"octave":5,"length":0.50,"type":"triangle"},
// {"note":7,"octave":5,"length":0.50,"type":"triangle"},
// {"note":4,"octave":5,"length":0.50,"type":"triangle"},
// {"note":10,"octave":4,"length":0.50,"type":"triangle"},
// {"note":9,"octave":4,"length":0.50,"type":"triangle"},
// {"note":5,"octave":5,"length":0.50,"type":"triangle"},
// {"note":9,"octave":5,"length":0.50,"type":"triangle"},
// {"note":1,"octave":6,"length":1.50,"type":"triangle"}
// ]
);
}
</script>