[x3d-public] 4.1 > MIDI > any interest in MIDI component?

GPU Group gpugroup at gmail.com
Thu May 25 06:58:09 PDT 2023

Could / should there be a MIDI component in web3d specs?

i've been playing with MIDI for another hobby, and have a MIDI keyboard,
which makes no sound by itself when plugged into a USB port on windows
desktop computer. I have to download a MIDI PLAYER program and run it, and
the one i downloaded says Made with Unity on startup. It doesn't reliably
'find' the MIDI keyboard, so I found some native code library and test
sample scenes, and made a little program, and it finds the keyboard
reliably, and I do a bit of processing on the volume - to slow a press and
I couldn't hear the sound, so I do a test and put a minimum volume.
The program doesn't make sounds by itself. There's a midiin and midiout
object, and the midiout finds a few devices and asks which one. I choose MS
Synth - something built into the microsoft windows operating system. And
that makes sound which comes out the operating system speakers when I
forward the 'messages' to midiout.
A few things to note:
- analogous to new Sound nodes which have source, processing and
destination nodes, except simpler source = midiin, destination = midiout,
and the connections/routing is done in a message callback handler with
procedural code, and can have source with url and .midi file format
- analogous to mouse/keyboard record / playback we use for desktop testing,
with double time delta from last event saved with each event recorded, and
on playback sleep(delta_time) between playing back events.
- processing could be analogous to an event utility node with a few dozen
eventOut fields, with notes being SFBool TRUE when pressed and FALSE when
released -- a bit like a programmable logic controller, except with a
serial stream of timed events.
There's a webMIDI API, although not all browsers have it.
- instead of relying on operating system synth, in theory MIDI sounds could
be made by an array of about 10 OscillatorSource nodes, 10 being a
polyphony like having all 10 fingers on a piano at the same time.


- native lib for desktop win, osx, linux based on RtMidi + ModernMidi

- includes midiin, midiout, and midi 1 file read / write

- MIDI 1.0 messages



- MIDI 1 file format
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230525/4f396f4f/attachment.html>

More information about the x3d-public mailing list