Verb183bAtriumTests.inc 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Round 183b slice 5: Atrium (the ValhallaRoom role), measured black-box on the reference (tp172d's settings and 13
  2. // new captures with the impulse at −20 dB; the reference is linear). Its level barely moves from early only to late
  3. // only, holds over Decay and over Late size.
  4. TEST (atrium_level_laws_verb183b)
  5. {
  6. using namespace verbs100;
  7. using lynx::EffectKind;
  8. auto total = [] (lynx::EffectParams p) { const auto s = impulse (EffectKind::atrium, p, 12.0); return energyDb (s, 0, s.l.size()); };
  9. auto p = defaults (EffectKind::atrium);
  10. p[0] = 1.0f;
  11. p[4] = 0.0f;
  12. const auto early = total (p);
  13. p[4] = 0.5f;
  14. const auto mid = total (p);
  15. p[4] = 1.0f;
  16. const auto late = total (p);
  17. // the reference: −28.7 / −27.2 / −26.1 dB (2.6 dB from early only to late only; the old linear fade moved 10.7)
  18. CHECK (std::abs (late - early) < 5.0 && mid > early - 1.0 && mid < late + 1.0);
  19. // Decay 2.1 s → 8.6 s: the reference −27.2 → −26.8 dB
  20. p[4] = 0.5f;
  21. p[2] = lynx::verbs::atrium::decayValue (2.1);
  22. const auto shortRoom = total (p);
  23. p[2] = lynx::verbs::atrium::decayValue (8.6);
  24. const auto longRoom = total (p);
  25. CHECK (std::abs (longRoom - shortRoom) < 2.5);
  26. // Late size 0 / 100 %: the reference holds its level (−26.9 / −27.2 dB)
  27. p = defaults (EffectKind::atrium);
  28. p[0] = 1.0f;
  29. p[5] = 0.0f;
  30. const auto small = total (p);
  31. p[5] = 1.0f;
  32. const auto big = total (p);
  33. CHECK (std::abs (big - small) < 2.0);
  34. }