Have Player Piano use MIDI files - Facsimile - 04-07-2024
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:- 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?
Cons:- 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?
RE: Have Player Piano use MIDI files - mralexs - 04-09-2024
Another alternative is ABC files
RE: Have Player Piano use MIDI files - Facsimile - 04-11-2024
Because of performance issues with 3D sounds, this idea is currently not possible.
RE: Have Player Piano use MIDI files - Glamurio - 04-13-2024
(04-07-2024, 03:39 PM)Facsimile Wrote: 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:- 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?
Cons:- 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?
Yes please. The current music system is honestly a bit of a nightmare and you need like an advanced degree to use it or use macros that play it for you.
RE: Have Player Piano use MIDI files - Facsimile - 04-13-2024
(04-13-2024, 09:28 AM)Glamurio Wrote: (04-07-2024, 03:39 PM)Facsimile Wrote: 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:- 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?
Cons:- 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?
Yes please. The current music system is honestly a bit of a nightmare and you need like an advanced degree to use it or use macros that play it for you.
As I said before it's not currently possible. Here's the screenshot of #imcoder on Discord regarding the issue, for posterity in case anyone searches this up later.
Though this is not possible, the silver lining is that I'm working on a design doc that aims to create a new musical instrument based on the Player Piano that expands upon it.
RE: Have Player Piano use MIDI files - Facsimile - 04-16-2024
The alternative is in the Player Projects channel on Discord.
|