Frage

I've been working on a PHP script that takes a word or phrase and converts it into ASCII tablature using a combination of Morse code rules and my own set of rules.

At this point, the program is nearly complete... all that's missing is the code to convert the ASCII tablature into a MIDI file.

The most recent version of the script can be found here:

Morse Code Machine

I found lots of resources for multiple languages, but still can't find any data definitions for MIDI files in XML or MF2T/T2MF formats. I can understand the ASCII format and adjust my script's output accordingly, but the closest tool that I could find that converts ASCII into MIDI is this Perl module. It seems the most promising tool/resource out of everything I've found so far, but I am looking for a PHP solution.

Does anyone have any suggestions as to how I might go about figuring out the "syntax" of an XML and/or MF2T/T2MF text format for tablature? It seems easy enough, but I'm just finding tools and scripts with little to no documentation on the file format used to create MIDI files from ASCII formatted tablature.

The ASCII Tablature will conform to these standards and I want to programmatically convert the ASCII tabs directly into MIDI files via PHP (or Perl if I have to)


EDIT:

Found another SO question that links to a bunch of sites that describe the technical details of the MIDI file format.

Here's the link: What is the structure of a MIDI file?

Another good resource for MIDI file format:

http://courses.cs.washington.edu/courses/cse466/03au/Labs/lab-5/Lab5_files/Standard%20MIDI%20file%20format,%20updated.pdf

War es hilfreich?

Lösung

I ended up changing my approach to the problem. I used the RTTTL format because it fulfills all my requirements. The format is limited to playing only one note at a time. That means chords (two or more notes &| string played simultaneously) aren't possible. I have only been testing the RTTTL conversion method for a short time so I could be wrong, but I couldn't find any way to accomplish chords with this protocol.

Since my program doesn't require that more than one note be played at the same time, I didn't end up sacrificing anything by using the RTTTL format.

I would still like to figure out ANY way to programmatically convert tablature in any type of structured text form into any type of audible file (MIDI, WAV, MP3, OGG, WMA, etc...)

For now, I'm closing this question because I've resolved my issue although not exactly the way I initially intended on doing so.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top