On Monday 30 January 2006 12:34, Chris Cannam wrote:
> > Recording sysex events from vkeybd have wrong behavior, it keeps the
> > buffer from the former sysex message, and appends the new message bytes
> > at the end. It inserts the messages at the right time on the segment,
> > though.
>
> Well I'm not familiar with the code for recording sysex at all, but naively
> it looks as though the code that sets up the data-block file for a sysex
> (AlsaDriver.cpp:2463 and around, MappedEvent.cpp:499 and thereabouts) never
> sets a data-block ID on the event at all, and so all incoming sysex events
> are appended to the same data-block file, namely $TMPDIR/datablock_0.
>
> I've committed some debug output so you can see what I mean.  Notice that
> prepareToWrite always wants to write to data-block 0, and registerDataBlock
> (which allocates a new data-block ID) is never called.

In MappedEvent.cpp:115 there is a call to registerDataBlockForEvent, but this 
constructor is not used for recorded sysex events. AlsaDriver.cpp:2463 uses 
the default constructor, so I guess that there should be an explicit call to 
registerDataBlockForEvent somewere before setDataBlockForEvent() in  
AlsaDriver.cpp:2470, right?

Anyway,this is the sequencer output (recording):

Received non-controller event (dest=130:0, controller is 130:2)
NON-REALTIME SYSEX
B 0 = fffffff0
B 1 = 41
B 2 = 10
B 3 = 42
B 4 = 12
B 5 = 40
B 6 = 01
B 7 = 30
B 8 = 00
B 9 = 00
B 10 = fffffff7
DataBlockFile[/home/pedro/tmp/kde-pedro//datablock_0]: prepareToWrite
Writing 9 chars to file for datablock 0
DataBlockFile[/home/pedro/tmp/kde-pedro//datablock_0]: prepareToRead
Adding NOTE OFF at  6.599999999R
Adding NOTE OFF at  7.099999999R
Adding NOTE OFF at  7.599999999R
Adding NOTE OFF at  8.099999999R
Received non-controller event (dest=130:0, controller is 130:2)
NON-REALTIME SYSEX
B 0 = fffffff0
B 1 = 41
B 2 = 10
B 3 = 42
B 4 = 12
B 5 = 40
B 6 = 01
B 7 = 30
B 8 = 01
B 9 = 00
B 10 = fffffff7
DataBlockFile[/home/pedro/tmp/kde-pedro//datablock_0]: prepareToWrite
Writing 9 chars to file for datablock 0
DataBlockFile[/home/pedro/tmp/kde-pedro//datablock_0]: prepareToRead
Adding NOTE OFF at  8.599999999R
Adding NOTE OFF at  9.099999999R
Adding NOTE OFF at  9.599999999R
Received non-controller event (dest=130:0, controller is 130:2)
NON-REALTIME SYSEX
B 0 = fffffff0
B 1 = 41
B 2 = 10
B 3 = 42
B 4 = 12
B 5 = 40
B 6 = 01
B 7 = 30
B 8 = 02
B 9 = 00
B 10 = fffffff7
DataBlockFile[/home/pedro/tmp/kde-pedro//datablock_0]: prepareToWrite
Writing 9 chars to file for datablock 0
DataBlockFile[/home/pedro/tmp/kde-pedro//datablock_0]: prepareToRead
Adding NOTE OFF at  10.099999999R
Adding NOTE OFF at  10.599999999R
Adding NOTE OFF at  11.099999999R
Adding NOTE OFF at  11.599999999R
Received non-controller event (dest=130:0, controller is 130:2)
NON-REALTIME SYSEX
B 0 = fffffff0
B 1 = 41
B 2 = 10
B 3 = 42
B 4 = 12
B 5 = 40
B 6 = 01
B 7 = 30
B 8 = 03
B 9 = 00
B 10 = fffffff7
DataBlockFile[/home/pedro/tmp/kde-pedro//datablock_0]: prepareToWrite
Writing 9 chars to file for datablock 0
DataBlockFile[/home/pedro/tmp/kde-pedro//datablock_0]: prepareToRead
Adding NOTE OFF at  12.099999999R
Adding NOTE OFF at  12.599999999R
Adding NOTE OFF at  13.099999999R
Adding NOTE OFF at  13.599999999R
Adding NOTE OFF at  14.099999999R
Adding NOTE OFF at  14.599999999R
rosegarden (sequencer): RosegardenSequencerApp::stop() - stopping

And this is the playback debugging output:

AlsaDriver - initialisePlayback
rosegarden (sequencer): [calling jumpToTime on start]
rosegarden (sequencer): jumpToTime( 0.000000000R)
AlsaDriver::startClocks
AlsaDriver::startClocks: started clocks
RosegardenSequencerApp::incrementTransportToken: incrementing to 10
rosegarden (sequencer): Sequencer status changed from 0 to 1
DataBlockFile[/home/pedro/tmp/kde-pedro//datablock_5]: prepareToRead
DataBlockFile[/home/pedro/tmp/kde-pedro//datablock_6]: prepareToRead
AudioPlayQueue::~AudioPlayQueue()
DataBlockFile[/home/pedro/tmp/kde-pedro//datablock_7]: prepareToRead
DataBlockFile[/home/pedro/tmp/kde-pedro//datablock_8]: prepareToRead
rosegarden (sequencer): RosegardenSequencerApp::stop() - stopping


> The trouble is that this would suggest it can never have worked properly at
> all, or at least not in the last several months, since this code hasn't
> changed in ages.

Yes. I think it never worked properly since sysex event data was m-mapped, and  
I've never tested it seriously. Sorry.

Another issue is the "empty payload problem", reported by [EMAIL PROTECTED] 
that originated this thread. I've verified the last RG beta, published under 
the name "rosegarden-1.1beta1.tar.bz2" [1] on December 28th, and it has a lot  
worse sysex problems. First, that version doesn't record sysex data (empty 
sysex events events after recording), and second: if you load a file 
containing existing valid sysex events, or if you create sysex events from 
scratch using the event list, they are sent to MIDI output ports as empty 
events, as the original bug report states. This behavior has been corrected 
at some later time, and current CVS HEAD has only the problem on recording. 
I'm not going to investigate when and how the other problems have been 
solved, because I don't have enough time and lack of motivation.

[1] See:
http://www.mail-archive.com/[email protected]/msg07980.html
http://www.telegraph-road.org/rosegarden/

Regards,
Pedro


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to