Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Midi File Parser / Player

An asset by BrainFooLong
The page banner background of a mountain and forest

Quick Information

No ratings yet
Midi File Parser / Player icon image
BrainFooLong
Midi File Parser / Player

Parse your midi files directly with native GDScript 4+ with no other dependencies. The example also include a demo of how you can create a sound player based on the parsed midi data.Usagevar parser = MidiFileParser.load_file("res://yourmidi.mid")# parser.header contains midi header data# parser.tracks contains all midi tracks## iterate over tracks and eventsfor track in parser.tracks: for event in track.events: # do something with events here Playback DemoSee midi_file_player_example.gd or load and play scene demo/midi_demo.It will contain all required parts (timing, _process loop) to play notes at correct times.The demo uses a very simple generic audio signal generator. Quality is not good but frequencies are correct. It will play "Beethoven - Fur Elise", which you will know for sure.

Supported Engine Version
4.0
Version String
1.0.1
Support Level
community
Modified Date
11 months ago
Git URL
Issue URL
Download ZIP

Godot GDScript 4+ Midi File Parser and Player

Parse your midi files directly with native GDScript 4+ with no other dependencies. The example also include a demo of how you can create a sound player based on the parsed midi data.

Install

Clone/Download this repository into your project.

Usage

var parser = MidiFileParser.load_file("res://yourmidi.mid")
# parser.header contains midi header data
# parser.tracks contains all midi tracks

## iterate over tracks and events
for track in parser.tracks:
    for event in track.events:
        # do something with events here   

Playback Demo

See midi_file_player_example.gd or load and play scene demo/midi_demo.

It will contain all required parts (timing, _process loop) to play notes at correct times.

The demo uses a very simple generic audio signal generator. Quality is not good but frequencies are correct. It will play "Beethoven - Fur Elise", which you will know for sure.

Parse your midi files directly with native GDScript 4+ with no other dependencies. The example also include a demo of how you can create a sound player based on the parsed midi data. Usage var parser = MidiFileParser.load_file("res://yourmidi.mid") # parser.header contains midi header data # parser.tracks contains all midi tracks ## iterate over tracks and events for track in parser.tracks: for event in track.events: # do something with events here Playback Demo See midi_file_player_example.gd or load and play scene demo/midi_demo. It will contain all required parts (timing, _process loop) to play notes at correct times. The demo uses a very simple generic audio signal generator. Quality is not good but frequencies are correct. It will play "Beethoven - Fur Elise", which you will know for sure.

Reviews

0 total reviews
No ratings yet

Your Rating

How do you rate this asset?
Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

No ratings yet
Midi File Parser / Player icon image
BrainFooLong
Midi File Parser / Player

Parse your midi files directly with native GDScript 4+ with no other dependencies. The example also include a demo of how you can create a sound player based on the parsed midi data.Usagevar parser = MidiFileParser.load_file("res://yourmidi.mid")# parser.header contains midi header data# parser.tracks contains all midi tracks## iterate over tracks and eventsfor track in parser.tracks: for event in track.events: # do something with events here Playback DemoSee midi_file_player_example.gd or load and play scene demo/midi_demo.It will contain all required parts (timing, _process loop) to play notes at correct times.The demo uses a very simple generic audio signal generator. Quality is not good but frequencies are correct. It will play "Beethoven - Fur Elise", which you will know for sure.

Supported Engine Version
4.0
Version String
1.0.1
Support Level
community
Modified Date
11 months ago
Git URL
Issue URL
Download ZIP

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers