midi-di 0.0.1
Library for reading and writing MIDI data
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
midi-di
Library for MIDI definitions and for reading MIDI files. It is completely written in D with no dependencies other than the standard library.
Simple Example
void main(string[] args) {
import mididi.reader : readMIDIFile;
import mididi.writer : writeMIDIFile;
import std.stdio : stdout;
if (args.length < 2) {
stdout.writeln("Too few arguments");
return;
}
// reads a file specified on the command line
// then writes and reads the file to show that the content is preserved
const midi = readMIDIFile(args[1]);
writeMIDIFile("./tmp.midi", midi);
const copy = readMIDIFile("./tmp.midi");
assert(midi == copy);
}
Documentation
See w2ptr.github.io/docs/midi-di for documentation.
Modules
The mididi
package contains the following modules:
mididi.def
: containsenum
definitions and some functions that are relevant to MIDI data.mididi.types
: contains the type definitions of the structures used in MIDI.mididi.reader
: contains the parser (MIDIReader!T
) struct and some convenience functions for reading MIDI files.mididi.writer
: contains the writer (seewriteXYZ
functions) and some convenience functions for writing to MIDI files.
- Registered by w2ptr
- 0.0.1 released 3 years ago
- w2ptr/midi-di
- BSL-1.0
- Copyright © 2021, Wout Huynen
- Authors:
- Dependencies:
- none
- Versions:
-
0.0.1 2021-Aug-03 ~main 2021-Aug-09 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
1 downloads this month
-
68 downloads total
-
- Score:
- 0.6
- Short URL:
- midi-di.dub.pm