-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Midi import: Tempo from MIDI file is overwritten by default tempo #96
Comments
hi, could it be that some other JACK client has taken over or is messing up as jack-timebase master? or MIDI Clock input is enabled and something is overriding the current qtractor session tempo(BPM) ? otoh. as a rule, a long ago established one and still, tempi (yes plural for tempo-map) of an imported MIDI standard file is effective if and only if it's the first on a brand new and empty session; if there are any prior existing MIDI track/channels in session, then all tempi from any additional MIDI file imports are simply ignored or overruled. does any of the above make any sense on the behavior you're seeing? cheers |
I am afraid not: To be sure I deleted Qtractor.conf. Then started nothing but qtractor (not even qjackctl) -> Initial tempo 120bpm.Then imported the file I'll send you by email (not here - I am not sure for copyright on that file). I expect 129bpm. As said: on slow RaspberryPi I see 129bpm for very short time and then it switches back to 120bpm. Tried this also with 0.8.4 shipped with fedora - same. Did some debugging: I set a breakpoint at qtractorMidiFileTempo::addNodeTempo and see one call with fTempo = 129 and iTick = 0. Checked in call stack down to qtractorTracks::addMidiTracks: iTrack = 1 so I'd expect this tempo on first track (iChannel is incremented at the beginning of the loop). |
it seems to set the tempo right if you import the .mid file into a location that is not the absolute beginning, given by the edit-head or left vertical line. if the midi file is imported into the absolute beginning the of time-line then it looks like the initial tempo (of the file) is discarded and overruled by the current session tempo. yep, this is not correct behavior: it's a dang bug and would start looking at https://github.com/rncbc/qtractor/blob/master/src/qtractorMidiClip.cpp#L470 |
as matter of fact, it is JACK transport that is messing with imported MIDI file tempi: if you turn off Transport > Mode to "None" or "Output" only, then things tend to work right. so after all, the issue seems to point to a race condition over the JACK transport/timebase callback and the moment |
Yeah it looked racy to me either. Tonight (with my hobby hat on) I will give this a try on PC and RaspberryPi and let you know. Thanks for taking care. |
should be fixed now with 0154eee |
Have tested on PC and Raspi: Thanks for fixing! |
Aargh - you opened the worm thingy (and I feel responsible :). 0154eee breaks at least mute. To test:
I switched back to previous commit (8bd65bd) and mute works again so it must be related to 0154eee. |
what 'ugly' things? i've tested and didn't see any ugliness on muting a track or another. |
Sound distorts totally. Another thing I found (I am sure I've done it before without issue - will test): If you zoom in/out clip area sound is also distorted. As test case see sample session attached (again path and name for might Fluid3GM.sf2 need some alignment). |
Meanwhile tested but I was not precise: Zoom in/out horizontally clip area distorts while playing example session since last commit. |
can you retry on master head (0154eee) and uncheck View > Options... > General > Transport > Timebase ? does it make a difference? and what about doing a |
|
refactored in 61a00f2b may you try again, with and without Timebase set ? cheers |
Quick test on PC:
So looks good from first glance. Will start a build for RasberryPi with this change included, do further tests and let you know. Why RaspberryPi: During my activities on qtractor I have learned: Things working perfect on PC can fail on RaspberryPi. It is much slower so things can behave complete different. |
It's not your problem but now auto-plugin-deactivation in neonx is broken. Auto monitoring does not work without auto-plugin-deactivation enabled Tomorrow is just another day... |
I did many imports and played around with them so I consider this solved. Thanks a lot for fixing this. |
Hi,
When importing a MIDI file, the tempo suggested by the file is overwritten by default tempo. On PC (fast) the effect is not visible but on RaspberryPi (slow) the imported tempo is displayed for a short while in toolbar(<1s) and then overwritten by the tempo set before in the session.
The text was updated successfully, but these errors were encountered: