Tower Unite

Tower Unite

81 ratings
Midi Keyboard Program Linux/Windows
By Mattio
A Python script that lets you use your MIDI keyboard in game and play like a real Ludwig.
   
Award
Favorite
Favorited
Unfavorite
Running on Windows
Before running make sure you have your MIDI capable keyboard plugged in, turned on and connected to your PC. Also make sure your PC detects it.
Also make sure your MIDI keyboard is set to Channel 1.

If you want to run the code directly with Python(You're going to need knowledge on executing and installing modules), source: https://github.com/Mattiox/tower-midi

Downloading and Running
For convenience, you can download and extract an executable version that means you won't even need Python installed, just download, extract, and run.

Download TowerMidi.zip. Extract and run Tower.exe from here:

https://github.com/Mattiox/tower-midi/releases


Click the dropdown box, and select your keyboards name, and click Start. Now when you press a button on your MIDI Keyboard your PC should recieve the correct letters, you can test this in Notepad or any text editor if you want to try before entering the game.

I added a QWERTZ button on request, which switches the Y and Z. If you're one of these weird azerty or zipboptoodlepip people with funky keyboard layouts and really want to play, let me know and I'll add a magic thing that does stuff.
Running on Linux
Reqs: Python 2.7, PyUserInput and Pygame.
But you should know how to get it going anyway if you're on Linux ;)

If when you close the program you encounter a terminal error saying;
PortMidi call failed... PortMidi: `Bad pointer' type ENTER...
It's rather annoying and I just deal with it, but if you superly insist on a fix, this guy found one; http://git.net/ml/python-pygame/2011-02/msg00076.html
Extra Info / Not working?
If you recieve no output, it's possible your keyboard is set to the wrong channel. Your manual should show you how to change it, manuals also exist online for pretty much everything if you need to find it.


This script uses Pygame's Midi module, which in turn uses PortMidi, it's a proper Midi module that can interact with real and virtual Midi devices. For more info on it you can see here; http://www.pygame.org/docs/ref/midi.html

What I mean by this is that if your device isn't showing up or the program errors when you run it, it's likely your end since the module is popular and written by someone who knows their stuff.
Although other MIDI software like Synthesia etc. shouldn't interfere, it has been known to cause problems after installing this software without restarting your PC. So if you install any MIDI software take note that it could be that causing the problems.
116 Comments
Eli Scrubs 3 Jul, 2021 @ 6:14am 
wtf is a midi keyboard
ᅚᅚJeffery 28 Jun, 2019 @ 11:12am 
Make same thing but now for fish :> :getin:
Kitteh 21 Aug, 2018 @ 2:15pm 
thanks!
Mattio  [author] 21 Aug, 2018 @ 2:08pm 
Not stupid at all :) it can't since I never designed it for that, this is only for connecting a midi keyboard. If you want a midi file auto player there are some available on the Pixeltail forums that people made, I've never used them though but a quick search gets a couple results
Kitteh 21 Aug, 2018 @ 1:59pm 
Stupid question but can this also run midi files?
Mattio  [author] 26 Aug, 2017 @ 6:46am 
Just want to say I have updated the program. Now telling you if your Channel is set wrong and if the program doesn't detect any Midi devices.

There's no real point in getting the new version to be honest, there's no real difference in functionality, if it works then it works. Hopefully didn't break something :emofdr:
Mattio  [author] 26 Aug, 2017 @ 3:44am 
No problem, I'm going to add a little popup for those in the wrong channel so it can be immediately known in the future :)
Dylan 26 Aug, 2017 @ 3:38am 
Thanks I never knew what the advanced button was for. Got it working now, also taught me something new, thanks :)
Mattio  [author] 26 Aug, 2017 @ 2:38am 
Have you also tried the second option MIDIIN2 too?
Is your keyboard definitely set to channel 1?
I have a feeling it's the channel since the program detects and runs, the manual link here on page 7 tells you how to set it: https://www.allfordj.ru/upload/iblock/653/rukovodstvo_polzovatelya_m_audio_keystation_49_ii.pdf#page=7
Dylan 26 Aug, 2017 @ 1:30am 
Any idea what i'm doing wrong? https://youtu.be/7thTLXSGyA8 Tried typing in search but it didn't do anything.