Page 1 of 1

Latency

PostPosted: Tue May 29, 2012 9:45 pm
by talrusher
hi,

what exactly does the latency setting in the megadrum module and what happens if i set it too low or too high?

dont know if i understand it right: in the latency period, megadrum doesnt handle any input signal from any input?! or diesnt it handle only the signal from the specific input?
for what is this option and what happens if i set it for example to 10? should i except any disadvantages?

Re: Latency

PostPosted: Tue May 29, 2012 10:14 pm
by dmitri
As per http://www.megadrum.info/content/miscellaneous-settings

This setting should have probably be called something like Group scan frequency. Internally MegaDrum scans all inputs every 10-30 microseconds for presence of signals. Then, very simplified, every <Latency> period MegaDrum scans inputs states to see if any of the inputs registered signals and sends MIDI messages for triggered inputs. Lowering this setting will reduce latency and may degrade level detection precision. Raising this setting may improve level detection precision and will increase latency. Latency can be changed between 10 and 100 which corresponds to 1 and 10 milliseconds. Default is 40 - 4 millisecond. Also when it is set to an odd value (e.g. 21, 23, 25 and so on) it enables a visual cue to see if pads Thresholds are set too low - when a pad is hit lightly but not enough to exceed Threshold level the VU meter for the pad set to a maximum but no MIDI signal is sent and the LED stays off. If VU meters start to go off without pads being hit then Thresholds for corresponding inputs are set too low.

Re: Latency

PostPosted: Tue May 29, 2012 11:19 pm
by talrusher
dmitri wrote:As per http://www.megadrum.info/content/miscellaneous-settings

... Lowering this setting will reduce latency and may degrade level detection precision. Raising this setting may improve level detection precision and will increase latency. ...


what exactly do you mean with "lvl detection precision"?

Re: Latency

PostPosted: Tue May 29, 2012 11:31 pm
by dmitri
How a accurately/precisely it measures input signal level.

Re: Latency

PostPosted: Wed May 30, 2012 3:37 am
by talrusher
dmitri wrote:How a accurately/precisely it measures input signal level.


but i dont understand how it works. how can it be more accurately, when md only waits the given period?

Re: Latency

PostPosted: Wed May 30, 2012 8:48 am
by dmitri
talrusher wrote:
dmitri wrote:How a accurately/precisely it measures input signal level.


but i dont understand how it works. how can it be more accurately, when md only waits the given period?

I'm sorry but you have to take it as a given - it just works this way.

Re: Latency

PostPosted: Sun Jun 03, 2012 4:29 pm
by rtoorek79
If I understood correctly the Latency have to be considered along with MinScan parameter.

MegaDrum scans all inputs over and over. There's no latency and minscan parameter involved yet. During this scanning MD may detect some signals on some inputs but nothing happens until the signal is below defined threshold. When MD detects a signal above Threshold/Dynamic threshold, it will keep sampling it for MinScan period of time before marking the signal as registered and making it ready to be sent over MIDI. Which means (at least I think so) that MD doesn't send the MIDI message right away but keeps it as ready to send. There's another scanner which scans in Latency period of time for all registered MIDI messages and sends them all in one shot to the PC. So the Latency scanner reduces cost of communication sending several messages in one shot. It's very important to know that both scanners cannot work at the same time - if one works other doesn't. Therefore lowering the Latency period may degrade level detection precision because in most cases there will be only one message to send and the constant cost of communication will not be reduced (and rather multiplied). In other words while MD spends a time trying to send one message it cannot scan inputs and the signals are lost.

That's only my opinion. If this is true I hope I didn't betray the secret :). Nevertheless if this is true I still wonder if it's so important to wait Latency time to send several messages at once (usually there are 2 rarely 3 notes played at the same time so the cost seems not to be very high). Therefore I'm not sure if I'm right.

If this is wrong please tell so Dmitri (without going into details if you don't want to), because I don't want to mislead anybody.

Re: Latency

PostPosted: Sun Jun 03, 2012 5:00 pm
by dmitri
It is around 90% correct.

Re: Latency

PostPosted: Thu Jun 14, 2012 9:19 pm
by talrusher
thx ;)