On 25 October 2012 02:38, Ted Felix <t...@tedfelix.com> wrote:
>    The executive overview goes something like this....  Rosegarden was
> designed to be a MIDI editor.  Then someone decided to add MIDI
> sequencing to it.  But what's ok for a MIDI editor (very CPU intensive
> updates in response to infrequent edit events from the user) is not at
> all ok for a MIDI sequencer (constant edit events due to massive amounts
> of incoming MIDI data courtesy of Herr Beethoven).

That's not quite an accurate characterisation -- it was always
intended to be a sequencer as well.  The idea is (was) that the
sequencer process would operate largely asynchronously from the editor
process.

So when playing, the editor would write a large number of events in
advance to a shared memory area, and the sequencer would play back
from there. (Editing during playback would run the risk of playing the
wrong thing during the edit, but would never hold up the sequencer.)

When recording, the sequencer would log incoming events to a buffer
and then the editor would pick them up afterwards. The main risk here
of course was overflowing the buffer, but the timings should be
correct so long as the sequencer thread timer was accurate.

In neither case should the number or nature of editor callbacks make
any difference to sequencing or recording.

For the Qt4 rejig (i.e. what became Rosegarden 10.02) we merged the
sequencer and editor processes -- which had previously been quite
separate processes communicating using IPC mechanisms -- into separate
threads in a single process. But the shared-memory architecture (all
the mapped-buffer stuff) stayed the same.

I'm afraid I haven't found the time to follow this bug closely, but if
Rosegarden is unable to record large volumes of incoming MIDI
properly, that suggests that either the inbound buffer is overflowing,
or else a change during the 10.02 timescale has introduced a mutex
that means writing to the buffer is no longer a safe operation for the
sequencer to carry out. Or else there's been some other change that
means segment updates affect recording -- segment updates shouldn't be
happening in any great quantity during recording, though, because we
don't even try to update the actual notes on canvas.


Chris

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to