Closed kimimaru4000 closed 4 years ago
Midi Through Port-0
This does not generate any audible outputs. Maybe you would like to install timidity, fluidsynth or anything that works as an ALSA MIDI device.
Thank you! I installed timidity and some soundfonts, and I'm hearing some sounds now!
This is off-topic, but is there a chance you can explain the example code? Specifically:
output.Send(new byte [] {MidiEvent.NoteOn, 0x40, 0x70}, 0, 3, 0);
Is byte[1] the note and byte[2] the pitch?
output.Send(new byte [] {MidiEvent.NoteOff, 0x40, 0x70}, 0, 3, 0);
How come this starts at timestamp 0 instead of 3, considering it's playing the note in the previous line for 3 "length" (what is this measured in exactly)?
I know I'm not great at offering docs. Please check this API signature:
That 3
part is the length part of the array ({MidiEvent.NoteOn, 0x40, 0x70}
). The timestamp part is the last 0
in this case.
Thank you! My main issue was resolved, so I'm closing this before it strays too far off-topic. I'll do some reading up on MIDI on my own to learn more about what each of these fields mean.
Environment:
I've imported managed-midi into my .NET Core application, but I cannot hear output from the example code in any of my audio devices (speakers and headphones).
Code:
Whenever the user types
!music
, it callsExecuteCommand
and should play the MIDI sounds, but I don't hear anything.Here's the output I get for my console lines:
Is there something I'm missing?