Online Sequencer Make music online
  • Sequences
  • Members
  • Chat
  • Forum
  • Wiki

Existing user? Sign In Create account
Login at Online Sequencer Forums

Online Sequencer Forums › Online Sequencer › News
1 2 Next »

Offline Sequencer

Pages (6): « Previous 1 2 3 4 5 6 Next »
Thread locked 
Thread tools
Offline Sequencer
dfhwze Offline
Member
41 Posts:
 
#21
04-02-2019, 11:03 AM
(04-02-2019, 10:57 AM)theboiidonitello Wrote:
(04-14-2018, 09:55 PM)dfhwze Wrote: Wink hey p.s. im severely stupid so can you explain how to plug this script in?Are we allowed to try to add some tools to it and reupload?

edit: my song reversal tool is available \o/

Code:
'reverse': {
           name: 'Reverse',
           action: function () {
               var reverseNotes = function (measureLength) {
                   /* get time index of last note that ends */
                   var lastNoteEndExact = 0;
                   for (i = 0; i < song.notes.length; i++) {
                       var note = song.notes[i];
                       if (isNumber(note.time) && isNumber(note.length) && note.time + note.length > lastNoteEndExact) {
                           lastNoteEndExact = note.time + note.length;
                       }
                   }
                   /* determine time index of end of song based on last note and grid measures */
                   var lastNoteEnd = Math.floor(lastNoteEndExact);
                   var songEnd = lastNoteEnd - lastNoteEnd % measureLength;
                   songEnd += lastNoteEndExact > songEnd ? measureLength : 0;
                   /* reverse all notes in time */
                   for (i = 0; i < song.notes.length; i++) {
                       var note = song.notes[i];
                       if (isNumber(note.time) && isNumber(note.length)) {
                           var newTime = songEnd - note.time - note.length;
                           song.moveNote(
                                    note,
                                    note.instrument,
                                    note.instrument,
                                    note.time,
                                    newTime,
                                    note.type,
                                    note.type);
                           song.update(note);
                       }
                   }
                   keySelect.selectedIndex = 0;
                   keySelect.onchange();
               }
               /* grid measure is by default 16 (4 beats of 4 '1/4th' notes) */
               /* TODO calculate measureLength from current grid settings */
               reverseNotes(16);
           }
       },

In the console of your browser, copy-paste the code, and press enter while on the Online Sequencer tab.


dfhwze Offline
Member
41 Posts:
 
#22
04-02-2019, 11:42 AM (This post was last modified: 04-02-2019, 11:43 AM by dfhwze.)
(04-02-2019, 10:54 AM)dfhwze Wrote: Update for the Online Sequencer:

Reverse Tool ->

Code:
menus[2].items.reverse = {
          name: 'Reverse',
          action: function () {
              var reverseNotes = function (measureLength) {
                  /* get time index of last note that ends */
                  var lastNoteEndExact = 0;
                  for (i = 0; i < song.notes.length; i++) {
                      var note = song.notes[i];
                      if (isNumber(note.time) && isNumber(note.length) && note.time + note.length > lastNoteEndExact) {
                          lastNoteEndExact = note.time + note.length;
                      }
                  }
                  /* determine time index of end of song based on last note and grid measures */
                  var lastNoteEnd = Math.floor(lastNoteEndExact);
                  var songEnd = lastNoteEnd - lastNoteEnd % measureLength;
                  songEnd += lastNoteEndExact > songEnd ? measureLength : 0;
                  /* reverse all notes in time */
                  for (i = 0; i < song.notes.length; i++) {
                      var note = song.notes[i];
                      if (isNumber(note.time) && isNumber(note.length)) {
                          var newTime = songEnd - note.time - note.length;
                          song.moveNote(
                                   note,
                                   note.instrument,
                                   note.instrument,
                                   note.time,
                                   newTime,
                                   note.type,
                                   note.type);
                          song.update(note);
                      }
                  }
                  keySelect.selectedIndex = 0;
                  keySelect.onchange();
              }
              /* grid measure is by default 16 (4 beats of 4 '1/4th' notes) */
              /* TODO calculate measureLength from current grid settings */
              reverseNotes(16);
          }
      };

      menuContainer = $('#menubar_menus');
       menuContainer.empty();

       for (var i = 0; i < menus.length; i++) {
           (function(i) {
               var menu = menus[i];
               var menuTitle = menu.name
               var menuElement = $('<div id="menu_' + menu.name + '" class="menu_title">' + menu.name + '</div>');
               createMenuPopup(menuElement, menuElement, menu);
               menuContainer.append(menuElement);
           })(i);
       }

Hope it works now...


  • x1
    • x1
Lopyt   Away
(Banned)
2,721 Posts:
   
#23
08-06-2019, 08:58 PM
(04-02-2019, 10:17 AM)dfhwze Wrote:
(04-01-2019, 02:11 PM)Sir_Guy Wrote: Is there a way to add the "new" Eguitar with code in this?

Is there a new instrument?
It was updated after the WU, I think. The old one sounds like the intro to The Day That Never Comes


fox Offline
not a mod
400 Posts:
   
#24
11-11-2019, 12:06 PM
frank's os clone: https://offline-os.glitch.me/


Lopyt   Away
(Banned)
2,721 Posts:
   
#25
11-14-2019, 10:46 PM
Forgot to thank you, Jacob_, I use this too much.

How do I add those code things, Frank?


Cringe_Gaming_64yt Offline
i have no idea of music theory and yet make decent music
357 Posts:
 
#26
02-12-2020, 01:54 PM
there better be hidden intruments


Lopyt   Away
(Banned)
2,721 Posts:
   
#27
02-12-2020, 01:56 PM
They are there, though I never found the hidden instruments to be useful


technoAptitude Offline
crunchy
3 Posts:
   
#28
05-13-2020, 11:24 PM
(11-11-2019, 12:06 PM)fox Wrote: frank's os clone: https://offline-os.glitch.me/
is there a download?


Cringe_Gaming_64yt Offline
i have no idea of music theory and yet make decent music
357 Posts:
 
#29
05-14-2020, 06:45 AM
(05-13-2020, 11:24 PM)technoAptitude Wrote:
(11-11-2019, 12:06 PM)fox Wrote: frank's os clone: https://offline-os.glitch.me/
is there a download?
you can download it with a website downloader, but be cautious  which one you pick to download it to your desktop


lolelujah321 Offline
Member
4 Posts:
 
#30
07-04-2020, 03:29 AM
Finally, online sequencer without wifi but without having to go through that eternal dinosaur game!


Pages (6): « Previous 1 2 3 4 5 6 Next »
Thread locked 



Users browsing this thread:   1 Guest(s)


  •  Return to Top
  •  Contact Us
  •   Home
  •  Lite mode
© Rush Crafted with ❤ by iAndrew
Powered By MyBB, © 2002-2025 MyBB Group.
Linear Mode
Threaded Mode
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend