adding comments to filterpansingle#6
Conversation
|
The spreading into classes is Ok for me now. If one likes to reuse the code, it is a good time to split the code up than as needed. I have also thought about adding the gain value to the Enginefilterpansingle ... Enginefilterpansingle Yes, the name is stupid and Enginefilterpan is now unused. |
Thanks in advance and for the fast reply. |
|
Ramping: Inside Mixxx we use this value to go from one state to an other. For example if you turn the Gain knob, Mixxx samples the knob position lets say 0.50 0.55 0.60. If we apply these abrupt gain change to a audio signal, it adds hear-able square wave noise to the signal. To avoid this, we change the gain for one buffer lengths form 0.5 to 0.55 and after sampling 0.60 from 0.55 to 0.60. In this case, we just try to guess the signal voltage between two samples buy using a straight curve between them. In the old solution we have used ramping, because we have faded out the samples with the old delay, and faded in the samples with the new delay.
What do you mean here? |
|
Thank you for your improvements! |
adding comments to filterpansingle
Fix compile on WIN, use GetSystemTimePreciseAsFileTime() on Windows 8
use QEvent::WindowDeactivate to reset the press state
Mastersyc double / half Bpm Fix.
Hercules DJControl Inpulse 200: Fix some code stye issues
…h sync
When loading a track that is not yet present in the library (and thus
doesn't have any BPM because it hasn't been analyzed yet) while another
deck is playing and both decks have sync enabled, a debug assertion is
triggered:
DEBUG ASSERT: "isValid()" in function double mixxx::Bpm::value() const at src/track/bpm.h:53
Aborted (core dumped)
The backtrace looks as follows:
#0 0x00007f175c87234c in __pthread_kill_implementation () at /usr/lib/libc.so.6
#1 0x00007f175c8254b8 in raise () at /usr/lib/libc.so.6
#2 0x00007f175c80f534 in abort () at /usr/lib/libc.so.6
#3 0x00007f175cf05ee4 in qt_assert(char const*, char const*, int) () at /usr/lib/libQt5Core.so.5
#4 0x000055deb2e67e1c in mixxx::(anonymous namespace)::handleMessage(QtMsgType, QMessageLogContext const&, QString const&) (type=<optimized out>, context=<optimized out>, input=<optimized out>) at src/util/logging.cpp:355
#5 0x00007f175cf47128 in () at /usr/lib/libQt5Core.so.5
#6 0x00007f175cf3fd8a in () at /usr/lib/libQt5Core.so.5
#7 0x00007f175cf06526 in QMessageLogger::critical(char const*, ...) const () at /usr/lib/libQt5Core.so.5
#8 0x000055deb2e5c720 in mixxx_debug_assert(char const*, char const*, int, char const*) (assertion=assertion@entry=0x55deb39bd0db "isValid()", file=file@entry=0x55deb39bbf30 "src/track/bpm.h", line=line@entry=53, function=function@entry=0x55deb39bbf08 "double mixxx::Bpm::value() const") at gsrc/util/assert.h:9
#9 0x000055deb2ee7e7e in mixxx_debug_assert_return_true(char const*, char const*, int, char const*) (function=0x55deb39bbf08 "double mixxx::Bpm::value() const", line=53, file=0x55deb39bbf30 "src/track/bpm.h", assertion=0x55deb39bd0db "isValid()") at gsrc/util/assert.h:18
#10 mixxx::Bpm::value() const (this=<synthetic pointer>) at src/track/bpm.h:53
#11 mixxx::operator*(mixxx::Bpm, double) (multiple=1, bpm=...) at src/track/bpm.h:160
#12 SyncControl::setLocalBpm(mixxx::Bpm) (this=<optimized out>, localBpm=...) at src/engine/sync/synccontrol.cpp:567
#13 0x000055deb34c7ba3 in EngineBuffer::postProcess(int) (this=0x55deb56eb060, iBufferSize=2048) at src/engine/enginebuffer.cpp:1318
#14 0x000055deb3139023 in EngineMaster::processChannels(int) (this=0x55deb5449440, iBufferSize=<optimized out>) at src/engine/enginemaster.cpp:383
#15 0x000055deb31394f7 in EngineMaster::process(int) (this=0x55deb5449440, iBufferSize=iBufferSize@entry=2048) at src/engine/enginemaster.cpp:410
#16 0x000055deb2f91d0b in SoundManager::onDeviceOutputCallback(long) (this=<optimized out>, iFramesPerBuffer=iFramesPerBuffer@entry=1024) at src/soundio/soundmanager.cpp:596
#17 0x000055deb32dd794 in SoundDevicePortAudio::callbackProcessClkRef(long, float*, float const*, PaStreamCallbackTimeInfo const*, unsigned long) (this=0x55deb553e6b0, framesPerBuffer=1024, out=<optimized out>, in=<optimized out>, timeInfo=<optimized out>, statusFlags=<optimized out>) at src/soundio/sounddeviceportaudio.cpp:965
This happens because `newLocalBpm` is invalid when `localBpm` is
invalid. Trying to do sync decks while no tempo information is available
does not make sense, so we only synchronize decks if the local BPM is
available.
Silence some float conversion warnings by making conversion explicit
VersionStore: Remove Apple fallback
Hi @daschuer ,
Thanks a lot for your work, I read it carefully despite my little c++ skills. I don't really know if I can call it a review considering how much I still have to learn but there is at least one thing I can share : My fresh look as a beginner. So I added as many comments I needed to understand what you did.
Could you tell me if there is any misunderstanding in my descriptions before I merge all what you've done?
More, thanks a lot for this example of a ramping applied sample by sample, it would be really more flexible than buffer than buffer. Don't you think I should use this pattern to wrap the calculations made in the autopan effect (https://github.com/demos/mixxx/blob/pan_effect_stereo/src/effects/native/autopaneffect.cpp#L164-L188) in a separated class (could be useful in a true pan knob/preference)?
There is one question remaining for me, it concerns the naming :
"Enginefilterpansingle" doesn't talk about delay even if it's mainly what it does, wouldn't "delaypan" be clearer? More, if i move the linked piece of code into another class shouldn't I call it enginefilterpansingle?
Sorry for the time I needed to response and thanks a lot for this "lesson" :)