Posts: 13
Threads: 3
Joined: Aug 2021
BYOND Username: Facsimile
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:- 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?
Posts: 233
Threads: 23
Joined: Jul 2019
BYOND Username: mralexs
Character Name: JC Denton
Another alternative is ABC files
Posts: 13
Threads: 3
Joined: Aug 2021
BYOND Username: Facsimile
Because of performance issues with 3D sounds, this idea is currently not possible.
Posts: 350
Threads: 20
Joined: Aug 2022
BYOND Username: Glamurio
Character Name: Amy Ward, Silas Moore, Emily Larson
(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.
Posts: 13
Threads: 3
Joined: Aug 2021
BYOND Username: Facsimile
04-13-2024, 04:34 PM
(This post was last modified: 04-13-2024, 04:41 PM by Facsimile.)
(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.
Posts: 13
Threads: 3
Joined: Aug 2021
BYOND Username: Facsimile
The alternative is in the
Player Projects channel on
Discord.