Online Sequencer Forums

Full Version: What have I done 2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.


(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()
BEE-fore I execute that,
Code:
Bee="According to all known laws of aviation..."
Bee.slice(0,1000)
Bee=Bee.toLowerCase()
you could actually make a real song for a change
(05-21-2018, 05:42 PM)dcsm Wrote: [ -> ]you could actually make a real song for a change

For a KEY change?