05-21-2018, 05:40 PM
(05-21-2018, 10:24 AM)_4eJloBek_ Wrote: [ -> ]That's the content I'm here for
Be careful what you ask for. This took about an hour:
Code:
letters = [];
chars = 'abcdefghijklmnopqrstuvwxyz.,';
for (i = 0; i < 28 * 4; i += 4) {
letter = [];
for (j = i; j < i + 3; j++) {
if (song.noteColumns[j]) {
letter.push(Object.values(song.noteColumns[j]).map(x => x.type))
} else {
console.log(song.noteColumns[j])
letter.push([])
}
}
letters[chars[i / 4]] = letter
}
selectAll();
deleteSelection();
string = Bee;
for (i = 0; i < string.length; i++) {
letter = letters[string[i]];
if (letter) {
for (j = 0; j < 3; j++) {
for (k = 0; k < letter[j].length; k++) {
song.addNote(new Note(song, letter[j][k], 4 * i + j, 1, 0))
}
}
}
}
selectAll()
Code:
Bee="According to all known laws of aviation..."
Bee.slice(0,1000)
Bee=Bee.toLowerCase()