07-31-2018, 03:26 PM
(07-28-2018, 02:01 PM)Frank Wrote: https://onlinesequencer.net/forum/showth...p?tid=2672
I made this on May 21st, 2018, well before you did this, but maybe I should try and reformat my program to work with this font. This looks much better than my ugly 3x5 set.
Code:
Note.prototype.toString = function(startTime) {
return (startTime ? this.time - startTime : this.time) + " " + this.type + " " + this.length + " " + this.instrument;
}
function getNotes(startX, stopX) {
selectedNotes = song.notes.filter(note => note.time >= startX && note.time < stopX && note.instrument == 0);
selectedNotes.map(note => note.time -= startX)
copy();
return clipboard.join(';')
}
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz()!?/=_#-.,'";
var charToNotes = {};
var charLength = {};
var guides = song.notes.filter(note => note.instrument == 8).map(note => note.time).sort((a, b) => a - b);
for (var i = 0; i < guides.length - 1; i++) {
charToNotes[chars[i]] = getNotes(guides[i], guides[i + 1]);
charLength[chars[i]] = guides[i + 1] - guides[i]
}
loadData('999:');
var text = localStorage.bee.slice(0, 500)
var time = 0
text.split('').map(function(char) {
if (charLength[char]) {
song.appendData(charToNotes[char], -time);
time += charLength[char]
} else {
time += 5
}
})
SequencerView.repaint()
Kim Wrote:+ https://js-game.glitch.me + Doesnt take peopel serious if their has badly speling gramer puntuatin