Hello,

The bug [1].

Quantization should align the song that has it,
with the other deck. This should happen only if the other deck
is playing something. In case the other deck doesn't play
you dont want to quantize because tracks skips when being unpaused.

The bug is pretty eazy to reproduce in Mixxx, as it says in the bug report.

I want to write a test case to demostrate the problem so I can later
work on fixing it. Here is the code I got so far:

TEST_F(EngineSyncTest, MyTestQuantize) {

  // DECK 1:
  auto pFileBpm1 = std::make_unique<ControlProxy>(m_sGroup1, "file_bpm");
  // set position to .2
  ControlObject::getControl(ConfigKey(m_sGroup1, "playposition"))->set(0.2);
  pFileBpm1->set(100.0);
  BeatsPointer pBeats1 = BeatFactory::makeBeatGrid(*m_pTrack1, 100, 0.0);
  m_pTrack1->setBeats(pBeats1);
  
  // DECK 2:
  auto pFileBpm2 = std::make_unique<ControlProxy>(m_sGroup2, "file_bpm");
  // set position to .3
  ControlObject::getControl(ConfigKey(m_sGroup2, "playposition"))->set(0.3);
  pFileBpm2->set(100.0);
  BeatsPointer pBeats2 = BeatFactory::makeBeatGrid(*m_pTrack2, 100, 0.0);
  m_pTrack2->setBeats(pBeats2);

  // turn quantize off for Deck 1
  ControlObject::getControl(ConfigKey(m_sGroup1, "quantize"))->set(0.0);

  // Press play on Deck 1
  ControlObject::getControl(ConfigKey(m_sGroup1, "play"))->set(1.0);

  // The playposition should be 0.2
  EXPECT_FLOAT_EQ(0.2, ControlObject::getControl(ConfigKey(m_sGroup1, 
"playposition"))->get());

  // Stop playback on Deck 1
  ControlObject::getControl(ConfigKey(m_sGroup1, "play"))->set(0.0);
  // Turn quantize on
  ControlObject::getControl(ConfigKey(m_sGroup1, "quantize"))->set(1.0);

  ProcessBuffer();
  
  // Start playback on Deck 1
  ControlObject::getControl(ConfigKey(m_sGroup1, "play"))->set(1.0);
  // The playposition should still be 0.2
  EXPECT_FLOAT_EQ(0.2, ControlObject::getControl(ConfigKey(m_sGroup1, 
"playposition"))->get());
}

When I run it, it passes.. It shouldn't.
I tired a few changes here and there but I am kinda stuck now.

I am not sure I am using the right COs tho...

--
[1]: https://bugs.launchpad.net/mixxx/+bug/1663444?comments=all
---

Grammenos Anastasis

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to