Hi Andrew, Thanks for the quick reply.
On Mon, 4 Jan 2016 02:55:50 +0400 Andrew Deryabin <[email protected]> wrote: > Your problem (as seen from your patch) is that > MusEGlobal::precountEnableFlag is always 'on'? I did more detailed tests today and found out that the flag is set when a song is loaded. I have a default song which is loaded on startup. This file contains <precountEnable>1</precountEnable> which sets the runtime flag. This is the console output when I tried to record: MusEGlobal::precountEnableFlag=1 state = PRECOUNT! JACK: state transition PRECOUNT -> PLAY ? JACK: state transition PRECOUNT -> PLAY ? JACK: state transition PRECOUNT -> PLAY ? JACK: state transition PRECOUNT -> PLAY ? ... JACK: state transition PRECOUNT -> STOP ? JACK: state transition PRECOUNT -> STOP ? JACK: state transition PRECOUNT -> STOP ? JACK: state transition PRECOUNT -> STOP ? The "state transition" messages also come from audio.cpp. They log how MusE gets confused because jack state doesn't match sequencer state. Changing the default song to <precountEnable>0</precountEnable> made recording work again: MusEGlobal::precountEnableFlag=0 The same is true for any song not only the default song. The flag is always retrieved from the song file. I checked some old files in order to confirm. Now to the metronome settings dialog. Here you can see a checkbox which shows whether the runtime flag is set. But you cannot change it here. Almost all precount settings are greyed out with a tooltip saying "disabled since jack cannot handle it". See this image: http://www.pingu-mobil.de/share/metronome-alsa.png There is also no difference between the Jack backend and the ALSA backend. Starting MusE with "muse3 -a" I repeated all tests with an ALSA MIDI interface. I configured a new MIDI interface this time using ALSA instead of JACK and had exactly the same results: * precount flag is read from the song file * precount settings in metronome dialog are greyed out * enabled precount flag confuses the sequencer All in all it seems the precount is completely broken. But at least there is a workaround in order to be able to record. However I do wonder if precount really cannot work with jack: * When there is no jack time master: Precount should be possible just like with ALSA * When MusE is the time master: Do the precount and then start rolling. Time slaves will remain inactive during precount. * When MusE is time slave: Precount doesn't make sense anyway. Then I found out more about my other problem: > 04.01.2016 01:58, Dennis Schulmeister пишет: > > Playback doesn't work anymore. The sequencer rolls incredibly slow > > and the MIDI messages are not sent in time. I didn't find out why but it turned out that startRolling() is called called each time the sequencer tries to advance time. MusEGlobal::precountEnableFlag=0 MusEGlobal::precountEnableFlag=0 MusEGlobal::precountEnableFlag=0 MusEGlobal::precountEnableFlag=0 MusEGlobal::precountEnableFlag=0 MusEGlobal::precountEnableFlag=0 ... The strange thing is that the problem is now gone. For testing I loaded some old songs and they played fine. Then back to my default song and the problem reoccurred. When I compared the XMLs I found only minor differences: * The default song didn't contain MIDI data, obviously * <precountEnable>1</precountEnable> in the default song * <master>0</master> in the default song * The default song contained two Jack routes which were accidentally created So I changed the two flags in the default song and removed the jack routes and all of a sudden playback worked again. Most strange ... Dennis ------------------------------------------------------------------------------ _______________________________________________ Lmuse-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lmuse-developer
