hi everyone!
a happy new year to all folks on the gregorian calendar, and a generic
happy next 365 days to everyone else!
the music department at columbia university are taking the list server
down for an upgrade on the coming weekend, so expect interruptions for
linux-audio-dev, linux-audio-user and linux-audio-announce. you will
probably want to keep a copy of all the mails you send over the weekend,
so that you can re-send them in case they end up in the bit bucket.
let me take this opportunity to thank douglas irving repetto for many
years of painless hosting and friendly help, and the entire music dept.
for their generous donation of iron and bandwidth. kudos, guys!
rumor has it that the new list server will be an os x machine. hopefully
this will make the lists even more user-friendly and aesthetically
pleasing than before ;)
all the best,
jörn
-------- Original Message --------
Subject: music.columbia.edu server downtime
Date: Mon, 2 Jan 2006 16:21:13 -0500
From: douglas irving repetto <douglas(a)music.columbia.edu>
To: douglas(a)music.columbia.edu
Hello,
We will be upgrading the music.columbia.edu server this weekend.
Hopefully all of the work will be done on Saturday, but it may extend
into Sunday. music.columbia.edu will not be available during the
downtime. That means no websites will be served, no email will be
sent/delivered, no mailing lists will function, etc.
I'll send an update later this week with info about some changes that
you'll see on the new server.
Happy new year,
douglas
--
............................................... http://artbots.org
.....douglas.....irving........................ http://dorkbot.org
................................ http://ceait.calarts.edu/musicdsp
.......... repetto....... http://works.music.columbia.edu/organism
............................... http://music.columbia.edu/~douglas
--
jörn nettingsmeier
home://germany/45128 essen/lortzingstr. 11/
http://spunk.dnsalias.org
phone://+49/201/491621
if you are a free (as in "free speech") software developer
and you happen to be travelling near my home, drop me a line
and come round for a free (as in "free beer") beer. :-D
On Friday 30 December 2005 17:37, Werner Schweer wrote:
> The ALSA seq api is from ancient time were no realtime threads were
> available in linux. Only a kernel driver could provide usable
> midi timing. But with the introduction of RT threads the
> ALSA seq api is obsolete IMHO.
I don't agree with this statement. IMHO, a design based on raw MIDI ports used
like simple Unix file descriptors, and every user application implementing
its own event schedule mechanism is the ancient and traditional way, and it
should be considered obsolete now in Linux since we have the advanced
queueing capabilities provided by the ALSA sequencer.
You guys are talking here about MIDI timing, considering only the event
scheduling point of view, as if Rosegarden or MusE were simple MIDI players.
Of course, playing beats on time is a required feature. But my bigger concern
about MIDI timing issues is when you are *recording* events. Here is where
ALSA queues, providing accurate timestamps for incoming events, are so good.
It could be the absolute winner if problems like the audio synchronization
and slave MTC synchronization were solved likewise.
Regards,
Pedro
On Saturday 31 December 2005 17:10, Paul Davis wrote:
> On Fri, 2005-12-30 at 22:27 +0100, Pedro Lopez-Cabanillas wrote:
> > On Friday 30 December 2005 17:37, Werner Schweer wrote:
> > > The ALSA seq api is from ancient time were no realtime threads were
> > > available in linux. Only a kernel driver could provide usable
> > > midi timing. But with the introduction of RT threads the
> > > ALSA seq api is obsolete IMHO.
> >
> > I don't agree with this statement. IMHO, a design based on raw MIDI ports
> > used  like simple Unix file descriptors, and every user application
> > implementing its own event schedule mechanism is the ancient and
> > traditional way, and it should be considered obsolete now in Linux since
> > we have the advanced queueing capabilities provided by the ALSA
> > sequencer.
>
> low latency apps don't want queuing they just want routing. this is why
> the ALSA sequencer is obsolete for such apps. frank (v.d.p) had the
> right idea back when he started this, but i agree with werner's
> perspective that the queuing facilities are no longer relevant, at least
> not for "music" or "pro-audio" applications.
Many professional musicians want MIDI capabilities on their PCs because they
already own (or want to have) electronic musical instruments communicating
via MIDI. This means that the computer is another piece of musical equipment
in the musician's studio/network.
The kind of scenario you are painting about low latency applications seems
limited to soft synths listening to sequencing applications. Using MIDI to
this kind of communication between two processes running in the same machine
looks a bit overkill to me. MusE has synth plugins, and Rosegarden has DSSI
synth plugins, without ALSA sequencer being involved here.
> > It could be the absolute winner if problems like the audio
> > synchronization  and slave MTC synchronization were solved likewise.
>
> what problems? JACK demonstrates perfect audio sync in the only sensible
> way there is (the same way every other system does it); several JACK
> clients have MTC slave capabilities, including ardour, and it has
> nothing whatsoever to do with the ALSA sequencer.
Exactly. Please, excuse me my poor English. I mean functionality instead of
problem. Let me reword the sentence: ALSA could be even better if there were
another universal mechanism available for every ALSA application, providing
an easy and consistent way to synchronize a queue with an external MTC
master, without needing to recode the whole process for each application.
I know that Ardour provides slave MTC synchronization, and also does
Rosegarden. Each one uses a different approach, and in the future there will
be many more better or worse implementations.
I like the way Rosegarden solves it, using the ALSA sequencer queue skew
parameter. I guess that we can build another ALSA sequencer client, either a
kernel module or a userspace one, accepting MTC input and translating the MTC
sysex messages received to skew in some queues used also by any other ALSA
clients. Comments?
Regards,
Pedro
Paul Davis:
> i guess it all depends on one's definition of
> "sufficient". my take is that there are several MIDI
> h/w boxes that guarantee MIDI delivery to a
> resolution that matches the wire protocol
> (1/3msec). until we have scheduling capabilities that
> match this (or better), i don't feel comfortable
> calling them "sufficient".
Ah, I see. I've no argument with that, but it isn't
quite what I thought you were referring to.
Chris
On Saturday 31 December 2005 00:52, Florian Schmidt wrote:
> All of this depends on whether physical port midi activity is really
> handled by IRQ's too. Anyone know more?
I don't know every MIDI interface details, but there are many different
variations. Please, somebody with better knowledge could provide additional
info and correct my very probable mistakes.
USB MIDI interfaces don't generate interrupts. Instead, this is done by the
USB host controller (EHCI/OHCI/UHCI). The driver for these devices provide an
interrupt handler not directly, but indirectly (the in/out URB completion
handlers). So yes, this device type may be considered interrupt-driven.
The oldest MIDI interface for PCs was the Roland MPU-401. It had two
operational modes: Intelligent and UART mode. Intelligent mode was necessary
because the low power of early personal computers CPUs. This intelligent mode
required IRQ handlers for both MIDI input and output operations, and to
control the internal timer used for hardware scheduling and event
timestamping, and also for external MTC/SMPTE synchronization. It was a
rather sofisticated piece of hardware, but there is not an ALSA driver for
these devices (and I don't know a single manufacturer selling it nowadays).
The MPU-401 UART mode doesn't provide an interrupt signal to finish the
output completion, so you must use polling for output (it provides an
interrupt only for incoming events). There is an ALSA driver for this mode,
that is used also by many consumer sound cards emulating the MPU-401. I
wouldn't recommend to use these MIDI interfaces.
Other chips, as the Ensoniq 1370/1371 used in some cheap SoundBlaster
products, included a better UART mode, providing interrupts for both
reception and transmission. There is also an ALSA driver for the 16550 UART,
that can be used with a few external devices like the Roland Canvas and the
Midiator devices.
Regards,
Pedro
Paul Davis:
> most of the ALSA sequencer's
> capabilities are redundant, which is compounded
> because it currently has
> no way of providing sufficiently accurate scheduling
You say this as if it were self-evident, when it's been
the subject of much of this thread. _Does_ it have
no way of providing sufficiently accurate scheduling?
If not, why not?
This would imply that there is in fact no way for a
userspace application on a normal Linux distribution
to provide MIDI timing accurate enough to be
perceived as correct in all circumstances.
Chris
Me:
> I'll have to review the sequencer API and look at
> adding a separate RT MIDI thread as an alternative
Actually no, hang on a minute. First I want to know
more about why the ALSA sequencer queue doesn't
work better here.
It's all very well saying it's irrelevant now that it's
so easy to create RT threads, but I think that's
bogus. Probably a substantial majority of Rosegarden
users doing MIDI only are using systems on which it
isn't possible for a random user to create RT
threads at all. For these users, the ALSA sequencer
ought to be able to do a lot better than an ordinary
unprivileged thread can. I'd like to know why it might not.
I'm not at a proper computer just now, to delve
through code - anyone have any more idea about this?
Chris
Florian Schmidt:
> Yeah, i got a nice and juicy BUG in it (see below). So
> this is what kills rosegarden regularly here when
> run with RTC timing source.
That'll be the chap. Mind you, I never saw the RTC-
based timer measure significantly better than the
system timer at 1000Hz. Although your measurements
may vary, and it seems, probably would.
Chris
Florian Schmidt writes:
> Here's example output with rosegarden producing a
> supposedly steady stream of 16th notes at 120 bpm:
> [...]
Those results certainly are pretty poor. We do have
a very similar test in the Rosegarden tree (the
complainer test) but it doesn't stress the system
quite the way it seems your program does.
I'll have to review the sequencer API and look at
adding a separate RT MIDI thread as an alternative
(which should be straightforward enough). The
rationale for using queued events is simple -- ALSA
provides the service, why duplicate it? -- but it's
probably true that we've already spent far more time
working around problems with it than we saved by not
duplicating it. (Does anyone else use queued
sequencer events in earnest?)
Chris