Sounding PC keyboard

Started by Sam_Zen, March 16, 2007, 23:47:12

Previous topic - Next topic

Sam_Zen

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...
0.618033988

LPChip

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...
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Sam_Zen

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 ?
0.618033988

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 !
0.618033988

LPChip

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 ;)
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

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.
0.618033988

LPChip

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).
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs