GithubHelp home page GithubHelp logo

9b6cuv8rgy / cfc_midi_interface Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cfc-servers/cfc_midi_interface

0.0 0.0 0.0 34 KB

Serverside addon to enable MIDI interface

License: GNU General Public License v3.0

Lua 100.00%

cfc_midi_interface's Introduction

cfc_midi_interface

This addon allows users with MIDI devices to play the Playable Piano addon with said device.
It also integrates Starfall hooks and functions for the MIDI devices and Playable Piano.

Requirements

Clients are required to have gmcl_midi.dll in garrysmod/lua/bin for MIDI devices to be used.

Just click the link and download the appropriate version of gmcl_midi from the latest release.

If you're running default Garry's Mod, download gmcl_midi_win32.dll.

If you're running Garry's Mod on the 64-bit / Chromium branch, download gmcl_midi_win64.dll.

Console Commands

  • midi_devices - This allows you to select the MIDI device you wish to use.
  • midi_debug [0|1] - This boolean ConVar enables/disables debug prints in console, which show information about midi events as they occur.
  • midi_reload - This simply reloads the addon, and searches for gmcl_midi.dll again, allowing users to add the file without relog.
  • sv_midi_sf_note_quota - This is a server-side quota for starfall playNote calls (per second) (def 30).

Starfall

  • The MIDI hook is now available on client-side, using the following syntax:
    nil GM:MIDI( float time, int command, int note, int velocity )
    or more often:
    hook.add("MIDI", "my_unique_identifier", function(time, command, note, velocity) end)
  • Entities now have the boolean Entity:IsInstrument() and boolean Entity:playNote(int note) functions.
    Entity:playNote takes a note index from 1-61 and returns a success boolean.
    NOTE: Entity:playNote is limited by the sv_midi_sf_note_quota ConVar.
    NOTE2: Entity:playNote also requires the calling player have PhysGun access to the instrument entity.

cfc_midi_interface's People

Contributors

samuelwilliams99 avatar brandonsturgeon avatar plally avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.