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 › Suggestions
« Previous 1 … 40 41 42 43 44 … 48 Next »

#midiflip code

Pages (2): 1 2 Next »
Thread tools
#midiflip code
HelpMe123Alt Offline
Banned
58 Posts:
 
#1
03-10-2018, 08:48 AM (This post was last modified: 03-10-2018, 11:47 AM by HelpMe123Alt.)
var p={};for(i=0;i<72;i++){p[piano[i]]=piano[71-i]}selectAll();for(i=0;i<selectedNotes.length;i++){n=selectedNotes[i];song.moveNote(n,n.instrument,n.instrument,n.time,n.time,n.type,p[n.type])}
Paste into console to #midiflip ANY song! There is a visual glitch that accompanies this, but it works internally; I tested it. You can save songs and the effect will stay.

Then again, you can still use other flippers online using importing and exporting, but this is faster.

MAJOR EDIT: THANK YOU TO korwynkim FOR THIS CODE. PROBS COULD HAVE DONE IT MYSELF BUT WHATEVER
var p={};for(i=0;i<72;i++){p[piano[i]]=piano[71-i]}selectAll();for(i=0;i<selectedNotes.length;i++){n=selectedNotes[i];song.moveNote(n,n.instrument,n.instrument,n.time,n.time,n.type,p[n.type])}deleteSelection();
undoChange();

MAJOR EDIT: THANK YOU JACOB_ THIS MAY BE A FEATURE FOR SOME REASON I ALSO SUGGEST YOU ADD HORIZONTAL FLIP AS WELL BTW


Reply
Kirbyderp Offline
kek
509 Posts:
 
#2
03-10-2018, 09:23 AM
Press delete and then undo after inputting the code, it fixes the visual glitch.


My Music! | High Quality Rips | Road to Remastery | Project Ultra
Reply
HelpMe123Alt Offline
Banned
58 Posts:
 
#3
03-10-2018, 10:04 AM (This post was last modified: 03-10-2018, 10:05 AM by HelpMe123Alt.)
Ayy, clever!
Now I will find the undo code!


Reply
korwynkim Offline
cat
16 Posts:
 
#4
03-10-2018, 10:08 AM (This post was last modified: 03-10-2018, 10:11 AM by korwynkim.)
Reformatted for readability
Edit: Added delete and undo fix

Code:
var p={};

for(i = 0; i < 72; i++){
   p[piano[i]] = piano[71 - i]
}
selectAll();

for(i = 0; i < selectedNotes.length; i++){
   n = selectedNotes[i];
   song.moveNote(n, n.instrument, n.instrument, n.time, n.time, n.type, p[n.type])
}

deleteSelection();
undoChange();


Trophy: https://imgur.com/a/4B0juxZ
Reply
HelpMe123Alt Offline
Banned
58 Posts:
 
#5
03-10-2018, 10:15 AM
Aw, you beat me to the punch. Unformatted code:
var p={};for(i=0;i<72;i++){p[piano[i]]=piano[71-i]}selectAll();for(i=0;i<selectedNotes.length;i++){n=selectedNotes[i];song.moveNote(n,n.instrument,n.instrument,n.time,n.time,n.type,p[n.type])}deleteSelection();
undoChange();


Reply
guest Offline
Member
454 Posts:
   
#6
03-10-2018, 10:31 AM
lol wtf it makes my songs sound happy


Reply
guest Offline
Member
454 Posts:
   
#7
03-10-2018, 10:32 AM
for example this:


Reply
HelpMe123Alt Offline
Banned
58 Posts:
 
#8
03-10-2018, 10:41 AM
Major and Minor are inversions of each other. (Dim. and Aug. are self-dual.)


Reply
Jacob_ Offline
Administrator
343 Posts:
 
#9
03-10-2018, 11:06 AM
Thanks for using your coding skills for good! Fixed and cleaned up:


Code:
var inversePiano = {};
for (i = 0; i < 72; i++) {
   inversePiano[piano[i]] = piano[71 - i]
}
for (i = 0; i < song.notes.length; i++) {
   n = song.notes[i];
   song.moveNote(n, n.instrument, n.instrument, n.time, n.time, n.type, inversePiano[n.type])
   song.update(n);
}

Can I add this to the site?


Reply
HelpMe123Alt Offline
Banned
58 Posts:
 
#10
03-10-2018, 11:07 AM
It would be my pleasure.


Reply
Pages (2): 1 2 Next »



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