Replies: 6 comments 23 replies
-
A while ago, I was working on a fast piece at full speed, and I noticed that I was making a lot more mistakes than usual. After wondering why I was suddenly so bad, I had the presence of mind to look at the latency in GO. The value had risen to 40 ms, because (for some reason) the settings had changed. I reset my original configuration, with latency displayed at 20 ms, and started playing correctly again! So, whatever GO's way of measuring latency, the value it displays makes sense. Personally, I see 4 steps:
For me, total latency is therefore the time between the start of stage 1 and the end of stage 4. The latency of step 1 takes place inside the organist and can therefore be removed from the equation. For step 2, the question is essentially to know at what level of depression the key will detect pressure. I suppose this varies from organ to organ. On mine, I've made a 60/40 setting: start playing if key >= 60%, stop if <=40%. Step 3 poses no problem of definition. In fact, it's the one that best defines the organ's intrinsic performance. Step 4 is the most problematic, because as you mention, the criterion chosen (i.e. the sound level threshold) can have a considerable influence on the result. Besides, in real life, the perceived latency of a note will not be the same if played alone or with other notes at the same time. My two cents! |
Beta Was this translation helpful? Give feedback.
-
Well it looks as if either nobody else is reading this or they have nothing to say about latency. newVideophile has expanded my original comment which was intended to be completely general and scientific - hopefully moving towards a proper scientific measurement of latency. First the mention of figures for latency - apparantly GO "displays" latency - where is this display and is it just a guess or a real measurement? I have not found it. Do you really believe the figures 20ms and 40ms? I have doubts.. If we are now talking only about GO, "Step 3" is the only area where GO could attempt to measure its own latency. It would need to start a high resolution timer when it received a "note on" midi message from rtmidi and stop it when it told the operating system's sound driver to play the note. It would then need to display the result. This would all be possible but as far as I know it does not do this. I remember the days before computers had hardware sound systems. Latency could easily be 500ms - making playing music from a keyboard next to impossible. Nearly all of the improvement since then has been due to the improvements in computer hardware not in VPOs (software organs). csw900 |
Beta Was this translation helpful? Give feedback.
-
A way of determining an actual latency might by a special device with a midi-out interface and a microphone that mesures the time interval between sending a key-on midi event and capturing the sound from the speaker. I don't know about existance of such devices. We may build a software solution: a program that emulates midi messages and listen for an audio input. It eliminates a portion of latencies for midi encoding, converting midi to usb, receiving a usb and decoding midi, but it is usually quite small (unless we use usb over wifi/ip tunelling). This testing program may listen not an audio input from a real microphone, but a virtual audio input connected with a GrandOrgue audio output. In this case we don't take into account a latency added by an audio device. Usually professional or semi professional audio cards add very small latency, but audiophile DACs or HDMI sound output with an external AV-receiver may add quite large latency that will not be measured in this case. Usually the largest part of latency is brought by GrandOrgue and other sound processing software behind it, because they need to fill an audio buffer and pass it to the next step of audio peocessing chain. So increasing a sample rate, decreasing a buffer size and eliminating extra steps of the audio processing chain decrease the latency. 20ms and 40ms are not precise and they do not reflect the actual latency. Usually a high latency does not bring any problems for playing midi files, but it becomes an obstacle for a live organ performation, that @newVideophile mentioned above. Real pipe organs also bring some latency for playing. Especially it is true for some pneumatic-tracker ogans, ex. built by Walker. Usually low notes of pedal divisions have long attacks: they require a significant time to grow the sound apmplitude after they started playing. You can see this by opening their attack wav-samples with a sound editor, ex. |
Beta Was this translation helpful? Give feedback.
-
Regarding the GO sound output buffer size. My previous experiences with this indicated that the optimum buffer size for all systems is 128. I am disappointed to note that the old default of 1024 (which does not work properly on any system; appears to be still in place and continues to fool others as well as me). This high value (1024) does compromise the maximum speed at which the organ can be played - including the playback of midi files. I have just confirmed on my windows system the size of this buffer has no significant effect on latency - I can find no noticeable change in human detectable latency for any values betwee 128 and 1024. This is possibly confirmed by "Sound Output State" readings which for my system are as follows for sample rate 44100 (Note that my careful spacing of this table has been ruined by Github's ignoring white space characters!!). As I said above it would be very useful to find out from the code how these values are calculated. At present I have doubts about the validity of all latency figures displayed by GO. Hence the desirability of a proper scientific measurement. csw900 |
Beta Was this translation helpful? Give feedback.
-
I think the input level is adjusted automatically, so the levels are unreliable. With a buffer size of 128, my latency is 90-100 ms. With a buffer size of 1024 it is 140-160 ms. |
Beta Was this translation helpful? Give feedback.
-
I think latency is difficult to evaluate by ear with organ sounds; a more nervous instrument is more suitable, such as the harpsichord, for example http://duphly.free.fr/en/blanchet.html |
Beta Was this translation helpful? Give feedback.
-
The subject is Latency.
What is the scientific definition of latency with regard to organs? And how is it to be properly measured? If latency cannot be measured then latency figures quoted for organs are almost meaningless.
In simplistic terms latency is obviously the time between pressing a key and the emission of sound from a "pipe". But this in itself has no scientific meaning. How is the time of pressing a key measured? How is the time a sound is emitted measured? Both must be defined before latency can be properly measured. I am not aware of any scientific definition of either.
When you press an organ key, at some point in its depression it opens a valve to pass air to a pipe. All this takes time so at what point is the key defined as being pressed?
When an organ pipe begins sounding the sound starts from nothing and gradually builds up to a steady state. At what point is the sound defined as being emitted (for the purpose of latency measurement). This can make an enormous difference to a latency measurement.
I am not expecting this to be resolved here but would be interested in other peoples thoughts. Especially whether they believe latency figures quoted for organs have much meaning.
csw900
Beta Was this translation helpful? Give feedback.
All reactions