All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benno Senoner <sbenno@gardena.net>
To: linux-sound@vger.kernel.org
Subject: Bad MIDI performance : 10ms latency instead of the expected 1-1.5ms
Date: Thu, 26 Aug 1999 17:34:03 +0000	[thread overview]
Message-ID: <marc-linux-sound-93568883025986@msgid-missing> (raw)

Hi folks,

I finished my MIDI performance tests:  ( DISAPPOINTING  :-(  )

I did basically the following:
connected the external MIDI-out of my AWE64 to the MIDI-in port with a MIDI
cable.
Then I wrote a little app which opens the midi device in O_RDWR mode
and then does
time1=gettime() 
- write 3 bytes to the midi device ( to simulate a Note-on cmd)
- read back the data
time2=gettime()
prints out the timediff

I tested both a 2.2.5 and a 2.2.10 kernel , same results.

I wrote this to measure the MIDI output-to-input delay.
I tried both with blocking I/O and non-blocking I/O.
Unfortunately I get bad values in both modes:
about 11.5ms , and this is exactly the MIDI transfer time (1.3ms) plus
10ms = 1 jiffie.
If I run the test on a HZ\x1000 kernel I get about 2ms.

11ms is not acceptable to implement realtime MIDI processing apps,
like soft-synths, virtual midi-thru boxes (or via sequencers), midi-filters etc.


Does anyone know if there is a way to get the values down to the effective
transfer time. ?

 ( are there lowlatency serial flags similar to those of the
regular serial devices ?)

You can get my mididelay benchmark here:

http://www.gardena.net/benno/linux/audio/mididelay0.1.tgz

Do you get better values on ALSA ?

comments ?

PS: Paul: I was wrong about not being able to open the midi device in
O_NONBLOCK.


regards,
Benno.

Benno Senoner
E-Mail: sbenno@gardena.net
Linux scheduling latency benchmarks
http://www.gardena.net/benno/linux/audio

             reply	other threads:[~1999-08-26 17:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-26 17:34 Benno Senoner [this message]
1999-08-26 18:42 ` Bad MIDI performance : 10ms latency instead of the expected Jaroslav Kysela
1999-08-26 19:38 ` Bad MIDI performance : 10ms latency instead of the expected 1-1.5ms Benno Senoner
1999-08-26 20:20 ` Bad MIDI performance : 10ms latency instead of the expected Alan Cox
1999-08-26 20:41 ` Alan Cox
1999-08-26 20:42 ` Bad MIDI performance : 10ms latency instead of the expected 1-1.5ms Benno Senoner
1999-08-26 20:51 ` Bad MIDI performance : 10ms latency instead of the expected Jaroslav Kysela
1999-08-26 21:04 ` Alan Cox
1999-08-26 21:53 ` Benno Senoner
1999-09-18 21:26 ` Bad MIDI performance : 10ms latency instead of the expected 1-1.5ms Peter Enderborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-sound-93568883025986@msgid-missing \
    --to=sbenno@gardena.net \
    --cc=linux-sound@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.