04-07-2024, 03:39 PM
The Piano Player currently plays a separate sound for each note.
What if we just convert plain-text input into a MIDI file and play that instead?
Instead of just accepting a MIDI file from the user, the plain-text format can be used limit what MIDI messages can be used and how they're used in the resulting MIDI file.
The plain-text input would probably be similar to the current format, except with tick delta times added on.
Pros:
Alternatives
XM (and other tracker formats)
Probably not?
While they have the ability to set custom samples, those samples are packaged into the file itself. You'd just end up making multiple copies of the same exact sample.
Execution
I have a passing familiarity with the MIDI files, so I can (probably) make a writer.
Question
Is it a good , bad , or crazy idea?
What if we just convert plain-text input into a MIDI file and play that instead?
Instead of just accepting a MIDI file from the user, the plain-text format can be used limit what MIDI messages can be used and how they're used in the resulting MIDI file.
The plain-text input would probably be similar to the current format, except with tick delta times added on.
Pros:
- Access to several MIDI instruments (e.g. steel drums, music box, church organ, etc.)
- Can precisely set the BPM (sleep() is a bit janky)
- It's one sound instead of multiple, so it can be easily stopped
- Might be more performant?
- What SoundFont BYOND uses is what you get (probably Microsoft GS Wavetable Synth on Windows)
- Overhead of storing the generated MIDI files temporarily
Alternatives
XM (and other tracker formats)
Probably not?
While they have the ability to set custom samples, those samples are packaged into the file itself. You'd just end up making multiple copies of the same exact sample.
Execution
I have a passing familiarity with the MIDI files, so I can (probably) make a writer.
Question
Is it a good , bad , or crazy idea?