Keyboard Only Navigation by TonE

Synthesia is a living project. You can help by sharing your ideas.
Search the forum before posting your idea. :D

No explicit, hateful, or hurtful language. Nothing illegal.
vicentefer31
Posts: 899
Location: Madrid, Spain

Post by vicentefer31 » 11-02-09 3:32 am

[Note from Nicholas (9/9/2012): While this is still a very useful tool, much of this functionality is available inside Synthesia via the Shortcuts section on the Settings screen. The functionality between this and Synthesia's shortcuts doesn't overlap completely, but there is a lot available there.]

TonE has made a wonderful script for you can have "Keyboard Only Navigation" in Windows and you don't need the computer Keyborad.
SynthesiaPitchclassControl.rar
(38.83 KiB) Downloaded 254 times
What else do you need?
-Your Pianokeyboard has to have pitchbend wheel
-AutoHotKeys

How to use it?

0. Install AutoHotkey if not done so far,
1. Extract the full content of the rar package above into a new directory on your harddisk, rather than only the .ahk file. You need really all files for this addon to work properly.
2. Double click SynthesiaPitchclassControl.ahk to start this addon.
3. Select from the Tray icon of this addon by right clicking onto this AutoHotkeys icon the correct MIDI-input device where your midi keyboard is connected to.
4. Start Synthesia.
5. Select your midi keyboard input port in Synthesia.
6. All the midi keys will only work as "Keyboard Only Navigation" if you push the pitchbend wheel at the same time to its minimum value, meaning fully down or fully left, depending on which kind of keyboard you are using. I hope you have a pitchwheel on your keyboard.
7. Your keyboard output should be set also to midi channel 1.
Keyboard Navigation.png
Keyboard Navigation.png (37.32 KiB) Viewed 10539 times
Enter = pitchbend wheel & any C
Esc = pitchbend wheel & any C#
Speed - = pitchbend wheel & any D
Speed + =pitchbend wheel & any E
Up = pitchbend wheel & any E
Down = pitchbend wheel & any F
Pause= pitchbend wheel & any A#

That is all, then hopefully this should allow you to navigate in Synthesia using only the midi keyboard.

8. To close this addon again, you can select as midi input "No input" and then press F1. Normally you would do this if you want to stop practicing with Synthesia.

Maybe some other forum users can try it also and write here if it worked for them.
Picasso: I am always doing that which I cannot do, in order that I may learn how to do it.

TonE
Synthesia Donor
Posts: 1180

Post by TonE » 11-02-09 2:48 pm

In the attachment below you can download a slightly improved version. Thanks to the hint from the AutoHotkey forum user, genmce, I added the line

Code: Select all

	midi_in_Stop()
into the exiting part of the script. This removes any problems with closing the midi input port. It means you can now close this addon by pressing F1 without the need to set the input port to "No input" as it was required before.

Thanks vicentefer31 for re-introducing the script here separately again, somehow noone seems to be interested in it, but at least we are having our fun. :)
Attachments
SynthesiaPitchclassControl.rar
(38.59 KiB) Downloaded 193 times

Nicholas
Posts: 12289

Post by Nicholas » 11-02-09 3:23 pm

TonE wrote:somehow noone seems to be interested in it, but at least we are having our fun. :)
You guys are the power users of the power users. ;)

I have been meaning to take a look at it myself. I'll let you know when I get a chance. It sounds very cool.

vicentefer31
Posts: 899
Location: Madrid, Spain

Post by vicentefer31 » 11-02-09 4:19 pm

Nicholas wrote:It sounds very cool.
It's very, very cool. Since I'm using this TonE's script I don't need to use the PC Keyboard. Right now, the game can be played start to finish without touching a mouse or typing keyboard.

Wikipedia: "Ergonomics is employed to fulfill the two goals of health and productivity. It is relevant in the design of such things as safe furniture and easy-to-use interfaces to machines."
Picasso: I am always doing that which I cannot do, in order that I may learn how to do it.

Nii
Posts: 8

Post by Nii » 11-03-09 3:56 am

