RTMIDI........

Started by wadmixfm, July 21, 2019, 22:08:55

Previous topic - Next topic

Hezkore

#15
No the initial connect time is very fast.
But after pressing a key; hearing the sound is delayed.
It takes several hundred milliseconds before you actually hear the sound.
And it's apparently a known issue with the Microsoft GS Wavetable Synthesizer.
A quick Google search reveals it's been a problem the MS GS wavetable synth has had for years now. :(
Simplicity is the ultimate sophistication. 🚀
GitHub
BlitzMax for VSCode
BlitzMax for Vim

Hezkore

I'm still battling the delayed audio.
But I have at least made some progress in other parts.
I can read and send Midi easily now.
I can play notes on my keyboard and send the data to a Midi synth on the computer.
And I can send Midi from the computer into my keyboard and have it be the synth.
And I've started processing Midi files as well:
Simplicity is the ultimate sophistication. 🚀
GitHub
BlitzMax for VSCode
BlitzMax for Vim

wadmixfm

have you tried an external midi device and is that delayed ???

wadmixfm

or even a standalone vst and use something like midiyoke to create a virtual port see if that delays , it could just be the way windows ports the audio

i know this might sound long winded try it on another machine like with windows xp or windows 7 because i have tried windows xp before with midi and that was very responsive )

its just to eliminate the cause and yes i know before anyone else says it xp did not use wdm drivers for the audio as they were native but windows 7 did and i got the same results :)

Lee

Hezkore

RTMIDI is not delayed.
It's the Windows GS Wavetable synthesizer.
So sending midi works fine, receiving midi works fine.
It's when you send midi data to the MS GS wavetable synth that the audio it produces is delayed.
So using any other output, like OmniMIDI, VirtualMIDISynth or even your external Midi device (like a keyboard) will not be delayed.

The problem for me is that this is an application that runs on the computer, and I want the sound to come out of the computer.
And 99% of the users would not have any other midi synth than what comes with Windows.
So they'd all experience audio delay.
Simplicity is the ultimate sophistication. 🚀
GitHub
BlitzMax for VSCode
BlitzMax for Vim


Hezkore

There's no other way than using a third party synthesizer, software or hardware.
The Windows GS Wavetable synthesizer is very old and outdated.
The only solution I have is to use a third party library that instead can interpret the Midi signals.

This seems like a good Open Source library (and app): https://github.com/KeppySoftware/OmniMIDI
It's got its own API you can use, so that you don't need the app: https://github.com/KeppySoftware/OmniMIDI/blob/master/DeveloperContent/KDMAPI.md
But I haven't looked into it much further than that, not tried implementing it.

There's also the old bassmidi.dll, which I've seen some people use in the past.
But not looked into that either.
Simplicity is the ultimate sophistication. 🚀
GitHub
BlitzMax for VSCode
BlitzMax for Vim

wadmixfm

what about asio4all

then you can lower the latency of the audio

to around 3ms which is about 256k buffer

its very tricky :)