ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: Simulate keystrokes to scalable BPM

(1/2) > >>

KynloStephen66515:
Anybody willing to code the following:

It would need to simulate key strokes, and send them to the active window, at a specific BPM

For instance, I would want to send the following keystrokes, to the active window:

Q E T I T E Q E T I T E
N Q E Y E Q N Q E Y E Q
V N Q R Q N V N Q R Q N
B M W T W M B M W T W M

They would be sent at the rate of 128 BPM (In this respect, for the left hand segment of Rufus Wainwright - Hallelujah)

If possible, I would like to also be able to set the program to be able to loop X times, then follow with a new set of orders (so looping that 4 times, then sending the next set of keys to the active window) - It would send each set, a designated number of times.

It should also be able to send multiple strokes at once, so if I wanted to send B Q E at the same time, it would do (at EXACTLY the same time)

BPM is hugely important in this, as its going to be used in conjunction with a Virtual MIDI Piano, So I would obviously want to be able to set a specific BPM for each song.

I know I'm pushing my luck, but I would also be able to set "BPM Markers" within the keymap file, so if it plays X at Y BPM, for N number of times, it could then also change BPM

As an extension (yay, more options), I would also be able to designate shortcuts to be sent to the active window (which will in-turn, change the transposition, the octave etc) (These are set by the MIDI Piano software itself)

IE

*128 4 (<--- signifies, 128 BPM, Repeat 4 times)
Q E T I T E Q E T I T E
N Q E Y E Q N Q E Y E Q
V N Q R Q N V N Q R Q N
B M W T W M B M W T W M
*192 8 (<---192 BPM, Repeat x4)
Q E T I T E Q E T I T E
N Q E Y E Q N Q E Y E Q
V N Q R Q N V N Q R Q N
B M W T W M B M W T W M
*128 8 CTLRA CTLRA (Change BPM back to 128, repeated 8 times, moving the transposition up 2 notches by sending CTRL-Right Arrow to the software)
Q E T I T E Q E T I T E
N Q E Y E Q N Q E Y E Q
V N Q R Q N V N Q R Q N
B M W T W M B M W T W M


It would be cool if those shortcuts are all able to be chosen and changed at any point using this softwares control menu, so I can add/remove shortcuts, or change stuff around to make life easier.


Its a big ask, so I thank in advance.

If you need any more information, ask! :D



mouser:
fun idea..

KynloStephen66515:
No-one?  :huh:

Ath:
Would it be something to add to WinSendKeys ? That comes with AutoIt source, so you could take a stab at it yourself ;)

skwire:
Stephen, here's a simplified version of the script I gave you last night:


--- Code: Autohotkey ---myTunes =(*128 4Q E T I T E Q E T I T EN Q E Y E Q N Q E Y E QV N Q R Q N V N Q R Q NB M W T W M B M W T W M*192 8Q E T I T E Q E T I T EN Q E Y E Q N Q E Y E QV N Q R Q N V N Q R Q NB M W T W M B M W T W M*128 8Q E T I T E Q E T I T EN Q E Y E Q N Q E Y E QV N Q R Q N V N Q R Q NB M W T W M B M W T W M) StringSplit, tArray, myTunes, *Return  F1::{    Loop, % tArray0    {        Loop, Parse, tArray%A_Index%, `n, `r        {            If ( A_Index = 1 )            {                StringSplit, myTimingArray, A_LoopField, %A_Space%                myBPMTime := Ceil( ( 60 / myTimingArray1 ) * 1000 )                myRepeat  := myTimingArray2            }            Else            {                myKeyBlock .= A_LoopField . " "            }        }    SendKeys( myKeyBlock, myBPMTime, myRepeat )    myKeyBlock := ""    }}Return  SendKeys( sKeys, nBPM, nRepeat ){    Loop, % nRepeat    {        Loop, Parse, sKeys, %A_Space%        {            If ( A_LoopField != "" )            {                SendInput, % A_LoopField                Sleep, % nBPM            }        }    }} ESC:: ExitApp

Navigation

[0] Message Index

[#] Next page

Go to full version