I haven't looked at it closely, but it seems that a pitch wheel is required? Can the script be edited? I don't have a pitch wheel =(

TonE
Synthesia Donor
Posts: 1180

Post by TonE » 11-03-09 5:52 am

Nii wrote:I haven't looked at it closely, but it seems that a pitch wheel is required? Can the script be edited? I don't have a pitch wheel =(
Yes, the script can be edited as you like, if you tell me how big your midi keyboard is, meaning telling me your midi keyboards pitch range, for example a typical 61 key midi keyboard has a pitch range from pitch 36 to pitch 96. If you have a similar midi keyboard range, but no pitchwheel I would recommend then using the highest midi note, in this example the pitch 96 to use as "activation switch".

Besides being an editable script it is also a very short script and easily understandable script, what you will recognize when you load it in any text editor.

TonE
Synthesia Donor
Posts: 1180

Post by TonE » 11-03-09 6:35 am

Here is a modified version for Synthesia users which do not have a pitchwheel on their midi keyboards, instead you can use the key or pitch 96, which is a C6, C7, C8 or Csomething depending on the used definition standard. Thus I prefer the exact pitch value 96. Use this key to "activate" Keyboard Only Navigation control.

You can define any other maximum pitch value in the script if you want, by changing the definition of MaxPitch in the script in two places.
Attachments
SynthesiaPitchclassControlPitch96.rar
(38.66 KiB) Downloaded 199 times

vicentefer31
Posts: 899
Location: Madrid, Spain

Post by vicentefer31 » 11-04-09 3:40 am

Hello TonE I have added two new funtions to your script in my computer, in D# for go to SongLibrary and F# for start a song no matter in what window of the game you are.
What do you think?:

if (pitchclass == 3 && LastVelocity != 0 && LastWheel == 0) ; note D# which is mapped to go to SongLibrary
{
Send, {enter}
Sleep, 5
Send, {enter}
Sleep, 5
Send, {enter}
Sleep, 5
Send, {enter}
Sleep, 5
Send, {enter}
Sleep, 5
Send, {enter}
Sleep, 5
Send, {ESC}
Sleep, 5
Send, {ESC}
Sleep, 5
Send, {ESC}
}
if (pitchclass == 6 && LastVelocity != 0 && LastWheel == 0) ; note F# which is mapped to Start the song to play
{
Send, {enter}
Sleep, 5
Send, {ESC}
Sleep, 5
Send, {enter}
Sleep, 5
Send, {enter}
Sleep, 5
Send, {enter}
Sleep, 5
Send, {enter}
Sleep, 5
Send, {enter}
Sleep, 5
Send, {Space}
}
Picasso: I am always doing that which I cannot do, in order that I may learn how to do it.

TonE
Synthesia Donor
Posts: 1180

Post by TonE » 11-04-09 5:39 am

vicentefer31 wrote:What do you think?
I did not test them myself. But my opinion is the danger or risk of such more complex "programming" or longer sequences is you can easily get a bad or unwanted behaviour if not properly designed and tested before. Usually you should guarantee an initial state from where your operation is starting. This seems not to be available in the code yet, so the user should not be allowed to use those long sequences of key presses whenever she wants.

But if the initial condition is checked and guaranteed it is a good idea also using any kind of sequences/automations to reach the target end state in one shot.

Frost
Posts: 51

Post by Frost » 11-04-09 11:22 am

Thanks TonE. I'll test it as soon as I find the time, it will really be useful.

A suggestion: is it possible for the modifier to be a pedal? I never use the soft pedal, or even the sostenuto. Are the pedals defined in autohotkeys, can I map them to enter/esc, or settings like "middle C while depressing the pedal --> down arrow"?

TonE
Synthesia Donor
Posts: 1180

Post by TonE » 11-04-09 4:00 pm

Frost wrote:A suggestion: is it possible for the modifier to be a pedal? I never use the soft pedal, or even the sostenuto. Are the pedals defined in autohotkeys, can I map them to enter/esc, or settings like "middle C while depressing the pedal --> down arrow"?
Midi input library for AutoHotkey supports note, CC and pitchwheel events. So for pedal if it sends out some CC, it should also work. You can find out e.g. with MIDI-OX what kind of events your pedal is sending out.

vicentefer31
Posts: 899
Location: Madrid, Spain

Post by vicentefer31 » 11-04-09 4:20 pm

Hi TonE, your script has a lot of posibilities. I'm thinking about the future "Search Box" for the Song Library (maybe for 0.7.1) Could it be posible something like this?
You play C1 then it show in the "Search Box" for example "Hanon"
D1-> "Sound Tracks"
E1-> POP ...
And you only have one octave for exmple C3 to B3 for the Keyoabard only Navigation?
Picasso: I am always doing that which I cannot do, in order that I may learn how to do it.

Nicholas
Posts: 12289

Post by Nicholas » 11-05-09 11:27 am

Pedals send CC messages. See table 3 on this page around rows 64-68.

TonE
Synthesia Donor
Posts: 1180

Post by TonE » 11-05-09 12:00 pm

Frost wrote:is it possible for the modifier to be a pedal? I never use the soft pedal, or even the sostenuto.
CC 64 Damper Pedal on/off (Sustain)
CC 67 Soft Pedal On/Off

So you seem to need CC 64.

vicentefer31
Posts: 899
Location: Madrid, Spain

Post by vicentefer31 » 11-05-09 4:52 pm

vicentefer31 wrote:Hi TonE, your script has a lot of posibilities. I'm thinking about the future "Search Box" for the Song Library (maybe for 0.7.1) Could it be posible something like this?
You play C1 then it show in the "Search Box" for example "Hanon"
D1-> "Sound Tracks"
E1-> POP ...
And you only have one octave for exmple C3 to B3 for the Keyoabard only Navigation?
I have seen it is very easy to do. AutoHotkeys is very useful.
Picasso: I am always doing that which I cannot do, in order that I may learn how to do it.

Nicholas
Posts: 12289

Post by Nicholas » 11-05-09 5:15 pm

vicentefer31 wrote:AutoHotkeys is very useful.
Yeah it is. I used it a while back for some World of Warcraft silliness (playing around with dual boxing) and I was super impressed with how easy it was to get some reasonably interesting behavior up and running in almost no time.

vicentefer31
Posts: 899
Location: Madrid, Spain

Post by vicentefer31 » 11-05-09 5:23 pm

Now, I'm using AutoHotkeys for Keyboard only Navigation and when Search/textbox is ready I'm going to use it to do Playlists :D
Picasso: I am always doing that which I cannot do, in order that I may learn how to do it.

Nicholas
Posts: 12289

Post by Nicholas » 11-08-09 1:10 am

Got a chance to try this out myself.

It did end up being very cool. ;)

vicentefer31
Posts: 899
Location: Madrid, Spain

Post by vicentefer31 » 11-08-09 4:00 am

Yes, but remember you have said you're actually in league with a secret organization whose goal is to bring down all of the major exercise equipment manufacturers, so you can't add this feature to the game. :(

Jeez, Nicholas... ;)
Picasso: I am always doing that which I cannot do, in order that I may learn how to do it.

Nicholas
Posts: 12289

Post by Nicholas » 11-09-09 11:43 pm

Just said it was cool... didn't say I was adding it. :D

On that note, I wonder if I should change all the key mappings before the next release?! Perhaps randomize them, like those old shareware Winzip nag screens after you were past your 30 days.

That would show those manufacturers! *laughs evilly*

Post Reply