A template file should work for any samplerate.
If I change the sample rate and open Qtractor with a template the following occurs:
I get an erroneous warning, since there is no file to save yet, since nothing has been created yet, only the program has been opened with a template.
There is no conflict with the frequencies, because there is no content to conflict with yet.
New content will be created or adapted to the current frequency and the session will be saved with the current frequency without any conflict.
Saving does not solve anything, since logically you do not save the template, but the new opened session.
It has an easy solution. I have manually deleted the "<sample-rate></sample-rate>" tag from the .qtt file and everything seems to work correctly now.
Conclusion:
It would be nice if Qtractor did not save that sample-rate tag in templates, since it is unnecessary and problematic.
Greetings :)
re. Small bug in templates
yeah, you're totally correct, templates should not tagged to a sample-rate whatsoever...
will fix that in the future, soon :)
thanks
ps. yay, qtractor >= 1.1.1.8git.49c6c3 has it done, hopefully :)
re. Small bug in templates
First, I'd like to point out that this is not urgent, and has no functional consequences. It's just an annoying warning.
I'm using PipeWire.
Qtractor now does what it should, but I still get the error.
Strange behavior:
1 If the session doesn't provide the samplerate data, Qtractor starts by default at 44100 (seen in the status bar).
2 I wonder why? Who provides the 4410 data if it's not in the session?
2 The warning appears.
4 I accept it, and the samplerate changes within Qtractor to the PipeWire value of 48000.
I have several hypotheses for this:
- My computer is possessed by a mocking spirit.
- Maybe PipeWire provides the data based on some lost jack configuration and confuses Qtractor.
- Maybe Qtractor takes the data from a lost Jack configuration before taking it from PipeWire.
I'm betting it's something related to demons and/or spirits :)
Thanks also for fixing the transport and range not being saved.
P.S.:
The worst thing is that I'm not sure if it started happening before compiling.
I suspect so, but I'm not sure either.
It's probably a bug in my computer and Qtractor is doing things right now.
If someone else can test it we'll clear up any doubts.
If the bug is general I can think of a possible solution.
If a template is opened, before running the xml, add the samplerate tag taking it from the audio engine.
Hunted
Sorry, curiosity gets the better of me.
The default data is taken from here, I have done tests and it is like this:
---
./qtractorTimeScale.cpp:67: m_iSampleRate = 44100;
// (Re)nitializer method.
void qtractorTimeScale::clear (void) { m_iSnapPerBeat = 4;
m_iHorizontalZoom = 100;
m_iVerticalZoom = 100;
// m_displayFormat = Frames;
>> m_iSampleRate = 44100;
m_iTicksPerBeat = TICKS_PER_BEAT_DEF;
m_iPixelsPerBeat = 32;
m_iBeatsPerBar2 = 0;
m_iBeatDivisor2 = 0;
// Clear/reset tempo-map...
reset();
}
---
One solution is the one I proposed:
- If you open it from a template, rebuild the xml with the samplerate data taken from the audio engine before it is read.
- The most logical thing would be that m_iSampleRate was not a handwritten data, but that it took the data from the audio engine. Although I don't know if it is written by hand precisely in case the reading of the audio engine fails.
Anyway... I've I'm calm, I know what's going on.
I cancelled the appointment with the Shaman to scare away mocking spirits XD
Best solution
I have commented it and it seems to work, I don't know if there are possible negative considerations.
qtractorTimeScale.cpp:67:
//m_iSampleRate = 44100;
re. Best solution
hi, no, there must be a better one...
the problem seems to reside in the timing the template is loaded the internal audio engine is not yet started and having a meaningful sample-rate setting.
the way you propose leads to uninitialized data and might be potentially worse and buggy than letting it go with a default (wrong) value.
i'll try to come up with a better solution then ASAP. thanks
ps. hopefully fixed now on qtractor >= 1.1.1.15git.769715, cheers
Solved
Works perfectly.
It starts with the default value of 44100, and then immediately takes the value of 48000 without any error or warning.
Thanks
Add new comment