From: Philip Jacob Smith <pj41985@ec...> - 2008-03-19 04:54:09
While suffering with Jack the other day, I wondered: Why doesn't
Rosegarden have ALSA support?
It would seem to me to be a very desirable feature. Real-time audio is
only necessary if you wish to do real-time synthesis. To simply record
and play audio files in sync with MIDI, that doesn't require real-time
audio. Think of how a video player works. MPlayer doesn't require Jack,
but it can play audio in sync with video.
I don't know how it works with ALSA, but I vaguely remember how it worked
with OSS. When you wanted to play audio, you had to tell OSS when to
begin playback. You'd give it some sound, then tell it to start at the
exact moment you wanted it to start, then just keep that buffer full.
There's no reason Rosegarden couldn't do this, since when it is playing an
audio track, it has the whole thing available immediately. Similarly,
when recording, you would tell OSS when to start recording, then, even if
it took OSS a second or two to deliver the data, you knew that the
beginning of that data corresponded with when you told it to start
I'd really like to see ALSA support in Rosegarden. I was trying to use
Jack with the largest buffer size it supports, since I'm not doing
anything real-time and I'd rather there be no skips in playback, but I
found that even this doesn't work acceptably. Apparently when Rosegarden
starts playback, the audio playback is randomly mis-synchronized with the
MIDI playback by as much as whatever the Jack latency is. It's as if the
MIDI playback is begun immediately, and the audio is simply sent to Jack
whenever it gets around to asking for more, when the correct thing to do
would be to wait for it to ask for more, then start MIDI playback in sync
with that request. ...or it could just be Jack's fault. I don't know,
but I don't care. I'd just rather not have Jack in the equation at all.
It's just one never-ending problem.
From: D. Michael McIntyre <michael.mcintyre@ro...> - 2008-03-20 03:49:03
On Wednesday 19 March 2008, Philip Jacob Smith wrote:
> While suffering with Jack the other day, I wondered: Why doesn't
> Rosegarden have ALSA support?
You might find this discussion interesting:
2. Add a PortAudioDriver as well as the existing JACK driver. (William
suggested this quite insistently once and I rejected the idea as far too
much work. Sorry, William, you were probably right.) PortAudio is also
callback-based, so it wouldn't be _that_ hard, but it would substantially
increase the amount of code in this already complex and notoriously fragile
bit of the application, and it may be hard to manage the timing when MIDI is
also involved because PA's latency reporting is not necessarily going to be
reliable -- so there is danger here. This output driver would at minimum
support playback from the master output only; ideally recording as well
(more danger!); never transport. We could always have an icon in the GUI to
show which output driver was in use, and have a "don't show this again"
warning dialog if PA is selected because JACK was unavailable on startup. PA
is never going to be a preferable audio I/O system to JACK, but it may
be "enough" for people who are essentially MIDI-based or notation-based
I point this discussion out for reference, but I'll be surprised if Chris
actually implements that, and I'm positive I never will.
D. Michael McIntyre