How To Make Macro's That Don't Skip Octaves

This forum is a catch all for all posts that do not belong in other forums.

How To Make Macro's That Don't Skip Octaves

Postby beco » Thu Jan 16, 2020 10:20 pm

As many of you already know, the August Patch of 2018 broke most of the available macros. I wanted to explain how to work around these issues, as I don't believe many people (if any) are aware of some of these workarounds (mostly number 3 below). Just a fair warning that this stuff gets pretty complicated, so don't expect easy answers. I would recommend trying out only one workaround at a time, and not try to figure them out all at once.

I've added 3 blocks of code at the bottom of this for non-edited, edited, and advanced editing of a section of song for you to test out to see how the changes affect the sound of the song. All you need to do is copy paste them into the musicbox .ahk script template.

1) The easiest thing to do is to not make chords across three octaves. Which means no [G,g]'s or [F,f]'s or [A,Aa]'s, etc. If a song does have chords across three octaves, your best option is to move the lower octave up to the middle octave; for example, changing [G,Dg] to [DGg]. Oftentimes making these changes will make a drastic enough difference to the chord that it may be a better idea just to remove the low octave G altogether, changing [G,Dg] to [Dg]. But this mainly comes down to personal preference.

2) The other trick for 3 octave chords is just to add a 2-5 note buffer (depending on the speed of the song... faster tempo requires more buffer notes) in the middle octave to slow the progression of the octave swapping. This is a common trick used by many gw2 musicians who play by hand. For example, a chord like [G,Dg] could be changed to G,/4 D/4 G/4 B/4 g or G,/6 D/6 G/6 B/6 g or G,/8 D/8 G/8 B/8 g, etc depending on the speed of the song. Changing chords to a strum like this will often sound strange due to the sudden shift in tempo, but this can be compensated for by reducing the length of the g note. If the original chord were [G,Dg]4, a strummed version could instead be G,/4 D/4 G/4 B/4 g3, where you are subtracting the previous note's duration's from the duration of the g (G,/4 + D/4 + G/4 + B/4 = 1 full note duration, and therefore you subtract 1 from the g4 duration. But again, this comes down to personal preference. Sometimes G,/4 D/4 G/4 B/4 g4 will sound better in the context of the song compared to g3.

3) This is the important one, but also the most confusing and tedious to do. With the octave swapping bug, you aren't able to swap octaves twice in a row unless there's at least a Sleep, 150 duration between one press of up/down and the next up/down. If you want to make a macro never get hung up on a octave swap, you can go into the script file through notepad/notepad++/etc. and make sure that there aren't any SendInput {Numpad9}'s and/or SendInput {Numpad0}'s that don't have a Sleep, 150 duration or greater separating them. If there are, you can manually add in a Sleep, 150 or any additional sleep duration that brings the sum duration above 150.

Here's a specific example which hopefully will explain things better. This is from the archive song "All of Me" from nynaeve, at the very top of the script. Specifically, this section: [A,Ae]3 [A,Ae]3 [A,Ae]2 [F,Af]3 [F,Af]3 [F,Af]2 I'll highlight the problematic areas in bold.

Sleep, 2000 (the initial sleep duration before the script starts playing
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad9}

SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad3 down}
Sleep, 743
SendInput {Numpad3 up}
SendInput {Numpad3 down}
SendInput {Numpad3 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad0}

SendInput {Numpad6 down}
Sleep, 743
SendInput {Numpad6 up}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad9}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}

SendInput {Numpad3 down}
Sleep, 470
SendInput {Numpad3 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad0}

SendInput {Numpad4 down}
Sleep, 743
SendInput {Numpad4 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad9}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad9}

SendInput {Numpad4 down}
Sleep, 743
SendInput {Numpad4 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad0}

SendInput {Numpad4 down}

This could be changed to:(the changes are in bold)

Sleep, 1925
SendInput {Numpad0}
Sleep, 75

SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad9}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 150
SendInput {Numpad9}
SendInput {Numpad3 down}
Sleep, 743
SendInput {Numpad3 up}
SendInput {Numpad3 down}
SendInput {Numpad3 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 150
SendInput {Numpad0}
SendInput {Numpad6 down}
Sleep, 743
SendInput {Numpad6 up}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9} The Numpad 9 get's moved up above the Sleep, 75 duration so you only need to add an additional Sleep, 75
Sleep, 75
Sleep, 75

SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad3 down}
Sleep, 470
SendInput {Numpad3 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 150
SendInput {Numpad0}
SendInput {Numpad4 down}
Sleep, 743
SendInput {Numpad4 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad9}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 150
SendInput {Numpad9}
SendInput {Numpad4 down}
Sleep, 743
SendInput {Numpad4 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 150
SendInput {Numpad0}
SendInput {Numpad4 down}

And here's how I would change the song, combining all of the above workarounds. This is a little complicated, so I'm not going to explain it. But you can figure it out if you understand the workarounds pretty well.

I changed the part to be A,/4 C/4 E/4 A/4 e3 [Ae]3 [Ae]2 F,/4 C/4 F/4 A/4 f3 [Af]3 [Af]2
With the script being:

Sleep, 2000
SendInput {Numpad0}
SendInput {Numpad6 down}
Sleep, 68
SendInput {Numpad6 up}
SendInput {Numpad8 down}
Sleep, 68
SendInput {Numpad8 up}
SendInput {Numpad9}
SendInput {Numpad3 down}
Sleep, 68
SendInput {Numpad3 up}
SendInput {Numpad6 down}
Sleep, 68
SendInput {Numpad6 up}
SendInput {Numpad9}

SendInput {Numpad3 down}
Sleep, 818
SendInput {Numpad3 up}
SendInput {Numpad3 down}
SendInput {Numpad3 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
Sleep, 818
SendInput {Numpad6 up}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad3 down}
Sleep, 545
SendInput {Numpad3 up}
SendInput {Numpad0}
Sleep, 40
SendInput {Numpad0}
SendInput {Numpad4 down}
Sleep, 28
SendInput {Numpad4 up}
SendInput {Numpad8 down}
Sleep, 68
SendInput {Numpad8 up}
SendInput {Numpad9}
SendInput {Numpad4 down}
Sleep, 68
SendInput {Numpad4 up}
SendInput {Numpad6 down}
Sleep, 68
SendInput {Numpad6 up}
SendInput {Numpad9}

SendInput {Numpad4 down}
Sleep, 818
SendInput {Numpad4 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
Sleep, 818
SendInput {Numpad6 up}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad4 down}
Sleep, 545
SendInput {Numpad4 up}

As you can see, there are a lot more problematic areas, but they also can be shifted around easily without adding any clunky added Sleep durations

Sleep, 2000
SendInput {Numpad0}
Sleep, 500
SendInput {Numpad6 down}
Sleep, 68
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad1 down}
Sleep, 68
SendInput {Numpad1 up}
SendInput {Numpad3 down}
Sleep, 68
SendInput {Numpad3 up}
SendInput {Numpad6 down}
Sleep, 68
SendInput {Numpad6 up}
SendInput {Numpad9}

SendInput {Numpad3 down}
Sleep, 818
SendInput {Numpad3 up}
SendInput {Numpad3 down}
SendInput {Numpad3 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
Sleep, 818
SendInput {Numpad6 up}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad3 down}
Sleep, 150
SendInput {Numpad3 up}
SendInput {Numpad0}
Sleep, 185
SendInput {Numpad0}
Sleep, 150
SendInput {Numpad4 down}
Sleep, 28
SendInput {Numpad4 up}
SendInput {Numpad9}
SendInput {Numpad1 down}
Sleep, 68
SendInput {Numpad1 up}
SendInput {Numpad4 down}
Sleep, 68
SendInput {Numpad4 up}
SendInput {Numpad6 down}
Sleep, 68
SendInput {Numpad6 up}
SendInput {Numpad9}

SendInput {Numpad4 down}
Sleep, 818
SendInput {Numpad4 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
Sleep, 818
SendInput {Numpad6 up}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad4 down}
Sleep, 545
SendInput {Numpad4 up}


Copy And Paste to .ahk file, only do one section of code at a time.

NON-EDITED, This is what you'll get when playing the section of All of Me script directly from the musicbox archive.

Sleep, 2000
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad9}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad3 down}
Sleep, 743
SendInput {Numpad3 up}
SendInput {Numpad3 down}
SendInput {Numpad3 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad0}
SendInput {Numpad6 down}
Sleep, 743
SendInput {Numpad6 up}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad9}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad3 down}
Sleep, 470
SendInput {Numpad3 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad0}
SendInput {Numpad4 down}
Sleep, 743
SendInput {Numpad4 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad9}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad9}
SendInput {Numpad4 down}
Sleep, 743
SendInput {Numpad4 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad0}
SendInput {Numpad4 down}
SendInput {Numpad4 up}




