Coder Social home page Coder Social logo

Comments (17)

rncbc avatar rncbc commented on July 25, 2024

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

from qtractor.

schnitzeltony avatar schnitzeltony commented on July 25, 2024

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).

from qtractor.

rncbc avatar rncbc commented on July 25, 2024

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
for clues...

from qtractor.

rncbc avatar rncbc commented on July 25, 2024

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 jack_transport_query() is called periodically (qtractorMainSession::slowTimerSlot()).

from qtractor.

schnitzeltony avatar schnitzeltony commented on July 25, 2024

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.

from qtractor.

rncbc avatar rncbc commented on July 25, 2024

should be fixed now with 0154eee
also merged into 'neonx' branch.
cheers

from qtractor.

schnitzeltony avatar schnitzeltony commented on July 25, 2024

Have tested on PC and Raspi: Thanks for fixing!

from qtractor.

schnitzeltony avatar schnitzeltony commented on July 25, 2024

Aargh - you opened the worm thingy (and I feel responsible :). 0154eee breaks at least mute.

To test:

  • Open a session (in my case only MIDI tracks)
  • Play session
  • Be sure that the volume is not too high before performing next step
  • Mute one track -> Ugly things happen

I switched back to previous commit (8bd65bd) and mute works again so it must be related to 0154eee.

from qtractor.

rncbc avatar rncbc commented on July 25, 2024

what 'ugly' things? i've tested and didn't see any ugliness on muting a track or another.

from qtractor.

schnitzeltony avatar schnitzeltony commented on July 25, 2024

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).

ExampleSession.zip

from qtractor.

schnitzeltony avatar schnitzeltony commented on July 25, 2024

Meanwhile tested but I was not precise: Zoom in/out horizontally clip area distorts while playing example session since last commit.

from qtractor.

rncbc avatar rncbc commented on July 25, 2024

can you retry on master head (0154eee) and uncheck View > Options... > General > Transport > Timebase ? does it make a difference?

and what about doing a git reset --hard 8bd65bd663647b26eb2b305abd384c4e2d9b66ea and rebuild it all from scratch?

from qtractor.

schnitzeltony avatar schnitzeltony commented on July 25, 2024
  1. master head ( 0154eee ) Timebase checked: Mute distorts / Zoom in/out clip area also distorts. Distortion sounds like many MIDI notes on/off in short time.
  2. master head ( 0154eee ) Timebase unchecked: Mute no distortion / Zoom in/out clip area also no distortion.
  3. full rebuild 8bd65bd : No distortion on either Timebase checked or unchecked.

from qtractor.

rncbc avatar rncbc commented on July 25, 2024

refactored in 61a00f2b

may you try again, with and without Timebase set ?

cheers

from qtractor.

schnitzeltony avatar schnitzeltony commented on July 25, 2024

Quick test on PC:

  • With or without Timebase set: no distortion
  • Midi import tempo correctly taken from MIDI file

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.

from qtractor.

schnitzeltony avatar schnitzeltony commented on July 25, 2024

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...

from qtractor.

schnitzeltony avatar schnitzeltony commented on July 25, 2024

I did many imports and played around with them so I consider this solved. Thanks a lot for fixing this.

from qtractor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.