Thread Rating:
  • 5 Vote(s) - 4.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Have Player Piano use MIDI files
#1
Music 
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 bee , bad sad greater domestic space-bee , or crazy a greater domestic space-bee that's gunna cause some trouble  idea?
Reply
#2
Another alternative is ABC files
Reply
#3
Because of performance issues with 3D sounds, this idea is currently not possible.
Reply
#4
(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 bee , bad sad greater domestic space-bee , or crazy a greater domestic space-bee that's gunna cause some trouble  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.
Reply
#5
(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 bee , bad sad greater domestic space-bee , or crazy a greater domestic space-bee that's gunna cause some trouble  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.

[Image: xgtJBvB.png]

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.
Reply
#6
The alternative is in the Player Projects channel on Discord.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)