EDITED

Sleep, 1925
SendInput {Numpad0}
Sleep, 75
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 75
SendInput {Numpad9}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 150
SendInput {Numpad9}
SendInput {Numpad3 down}
Sleep, 743
SendInput {Numpad3 up}
SendInput {Numpad3 down}
SendInput {Numpad3 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 150
SendInput {Numpad0}
SendInput {Numpad6 down}
Sleep, 743
SendInput {Numpad6 up}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}
Sleep, 75
Sleep, 75
SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad3 down}
Sleep, 470
SendInput {Numpad3 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 150
SendInput {Numpad0}
SendInput {Numpad4 down}
Sleep, 743
SendInput {Numpad4 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad9}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 150
SendInput {Numpad9}
SendInput {Numpad4 down}
Sleep, 743
SendInput {Numpad4 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
Sleep, 150
SendInput {Numpad0}
SendInput {Numpad4 down}
SendInput {Numpad4 up}




ADVANCED EDITS

Sleep, 2000
SendInput {Numpad0}
Sleep, 500
SendInput {Numpad6 down}
Sleep, 68
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad1 down}
Sleep, 68
SendInput {Numpad1 up}
SendInput {Numpad3 down}
Sleep, 68
SendInput {Numpad3 up}
SendInput {Numpad6 down}
Sleep, 68
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad3 down}
Sleep, 818
SendInput {Numpad3 up}
SendInput {Numpad3 down}
SendInput {Numpad3 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
Sleep, 818
SendInput {Numpad6 up}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad3 down}
Sleep, 150
SendInput {Numpad3 up}
SendInput {Numpad0}
Sleep, 185
SendInput {Numpad0}
Sleep, 150
SendInput {Numpad4 down}
Sleep, 28
SendInput {Numpad4 up}
SendInput {Numpad9}
SendInput {Numpad1 down}
Sleep, 68
SendInput {Numpad1 up}
SendInput {Numpad4 down}
Sleep, 68
SendInput {Numpad4 up}
SendInput {Numpad6 down}
Sleep, 68
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad4 down}
Sleep, 818
SendInput {Numpad4 up}
SendInput {Numpad4 down}
SendInput {Numpad4 up}
SendInput {Numpad0}
SendInput {Numpad6 down}
Sleep, 818
SendInput {Numpad6 up}
SendInput {Numpad6 down}
SendInput {Numpad6 up}
SendInput {Numpad9}
SendInput {Numpad4 down}
Sleep, 545
SendInput {Numpad4 up}
beco
 
Posts: 1
Joined: Thu Jan 16, 2020 10:17 pm

Return to General Discussion



Who is online

Users browsing this forum: No registered users and 5 guests


cron