Dear Rui,
sorry for 'spammimg the wrong list äh blog' and that it takes 10 days to open the topic in this List, but here we go:
(I have attached an archive session file,) I hope all information is included. I'm running the head version and update regulary.
Sorry, attaching does not work: "warning: Parameter 2 to mollom_form_alter() expected to be a reference, value given in /srv/www/vhosts/rncbc/drupal-6.20/includes/common.inc on line 2892." can I send it to pmail?
Jackd parameter:
usr/bin/jackd -v -p128 -dfirewire -r44100 -p256 -n2
Version: jackdmp 1.9.7
The MIDI files and the audio files are recorded with Rosegarden.
I have then exported the MIDI from Rosegarden, imported it in the Qtractor file manager and drag-droped the three tracks into the mail window.
The audio files are copied from one directory to the other. Imported in the QTracor file manager and drag-dropped to the arrange window.
The problem: If I cycle the 16 bars, usually the first loop is ok, but when beginning the second loop, MIDI and audio timing is completely broken or audio has a lot of xruns and/or stops.
When I disable the MIDI-Tracks!!!, everything works fine. When I disable the audio tracks, even the MIDI Track timing is corrupted in the second loop.
Isn't it strange?
Attachment | Size |
---|---|
Clicky.qtz | 2.88 KB |
Re: Problem with "MIDI xruns"
please send the archive/zip (.qtz) via pmail then--without some evidence i'm afraid i cannot help you the slightest bit, although i find the whole situation a very strange one indeed :/
seeya
Re: Problem with "MIDI xruns"
That's what I did but I get an:
rncbc@rncbc.org
SMTP error from remote mail server after MAIL FROM: SIZE=10900968:
host mail.rncbc.org [x.x.x.x]: 552 5.3.4 Message size exceeds fixed limit
:-(
Holger
Re: Problem with "MIDI xruns"
well that's huge :) any chance on getting rid of that lengthy audio stuff and still reproduce the issue?
after all, you're reporting a midi related trouble ain't you?
otherwise, you could have some dropbox/cloud somewhere and hand-over the file in some other way but mail or this blog (which have a 2mb attachment/upload file size limit btw, iirc)
cheers
Re: Problem with "MIDI xruns"
Rui you are perfectly right. I removed all audio stuff but still get XRuns... .
Yeah I'm a wizard;-)
I have sent the snippet via pmail.
I hope you can reproduce the behaviour.
So far: Thanks for you assistance.
Holger
Re: Problem with "MIDI xruns"
for general evidence, your file (Clicky.qtz) is now listed (attached) on this forum topic.
however, as i suspected, i cannot reproduce the reported behavior and i am already looping it for ages now :)
just out of curiosity, what midi interface(s) are you using? i see there's a "MTPAV on parallel port" but is that on a parallel (old printer) port actually? do that things still exist any longer? :) how old is your hardware/system? :))
what happens after you try some other queue timer resolution (in View/Options.../MIDI/Playback ... ) than the current or default one ?
byee
Re: Problem with "MIDI xruns"
didn't I mention you have to loop it 3684759 times - before you go mad...
Ok, thank you for checking this out.
Yes, I'm still using this old MOTU MIDI Express XT parallel interface. And I'm happy to have exactly this one, otherwise I had given up and switched to Windows. (There is no Win7 driver for the parallel version, so I have to stick to Linux;-)
My other hardware is everything between old (LXP1/5, K2000) and recent (Mackie FireWire mixer).
My workststion has an AMD Athlon(tm) 64 X2 Dual Core Processor 5200, which should be powerful enough for 3 MIDI tracks;-)
Other timer resolution makes the situation worse.
There seems to be no MIDI 'feedback' anywhere.
I will try to invatigate even more.
Again: Thanks for your help so far, Rui!
Holger
Re: Problem with "MIDI xruns"
which is your system timer resolution?
nb. lesser than 1000hz is not here recommended, although most distro supplied kernels have lousy values eg. 250hz or even 100hz, in an attempt to save some battery wattage for the laptops and mobile stuff which is pretty marginal if not b.s :)
did you try the hrtimer (high-resolution timer)? depending on your kernel version, it should be available through the snd-hrtimer alsa module. load it with
modprobe snd-hrtimer
as root and try to select it on qtractor options.
take note that the slave pcm timers are only good enough when the audio pcm period is short as well (ie. 256x2 might not be enough) and given that you're using a firewire device, well, it kind of makes it into a gray area to me--there's no alsa firewire driver per se, so it might not get tied to a pcm interrupt timer at all (thus the lousy results you get) . last time i saw it plugs directly into jackd through its ffado backend and stack.
do you experience the same behavior with any other audio device you can get your hands to? any but firewire, i ask.
did you said it works fine on rosegarden?
one other question, which i forgot to ask in first place: what are in fact those "xruns" you're talking about, which tend to occur on each loop turn-around? are those notes being playing out of tempo or dropped out entirely? is there a tempo variation or is it actually jackd reporting "xruns" instead?
seeya
Re: Problem with "MIDI xruns"
Rui,
your support is great and very welcome!
snd-hrtimer is loaded and I use the high resolution. 10.000Hz when I remember right. (I'm at work...)
The XRun(s) occur immediatly at the beginning of the loop and are reported by jackd. Then the timing is completely gone (midi output is delayed and notes are 'bouncing' around.), audio is disturbed from that point (and maybe stops...)
Yes, it works in Rosegarden.
Yesterday night I investigated one more thing:
I have two MIDI devices, a synthy and an e-piano. When I only enable the e-piano, everything works smooth, when I enable the synthy, the problem occurs (I have disconnected MIDI out from the synth to avoid possible MIDI-through loops).
The difference is: I have no instrument definition for the piano (yes yes, one of these old devices which only have one sound;-).
This means: no program change at the beginning of the sequence. (There might be the difference to rosegarden, I don't think they add the programm change to the sequence, as it is done in qtractor - but I'm not sure)
It could be 'bad vibes' between my 'vintage MIDI controller' and theese progranm changes... .
BTW - when I started testing with qtractor I tried to get rid of the programm changes and sometimes it seemed that they are added mor than once at the beginning of sequence - could this be?
I'm sorry, I have not tested all this with my alsa audio device - I will try it tonight. Unfortunatly I don't have another MIDI controller.
Thanks again Rui!
Holger
Re: Problem with "MIDI xruns"
i really can't see how all this happens.
but you can try a few shots in the dark, one by one, exclusive and/or inclusive:
./configure --enable-debug
), start from a terminal console and watch for the verbose output.please, test && tell
cheers
Re: Problem with "MIDI xruns"
Rui,
here are the results:
1: The problem IS connected to the FireWire device. I when I test with my Delta 44, there does not seem to be this problem.
2: Debug-Output
I did as you told me, started the song with all midi tracks muted and activated the MIDI tracks one by one. See log below
(Everything after *** are my comments)
3: After I have seen theese sendAllControllers(0) immediatly before the problem, I commented it it out in the source and recompiled. It does not solve the problem but prevent if from occuring immediatly.
Here we go:
*** Starting qtractor
--snip
--snip
*** Naming of the ports is not finished in ffado, therefore these 'unknown...' names
*** Load Song
-- snip
-- snip
-- snip
*** Song loaded -> play
*** Now unmuting a first MIDI Sequence
*** Start of sequence!
*** What does this mean??? Here the timing is already instable
*** activating a second track
*** and now everything gets out of sync.
*** What does JackActivationCount... means?
Re: Problem with "MIDI xruns"
*** What does JackActivationCount... means?
beats me :) those are jackdmp (aka jack2) generated messages... not qtractor's.
Re: Problem with "MIDI xruns"
Dear Rui,
guess what I did the last two evenings? I was making music using qtractor, my good old MIDI express XT and my FireWire interface... yeah.
The setup is still not as stable as I want it to, but in 9 of ten 10 cases I don't have any xruns.
What I did:
1.) Assuming that qtractor is not the cause of trouble;-)
2.) Installing a different realtime-kernel - I was using a Liquorix kernel because it was running with the NVidia driver - now I'm using the one from pengutronix and the nv video driver...
3.) lowering the priority for the MOTU in the hope that it does not disturb the audio interface
4.) Setting a very high priority for the FireWire
Thank you for all your help!
Holger
Re: Problem with "MIDI xruns"
well that is good news but doesn't quite dismiss the case :)
truth is i've been told that a real-time (preempt_rt) kernel has been the top recommendation for dealing with firewire audio devices--i don't have any experience with those myself, just heard on the interwebs:)--in fact it used to be more of a sine qua non condition. however i have been just assuming that recommendation wears out as far the latest stock kernels (and ffado stack) have been catching up to the task. i guess it's not still a closed deal, at least for some setups ;)
have you tried any the above a. to g. steps already, the so called shots in the dark ?
byee
Re: Problem with "MIDI xruns"
Dear Rui,
both were RT-Kernels (afaik), I never had dared to file this bugreport without having a rt-kernel;-)
But the pengutronix kernel has some modifications which made the rtirq-script failing, so I had to set priorities with my own script....
"...have you tried any the above a. to g. steps already, the so called shots in the dark ?"
Sorry for not being clear here: My lengthly post with the logfile was after doing all points from a to g. My plan was enable all backwards when it works in the 'g-state'. But due to tha fact that it did not change a lot, in my eyes there was no reason to investigate any further.
BTW: There are still program changes at the beginning of the sequences which cause the trouble (I tried to delete them but they are inserted again) - are they necessary or is the program change instruction send with the 'sendAllControllers()' function...
Holger
Add new comment