You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
Godot's MIDI's implementation has kind of been left out for years.
I mean, do not get me wrong. it's cool, neat, and it's actually functional, too. But it isn't exactly everyday-use. And that is fairly easy to tell, too. The documentation and related members haven't really been kept up to standard compared to the rest of the class reference. To make it brief, they're full of details that only the author may have been interested in, all the while ensuring that the user looks elsewhere to understand what it all means.
Furthermore, MIDI-related discussion is fairly rare.
I can only speculate that it's been like this because it sounded cool, then it got merged with little insight, and then got left out ever since.
But that would be okay, perhaps? I mean, it's still a shame, but it would be okay...
...If it weren't for the fact that, for some ungodly reason, all of the MIDI constants are present in the GlobalScope. Once again, I can speculate that back when this was implemented it would've not been that big of a deal at all. Maybe it was to be consistent with the Key and MouseButton enum? Either way, now they stand out.
There's many of them, and for how niche their purpose is, they "pollute" the global scope with information most users will never be interested in. The rest of the documentation about MIDI support is sporadically placed around OS and InputEventMIDI, too. Not that there is a lot of it, but it's not exactly a good impression.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Move all of the global scope MIDI constants and related OS's methods and/or into their own singleton or class. Of course, this would leave the currently existing ones as deprecated.
There are a few possible candidates:
One problem could be, that having a whole class with relatively few functions is quite silly. Godot is not exactly a stranger to this (Marshalls, IP...), but it needs to be kept in mind.
The AudioServer singleton
At a first glance, it would seem like the AudioServer would be the most logical.
However, its purpose strictly related to audio stream processing. MIDI is an input interface designed for musical instruments (it doesn't play the audio itself). From an implementation standpoint, this doesn't make sense.
The InputEventMIDI class
One last alternative, and this is kind of my favourite.
In Godot 4, static methods for built-in classes are supported without much hassle. We can take advantage of this to keep the scope of all MIDI properties in check, with the additional benefit of keeping absolutely all of the class reference about MIDI support in one page, since InputEventMIDI is the only one class, pretty much.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
See the above suggestions.
If this enhancement will not be used often, can it be worked around with a few lines of script?
The proposal is about the way these MIDI related methods and constants are exposed, so no.
Is there a reason why this should be core and not an add-on in the asset library?
Everything MIDI is built into core.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
Contributing to the documentation.
Describe the problem or limitation you are having in your project
Godot's MIDI's implementation has kind of been left out for years.
I mean, do not get me wrong. it's cool, neat, and it's actually functional, too. But it isn't exactly everyday-use. And that is fairly easy to tell, too. The documentation and related members haven't really been kept up to standard compared to the rest of the class reference. To make it brief, they're full of details that only the author may have been interested in, all the while ensuring that the user looks elsewhere to understand what it all means.
Furthermore, MIDI-related discussion is fairly rare.
I can only speculate that it's been like this because it sounded cool, then it got merged with little insight, and then got left out ever since.
But that would be okay, perhaps? I mean, it's still a shame, but it would be okay...
...If it weren't for the fact that, for some ungodly reason, all of the MIDI constants are present in the GlobalScope. Once again, I can speculate that back when this was implemented it would've not been that big of a deal at all. Maybe it was to be consistent with the Key and MouseButton enum? Either way, now they stand out.
There's many of them, and for how niche their purpose is, they "pollute" the global scope with information most users will never be interested in. The rest of the documentation about MIDI support is sporadically placed around OS and InputEventMIDI, too. Not that there is a lot of it, but it's not exactly a good impression.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Move all of the global scope MIDI constants and related OS's methods and/or into their own singleton or class. Of course, this would leave the currently existing ones as deprecated.
There are a few possible candidates:
New MIDI singleton
This is the simplest choice.
One problem could be, that having a whole class with relatively few functions is quite silly. Godot is not exactly a stranger to this (Marshalls, IP...), but it needs to be kept in mind.
The AudioServer singleton
At a first glance, it would seem like the AudioServer would be the most logical.
However, its purpose strictly related to audio stream processing. MIDI is an input interface designed for musical instruments (it doesn't play the audio itself). From an implementation standpoint, this doesn't make sense.
The InputEventMIDI class
One last alternative, and this is kind of my favourite.
In Godot 4, static methods for built-in classes are supported without much hassle. We can take advantage of this to keep the scope of all MIDI properties in check, with the additional benefit of keeping absolutely all of the class reference about MIDI support in one page, since InputEventMIDI is the only one class, pretty much.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
See the above suggestions.
If this enhancement will not be used often, can it be worked around with a few lines of script?
The proposal is about the way these MIDI related methods and constants are exposed, so no.
Is there a reason why this should be core and not an add-on in the asset library?
Everything MIDI is built into core.
The text was updated successfully, but these errors were encountered: