Skip to content

Preliminary MIDI support#1

Open
FPtje wants to merge 5 commits into
macdguy:masterfrom
FPtje:master
Open

Preliminary MIDI support#1
FPtje wants to merge 5 commits into
macdguy:masterfrom
FPtje:master

Conversation

@FPtje
Copy link
Copy Markdown

@FPtje FPtje commented Sep 12, 2014

This pull request adds support for the http://facepunch.com/showthread.php?t=1421522 module. In short it does the following:

  1. Load the module if it is present
  2. When the player starts sitting in the piano, it tries to open a connection to the first MIDI device if it exists.
  3. When a note is played on the MIDI device, it is sent to the server.

Some notes:

  • A player might want to change MIDI instruments, as there can be more than one connected to the PC
  • All notes played by a MIDI device are muted clientside. This is because notes play with a slight delay, this can get REALLY annoying when you actually want to play a song. Players can see that the MIDI device works with the note sprites. This works for now, but you want to look for a clearer way to show that it works
  • We must decide what to do regarding the security of loading a clientside module. One could recompile the module and bypass sv_allowcslua with it.
  • The MIDI implementation should be tested on multiplayer synchronisation. With an actual keyboard notes are much more easily played in rapid succession. Net messages have no QoS, so other clients might not hear the same thing the piano player does. Gmcl_midi tells Lua exactly when a MIDI event was received. This information is currently not being used, but it could be used perfectly to synchronize the notes properly with other players if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant