Garry's Mod

Garry's Mod

74 ratings
MIDI Playable Piano
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Entity
Addon Tags: Fun
File Size
Posted
Updated
27.830 MB
20 Nov, 2021 @ 6:57am
3 Jun, 2022 @ 3:35pm
8 Change Notes ( view )

Subscribe to download
MIDI Playable Piano

Description
This is a modified version of the Playable Piano addon (which is made by MacDGuy). It can be used safely alongside the original one.
Changes compared to original:
- Enhanced sound processing: note sound is stopped when a key is released.
- MIDI input support. This requires the GMCL MIDI[github.com] binary LUA module to be installed. See the Installation[github.com] section of the GMCL MIDI README file.

MIDI Input
If GMCL MIDI module is installed correctly, you should see the following messages in the Garry's Mod developer console:
Piano MIDI: GMCL MIDI module detected! Piano MIDI: GMCL MIDI module initialised. Use console commands midi_devices and midi_debug [0|1] to use.
To select MIDI device to use as input for the piano, execute the following command in the developer console:
midi_devices

Usage
Make sure you spawn the entity and not just the prop, otherwise you won't be able to play or hear anything!
You can adjust the velocity value for a MIDI key press that produces the highest volume sound by changing value of the
midi_vel_clamp
console variable. This is useful if you wish to get higher volume sounds out of gentle key presses.

Scripts
The source code of the LUA script library that drives this addon is available at GitHub[github.com].



A bunch of kudos go to Mr. xDShot and his friend for performing the initial testing of this addon.
If you like this creation, please, support the author of the original Playable Piano addon!
21 Comments
oneinfiniteloop  [author] 12 Nov, 2024 @ 3:00pm 
You'll have to use sustain pedal if you have MIDI keyboard, or just use original Playable Piano addon if you use PC keyboard to play.
𝒱𝒾𝓁𝑜𝓈 6 Oct, 2024 @ 5:30am 
Hi, how to disable the option "- Enhanced sound processing: note sound is stopped when a key is released." Thanks
Because it cut very brutally the song sometimes.
mızradan 12 Apr, 2023 @ 3:54am 
baller
The Mingus (Mingunator) 4 Feb, 2023 @ 11:49am 
nevermind, it's in fun+games
The Mingus (Mingunator) 4 Feb, 2023 @ 11:47am 
im trying to use this, but it just isn't anywhere in my spawn menu
oneinfiniteloop  [author] 18 Dec, 2022 @ 11:45am 
If a file that corresponds to GMod branch in use is present and you're still getting the same error, try installing the Microsoft Visual C++ runtime libraries package (https://aka.ms/vs/17/release/vc_redist.x86.exe for default branch, https://aka.ms/vs/17/release/vc_redist.x64.exe for x86-64 branch).
oneinfiniteloop  [author] 18 Dec, 2022 @ 11:21am 
Apparently, there is a problem with your GMCL binary LUA module installation. If you're running Windows and you're using the default GMod branch, there should be a file called 'gmcl_midi_win32.dll' inside the garrysmod/lua/bin directory of your GMod installation directory. If you're using the x86_64 branch, there should be a file called 'gmcl_midi_win64.dll' in the same directory.
ahmed vengalbi 27 Nov, 2022 @ 3:41am 
Hi! I have a problem, I did everything as needed, but the console error "[MIDI Playable Piano] Couldn't include file 'includes\modules\midi.lua' - File not found (@lua/midi_interface/base.lua (line 150))
" Tell me if you know how to solve the problem. Thanks!
Cigarette 3 Sep, 2022 @ 4:41pm 
Just going to confirm, this lets me use a midi file, and play it on a PC keyboard?
oneinfiniteloop  [author] 3 Sep, 2022 @ 4:32pm 
If you're using Windows, try this: https://www.tobias-erichsen.de/software/loopmidi.html