Online Sequencer Forums

Full Version: Swing in Console
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I think in the console there should be a new command, called "swing". It would let you take selected notes, (or maybe some other way of defining which notes you want to do this to), and add swing to them. Here's an example: Select some piano notes. Then enter in the console: "swing = 1". The higher the number, the more swing there is.
It would probably be easier as a grid divider function. You could do it manually by calculating your counts. Full swing (true triplets) could be 12/8 or 6/8. Half swing, you could divide the grid by 48 and draw notes 5 squares long with rests of 3 (if my math is correct). In any event. Any time that you are adjusting the length of the notes, they need to physically stretch or shrink on the grid whether there is a dedicated function for it or not.

Not against such a function btw, but that function would not only need to know how much swing, but also how many counts to swing on (quarter notes, eighth notes, etc) and if you have a longer note in the middle of the selection that was say a dotted quarter (3/8s long) would it get f'd up by the function or just ignored, and how would the function know to ignore it?
(05-14-2022, 10:22 AM)SnakeyWaters Wrote: [ -> ]I think in the console there should be a new command, called "swing". It would let you take selected notes, (or maybe some other way of defining which notes you want to do this to), and add swing to them. Here's an example: Select some piano notes. Then enter in the console: "swing = 1". The higher the number, the more swing there is.

maybe it could work by moving the notes occupying every other 1/2 grid space by a certain amount. 0= no movement and 1= move 1/2 grid space forward.  by this math i think 1/3=triplet swing
i saw this on fl and i was like "bro this feature is useless"

just use triplets. need i say more
Code:
tweakNotes(n=>{const t=n.time/4;const it=Math.floor(t);const ft=t-it;const dt=ft<=0.5?ft*4/3:(ft-0.5)*3/4+2/3;const nt=it+dt;n.time=nt*4;});
(05-15-2022, 10:33 AM)Liam Wrote: [ -> ]tweakNotes(n=>{const t=n.time/4;const it=Math.floor(t);const ft=t-it;const dt=ft<=0.5?ft*4/3: (ft-0.5)*3/4+2/3;const nt=it+dt;n.time=nt*4;});

do i have to be sad halfway through or can i do that part in advance?
(05-15-2022, 10:33 AM)Liam Wrote: [ -> ]
Code:
tweakNotes(n=>{const t=n.time/4;const it=Math.floor(t);const ft=t-it;const dt=ft<=0.5?ft*4/3:(ft-0.5)*3/4+2/3;const nt=it+dt;n.time=nt*4;});

ok how the heck do I use that
Open the debug console (Ctrl+shift+J on Chrome), select the notes you want to swing, paste the code into the console, and press enter
(05-15-2022, 09:51 AM)PuzzlePuddles Wrote: [ -> ]i saw this on fl and i was like "bro this feature is useless"

just use triplets. need i say more

Not if you want your swing to not be exact triplets.