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

John Carlson yottzumm at gmail.com
Thu May 25 08:33:51 PDT 2023

I’ll have to check if our electric piano has midi.


On Thu, May 25, 2023 at 8:59 AM GPU Group <gpugroup at gmail.com> wrote:

> 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.
> -Doug
> https://github.com/jcelerier/libremidi
> - native lib for desktop win, osx, linux based on RtMidi + ModernMidi
> - includes midiin, midiout, and midi 1 file read / write
> https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API
> - WebMIDI
> https://www.midi.org/specifications-old/item/table-1-summary-of-midi-message
> - MIDI 1.0 messages
> https://en.wikipedia.org/wiki/MIDI
> https://www.cs.cmu.edu/~music/cmsip/readings/Standard-MIDI-file-format-updated.pdf
> - MIDI 1 file format
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230525/f6e21606/attachment.html>

More information about the x3d-public mailing list