[Coco] suggestion for Ultimuse

KnudsenMJ at aol.com KnudsenMJ at aol.com
Sun Nov 23 22:22:27 EST 2003


Well, I got Bob D's auto-save function working in UltiMusE-K (MM/1).  
Assuming the same alarm() functions exist in OS9/6809, it could even be put into the 
Coco version, if anyone cared.

So far I think the only shortcoming of the auto-save is that, if you switch 
to another window, no saves will occur till you switch back.  I will try to fix 
it so *onbe* save will be done when you first swap out, and no more after 
that.

Of interest to others who may want to try this on their editors or whatever 
-- I found there would be no problem calling my file-saving code directly from 
the interrupt (signal handling) routine.  However, I chose not to do this, but 
instead the signal handler just sets a Boolean flag.  Whenever UME goes to 
look for user input (key or mouse), it tests that flag and if it's set, it saves 
the file and clears the flag.

The reason I don't do the save directly fromt he interrupt is that the signal 
is totally asynchronous, and could come in while the program is busy 
modifying the music data structures, during which time the data are in inconsistent 
states.  Like when you've dleeted a note and the entire array of notes is being 
bubbled down by one -- halfway thru this is not the time to save it!
--Mike K.



More information about the Coco mailing list