ModPlug Central

OpenMPT => Help and Questions => Topic started by: Sam_Zen on March 16, 2007, 23:47:12

Title: Sounding PC keyboard
Post by: Sam_Zen on March 16, 2007, 23:47:12
I don't consider it a bug, because system-functions outside OMPT also play a role here, plus hardware.
But I wonder what causes the significant (~0.3 sec) delay, when a key on the keyboard is pressed, and the selected sample starts playing. Not much of a problem when editing codes in a pattern during composing.

When using a tracker in realtime playback mode, it becomes quite another thing. During playback it is still possible to add a sound with the KB from a selected sample. Example :
Play a pattern with some drum sequence in a loop. Select at the pattern tab the sample with the hihat or snare. Try to play a key while keeping steady on the beat...
Title: Sounding PC keyboard
Post by: LPChip on March 17, 2007, 13:27:21
The delay is basically filling the audio buffer.

By setting the latency in the setup, you can narrow down the delay to as little as possible. Do note that if your soundcard cannot handle such short latency, the audio will start to cracle.

ASIO and DirectX are 2 very good options to get your delay down, where ASIO will guarantee you to get to 2ms which is 0.02 sec :)

However, if you only mean the initialisation part, then its just because the audio buffers are being reset, so it resets all plugins too, which each has its own initial delay...
Title: Sounding PC keyboard
Post by: Sam_Zen on March 18, 2007, 02:34:22
Thanks. I'm afraid, on my 800 Mhz machine I will still have to deal with such a delay, no matter finetuning.
But I see some odd aspect here. As far as I know, then the same sample-file already is stored in some other buffer-region, with all the other relevant samples as well, before the song can be started to play. So why load it in another location as well ?
Title: Sounding PC keyboard
Post by: Sam_Zen on March 19, 2007, 03:28:56
In the meantime I've looked at the Soundcard tab of the Setup, and tried some tuning.
First I reduced the Max. Polyphony setting, anyway, to a number making more sense.
Then I reduced the buffer length from the default to 50 ms. It obviously shortened the delay. So I went for 30, and
the reaction-time still came to a more acceptable level. But then I detected some irregularities when pressing several keys
at the same time. So I went back to 50, and it's quite ok now. Thanks, LPChip !
Title: Sounding PC keyboard
Post by: LPChip on March 19, 2007, 08:37:46
Quote from: "Sam_Zen"In the meantime I've looked at the Soundcard tab of the Setup, and tried some tuning.
First I reduced the Max. Polyphony setting, anyway, to a number making more sense.
Then I reduced the buffer length from the default to 50 ms. It obviously shortened the delay. So I went for 30, and
the reaction-time still came to a more acceptable level. But then I detected some irregularities when pressing several keys
at the same time. So I went back to 50, and it's quite ok now. Thanks, LPChip !

No problem. :D

Also try different sound devices. If you have a DirectX one, you might be able to set it to 30 which is a more acceptable level.

You can also install programs like Asio4all which allows you to bring it down to 10 ms ;)
Title: Sounding PC keyboard
Post by: Sam_Zen on March 20, 2007, 00:18:50
My main sound device is the SB Live!, and I checked wit Sherlock. It didn't show any DirectX codecs in the list.
I've DL'ed Asio4all, so let's see.
Title: Sounding PC keyboard
Post by: LPChip on March 20, 2007, 08:57:27
Quote from: "Sam_Zen"My main sound device is the SB Live!, and I checked wit Sherlock. It didn't show any DirectX codecs in the list.
I've DL'ed Asio4all, so let's see.

You should have 4 devices in the setup by default if you have an SB!Live.

(w) Wave Mapper
(w) SB!Live(E800 or so)
(d) Primary Sound Device
(d) SB!Live(E800 or so)

The (w) is a yellow speaker which is your wavedevice.
The (d) is a directx device, which should have a low latency.

Once you've installed ASIO4All, it will add another device called (a) Asio4All (where the (a) stands for ASIO).