All Projects → follower → godot-midi-input-example

follower / godot-midi-input-example

Licence: MIT license
Example of MIDI Input handling (e.g keyboard/controller) for the Godot game engine.

Programming Languages

GDScript
375 projects

Projects that are alternatives of or similar to godot-midi-input-example

CellForest
A cellular-automaton forest simulation set to live data-driven music.
Stars: ✭ 19 (-45.71%)
Mutual labels:  godot
ZHSAN3
中華三國志重製版3.0
Stars: ✭ 21 (-40%)
Mutual labels:  godot
midi2pico
Midi to PICO-8 converter
Stars: ✭ 51 (+45.71%)
Mutual labels:  midi
gdscript-online.github.io
Try out GDScript without installing Godot
Stars: ✭ 62 (+77.14%)
Mutual labels:  godot
godot-chip8-emulator
A CHIP-8 emulator made with Godot, written in GDScript.
Stars: ✭ 51 (+45.71%)
Mutual labels:  godot
godot-awesome-splash
Collection of splash screens in Godot
Stars: ✭ 137 (+291.43%)
Mutual labels:  godot
rtmidi2
python bindings to rtmidi allowing to listen to multiple ports simultaneously
Stars: ✭ 16 (-54.29%)
Mutual labels:  midi
MusicManipulations.jl
Manipulate music data, humanize, quantize and analyze music performances with Julia
Stars: ✭ 41 (+17.14%)
Mutual labels:  midi
godot-lua-pluginscript
Godot PluginScript for the Lua language, currently based on LuaJIT's FFI
Stars: ✭ 182 (+420%)
Mutual labels:  godot
godot-trackball-camera
A short Godot addon that adds a TrackballCamera node without gimbal lock.
Stars: ✭ 22 (-37.14%)
Mutual labels:  godot
FreeRoamRoguelikeRacerPrototype
A 3D free roam racer in a procedurally generated map
Stars: ✭ 77 (+120%)
Mutual labels:  godot
mdxtools
A bunch of tools for handling the MDX music format (music for the Sharp x68000)
Stars: ✭ 44 (+25.71%)
Mutual labels:  midi
pymidi
Python library for building RTP-MIDI / AppleMIDI clients and servers
Stars: ✭ 35 (+0%)
Mutual labels:  midi
godot-admob-editor
This repository is for Godot's Addons to integrate natively AdMob to your Game Project without much configurations, with a beautiful UI and directly inside Godot Editor!
Stars: ✭ 43 (+22.86%)
Mutual labels:  godot
linux-show-player
Linux Show Player - Cue player designed for stage productions
Stars: ✭ 147 (+320%)
Mutual labels:  midi
godot 2d navmesh generator
Godot plugin that generates a 2D navigation mesh from collsion nodes.
Stars: ✭ 35 (+0%)
Mutual labels:  godot
godot-apple-signin
Module for sign in with Apple in Godot
Stars: ✭ 27 (-22.86%)
Mutual labels:  godot
entity spell system
An entity and spell system c++ godot engine module, for complex (optionally multiplayer) RPGs.
Stars: ✭ 86 (+145.71%)
Mutual labels:  godot
A-Key-s-Path
A short puzzle-platformer game made with Godot, running on GLES 2.0.
Stars: ✭ 146 (+317.14%)
Mutual labels:  godot
VSLilyPond
VSCode Extension for LilyPond
Stars: ✭ 59 (+68.57%)
Mutual labels:  midi

Godot MIDI Input example

Home: https://github.com/follower/godot-midi-input-example

Official Godot docs:

The Demo

The enclosed Godot 3.1-compatible project lists available MIDI input devices, dumps textual information about the events received and visualises key presses on a 1-octave on screen keyboard.

Just The Code...

If you just want some example code so you can implement your own MIDI Input-based Godot project...

# The MIDI Input specific parts...

func _ready():
	OS.open_midi_inputs() # Required for cross-platform reliability.

	print(OS.get_connected_midi_inputs()) # List available MIDI input sources (e.g. keyboard, controller).


func _unhandled_input(event : InputEvent):

	if (event is InputEventMIDI): # When we get a MIDI input event...

		var event_dump_rb : String = ""

		# Display the available property values...
		event_dump_rb += "chn: {channel} msg: {message}\n".format({"channel": event.channel, "message": event.message})
		event_dump_rb += "  pitch: {pitch} vel: {velocity}\n".format({"pitch": event.pitch, "velocity": event.velocity})

		event_dump_rb += "\n"

		print(event_dump_rb)


		# Example of converting pitch to a keyboard key (not a musical key) within an octave.
		var key_index = event.pitch % 12


		# Handle the received message type appropriately...
		match event.message:
			MIDI_MESSAGE_NOTE_ON:
				# Do something here...

			MIDI_MESSAGE_NOTE_OFF:
				# Do something here...

Brought to you by follower at http://rancidbacon.com/.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].