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

Post by vicentefer31 »

[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 267 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 15777 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 »

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 204 times
Nicholas
Posts: 13135

Post by Nicholas »

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

Post by vicentefer31 »

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 »

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 »

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 »

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 210 times
vicentefer31
Posts: 899

Post by vicentefer31 »

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 »

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 »

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 »

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

Post by vicentefer31 »

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: 13135

Post by Nicholas »

Pedals send CC messages. See table 3 on this page around rows 64-68.
TonE
Synthesia Donor
Posts: 1180

Post by TonE »

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

Post by vicentefer31 »

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: 13135

Post by Nicholas »

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

Post by vicentefer31 »

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: 13135

Post by Nicholas »

Got a chance to try this out myself.

It did end up being very cool. ;)
vicentefer31
Posts: 899

Post by vicentefer31 »

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: 13135

Post by Nicholas »

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