Skip to content

milnet2/midi-grammar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ANTLR based grammars for handling MIDI

WARNING

This project is in a very early stage, you should avoid it in production-code. See Alternatives below.

Goals of the project:

  • Provide easy-to-use access to MIDI-events

  • Be resilient to broken MIDI-files

  • Be easy to extend

  • Eventually support for other programming-languages ANTLR supports

    • Currently, the Lexer uses a custom super-class (written in Java) which limits the available platforms

Alternatives

Alternative Description

javax.sound.midi from the JDK

  • Very well tested

  • Only exposes byte-representation of MIDI-messages

  • Maybe a bit cumbersome to use at times

ktmidi

  • Kotlin Multiplatform

  • Support for MIDI 2.0

Usage

Read in .mid file into a tree-structure

link:midi-file-grammar/src/test/kotlin/de/tobiasblaschke/lib/midi/adapter/grammar/Midi1FileParserTest.kt[role=include]

Read in .mid file as token-stream

link:midi-file-grammar/src/test/kotlin/de/tobiasblaschke/lib/midi/adapter/grammar/Midi1FileLexerTest.kt[role=include]

About

ANTLR based grammars for handling MIDI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published