diff --git a/CMakeLists.txt b/CMakeLists.txt index edf35c3794f..7d8494b260d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3450,6 +3450,7 @@ if (STEM) target_sources(mixxx-test PUBLIC src/test/stemtest.cpp src/test/steminfotest.cpp + src/test/stemcontrolobjecttest.cpp ) list(APPEND MIXXX_LIB_PRECOMPILED_HEADER src/track/steminfo.h) target_sources(mixxx-lib PRIVATE @@ -3457,6 +3458,17 @@ if (STEM) src/track/steminfoimporter.cpp src/track/steminfo.cpp ) + if(QOPENGL) + target_sources(mixxx-lib PRIVATE + src/waveform/renderers/allshader/waveformrendererstem.cpp + ) + endif() + if(QML) + target_compile_definitions(mixxx-qml-lib PUBLIC __STEM__) + target_sources(mixxx-qml-lib PRIVATE + src/qml/qmlstemsmodel.cpp + ) + endif() endif() # Test Suite diff --git a/res/qml/EqColumn.qml b/res/qml/EqColumn.qml index acf1f3ab1c2..f894e27165f 100644 --- a/res/qml/EqColumn.qml +++ b/res/qml/EqColumn.qml @@ -1,44 +1,103 @@ import "." as Skin import QtQuick 2.12 import QtQuick.Shapes 1.12 +import QtQuick.Layouts +import Mixxx 1.0 as Mixxx import "Theme" Column { id: root required property string group + property var player: Mixxx.PlayerManager.getPlayer(root.group) - spacing: 4 + Mixxx.ControlProxy { + id: stemCountControl - Skin.EqKnob { - statusKey: "button_parameter3" - knob.group: "[EqualizerRack1_" + root.group + "_Effect1]" - knob.key: "parameter3" - knob.color: Theme.eqHighColor + group: root.group + key: "stem_count" } - Skin.EqKnob { - statusKey: "button_parameter2" - knob.group: "[EqualizerRack1_" + root.group + "_Effect1]" - knob.key: "parameter2" - knob.color: Theme.eqMidColor - } + Row { + Column { + id: stem + spacing: 4 + visible: opacity != 0 + Repeater { + model: root.player.stemsModel - Skin.EqKnob { - knob.group: "[EqualizerRack1_" + root.group + "_Effect1]" - knob.key: "parameter1" - statusKey: "button_parameter1" - knob.color: Theme.eqLowColor - } + Skin.StemKnob { + id: stem + group: root.group + property alias color: stem.stemColor + } + } + } + Column { + id: eq + spacing: 4 + width: 10 + visible: opacity != 0 + Skin.EqKnob { + statusKey: "button_parameter3" + knob.group: "[EqualizerRack1_" + root.group + "_Effect1]" + knob.key: "parameter3" + knob.color: Theme.eqHighColor + } + + Skin.EqKnob { + statusKey: "button_parameter2" + knob.group: "[EqualizerRack1_" + root.group + "_Effect1]" + knob.key: "parameter2" + knob.color: Theme.eqMidColor + } + + Skin.EqKnob { + knob.group: "[EqualizerRack1_" + root.group + "_Effect1]" + knob.key: "parameter1" + statusKey: "button_parameter1" + knob.color: Theme.eqLowColor + } + + Skin.EqKnob { + knob.group: "[QuickEffectRack1_" + root.group + "]" + knob.key: "super1" + statusGroup: "[QuickEffectRack1_" + root.group + "_Effect1]" + statusKey: "enabled" + knob.arcStyle: ShapePath.DashLine + knob.arcStylePattern: [2, 2] + knob.color: Theme.eqFxColor + } + } + states: [ + State { + name: "eq" + when: stemCountControl.value == 0 + PropertyChanges { target: stem; opacity: 0; width: 0} + }, + State { + name: "stem" + when: stemCountControl.value != 0 + PropertyChanges { target: eq; opacity: 0; width: 0 } + } + ] - Skin.EqKnob { - knob.group: "[QuickEffectRack1_" + root.group + "]" - knob.key: "super1" - statusGroup: "[QuickEffectRack1_" + root.group + "_Effect1]" - statusKey: "enabled" - knob.arcStyle: ShapePath.DashLine - knob.arcStylePattern: [2, 2] - knob.color: Theme.eqFxColor + transitions: [ + Transition { + from: "eq" + to: "stem" + ParallelAnimation { + PropertyAnimation { targets: [eq, stem]; properties: "opacity,width"; duration: 1000} + } + }, + Transition { + from: "stem" + to: "eq" + ParallelAnimation { + PropertyAnimation { targets: [eq, stem]; properties: "opacity,width"; duration: 1000} + } + } + ] } Skin.OrientationToggleButton { diff --git a/res/qml/Mixer.qml b/res/qml/Mixer.qml index 05e362920a8..9a6b5bd165c 100644 --- a/res/qml/Mixer.qml +++ b/res/qml/Mixer.qml @@ -1,4 +1,5 @@ import "." as Skin +import Mixxx 1.0 as Mixxx import QtQuick 2.12 Item { diff --git a/res/qml/StemKnob.qml b/res/qml/StemKnob.qml new file mode 100644 index 00000000000..0e0f1fd0e5d --- /dev/null +++ b/res/qml/StemKnob.qml @@ -0,0 +1,67 @@ +import "." as Skin +import Mixxx 1.0 as Mixxx +import QtQuick 2.12 +import "Theme" + +Rectangle { + id: root + + property alias knob: knob + + required property string group + required property string label + required property color stemColor + required property int index + + width: 56 + height: 56 + radius: 5 + color: stemColor + + Skin.ControlKnob { + id: knob + group: root.group + key: `stem_${root.index + 1}_volume` + color: Theme.gainKnobColor + anchors.topMargin: 5 + anchors.top: root.top + anchors.horizontalCenter: root.horizontalCenter + + arcStart: 0 + + width: 36 + height: 36 + } + + Text { + anchors.bottom: root.bottom + anchors.horizontalCenter: root.horizontalCenter + text: label + } + + Mixxx.ControlProxy { + id: statusControl + + group: root.group + key: `stem_${root.index + 1}_mute` + } + + Rectangle { + id: statusButton + + anchors.left: root.left + anchors.top: root.top + anchors.leftMargin: 4 + anchors.topMargin: 4 + width: 8 + height: width + radius: width / 2 + border.width: 1 + border.color: Theme.buttonNormalColor + color: statusControl.value ? knob.color : "transparent" + + TapHandler { + onTapped: statusControl.value = !statusControl.value + } + } +} diff --git a/src/analyzer/analyzerwaveform.cpp b/src/analyzer/analyzerwaveform.cpp index 3b787333bab..f55e18a186b 100644 --- a/src/analyzer/analyzerwaveform.cpp +++ b/src/analyzer/analyzerwaveform.cpp @@ -103,6 +103,9 @@ bool AnalyzerWaveform::shouldAnalyze(TrackPointer tio) const { ConstWaveformPointer pTrackWaveformSummary = tio->getWaveformSummary(); ConstWaveformPointer pLoadedTrackWaveform; ConstWaveformPointer pLoadedTrackWaveformSummary; +#ifdef __STEM__ + bool isStemTrack = !tio->getStemInfo().isEmpty(); +#endif TrackId trackId = tio->getId(); bool missingWaveform = pTrackWaveform.isNull(); @@ -142,6 +145,19 @@ bool AnalyzerWaveform::shouldAnalyze(TrackPointer tio) const { } } +#ifdef __STEM__ + // If the waveform was generated without stem information but the track has + // some, or the waveform contains stem information but the track doesn't + // have any, we need to regenerate the waveform. + if (!missingWaveform && + ((!pTrackWaveform.isNull() && + pTrackWaveform->hasStem() != isStemTrack) || + (!pLoadedTrackWaveform.isNull() && + pLoadedTrackWaveform->hasStem() != isStemTrack))) { + missingWaveform = true; + } +#endif + // If we don't need to calculate the waveform/wavesummary, skip. if (!missingWaveform && !missingWavesummary) { kLogger.debug() << "loadStored - Stored waveform loaded"; diff --git a/src/analyzer/analyzerwaveform.h b/src/analyzer/analyzerwaveform.h index 3258a8c3f3e..a839cf8190b 100644 --- a/src/analyzer/analyzerwaveform.h +++ b/src/analyzer/analyzerwaveform.h @@ -141,7 +141,7 @@ struct WaveformStride { float m_overallData[ChannelCount]; float m_filteredData[ChannelCount][FilterCount]; - float m_stemData[ChannelCount][mixxx::kMaxSupportedStem]; + float m_stemData[ChannelCount][mixxx::kMaxSupportedStems]; float m_averageOverallData[ChannelCount]; float m_averageFilteredData[ChannelCount][FilterCount]; diff --git a/src/analyzer/constants.h b/src/analyzer/constants.h index e66a52a308f..42d84db7217 100644 --- a/src/analyzer/constants.h +++ b/src/analyzer/constants.h @@ -10,7 +10,7 @@ namespace mixxx { // fixed number of channels like the engine does, usually 2 = stereo. constexpr audio::ChannelCount kAnalysisChannels = mixxx::kEngineChannelOutputCount; constexpr audio::ChannelCount kAnalysisMaxChannels = mixxx::kMaxEngineChannelInputCount; -constexpr int kMaxSupportedStem = 4; +constexpr int kMaxSupportedStems = 4; constexpr SINT kAnalysisFramesPerChunk = 4096; constexpr SINT kAnalysisSamplesPerChunk = kAnalysisFramesPerChunk * kAnalysisMaxChannels; diff --git a/src/engine/channels/enginedeck.cpp b/src/engine/channels/enginedeck.cpp index 7b04c7db263..09f2474e4b5 100644 --- a/src/engine/channels/enginedeck.cpp +++ b/src/engine/channels/enginedeck.cpp @@ -7,8 +7,22 @@ #include "engine/enginepregain.h" #include "engine/enginevumeter.h" #include "moc_enginedeck.cpp" +#include "track/track.h" #include "util/sample.h" +#ifdef __STEM__ +namespace { +constexpr int kMaxSupportedStems = 4; + +QString getGroupForStem(const QString& deckGroup, int stemIdx) { + DEBUG_ASSERT(deckGroup.endsWith("]")); + return QStringLiteral("%1Stem%2]") + .arg(deckGroup.left(deckGroup.size() - 1), + QString::number(stemIdx)); +} +} // anonymous namespace +#endif + EngineDeck::EngineDeck( const ChannelHandleAndGroup& handleGroup, UserSettingsPointer pConfig, @@ -39,39 +53,110 @@ EngineDeck::EngineDeck( pConfig, this, pMixingEngine, +#ifdef __STEM__ primaryDeck ? mixxx::audio::ChannelCount::stem() - : mixxx::audio::ChannelCount::stereo()); + : mixxx::audio::ChannelCount::stereo() + +#else + mixxx::audio::ChannelCount::stereo() +#endif + ); + +#ifdef __STEM__ + if (!primaryDeck) { + return; + } + + connect(m_pBuffer, &EngineBuffer::trackLoaded, this, &EngineDeck::slotTrackLoaded); + + m_pStemCount = std::make_unique(ConfigKey(getGroup(), "stem_count")); + m_pStemCount->setReadOnly(); + + m_stemGain.reserve(kMaxSupportedStems); + m_stemMute.reserve(kMaxSupportedStems); + for (int stemIdx = 1; stemIdx <= kMaxSupportedStems; stemIdx++) { + m_stemGain.emplace_back(std::make_unique( + ConfigKey(getGroupForStem(getGroup(), stemIdx), QStringLiteral("volume")))); + // The default value is ignored and override with the medium value by + // ControlPotmeter. This is likely a bug but fixing might have a + // disruptive impact, so setting the default explicitly + m_stemGain.back()->set(1.0); + m_stemGain.back()->setDefaultValue(1.0); + m_stemMute.emplace_back(std::make_unique( + ConfigKey(getGroupForStem(getGroup(), stemIdx), QStringLiteral("mute")))); + } +#endif } +#ifdef __STEM__ +void EngineDeck::slotTrackLoaded(TrackPointer pNewTrack, + TrackPointer) { + VERIFY_OR_DEBUG_ASSERT(m_pStemCount) { + return; + } + if (m_pConfig->getValue( + ConfigKey("[Mixer Profile]", "stem_auto_reset"), true)) { + for (int stemIdx = 0; stemIdx < kMaxSupportedStems; stemIdx++) { + m_stemGain[stemIdx]->set(1.0); + m_stemMute[stemIdx]->set(0.0); + ; + } + } + if (pNewTrack) { + int stemCount = pNewTrack->getStemInfo().size(); + m_pStemCount->forceSet(stemCount); + } else { + m_pStemCount->forceSet(0); + } +} +#endif + EngineDeck::~EngineDeck() { delete m_pPassing; delete m_pBuffer; delete m_pPregain; } +#ifdef __STEM__ void EngineDeck::processStem(CSAMPLE* pOut, const int iBufferSize) { - int stereoChannelCount = m_pBuffer->getChannelCount() / mixxx::kEngineChannelOutputCount; - auto allChannelBufferSize = iBufferSize * stereoChannelCount; + int stemCount = m_pBuffer->getChannelCount() / mixxx::kEngineChannelOutputCount; + auto allChannelBufferSize = iBufferSize * stemCount; if (m_stemBuffer.size() < allChannelBufferSize) { m_stemBuffer = mixxx::SampleBuffer(allChannelBufferSize); } m_pBuffer->process(m_stemBuffer.data(), allChannelBufferSize); // TODO(XXX): process effects per stems - SampleUtil::clear(pOut, iBufferSize); const CSAMPLE* pIn = m_stemBuffer.data(); for (int i = 0; i < iBufferSize; i += mixxx::kEngineChannelOutputCount) { - for (int chIdx = 0; chIdx < m_pBuffer->getChannelCount(); - chIdx += mixxx::kEngineChannelOutputCount) { - // TODO(XXX): apply stem gain or skip muted stem - pOut[i] += pIn[stereoChannelCount * i + chIdx]; - pOut[i + 1] += pIn[stereoChannelCount * i + chIdx + 1]; + for (int stemIdx = 0; stemIdx < stemCount; + stemIdx++) { + if (m_stemMute[stemIdx]->toBool()) { + continue; + } + float gain = static_cast(m_stemGain[stemIdx]->get()); + pOut[i] += pIn[stemCount * i + mixxx::kEngineChannelOutputCount * stemIdx] * gain; + pOut[i + 1] += + pIn[stemCount * i + + mixxx::kEngineChannelOutputCount * stemIdx + 1] * + gain; } } // TODO(XXX): process stem DSP } +void EngineDeck::cloneStemState(const EngineDeck* deckToClone) { + VERIFY_OR_DEBUG_ASSERT(deckToClone) { + return; + } + for (int stemIdx = 0; stemIdx < kMaxSupportedStems; stemIdx++) { + m_stemGain[stemIdx]->set(deckToClone->m_stemGain[stemIdx]->get()); + m_stemMute[stemIdx]->set(deckToClone->m_stemMute[stemIdx]->get()); + } +} +#endif + void EngineDeck::process(CSAMPLE* pOut, const int iBufferSize) { // Feed the incoming audio through if passthrough is active const CSAMPLE* sampleBuffer = m_sampleBuffer; // save pointer on stack @@ -88,14 +173,18 @@ void EngineDeck::process(CSAMPLE* pOut, const int iBufferSize) { return; } +#ifdef __STEM__ // Process the raw audio if (m_pBuffer->getChannelCount() <= mixxx::kEngineChannelOutputCount) { // Process a single mono or stereo channel +#endif m_pBuffer->process(pOut, iBufferSize); +#ifdef __STEM__ } else { // Process multiple stereo channels (stems) and mix them together processStem(pOut, iBufferSize); } +#endif m_pPregain->setSpeedAndScratching(m_pBuffer->getSpeed(), m_pBuffer->getScratching()); m_bPassthroughWasActive = false; } diff --git a/src/engine/channels/enginedeck.h b/src/engine/channels/enginedeck.h index 670787270b0..607c853e95b 100644 --- a/src/engine/channels/enginedeck.h +++ b/src/engine/channels/enginedeck.h @@ -5,12 +5,14 @@ #include "engine/channels/enginechannel.h" #include "preferences/usersettings.h" #include "soundio/soundmanagerutil.h" +#include "track/track_decl.h" #include "util/samplebuffer.h" class EnginePregain; class EngineBuffer; class EngineMixer; class ControlPushButton; +class ControlPotmeter; class EngineDeck : public EngineChannel, public AudioDestination { Q_OBJECT @@ -63,23 +65,40 @@ class EngineDeck : public EngineChannel, public AudioDestination { // Return whether or not passthrough is active bool isPassthroughActive() const; +#ifdef __STEM__ + // Clone the stem state (gain and volume) from deckToClone to this. Doesn't + // check if the loaded track is a stem so this should only be used in case + // of stem track + void cloneStemState(const EngineDeck* deckToClone); +#endif + signals: void noPassthroughInputConfigured(); public slots: void slotPassthroughToggle(double v); void slotPassthroughChangeRequest(double v); +#ifdef __STEM__ + void slotTrackLoaded(TrackPointer pNewTrack, TrackPointer); +#endif private: +#ifdef __STEM__ // Process multiple channels and mix them together into the passed buffer void processStem(CSAMPLE* pOutput, const int iBufferSize); +#endif UserSettingsPointer m_pConfig; EngineBuffer* m_pBuffer; EnginePregain* m_pPregain; +#ifdef __STEM__ // Stem buffer used to retrieve all the channel to mix together mixxx::SampleBuffer m_stemBuffer; + std::unique_ptr m_pStemCount; + std::vector> m_stemGain; + std::vector> m_stemMute; +#endif // Begin vinyl passthrough fields QScopedPointer m_pInputConfigured; diff --git a/src/mixer/basetrackplayer.cpp b/src/mixer/basetrackplayer.cpp index 7403e068af3..e6b9d87a744 100644 --- a/src/mixer/basetrackplayer.cpp +++ b/src/mixer/basetrackplayer.cpp @@ -24,6 +24,7 @@ namespace { constexpr double kNoTrackColor = -1; constexpr double kShiftCuesOffsetMillis = 10; constexpr double kShiftCuesOffsetSmallMillis = 1; +constexpr int kMaxSupportedStems = 4; const QString kEffectGroupFormat = QStringLiteral("[EqualizerRack1_%1_Effect1]"); inline double trackColorToDouble(mixxx::RgbColor::optional_t color) { @@ -278,6 +279,24 @@ BaseTrackPlayerImpl::BaseTrackPlayerImpl( &BaseTrackPlayerImpl::slotUpdateReplayGainFromPregain); m_ejectTimer.start(); + + if (!primaryDeck) { + return; + } + +#ifdef __STEM__ + m_pStemColors.reserve(kMaxSupportedStems); + QString group = getGroup(); + for (int stemIdx = 1; stemIdx <= kMaxSupportedStems; stemIdx++) { + QString stemGroup = QStringLiteral("%1Stem%2]") + .arg(group.left(group.size() - 1), + QString::number(stemIdx)); + m_pStemColors.emplace_back(std::make_unique( + ConfigKey(stemGroup, QStringLiteral("color")))); + m_pStemColors.back()->set(kNoTrackColor); + m_pStemColors.back()->setReadOnly(); + } +#endif } BaseTrackPlayerImpl::~BaseTrackPlayerImpl() { @@ -367,6 +386,13 @@ void BaseTrackPlayerImpl::loadTrack(TrackPointer pTrack) { ConfigKey(m_pChannelToCloneFrom->getGroup(), "loop_start_position"))); m_pLoopOutPoint->set(ControlObject::get( ConfigKey(m_pChannelToCloneFrom->getGroup(), "loop_end_position"))); + +#ifdef __STEM__ + auto* pDeckToClone = qobject_cast(m_pChannelToCloneFrom); + if (pDeckToClone && m_pLoadedTrack && m_pLoadedTrack->hasStem() && m_pChannel) { + m_pChannel->cloneStemState(pDeckToClone); + } +#endif } connectLoadedTrack(); @@ -665,6 +691,23 @@ void BaseTrackPlayerImpl::slotTrackLoaded(TrackPointer pNewTrack, } } +#ifdef __STEM__ + if (m_pStemColors.size()) { + const auto& stemInfo = m_pLoadedTrack->getStemInfo(); + DEBUG_ASSERT(stemInfo.size() <= kMaxSupportedStems); + int stemIdx = 0; + for (const auto& stemColorCo : m_pStemColors) { + auto color = kNoTrackColor; + if (stemIdx < stemInfo.size()) { + color = trackColorToDouble(mixxx::RgbColor::fromQColor( + stemInfo.at(stemIdx).getColor())); + } + stemColorCo->forceSet(color); + stemIdx++; + } + } +#endif + emit newTrackLoaded(m_pLoadedTrack); emit trackRatingChanged(m_pLoadedTrack->getRating()); } else { diff --git a/src/mixer/basetrackplayer.h b/src/mixer/basetrackplayer.h index 14ff33e556f..048455edfec 100644 --- a/src/mixer/basetrackplayer.h +++ b/src/mixer/basetrackplayer.h @@ -166,6 +166,11 @@ class BaseTrackPlayerImpl : public BaseTrackPlayer { std::unique_ptr m_pTrackColorNext; std::unique_ptr m_pTrackColorSelect; +#ifdef __STEM__ + // Stems color + std::vector> m_pStemColors; +#endif + // Waveform display related controls std::unique_ptr m_pWaveformZoom; std::unique_ptr m_pWaveformZoomUp; diff --git a/src/preferences/dialog/dlgprefmixer.cpp b/src/preferences/dialog/dlgprefmixer.cpp index 309b78fe4c8..297e826fd5f 100644 --- a/src/preferences/dialog/dlgprefmixer.cpp +++ b/src/preferences/dialog/dlgprefmixer.cpp @@ -29,6 +29,9 @@ const ConfigKey kEqsOnlyKey = ConfigKey(kMixerProfile, QStringLiteral("EQsOnly") const ConfigKey kSingleEqKey = ConfigKey(kMixerProfile, QStringLiteral("SingleEQEffect")); const ConfigKey kEqAutoResetKey = ConfigKey(kMixerProfile, QStringLiteral("EqAutoReset")); const ConfigKey kGainAutoResetKey = ConfigKey(kMixerProfile, QStringLiteral("GainAutoReset")); +#ifdef __STEM__ +const ConfigKey kStemAutoResetKey = ConfigKey(kMixerProfile, QStringLiteral("stem_auto_reset")); +#endif const QString kDefaultMainEqId = QString(); const ConfigKey kHighEqFreqKey = ConfigKey(kMixerProfile, kHighEqFrequency); @@ -92,6 +95,9 @@ DlgPrefMixer::DlgPrefMixer( m_eqEffectsOnly(true), m_eqAutoReset(false), m_gainAutoReset(false), +#ifdef __STEM__ + m_stemAutoReset(true), +#endif m_eqBypass(false), m_initializing(true), m_updatingMainEQ(false), @@ -133,6 +139,14 @@ DlgPrefMixer::DlgPrefMixer( &QCheckBox::toggled, this, &DlgPrefMixer::slotGainAutoResetToggled); +#ifdef __STEM__ + connect(CheckBoxStemAutoReset, + &QCheckBox::toggled, + this, + &DlgPrefMixer::slotStemAutoResetToggled); +#else + CheckBoxStemAutoReset->hide(); +#endif connect(CheckBoxBypass, &QCheckBox::toggled, this, @@ -468,6 +482,9 @@ void DlgPrefMixer::slotResetToDefaults() { CheckBoxSingleEqEffect->setChecked(true); CheckBoxEqAutoReset->setChecked(false); CheckBoxGainAutoReset->setChecked(false); +#ifdef __STEM__ + CheckBoxStemAutoReset->setChecked(true); +#endif setDefaultShelves(); comboBoxMainEq->setCurrentIndex(0); // '---' no EQ @@ -691,6 +708,9 @@ void DlgPrefMixer::slotApply() { m_pConfig->set(kEqsOnlyKey, ConfigValue(m_eqEffectsOnly ? 1 : 0)); m_pConfig->set(kEqAutoResetKey, ConfigValue(m_eqAutoReset ? 1 : 0)); m_pConfig->set(kGainAutoResetKey, ConfigValue(m_gainAutoReset ? 1 : 0)); +#ifdef __STEM__ + m_pConfig->set(kStemAutoResetKey, ConfigValue(m_stemAutoReset ? 1 : 0)); +#endif applyDeckEQs(); applyQuickEffects(); @@ -753,6 +773,11 @@ void DlgPrefMixer::slotUpdate() { m_gainAutoReset = m_pConfig->getValue(kGainAutoResetKey, false); CheckBoxGainAutoReset->setChecked(m_gainAutoReset); +#ifdef __STEM__ + m_stemAutoReset = m_pConfig->getValue(kStemAutoResetKey, true); + CheckBoxStemAutoReset->setChecked(m_stemAutoReset); +#endif + QString eqBaypassCfg = m_pConfig->getValueString(kEnableEqsKey); m_eqBypass = !(eqBaypassCfg == "yes" || eqBaypassCfg == "1" || eqBaypassCfg.isEmpty()); CheckBoxBypass->setChecked(m_eqBypass); @@ -913,6 +938,12 @@ void DlgPrefMixer::slotGainAutoResetToggled(bool checked) { m_gainAutoReset = checked; } +#ifdef __STEM__ +void DlgPrefMixer::slotStemAutoResetToggled(bool checked) { + m_stemAutoReset = checked; +} +#endif + void DlgPrefMixer::slotBypassEqToggled(bool checked) { m_eqBypass = checked; diff --git a/src/preferences/dialog/dlgprefmixer.h b/src/preferences/dialog/dlgprefmixer.h index a5d9541f2f0..b34dede9c57 100644 --- a/src/preferences/dialog/dlgprefmixer.h +++ b/src/preferences/dialog/dlgprefmixer.h @@ -37,6 +37,9 @@ class DlgPrefMixer : public DlgPreferencePage, public Ui::DlgPrefMixerDlg { void slotSingleEqToggled(bool checked); void slotEqAutoResetToggled(bool checked); void slotGainAutoResetToggled(bool checked); +#ifdef __STEM__ + void slotStemAutoResetToggled(bool checked); +#endif void slotBypassEqToggled(bool checked); // Create, populate and show/hide EQ & QuickEffect selectors, considering the // number of decks and the 'Single EQ' checkbox @@ -110,6 +113,7 @@ class DlgPrefMixer : public DlgPreferencePage, public Ui::DlgPrefMixerDlg { bool m_eqEffectsOnly; bool m_eqAutoReset; bool m_gainAutoReset; + bool m_stemAutoReset; bool m_eqBypass; bool m_initializing; diff --git a/src/preferences/dialog/dlgprefmixerdlg.ui b/src/preferences/dialog/dlgprefmixerdlg.ui index 28ff77cee58..916ea756147 100644 --- a/src/preferences/dialog/dlgprefmixerdlg.ui +++ b/src/preferences/dialog/dlgprefmixerdlg.ui @@ -6,8 +6,8 @@ 0 0 - 427 - 333 + 441 + 908 @@ -20,7 +20,6 @@ Crossfader Preferences - @@ -157,18 +156,18 @@ 0 - - - 123 - 83 - - Qt::ScrollBarAlwaysOff Qt::ScrollBarAlwaysOff + + + 123 + 83 + + @@ -189,37 +188,36 @@ - Deck Equalizers - + + + Uncheck to allow any effect to be loaded into the EQ knobs. + Only allow EQ knobs to control EQ-specific effects - + true - - Uncheck to allow any effect to be loaded into the EQ knobs. - + + Uncheck to allow different decks to use different EQ effects. + Use the same EQ filter for all decks true - - Uncheck to allow different decks to use different EQ effects. - @@ -239,7 +237,7 @@ Equalizer Plugin - + 3 @@ -252,12 +250,12 @@ true - - 3 - Quick Effect + + 3 + @@ -276,18 +274,16 @@ - - - Bypass EQ effect processing - When checked, EQs are not processed, improving performance on slower computers. + + Bypass EQ effect processing + - @@ -298,7 +294,6 @@ - @@ -309,39 +304,41 @@ - + + + + Reset stem controls on track load + + + - Equalizer frequency Shelves - - - - High EQ - 75 true + + High EQ + false - @@ -364,7 +361,6 @@ - @@ -428,32 +424,28 @@ - - - - - Low EQ - 75 true + + Low EQ + false - @@ -476,7 +468,6 @@ - @@ -540,22 +531,18 @@ - - - Main EQ - @@ -606,7 +593,6 @@ - @@ -620,7 +606,6 @@ - @@ -631,8 +616,6 @@ checkBoxReverse CheckBoxEqOnly CheckBoxSingleEqEffect - CheckBoxBypass CheckBoxEqAutoReset CheckBoxGainAutoReset @@ -640,12 +623,10 @@ SliderLoEQ comboBoxMainEq pbResetMainEq - + - diff --git a/src/qml/qmlplayerproxy.cpp b/src/qml/qmlplayerproxy.cpp index f15a1197489..40655f248f1 100644 --- a/src/qml/qmlplayerproxy.cpp +++ b/src/qml/qmlplayerproxy.cpp @@ -31,7 +31,12 @@ QmlPlayerProxy::QmlPlayerProxy(BaseTrackPlayer* pTrackPlayer, QObject* parent) : QObject(parent), m_pTrackPlayer(pTrackPlayer), m_pBeatsModel(new QmlBeatsModel(this)), - m_pHotcuesModel(new QmlCuesModel(this)) { + m_pHotcuesModel(new QmlCuesModel(this)) +#ifdef __STEM__ + , + m_pStemsModel(std::make_unique(this)) +#endif +{ connect(m_pTrackPlayer, &BaseTrackPlayer::loadingTrack, this, @@ -129,8 +134,17 @@ void QmlPlayerProxy::slotTrackLoaded(TrackPointer pTrack) { &Track::cuesUpdated, this, &QmlPlayerProxy::slotHotcuesChanged); +#ifdef __STEM__ + connect(pTrack.get(), + &Track::stemsUpdated, + this, + &QmlPlayerProxy::slotStemsChanged); +#endif slotBeatsChanged(); slotHotcuesChanged(); +#ifdef __STEM__ + slotStemsChanged(); +#endif } emit trackChanged(); emit trackLoaded(); @@ -175,6 +189,9 @@ void QmlPlayerProxy::slotTrackChanged() { emit colorChanged(); emit coverArtUrlChanged(); emit trackLocationUrlChanged(); +#ifdef __STEM__ + emit stemsChanged(); +#endif emit waveformLengthChanged(); emit waveformTextureChanged(); @@ -219,6 +236,20 @@ void QmlPlayerProxy::slotBeatsChanged() { } } +#ifdef __STEM__ +void QmlPlayerProxy::slotStemsChanged() { + VERIFY_OR_DEBUG_ASSERT(m_pStemsModel != nullptr) { + return; + } + + const TrackPointer pTrack = m_pCurrentTrack; + if (pTrack) { + m_pStemsModel->setStems(pTrack->getStemInfo()); + emit stemsChanged(); + } +} +#endif + void QmlPlayerProxy::slotHotcuesChanged() { VERIFY_OR_DEBUG_ASSERT(m_pHotcuesModel != nullptr) { return; diff --git a/src/qml/qmlplayerproxy.h b/src/qml/qmlplayerproxy.h index 7bcc20fa558..b796a909d9e 100644 --- a/src/qml/qmlplayerproxy.h +++ b/src/qml/qmlplayerproxy.h @@ -9,6 +9,7 @@ #include "mixer/basetrackplayer.h" #include "qml/qmlbeatsmodel.h" #include "qml/qmlcuesmodel.h" +#include "qml/qmlstemsmodel.h" #include "track/cueinfo.h" #include "track/track.h" @@ -47,6 +48,9 @@ class QmlPlayerProxy : public QObject { Q_PROPERTY(mixxx::qml::QmlBeatsModel* beatsModel MEMBER m_pBeatsModel CONSTANT); Q_PROPERTY(mixxx::qml::QmlCuesModel* hotcuesModel MEMBER m_pHotcuesModel CONSTANT); +#ifdef __STEM__ + Q_PROPERTY(mixxx::qml::QmlStemsModel* stemsModel READ getStemsModel CONSTANT); +#endif public: explicit QmlPlayerProxy(BaseTrackPlayer* pTrackPlayer, QObject* parent = nullptr); @@ -82,6 +86,12 @@ class QmlPlayerProxy : public QObject { Q_INVOKABLE void loadTrackFromLocation(const QString& trackLocation, bool play = false); Q_INVOKABLE void loadTrackFromLocationUrl(const QUrl& trackLocationUrl, bool play = false); +#ifdef __STEM__ + QmlStemsModel* getStemsModel() const { + return m_pStemsModel.get(); + } +#endif + public slots: void slotTrackLoaded(TrackPointer pTrack); void slotLoadingTrack(TrackPointer pNewTrack, TrackPointer pOldTrack); @@ -89,6 +99,9 @@ class QmlPlayerProxy : public QObject { void slotWaveformChanged(); void slotBeatsChanged(); void slotHotcuesChanged(); +#ifdef __STEM__ + void slotStemsChanged(); +#endif void setArtist(const QString& artist); void setTitle(const QString& title); @@ -126,6 +139,9 @@ class QmlPlayerProxy : public QObject { void coverArtUrlChanged(); void trackLocationUrlChanged(); void cuesChanged(); +#ifdef __STEM__ + void stemsChanged(); +#endif void loadTrackFromLocationRequested(const QString& trackLocation, bool play); @@ -140,6 +156,9 @@ class QmlPlayerProxy : public QObject { TrackPointer m_pCurrentTrack; QmlBeatsModel* m_pBeatsModel; QmlCuesModel* m_pHotcuesModel; +#ifdef __STEM__ + std::unique_ptr m_pStemsModel; +#endif }; } // namespace qml diff --git a/src/qml/qmlstemsmodel.cpp b/src/qml/qmlstemsmodel.cpp new file mode 100644 index 00000000000..2fa27b688da --- /dev/null +++ b/src/qml/qmlstemsmodel.cpp @@ -0,0 +1,67 @@ +#include "qml/qmlstemsmodel.h" + +#include + +#include "moc_qmlstemsmodel.cpp" + +namespace mixxx { +namespace qml { +namespace { +const QHash kRoleNames = { + {QmlStemsModel::LabelRole, "label"}, + {QmlStemsModel::ColorRole, "color"}, +}; +} + +QmlStemsModel::QmlStemsModel( + QObject* pParent) + : QAbstractListModel(pParent) { +} + +void QmlStemsModel::setStems(QList stems) { + beginResetModel(); + m_stems = std::move(stems); + endResetModel(); +} + +QVariant QmlStemsModel::data(const QModelIndex& index, int role) const { + if (index.row() < 0 || index.row() >= m_stems.size()) { + return QVariant(); + } + + const StemInfo& stemInfo = m_stems.at(index.row()); + + switch (role) { + case QmlStemsModel::LabelRole: { + return stemInfo.getLabel(); + } + case QmlStemsModel::ColorRole: + return stemInfo.getColor(); + default: + return QVariant(); + } +} + +int QmlStemsModel::rowCount(const QModelIndex& parent) const { + if (parent.isValid()) { + return 0; + } + + return m_stems.size(); +} + +QHash QmlStemsModel::roleNames() const { + return kRoleNames; +} + +QVariant QmlStemsModel::get(int row) const { + QModelIndex idx = index(row, 0); + QVariantMap dataMap; + for (auto it = kRoleNames.constBegin(); it != kRoleNames.constEnd(); it++) { + dataMap.insert(it.value(), data(idx, it.key())); + } + return dataMap; +} + +} // namespace qml +} // namespace mixxx diff --git a/src/qml/qmlstemsmodel.h b/src/qml/qmlstemsmodel.h new file mode 100644 index 00000000000..a6db729b08d --- /dev/null +++ b/src/qml/qmlstemsmodel.h @@ -0,0 +1,32 @@ +#pragma once +#include +#include + +#include "track/steminfo.h" + +namespace mixxx { +namespace qml { + +class QmlStemsModel : public QAbstractListModel { + Q_OBJECT + public: + enum Roles { + LabelRole, + ColorRole, + }; + Q_ENUM(Roles) + explicit QmlStemsModel(QObject* pParent = nullptr); + + void setStems(QList stems); + + QVariant data(const QModelIndex& index, int role) const override; + int rowCount(const QModelIndex& parent) const override; + QHash roleNames() const override; + Q_INVOKABLE QVariant get(int row) const; + + private: + QList m_stems; +}; + +} // namespace qml +} // namespace mixxx diff --git a/src/test/reference_buffers/StemMuteControlDrumAndBass b/src/test/reference_buffers/StemMuteControlDrumAndBass new file mode 100644 index 00000000000..b5d50108bb8 --- /dev/null +++ b/src/test/reference_buffers/StemMuteControlDrumAndBass @@ -0,0 +1,512 @@ +1.17671,1.17778 +1.19235,1.19096 +1.19075,1.19211 +1.18008,1.18108 +1.1712,1.16587 +1.20862,1.20227 +1.2,1.19529 +1.21623,1.2085 +1.22512,1.22341 +1.1658,1.16651 +1.20908,1.20504 +1.16972,1.16941 +1.20817,1.20165 +1.20657,1.1967 +1.1966,1.19076 +1.20711,1.19988 +1.18524,1.1818 +1.19239,1.19409 +1.17391,1.17375 +1.21456,1.212 +1.18325,1.18133 +1.23041,1.22035 +1.17201,1.16267 +1.24765,1.24303 +1.16906,1.1607 +1.25019,1.25221 +1.12948,1.13152 +0.0662004,0.0640255 +-0.0420865,-0.0405545 +0.0751374,0.0673831 +-0.0470126,-0.056908 +0.0485038,0.0413073 +-0.0319781,-0.0409311 +0.0455115,0.0418134 +-0.0228387,-0.0205515 +0.00287354,0.00310099 +0.00318635,0.00403517 +0.00912511,0.00893503 +0.0242978,0.0152214 +-0.0109355,-0.0177945 +0.0453864,0.0380296 +0.0108305,0.00299567 +0.0218334,0.023095 +-0.00198787,-0.00107688 +0.000275433,0.00166434 +0.0372807,0.0393567 +0.0271512,0.0229989 +0.0132429,0.0056076 +0.0290634,0.0227987 +0.0359415,0.0284701 +0.0362031,0.0319607 +0.000593543,0.00373137 +0.00199825,0.00126916 +0.0161557,0.0179179 +-0.00526172,-0.0055154 +0.0298764,0.0207468 +0.0206562,0.0160574 +0.0409394,0.0335994 +0.00212479,-0.00321478 +0.00765979,0.010368 +0.0215524,0.0220404 +0.00636864,0.00762546 +0.0304857,0.0306008 +0.00344545,-0.00322533 +0.0409462,0.0330973 +0.0126993,0.00727749 +0.034923,0.0288336 +0.0207519,0.0211922 +-0.0255169,-0.0217551 +0.0243149,0.0237076 +-0.000324905,0.000411451 +0.0238053,0.0179287 +0.0308542,0.0207521 +0.0160738,0.00954902 +0.0295369,0.0233405 +0.010534,0.00942546 +0.00677818,0.0108976 +0.0189683,0.021632 +0.0392352,0.0384799 +0.0464193,0.0436963 +0.045787,0.036094 +0.0315031,0.021905 +0.0426124,0.0388162 +0.0465063,0.0424017 +0.0172726,0.0217137 +0.0374458,0.0425594 +0.0162818,0.0155577 +0.02173,0.021274 +0.0294224,0.0211622 +0.0122882,0.00222516 +0.0252068,0.0198758 +-0.0101696,-0.0135723 +0.00144607,0.00314647 +-0.010999,-0.00504404 +-0.00137997,0.00107443 +0.0186669,0.0175323 +0.0119879,0.00897455 +0.0233824,0.0146298 +0.024023,0.0184823 +0.045023,0.0440702 +0.0390977,0.0396318 +0.0602806,0.0665646 +0.0449774,0.0501342 +0.059793,0.0609962 +0.0673642,0.0664432 +0.0573198,0.0537835 +0.0718343,0.0668883 +0.0191631,0.0185829 +0.0158557,0.0189103 +0.0187713,0.0218363 +0.0300934,0.0374005 +0.0140274,0.017244 +-0.00767308,-0.00798315 +-0.000467479,0.000632048 +-0.00596458,-0.00881797 +0.0177283,0.0182577 +0.0261385,0.0304738 +0.0226881,0.0271425 +0.0191135,0.0257514 +0.0293385,0.0358603 +0.0514401,0.0547334 +0.0533196,0.055492 +0.0380738,0.0414605 +0.0324243,0.0338349 +0.039294,0.0442238 +0.0372811,0.0448014 +0.0154322,0.0208362 +0.0220426,0.0301473 +0.011959,0.018342 +0.0308719,0.0340555 +0.0366294,0.0413424 +-0.00431252,-0.000175536 +0.0203919,0.0231553 +0.00856823,0.0156217 +0.0294739,0.0366371 +0.0242231,0.0295479 +0.00630963,0.0163022 +0.0204995,0.0259975 +0.0180454,0.0222589 +0.0276498,0.0350655 +0.0318316,0.0339606 +0.0433918,0.0487192 +0.0113947,0.0197341 +0.0223534,0.0283229 +0.00499356,0.0146218 +0.0107381,0.0207368 +0.00918317,0.0143637 +0.00379068,0.00960302 +0.0364518,0.041164 +0.0019753,0.00227714 +0.0137015,0.0195864 +0.00629461,0.0131723 +0.0308125,0.0364475 +0.0369963,0.0486313 +0.0452865,0.0518848 +0.0539784,0.0568848 +0.0312787,0.035684 +0.0421709,0.0408572 +0.0462186,0.0466028 +0.0586405,0.0652573 +0.00806481,0.013395 +0.0246089,0.0335319 +0.028425,0.0393394 +0.0191031,0.0213966 +0.0281449,0.0307032 +-0.00576735,-0.00521916 +-0.00337297,-0.00747436 +-0.006926,-0.00238907 +0.0183229,0.0238816 +0.0233087,0.0294436 +0.0156309,0.0261101 +0.0122118,0.0156161 +0.0151045,0.0142509 +0.0249062,0.0236742 +0.0348207,0.0298154 +0.0379606,0.0364268 +0.0484621,0.0536058 +0.0556488,0.0601804 +0.0363759,0.0432492 +0.0516145,0.057061 +0.0474482,0.0444106 +0.0682188,0.0654876 +0.0530042,0.048718 +0.0173604,0.0134956 +0.0283086,0.0327913 +0.0107326,0.0161586 +0.0213631,0.0272076 +0.014498,0.020157 +-0.00497043,-0.00688231 +0.0157688,0.0108399 +0.0224704,0.0182612 +0.0293667,0.0244626 +0.0245464,0.0263044 +0.00156504,0.00751263 +0.0277791,0.0314391 +0.0263891,0.0312951 +0.027864,0.0257919 +0.0413175,0.0340261 +0.015879,0.0111327 +0.0301965,0.0236116 +0.0336408,0.0336137 +0.0226193,0.0284137 +0.00446361,0.00795078 +-0.00573832,-0.000911951 +0.00492638,0.00499988 +0.0100262,0.00308466 +0.00492394,0.00015986 +-0.00195765,-0.00657195 +0.00768358,0.00506341 +-0.00471729,0.00149047 +-0.0093233,-0.00503349 +0.0118548,0.014185 +0.0137876,0.0167347 +0.0073055,0.000277281 +0.010819,0.00415844 +-0.00109154,-0.00416309 +0.00576752,-7.99298e-05 +0.0031479,0.00578243 +-0.000410497,0.00440687 +0.0241306,0.0228672 +0.000781596,0.00258088 +0.00180352,-0.00182849 +0.00572675,-0.00403345 +-0.0200893,-0.0219508 +-0.00884628,-0.0127988 +-0.000182986,-0.00283527 +-0.00299513,0.00381988 +0.00174749,0.000518322 +0.00138587,-0.000176787 +0.00541049,0.00638384 +0.0202216,0.0105025 +0.00720841,0.00291896 +0.0148147,0.0142572 +0.033623,0.0275257 +0.00674111,0.00932413 +0.0229433,0.0243497 +0.0189085,0.0121788 +-0.0122764,-0.013075 +0.0202734,0.0139363 +0.0194135,0.00850642 +-0.00116032,-0.00192446 +0.011601,0.00586808 +0.0195884,0.014609 +0.00725949,0.0105276 +0.00714439,0.000690222 +-0.00958663,-0.0146987 +-0.0200208,-0.0215639 +0.00258851,-0.00862718 +-0.0196051,-0.0246696 +-0.0125874,-0.0142135 +0.0048697,-0.00355852 +-0.00185966,-0.00173503 +-0.000197589,-0.0011754 +0.00486678,-0.00390643 +0.0176336,0.0163991 +0.0292069,0.0219931 +0.026144,0.0146592 +0.00473112,0.00240713 +0.00937641,0.000765204 +0.0103836,0.0033918 +0.0216812,0.0221008 +0.0199454,0.0120944 +0.00916201,0.00365257 +0.00656933,0.0033592 +-0.00475734,-0.0167896 +-0.0109863,-0.0178971 +-0.0141919,-0.0188843 +-0.000235975,-0.00968963 +-0.0247086,-0.025584 +-0.0217106,-0.0233262 +-0.00335813,-0.0100914 +0.00280637,0.00170445 +0.0159908,0.00884241 +0.00106865,-0.00875962 +0.00387675,0.000657678 +0.0288316,0.0217884 +0.026767,0.0226884 +0.0111895,0.0124786 +0.0101869,0.00530505 +0.00146115,-0.00255418 +0.00745696,0.00339615 +-0.00213337,-0.0128661 +0.00363714,-0.00233471 +-0.0166311,-0.0203682 +-0.0135841,-0.0186386 +0.00795144,0.00986385 +-0.0191467,-0.0195147 +0.000559568,-0.00352305 +-0.00308257,-0.00514841 +0.00611269,-0.000911713 +-0.0133514,-0.0194165 +0.00200397,0.00148946 +0.021145,0.0204173 +0.00385916,0.00691384 +0.0134271,0.0178152 +-0.0191247,-0.020187 +0.0114761,0.00952262 +0.0111427,0.00722516 +-0.0109488,-0.0170072 +-0.00562251,-0.00629526 +0.00384438,0.00553048 +-0.00337136,-0.000449002 +-0.0075714,-0.00224018 +-0.00132895,-0.000501871 +-0.0100942,-0.0125308 +0.0113986,0.00827265 +-0.0141547,-0.0188251 +-0.00893891,-0.00963461 +0.0112416,0.0152784 +0.013918,0.0192648 +0.00579607,0.0126869 +-0.0141886,-0.00972301 +-0.00594497,-0.0061453 +-0.00505406,-0.0060522 +-0.0234222,-0.0248874 +-0.0254925,-0.0245116 +-0.0225884,-0.016494 +-0.0311043,-0.023735 +0.00116104,0.00871837 +0.00211281,0.00718927 +0.00461376,0.00480175 +-0.00918645,-0.0108366 +-0.00692469,-0.00866705 +0.00254554,0.00332713 +-0.00395334,0.00110376 +0.0175167,0.0245873 +-0.0123333,-0.0053966 +-0.00579792,-0.00159007 +6.04391e-05,0.000296474 +0.0169721,0.0154917 +0.010702,0.00959516 +-0.00928557,-0.00720441 +-0.00364077,0.0030219 +-0.0217919,-0.0135149 +-0.00350922,0.00495797 +-0.0071578,-0.00143188 +0.000554681,0.00143063 +0.0153036,0.0152978 +0.00570744,0.00555456 +0.00222176,0.00418591 +-0.0112178,-0.00408977 +-0.0123876,-0.00497282 +0.0124114,0.0189062 +0.0156202,0.0204821 +0.0100381,0.00895631 +-0.0111819,-0.0133745 +-0.00987637,-0.010164 +-0.013698,-0.0137336 +-0.0272051,-0.0216966 +-0.00133824,0.00630188 +-0.0300403,-0.0259158 +-0.0141532,-0.00944805 +-0.015929,-0.0154392 +-0.0263483,-0.0292076 +-0.0104423,-0.00810426 +-0.00766563,-0.00516242 +-0.00380689,0.00125569 +-0.0283261,-0.0180677 +-0.0120215,-0.0070976 +-0.000673234,0.00254762 +0.0144248,0.0176289 +0.00363272,0.000553966 +0.000344098,0.00136685 +-0.0145776,-0.00966203 +-0.00670528,-0.00450677 +-0.00552273,0.00220698 +-0.0324344,-0.0269926 +-0.00437832,-0.00583917 +-0.0202752,-0.0181161 +-0.00197536,-0.00358564 +-0.00201035,-0.00435877 +-0.0242406,-0.0177569 +-0.029225,-0.025622 +-0.0227989,-0.0183975 +-0.0251425,-0.0167231 +-0.010738,-0.0109927 +-0.00936645,-0.00842816 +-0.0232188,-0.0187845 +0.000124097,-0.000778258 +-0.0347157,-0.0281187 +-0.00459868,0.00425297 +-0.0120071,-0.00973159 +-0.0369983,-0.0295093 +-0.0162115,-0.0132424 +-0.000297427,-0.00310826 +0.0192201,0.0242398 +-0.0102797,-0.00881869 +-0.0299905,-0.0284499 +-0.029965,-0.0208043 +-0.0221117,-0.0207995 +-0.0094291,-0.00838488 +0.00340402,0.00792933 +-0.0130306,-0.0167545 +-0.00230104,-0.00029254 +-0.0364353,-0.0300153 +-0.028504,-0.0277826 +-0.0224277,-0.0145288 +-0.0281943,-0.0223325 +0.00957835,0.00806814 +-0.0213059,-0.0161362 +0.0064429,0.00779796 +-0.0202458,-0.0202138 +-0.0276484,-0.0182924 +-0.0103624,-0.00658542 +-0.000383198,0.00290638 +0.0163677,0.0233481 +-6.85453e-06,-0.00306326 +-0.00378388,-0.00453156 +0.00670451,0.00975215 +0.00871247,0.00596064 +-0.00294673,0.0021196 +0.0123874,0.0178218 +-0.0147111,-0.0167758 +0.0237597,0.0267998 +0.000633359,-0.00160712 +-0.0115002,-0.0174602 +-0.0111228,-0.00776947 +-0.00662416,-0.00643283 +0.00388491,0.00604111 +-0.008192,0.000330508 +-0.000647724,-0.00155443 +-0.0391543,-0.0398198 +0.00976127,0.0105866 +-0.0491144,-0.0559716 +0.0425231,0.0436641 +-0.0669013,-0.0626884 +0.0377882,0.0372736 +-0.0702832,-0.0640188 +-1.0681,-1.06811 +-1.17872,-1.18627 +-1.07961,-1.08174 +-1.15858,-1.16646 +-1.08529,-1.09088 +-1.13723,-1.13289 +-1.09631,-1.09792 +-1.16586,-1.16528 +-1.12723,-1.12583 +-1.14659,-1.15697 +-1.144,-1.15008 +-1.13231,-1.13644 +-1.16509,-1.17245 +-1.15576,-1.15108 +-1.1602,-1.15641 +-1.14918,-1.15115 +-1.16773,-1.1651 +-1.13695,-1.14447 +-1.14033,-1.15104 +-1.13509,-1.1371 +-1.14307,-1.14937 +-1.15424,-1.15427 +-1.14464,-1.13815 +-1.14251,-1.14678 +-1.14513,-1.14835 +-1.12741,-1.13329 +-1.1375,-1.15313 +-1.16116,-1.16706 +-1.15085,-1.15393 +-1.1585,-1.16281 +-1.14702,-1.1407 +-1.15989,-1.16036 +-1.13927,-1.14674 +-1.15682,-1.16019 +-1.14395,-1.15597 +-1.12782,-1.13648 +-1.14648,-1.14378 +-1.12432,-1.12553 +-1.16271,-1.15828 +-1.15259,-1.14709 +-1.13799,-1.14579 +-1.14385,-1.14972 +-1.15821,-1.16555 +-1.16408,-1.17583 +-1.15199,-1.15093 +-1.13984,-1.13755 +-1.14415,-1.14486 +-1.1628,-1.15821 +-1.14859,-1.15477 +-1.1328,-1.14441 +-1.1144,-1.12033 +-1.13441,-1.14451 +-1.1248,-1.12742 +-1.13801,-1.13135 +-1.15045,-1.14969 +-1.12271,-1.1199 +-1.15139,-1.1517 +-1.14252,-1.15339 +-1.13947,-1.14513 +-1.14913,-1.15287 +-1.13203,-1.13512 +-1.15467,-1.14702 +-1.1607,-1.15564 +-1.13887,-1.13908 +-1.15038,-1.15014 +-1.12948,-1.13863 +-1.10905,-1.11898 +-1.12838,-1.13126 +-1.11444,-1.11788 +-1.12109,-1.11815 +-1.13927,-1.13327 +-1.12547,-1.1274 +-1.1142,-1.11715 +-1.11539,-1.12196 +-1.1382,-1.14902 +-1.13898,-1.14217 +-1.13547,-1.13515 +-1.15069,-1.14836 +-1.15968,-1.15248 +-1.15781,-1.15617 +-1.12539,-1.1288 +-1.12402,-1.12808 +-1.14189,-1.14978 +-1.13521,-1.1393 diff --git a/src/test/reference_buffers/StemMuteControlFull b/src/test/reference_buffers/StemMuteControlFull new file mode 100644 index 00000000000..621affabf71 --- /dev/null +++ b/src/test/reference_buffers/StemMuteControlFull @@ -0,0 +1,512 @@ +-0.0184274,-0.0167733 +-0.0276069,-0.0285196 +-0.0143912,-0.014731 +-0.0187735,-0.0223395 +-0.0312096,-0.03537 +0.0246677,0.0201651 +-0.0350467,-0.0399992 +0.0157791,0.00999939 +-0.00103766,-0.00489831 +-0.0405437,-0.0366725 +-0.0389988,-0.0394731 +-0.0319203,-0.0309581 +-0.0029459,-0.0019123 +0.0304385,0.0235952 +-0.0243107,-0.028738 +-0.000721335,-0.00305456 +-0.00623375,-0.00341827 +-0.0290813,-0.021794 +9.01222e-05,0.00235367 +-0.0132002,-0.0146413 +0.0486476,0.0492926 +-0.0262701,-0.0315933 +0.0478559,0.0372528 +-0.0560359,-0.0604039 +0.079184,0.0733867 +-0.0427345,-0.0450204 +0.0613435,0.0621003 +1.15827,1.15437 +1.24027,1.23979 +1.17066,1.16059 +1.23926,1.22042 +1.16995,1.15839 +1.24376,1.23198 +1.1806,1.16839 +1.21182,1.20564 +1.16991,1.16346 +1.21946,1.21339 +1.21241,1.20527 +1.22187,1.20508 +1.19951,1.18676 +1.2263,1.21664 +1.23457,1.21948 +1.18116,1.17766 +1.2074,1.20843 +1.19432,1.19042 +1.24357,1.24001 +1.24619,1.23482 +1.22984,1.21512 +1.22873,1.21508 +1.24517,1.22318 +1.22246,1.20235 +1.22323,1.21171 +1.20187,1.18412 +1.21576,1.1974 +1.20852,1.19225 +1.21027,1.18505 +1.23775,1.21534 +1.23161,1.21242 +1.23189,1.21468 +1.19028,1.18793 +1.2346,1.23111 +1.18001,1.17214 +1.21172,1.21191 +1.19877,1.19022 +1.22729,1.21554 +1.22283,1.21584 +1.20718,1.19285 +1.23977,1.23262 +1.16091,1.15439 +1.2354,1.22081 +1.18642,1.17649 +1.26075,1.24037 +1.19856,1.17172 +1.25294,1.2327 +1.17122,1.15238 +1.23217,1.2219 +1.14165,1.13863 +0.0674216,0.0637188 +-0.0190811,-0.0228339 +0.0878504,0.0843189 +-0.0107763,-0.0188869 +0.0815187,0.0749679 +0.0141981,0.0149015 +0.0632412,0.061792 +-0.0202585,-0.013326 +0.0449414,0.055366 +0.00412452,0.00374055 +0.0201843,0.0237908 +-0.00320238,-0.00915676 +-0.00742257,-0.020698 +0.0274339,0.0261459 +-0.0386905,-0.0453826 +-0.00988775,-0.00816208 +-0.0214542,-0.0130346 +0.0213226,0.0165123 +-0.00237179,-0.00114107 +0.0190086,0.013051 +0.0213931,0.00795662 +0.0472536,0.0426903 +0.0420001,0.0358395 +0.0321643,0.0338006 +0.0563842,0.0609763 +0.0291826,0.0330631 +0.0708558,0.0763069 +0.040585,0.042401 +0.0651028,0.0686784 +0.0486946,0.0492316 +-0.00192791,0.0083462 +-0.0195182,-0.00612766 +-0.0157152,-0.00540012 +0.0286582,0.0494421 +0.0143881,0.0253199 +-0.0164785,-0.00666815 +-0.0102292,-0.00359291 +-2.85506e-05,-0.00319439 +0.0142174,0.0216948 +0.0471232,0.0482745 +0.0169183,0.0190301 +0.0332407,0.0393119 +0.0516425,0.0502027 +0.0538932,0.0564014 +0.0568108,0.053466 +0.0475391,0.048102 +0.0407676,0.0471917 +0.0367665,0.0382522 +0.0262026,0.0357468 +0.00971609,0.0197992 +0.0521265,0.0635559 +0.0193294,0.0333911 +0.044689,0.0505079 +0.044434,0.0531672 +4.20213e-05,0.00810492 +0.0297914,0.0333111 +0.020823,0.0297397 +0.0468544,0.0549679 +0.0375095,0.0446121 +0.0276917,0.0334855 +0.0225766,0.0263343 +0.030422,0.0364245 +0.0226371,0.0279282 +0.0296164,0.0351795 +0.0610339,0.0640359 +0.00962538,0.0179372 +0.0361154,0.0472226 +0.0204814,0.0270774 +0.00170368,0.016999 +0.0181648,0.0256966 +-0.0216419,-0.0178443 +0.0354273,0.0431892 +0.0394018,0.0365838 +0.00279051,0.0111496 +0.00298226,0.0114371 +-0.00426805,-0.00294483 +0.0200766,0.0318001 +0.0188292,0.0231267 +0.00204921,0.00335175 +0.00732297,0.0111967 +0.0232297,0.0197843 +0.0286151,0.0274715 +0.0365998,0.0413018 +-0.00852484,-0.00565517 +-0.00334626,0.00453591 +0.00497484,0.0183097 +-0.00964618,-0.00733304 +0.0200297,0.0230687 +-0.0404731,-0.0360994 +-0.0108212,-0.0119377 +-0.0472538,-0.0358321 +-0.0314977,-0.0189204 +-0.0199614,-0.00882018 +-0.0706735,-0.0521225 +0.00706106,0.015914 +-0.0734045,-0.0715756 +0.0400298,0.0441183 +-0.0442398,-0.0484177 +0.0618752,0.0564968 +-0.0424106,-0.0407475 +-1.06838,-1.07359 +-1.21322,-1.21492 +-1.10493,-1.1072 +-1.18909,-1.20669 +-1.09236,-1.10347 +-1.18336,-1.19651 +-1.1505,-1.16388 +-1.20887,-1.20488 +-1.18446,-1.18113 +-1.19891,-1.18948 +-1.187,-1.17454 +-1.18186,-1.17975 +-1.20861,-1.20183 +-1.15963,-1.1538 +-1.19124,-1.18786 +-1.17255,-1.16222 +-1.22569,-1.21677 +-1.16485,-1.15844 +-1.1799,-1.17676 +-1.16758,-1.17475 +-1.14491,-1.1587 +-1.17243,-1.18789 +-1.15495,-1.1733 +-1.15149,-1.1659 +-1.09707,-1.1017 +-1.15339,-1.16065 +-1.08961,-1.09671 +-1.11686,-1.12218 +-1.09503,-1.11111 +-1.12488,-1.13165 +-1.13836,-1.1429 +-1.09629,-1.10355 +-1.16831,-1.15559 +-1.11155,-1.10914 +-1.13263,-1.13076 +-1.07968,-1.07076 +-1.13776,-1.14957 +-1.11864,-1.12157 +-1.15398,-1.15958 +-1.12365,-1.1357 +-1.11909,-1.11464 +-1.1402,-1.14345 +-1.07272,-1.07665 +-1.1591,-1.1613 +-1.06583,-1.07649 +-1.19294,-1.20469 +-1.06445,-1.07368 +-1.19534,-1.20092 +-1.02714,-1.03387 +-1.20313,-1.2005 +-0.9828,-0.985168 +1.1086,1.10086 +1.33332,1.33558 +1.11022,1.09611 +1.29376,1.28665 +1.13483,1.13576 +1.31305,1.30011 +1.16765,1.17291 +1.26911,1.26756 +1.17815,1.16846 +1.21035,1.21434 +1.24006,1.22766 +1.21225,1.20513 +1.22607,1.22693 +1.17851,1.16982 +1.23802,1.24085 +1.18279,1.18421 +1.1931,1.19005 +1.13172,1.13238 +1.17673,1.17348 +1.17708,1.17251 +1.17946,1.17568 +1.18211,1.18191 +1.16829,1.16386 +1.16781,1.16669 +1.12636,1.12742 +1.16593,1.15603 +1.17168,1.17058 +1.18409,1.17608 +1.16888,1.15458 +1.15286,1.15158 +1.14092,1.12793 +1.18464,1.17849 +1.16435,1.16494 +1.15974,1.14899 +1.16971,1.16938 +1.15712,1.15196 +1.15712,1.14814 +1.13578,1.13547 +1.12942,1.12479 +1.13248,1.13214 +1.1369,1.14011 +1.13651,1.13943 +1.17088,1.17473 +1.13872,1.14024 +1.18919,1.19042 +1.12144,1.11812 +1.19111,1.18942 +1.14389,1.14348 +1.24524,1.24169 +1.12316,1.12497 +0.0650318,0.0609627 +-0.0464029,-0.0557582 +0.0476085,0.0403075 +-0.0447714,-0.0604151 +0.0608164,0.0476832 +-0.0539592,-0.0633382 +0.0291345,0.0176743 +-0.0167345,-0.0205306 +-0.0108032,-0.0155391 +-0.0341482,-0.0399994 +-0.0185043,-0.0213552 +-0.00536019,-0.0110976 +-0.034323,-0.0360809 +0.0157918,0.0176945 +0.0177271,0.0238214 +0.010951,0.0208042 +0.0106439,0.0175325 +0.00342369,0.00952703 +-0.00534314,-0.00621128 +0.0432531,0.038577 +-0.00972623,-0.0138194 +0.0394436,0.0317085 +0.0178834,0.0162239 +-0.00982094,-0.0121684 +0.0254147,0.0201614 +-0.00571382,-0.00766283 +0.0101382,0.000207901 +0.00725543,-0.00100362 +0.000933826,-0.00367391 +-0.0178624,-0.0227093 +0.014526,0.021565 +-0.0151144,-0.00745577 +0.00913197,0.017105 +-0.0169343,-0.00691438 +-0.0225918,-0.0222434 +-0.00596571,-0.00569195 +-0.0367747,-0.038031 +-0.00132281,-0.00415874 +-0.039782,-0.0374555 +-0.0107006,-0.0104235 +-0.00380021,-0.00411546 +0.00655711,0.00281173 +0.00786722,-0.000346541 +-0.0152507,-0.0249245 +0.0032956,-0.00643176 +0.00440437,0.00177211 +-0.00561297,-0.00570291 +0.0160576,0.0217229 +-0.0237717,-0.014796 +-0.0273461,-0.0250812 +0.024047,0.0289438 +0.00130069,0.00161886 +0.029437,0.0279133 +-0.0222428,-0.0148323 +-0.0151069,-0.0112112 +-0.00332224,0.00484174 +0.0192436,0.0289167 +0.0047785,0.00479704 +-0.0165598,-0.0149884 +0.0337754,0.0313166 +0.00800043,0.00400126 +0.027739,0.0313531 +-0.0245998,-0.0204318 +-0.00453413,0.00273365 +-0.0023787,0.00517225 +0.00541669,0.00762296 +0.00265795,0.00141037 +-0.0192168,-0.0239394 +-0.00209045,-0.00693923 +-0.0178663,-0.0222824 +-0.00869596,-0.0104681 +-0.0338132,-0.0342226 +-0.0147513,-0.0189652 +-0.0594438,-0.0637072 +-0.0459964,-0.0540361 +-0.0644318,-0.0741811 +-0.0648828,-0.0681576 +-0.0504678,-0.0522686 +-0.0735637,-0.0687835 +-0.0698875,-0.0592661 +-0.0686462,-0.0615697 +-0.0434363,-0.0343254 +-0.052703,-0.0464005 +-0.0203134,-0.01749 +-0.0762461,-0.0690656 +-0.0599696,-0.0542315 +-0.0842395,-0.0770453 +-0.0733985,-0.0659297 +-0.0767695,-0.0748261 +-0.0674474,-0.0680367 +-0.0441993,-0.04974 +-0.0537078,-0.0602142 +-0.0309416,-0.0371957 +-0.117611,-0.121892 +-0.0442584,-0.0439811 +-0.128688,-0.131451 +-0.00558329,-0.00530684 +-0.0959239,-0.0985355 +-0.00852978,-0.0159189 +-0.127104,-0.127036 +-1.17838,-1.18332 +-1.26624,-1.26653 +-1.16587,-1.16001 +-1.23718,-1.24063 +-1.20562,-1.20219 +-1.22545,-1.22592 +-1.1741,-1.1803 +-1.1998,-1.19575 +-1.19039,-1.19079 +-1.26896,-1.26542 +-1.21731,-1.20733 +-1.25142,-1.24727 +-1.19375,-1.18733 +-1.19812,-1.19211 +-1.22182,-1.21885 +-1.20563,-1.20113 +-1.26034,-1.25256 +-1.23501,-1.22944 +-1.24348,-1.23976 +-1.21212,-1.20581 +-1.21125,-1.21562 +-1.22034,-1.22403 +-1.22786,-1.22831 +-1.09545,-1.10588 +-1.11631,-1.11501 +-1.11128,-1.11215 +-1.07484,-1.08347 +-1.07247,-1.06912 +-1.04181,-1.05044 +-1.11062,-1.11771 +-1.05617,-1.05226 +-1.09526,-1.10075 +-1.06457,-1.05806 +-1.08534,-1.07614 +-1.09509,-1.09444 +-1.06137,-1.05225 +-1.06928,-1.06606 +-1.08104,-1.0805 +-1.07115,-1.06223 +-1.08063,-1.07452 +-1.09497,-1.08781 +-1.04901,-1.0385 +-1.09945,-1.09643 +-1.04244,-1.04402 +-1.13033,-1.13075 +-1.0519,-1.05916 +-1.09731,-1.10235 +-1.05686,-1.05458 +-1.14497,-1.14976 +-1.03482,-1.03469 +0.0410385,0.0410666 +0.111101,0.0986651 +0.0329425,0.0301569 +0.136364,0.130945 +0.05946,0.0516673 +0.17399,0.183848 +0.0259266,0.0266169 +0.0812032,0.0829862 +0.0629849,0.0711446 +0.0860108,0.0749096 +0.0802666,0.0767019 +0.0495225,0.0477315 +0.0547173,0.0437189 +0.0372196,0.043296 +0.0481644,0.0493471 +0.0361634,0.0308636 +0.0526301,0.0555414 +0.0460033,0.0355349 +0.0804852,0.0698228 +0.062714,0.0616442 +0.0846739,0.0794291 +0.0418047,0.0444592 +0.083223,0.0923486 +0.0584953,0.058163 +-0.00351745,-0.00543028 +0.0274503,0.024946 +-0.00114852,-0.0158308 +0.0061838,-0.00182927 +-0.0108578,-0.0123215 +-0.0049814,-0.0147408 +-0.0399507,-0.0364615 +-0.0132269,-0.0155511 +-0.00476128,-0.0200784 +-0.0127823,-0.0159175 +-0.0149027,-0.0308786 +-0.00664037,-0.0184222 +-0.00159776,0.00468004 +0.0112658,0.00687748 +-0.0278619,-0.0197554 +-0.0427966,-0.0343382 +-0.00185168,-0.0108336 +-0.0334222,-0.0339173 +0.0100986,0.0010156 +-0.0632406,-0.0754352 +-0.0074572,-0.0058313 +-0.0205497,-0.0239067 +0.00064826,-0.00146025 +-0.0842773,-0.0841651 +0.0263228,0.0153383 +-0.0602209,-0.0738209 +-1.0784,-1.08757 +-1.18287,-1.19362 +-1.09265,-1.09504 +-1.18963,-1.18056 +-1.10714,-1.10394 +-1.18029,-1.17334 +-1.11437,-1.10929 +-1.16873,-1.17748 +-1.13836,-1.1385 +-1.17743,-1.17903 +-1.12804,-1.13145 +-1.15607,-1.14536 +-1.15861,-1.15723 +-1.15618,-1.15809 +-1.18947,-1.18972 +-1.11417,-1.12925 +-1.13331,-1.14313 +-1.09701,-1.10168 +-1.11808,-1.12428 +-1.09981,-1.09347 +-1.1474,-1.14175 +-1.1058,-1.1054 +-1.12175,-1.11975 +-1.12124,-1.12664 +-1.1044,-1.11062 +-1.1757,-1.1752 +-1.12234,-1.12118 +-1.1608,-1.15481 +-1.14824,-1.14041 +-1.14022,-1.13874 +-1.13078,-1.13198 +-1.13952,-1.14495 +-1.13808,-1.14521 +-1.14615,-1.14871 diff --git a/src/test/reference_buffers/StemVolumeControlDrumAndBass b/src/test/reference_buffers/StemVolumeControlDrumAndBass new file mode 100644 index 00000000000..955c3904642 --- /dev/null +++ b/src/test/reference_buffers/StemVolumeControlDrumAndBass @@ -0,0 +1,512 @@ +1.06017,1.06178 +1.07259,1.07178 +1.07361,1.07525 +1.06201,1.06374 +1.05632,1.0516 +1.08984,1.08395 +1.08044,1.07664 +1.09594,1.08886 +1.10072,1.09971 +1.04975,1.05151 +1.08526,1.08188 +1.05282,1.05338 +1.0867,1.08123 +1.08576,1.07654 +1.07543,1.07057 +1.08415,1.07787 +1.06577,1.06294 +1.07155,1.07426 +1.05667,1.0573 +1.09056,1.08861 +1.06802,1.06711 +1.10706,1.09766 +1.05979,1.05112 +1.1194,1.11576 +1.05825,1.05047 +1.12195,1.12476 +1.02342,1.02641 +0.17252,0.170899 +0.0853893,0.0878354 +0.180802,0.173929 +0.0832138,0.0738915 +0.157636,0.151434 +0.0915904,0.0833995 +0.153917,0.150821 +0.0991513,0.102429 +0.119003,0.119835 +0.121331,0.122808 +0.129386,0.130104 +0.142536,0.133911 +0.111962,0.105765 +0.158763,0.152186 +0.130073,0.122591 +0.139201,0.141176 +0.120382,0.121939 +0.11867,0.120398 +0.152021,0.154872 +0.142354,0.138734 +0.131454,0.124223 +0.145063,0.139617 +0.150257,0.143225 +0.148302,0.14457 +0.115315,0.119263 +0.120713,0.120348 +0.132566,0.134946 +0.113467,0.113947 +0.142878,0.134063 +0.139204,0.135301 +0.156035,0.149304 +0.122627,0.117592 +0.125888,0.129342 +0.139688,0.140652 +0.127093,0.128707 +0.144114,0.145001 +0.125182,0.118888 +0.153398,0.146022 +0.131115,0.126467 +0.148598,0.142843 +0.133546,0.134607 +0.0946987,0.0992022 +0.137814,0.137547 +0.119323,0.120813 +0.138522,0.133308 +0.145157,0.135433 +0.132866,0.127171 +0.144796,0.139139 +0.128567,0.127889 +0.125305,0.130252 +0.135248,0.138317 +0.155587,0.155329 +0.160591,0.158632 +0.159302,0.149907 +0.146598,0.137578 +0.156184,0.153051 +0.160943,0.157089 +0.132097,0.137202 +0.151812,0.157469 +0.133954,0.133499 +0.138305,0.138569 +0.144637,0.136791 +0.131131,0.121391 +0.141124,0.136502 +0.110459,0.107324 +0.120819,0.122888 +0.106995,0.113552 +0.11664,0.119203 +0.134098,0.133341 +0.130036,0.127426 +0.139252,0.13046 +0.140469,0.135268 +0.157958,0.15716 +0.153412,0.153799 +0.173195,0.179747 +0.161331,0.166396 +0.17524,0.176255 +0.180884,0.180133 +0.172917,0.169085 +0.185544,0.180423 +0.140584,0.140044 +0.133325,0.135933 +0.137473,0.140387 +0.14599,0.15316 +0.130602,0.133254 +0.112769,0.112291 +0.117814,0.118536 +0.114485,0.110964 +0.133251,0.133516 +0.141123,0.144794 +0.13864,0.142335 +0.136377,0.142576 +0.145508,0.151087 +0.166745,0.16921 +0.167015,0.168538 +0.15422,0.156449 +0.149034,0.149594 +0.154676,0.158749 +0.153421,0.159675 +0.132335,0.136907 +0.140424,0.147493 +0.128064,0.133182 +0.146705,0.149072 +0.153732,0.157266 +0.116523,0.119455 +0.137631,0.139553 +0.12656,0.132303 +0.143878,0.149904 +0.141707,0.146089 +0.126361,0.134921 +0.137998,0.142406 +0.138823,0.141919 +0.14336,0.149266 +0.14912,0.150173 +0.157715,0.161743 +0.12883,0.135655 +0.138139,0.143046 +0.124322,0.132523 +0.128057,0.136642 +0.124806,0.128962 +0.12348,0.127827 +0.148625,0.152126 +0.122029,0.121347 +0.129916,0.134402 +0.125111,0.13101 +0.148063,0.152742 +0.151425,0.161785 +0.158571,0.16439 +0.167914,0.169848 +0.148632,0.151898 +0.154079,0.152105 +0.161135,0.160481 +0.168315,0.173936 +0.124666,0.12936 +0.140596,0.148424 +0.142863,0.152932 +0.133124,0.134761 +0.142228,0.143702 +0.115072,0.114955 +0.11671,0.111947 +0.113688,0.117256 +0.133465,0.138579 +0.13959,0.145087 +0.132687,0.142422 +0.130198,0.133368 +0.130756,0.129323 +0.140965,0.13926 +0.14839,0.143295 +0.150528,0.148476 +0.158715,0.163626 +0.164769,0.169252 +0.15047,0.15686 +0.1617,0.167085 +0.161179,0.158022 +0.177179,0.173999 +0.165252,0.160994 +0.132174,0.128072 +0.142806,0.146911 +0.127188,0.132687 +0.136373,0.141892 +0.131847,0.13727 +0.113327,0.111529 +0.13205,0.126787 +0.136253,0.132022 +0.146623,0.141869 +0.138498,0.140004 +0.11947,0.125625 +0.138813,0.142631 +0.138432,0.143213 +0.140973,0.139275 +0.152442,0.14526 +0.132314,0.127558 +0.140874,0.134719 +0.147947,0.147915 +0.137271,0.143143 +0.123238,0.127092 +0.112373,0.117068 +0.126016,0.126234 +0.128022,0.121321 +0.123534,0.11857 +0.11692,0.112531 +0.126156,0.123665 +0.116781,0.122829 +0.107593,0.112227 +0.133163,0.135562 +0.130157,0.133106 +0.130382,0.123822 +0.128021,0.12143 +0.121583,0.118736 +0.124864,0.119562 +0.122085,0.124815 +0.120759,0.126 +0.138699,0.137967 +0.123369,0.12528 +0.113724,0.110645 +0.129947,0.120607 +0.0925905,0.0908581 +0.11963,0.116278 +0.106627,0.104245 +0.124029,0.131032 +0.104111,0.103488 +-0.100846,-0.102235 +-0.115608,-0.114309 +-0.0837628,-0.092854 +-0.113154,-0.11726 +-0.0904651,-0.0904677 +-0.0862667,-0.0916887 +-0.0992109,-0.0963139 +-0.0931544,-0.0909278 +-0.0922832,-0.0982881 +-0.126717,-0.127002 +-0.0956149,-0.100917 +-0.0950401,-0.105209 +-0.116494,-0.116552 +-0.103356,-0.107954 +-0.0988046,-0.103091 +-0.106282,-0.102159 +-0.110909,-0.116255 +-0.119577,-0.124064 +-0.133071,-0.133651 +-0.110824,-0.121033 +-0.129474,-0.133933 +-0.123977,-0.124535 +-0.105422,-0.112936 +-0.112763,-0.111947 +-0.109984,-0.109765 +-0.106608,-0.114497 +-0.0950045,-0.0953491 +-0.0864542,-0.0923361 +-0.0888858,-0.0994528 +-0.107464,-0.108648 +-0.103372,-0.110571 +-0.104588,-0.110612 +-0.0946347,-0.0928693 +-0.0993568,-0.105828 +-0.10752,-0.112043 +-0.107116,-0.108891 +-0.116221,-0.127032 +-0.121223,-0.127171 +-0.127579,-0.130875 +-0.114097,-0.12256 +-0.137433,-0.137375 +-0.132214,-0.132551 +-0.11707,-0.123022 +-0.110801,-0.110949 +-0.096064,-0.102061 +-0.107943,-0.117101 +-0.105417,-0.107596 +-0.0867694,-0.0927657 +-0.0882698,-0.0916716 +-0.102011,-0.0995697 +-0.0996608,-0.103594 +-0.109806,-0.113078 +-0.105178,-0.108035 +-0.112137,-0.122062 +-0.107142,-0.112327 +-0.126219,-0.128839 +-0.126077,-0.130536 +-0.104855,-0.102191 +-0.128844,-0.128336 +-0.113103,-0.11685 +-0.115431,-0.116855 +-0.105883,-0.112363 +-0.124481,-0.130439 +-0.109814,-0.109818 +-0.0941304,-0.0946349 +-0.109779,-0.106735 +-0.100077,-0.0952766 +-0.129575,-0.130643 +-0.10094,-0.102886 +-0.100151,-0.103717 +-0.120115,-0.126301 +-0.116865,-0.117431 +-0.107736,-0.105773 +-0.11514,-0.112408 +-0.118614,-0.113095 +-0.111956,-0.111008 +-0.120699,-0.1234 +-0.101145,-0.10411 +-0.121994,-0.12681 +-0.118879,-0.119951 +-0.101723,-0.0976815 +-0.0978713,-0.0929979 +-0.106745,-0.100349 +-0.122606,-0.118364 +-0.113937,-0.114897 +-0.115991,-0.117541 +-0.132501,-0.134399 +-0.132368,-0.132292 +-0.132424,-0.126833 +-0.13944,-0.132632 +-0.109653,-0.102973 +-0.108351,-0.103652 +-0.103376,-0.103803 +-0.117491,-0.119873 +-0.115164,-0.117167 +-0.108091,-0.107966 +-0.114703,-0.11022 +-0.0950907,-0.0882733 +-0.120335,-0.114141 +-0.114708,-0.110994 +-0.109951,-0.11011 +-0.0940972,-0.096456 +-0.103054,-0.104666 +-0.11844,-0.116996 +-0.113343,-0.107676 +-0.130599,-0.122877 +-0.11411,-0.10651 +-0.118196,-0.113474 +-0.110412,-0.110105 +-0.098393,-0.0993786 +-0.104835,-0.105846 +-0.108099,-0.10665 +-0.119816,-0.113632 +-0.120482,-0.113668 +-0.100486,-0.0944261 +-0.0955059,-0.0914592 +-0.101811,-0.103235 +-0.119312,-0.121918 +-0.115518,-0.116495 +-0.122741,-0.122982 +-0.135112,-0.130117 +-0.111947,-0.104941 +-0.138029,-0.134145 +-0.123369,-0.119378 +-0.12453,-0.124684 +-0.133263,-0.136524 +-0.118801,-0.117384 +-0.115404,-0.113548 +-0.11279,-0.108308 +-0.134832,-0.125587 +-0.118816,-0.114465 +-0.108911,-0.106371 +-0.0953266,-0.0930526 +-0.103638,-0.10713 +-0.108045,-0.107705 +-0.122998,-0.118793 +-0.11767,-0.115717 +-0.117055,-0.109968 +-0.139974,-0.135004 +-0.114134,-0.115775 +-0.129098,-0.127587 +-0.113794,-0.115737 +-0.112197,-0.114833 +-0.13287,-0.127122 +-0.135606,-0.132344 +-0.129766,-0.125909 +-0.132656,-0.1251 +-0.119193,-0.119896 +-0.117266,-0.117159 +-0.127495,-0.123991 +-0.10736,-0.108817 +-0.139292,-0.13371 +-0.114417,-0.106419 +-0.119116,-0.117423 +-0.14116,-0.134692 +-0.122829,-0.120497 +-0.108013,-0.111363 +-0.0928773,-0.08874 +-0.119496,-0.118414 +-0.135739,-0.134699 +-0.135994,-0.12754 +-0.130229,-0.12913 +-0.116406,-0.115914 +-0.106873,-0.102943 +-0.120347,-0.124297 +-0.110104,-0.108809 +-0.141255,-0.135415 +-0.132861,-0.132536 +-0.129629,-0.122642 +-0.134333,-0.129073 +-0.101271,-0.103392 +-0.126389,-0.122235 +-0.104513,-0.103722 +-0.13779,-0.138497 +-0.146765,-0.138339 +-0.129996,-0.126637 +-0.121015,-0.118442 +-0.106708,-0.100385 +-0.121234,-0.124491 +-0.121326,-0.122653 +-0.112544,-0.109801 +-0.110451,-0.113226 +-0.120471,-0.115833 +-0.109672,-0.104254 +-0.1322,-0.134251 +-0.099988,-0.0972932 +-0.11893,-0.121057 +-0.130333,-0.136402 +-0.12916,-0.126141 +-0.127228,-0.126939 +-0.118466,-0.116612 +-0.127884,-0.119676 +-0.123537,-0.124406 +-0.154662,-0.155749 +-0.114283,-0.113644 +-0.160656,-0.167471 +-0.0862567,-0.0854769 +-0.175345,-0.171045 +-0.0920808,-0.0924459 +-0.175959,-0.169812 +-0.972392,-0.971958 +-1.06082,-1.06807 +-0.981455,-0.983372 +-1.04274,-1.04989 +-0.985777,-0.990961 +-1.02666,-1.02185 +-0.996659,-0.997421 +-1.05555,-1.05457 +-1.02247,-1.02046 +-1.03843,-1.04804 +-1.03806,-1.04385 +-1.02792,-1.03141 +-1.05511,-1.06192 +-1.04925,-1.04438 +-1.04855,-1.04413 +-1.04308,-1.04468 +-1.05866,-1.0558 +-1.03037,-1.03719 +-1.03334,-1.04371 +-1.02759,-1.02916 +-1.03649,-1.04194 +-1.04692,-1.04651 +-1.03783,-1.03057 +-1.03635,-1.03964 +-1.03952,-1.04214 +-1.02303,-1.02787 +-1.03215,-1.04678 +-1.0528,-1.05801 +-1.04263,-1.04456 +-1.05023,-1.05368 +-1.0433,-1.03631 +-1.05213,-1.05154 +-1.03288,-1.03977 +-1.04711,-1.0499 +-1.03548,-1.04666 +-1.02328,-1.03163 +-1.03938,-1.03613 +-1.02019,-1.02076 +-1.05327,-1.04862 +-1.04731,-1.04119 +-1.03226,-1.03952 +-1.03684,-1.04243 +-1.05035,-1.0569 +-1.05499,-1.06618 +-1.04752,-1.04599 +-1.03562,-1.03238 +-1.03848,-1.03861 +-1.05392,-1.04865 +-1.04082,-1.04601 +-1.02695,-1.03806 +-1.01156,-1.01674 +-1.02895,-1.03824 +-1.02054,-1.02282 +-1.03441,-1.02707 +-1.04458,-1.0433 +-1.01987,-1.0169 +-1.04503,-1.04479 +-1.03714,-1.0478 +-1.03635,-1.04194 +-1.04269,-1.04596 +-1.02796,-1.03102 +-1.04898,-1.04117 +-1.05099,-1.04546 +-1.03367,-1.03383 +-1.04181,-1.04117 +-1.02325,-1.03186 +-1.0062,-1.01596 +-1.02261,-1.02485 +-1.01179,-1.01467 +-1.0159,-1.01265 +-1.03509,-1.02831 +-1.02228,-1.02376 +-1.01186,-1.01446 +-1.0135,-1.01935 +-1.03421,-1.04479 +-1.03662,-1.0395 +-1.03139,-1.03055 +-1.04545,-1.04312 +-1.05274,-1.04526 +-1.05052,-1.04858 +-1.02161,-1.02514 +-1.02112,-1.02487 +-1.03655,-1.04426 +-1.02941,-1.03354 diff --git a/src/test/reference_buffers/StemVolumeControlDrumOnly b/src/test/reference_buffers/StemVolumeControlDrumOnly new file mode 100644 index 00000000000..2510d9e8d6c --- /dev/null +++ b/src/test/reference_buffers/StemVolumeControlDrumOnly @@ -0,0 +1,512 @@ +0.593999,0.597787 +0.593552,0.595053 +0.605032,0.607844 +0.589732,0.594399 +0.596804,0.594484 +0.614691,0.610692 +0.602174,0.602067 +0.614787,0.61027 +0.603157,0.604891 +0.585561,0.591485 +0.589972,0.589246 +0.585241,0.58928 +0.60082,0.599551 +0.602534,0.595908 +0.590763,0.589808 +0.592312,0.589836 +0.587867,0.587516 +0.588172,0.594934 +0.587694,0.591509 +0.594525,0.595039 +0.607088,0.610205 +0.613682,0.6069 +0.610911,0.604944 +0.6064,0.606714 +0.61503,0.609531 +0.608994,0.614956 +0.599176,0.605969 +0.5978,0.598391 +0.595292,0.601395 +0.603459,0.600114 +0.60412,0.597089 +0.594167,0.591939 +0.585864,0.580722 +0.587541,0.58685 +0.587111,0.594352 +0.58352,0.586772 +0.593911,0.597899 +0.610429,0.614779 +0.615487,0.608667 +0.603554,0.600004 +0.612269,0.60881 +0.607043,0.600972 +0.60867,0.6135 +0.609862,0.614004 +0.592246,0.595333 +0.61098,0.616933 +0.603166,0.601674 +0.604299,0.598683 +0.609059,0.606889 +0.607517,0.602243 +0.596697,0.595007 +0.5742,0.581388 +0.59557,0.596664 +0.598209,0.603056 +0.588382,0.591796 +0.594885,0.587326 +0.613394,0.612275 +0.61642,0.612125 +0.604635,0.60082 +0.598801,0.605238 +0.612231,0.615101 +0.60999,0.613035 +0.598627,0.602603 +0.612126,0.607342 +0.603203,0.597721 +0.604777,0.603223 +0.603296,0.598881 +0.584722,0.588266 +0.575561,0.583032 +0.591808,0.592906 +0.597912,0.602417 +0.597387,0.594824 +0.60237,0.594155 +0.600036,0.59766 +0.605831,0.602335 +0.600697,0.601745 +0.599411,0.607671 +0.600366,0.605055 +0.620993,0.622725 +0.61728,0.618376 +0.613364,0.60516 +0.606979,0.600271 +0.610471,0.609988 +0.618689,0.615837 +0.591395,0.599154 +0.609276,0.617106 +0.604641,0.605264 +0.604606,0.60775 +0.605496,0.599305 +0.606502,0.598053 +0.604794,0.603007 +0.592974,0.590912 +0.598309,0.601854 +0.578973,0.587938 +0.58872,0.591719 +0.595822,0.596578 +0.602229,0.60123 +0.60273,0.593781 +0.606254,0.602412 +0.609701,0.609519 +0.610667,0.61047 +0.624854,0.632474 +0.626748,0.631445 +0.637027,0.637289 +0.634964,0.634894 +0.635308,0.630292 +0.64038,0.634562 +0.626269,0.62589 +0.603203,0.604024 +0.612278,0.614589 +0.609578,0.616199 +0.596903,0.597296 +0.594537,0.593388 +0.590941,0.590151 +0.596284,0.59009 +0.59534,0.594551 +0.601061,0.602077 +0.602448,0.603107 +0.605432,0.609877 +0.610184,0.611996 +0.627963,0.627118 +0.621798,0.620723 +0.618805,0.616403 +0.615471,0.61263 +0.616206,0.616852 +0.61798,0.61917 +0.599948,0.601189 +0.613948,0.616875 +0.592483,0.592543 +0.610039,0.60914 +0.622144,0.620962 +0.599867,0.597975 +0.606587,0.605144 +0.598528,0.599028 +0.601493,0.602972 +0.611643,0.612253 +0.606568,0.609399 +0.607993,0.608041 +0.621935,0.620562 +0.606202,0.606069 +0.618274,0.61502 +0.615006,0.61384 +0.598569,0.599336 +0.601279,0.601941 +0.601636,0.604126 +0.597332,0.600262 +0.587299,0.587357 +0.602237,0.600722 +0.597319,0.595972 +0.602245,0.597628 +0.594772,0.593663 +0.600376,0.602362 +0.617066,0.617919 +0.609142,0.614401 +0.611711,0.614411 +0.623656,0.6217 +0.618047,0.616755 +0.601709,0.597095 +0.620803,0.615995 +0.607011,0.608649 +0.591069,0.593219 +0.604544,0.607994 +0.600613,0.607303 +0.589207,0.588221 +0.598558,0.595698 +0.598427,0.595653 +0.597044,0.589631 +0.596144,0.595836 +0.594031,0.597371 +0.604715,0.607661 +0.60091,0.60767 +0.602144,0.604378 +0.593362,0.58961 +0.605202,0.601604 +0.602668,0.597215 +0.600798,0.596673 +0.599729,0.603707 +0.60125,0.605537 +0.606846,0.611304 +0.602044,0.60718 +0.616102,0.612468 +0.613018,0.608045 +0.614242,0.610098 +0.591431,0.586377 +0.600794,0.603392 +0.593011,0.598802 +0.59641,0.60063 +0.601245,0.60572 +0.586515,0.585177 +0.597173,0.590574 +0.591384,0.587064 +0.61565,0.611495 +0.594305,0.594801 +0.591092,0.598075 +0.582948,0.587397 +0.586603,0.590883 +0.593409,0.593208 +0.596939,0.590195 +0.598054,0.59326 +0.583581,0.579151 +0.605173,0.605123 +0.595879,0.602061 +0.598336,0.603658 +0.584817,0.588987 +0.610375,0.611172 +0.600004,0.594267 +0.597974,0.59221 +0.592431,0.588943 +0.600045,0.598069 +0.602774,0.608183 +0.57526,0.581271 +0.618395,0.621071 +0.595636,0.598591 +0.622687,0.618 +0.596829,0.590516 +0.612283,0.610331 +0.601249,0.598127 +0.597833,0.600947 +0.605434,0.612372 +0.59697,0.598368 +0.613721,0.616076 +0.561405,0.560539 +0.626829,0.619169 +0.54331,0.542094 +0.633537,0.632585 +0.533866,0.532568 +0.632126,0.639881 +0.513564,0.515366 +-0.509773,-0.51047 +-0.599682,-0.597079 +-0.4997,-0.50628 +-0.594605,-0.597976 +-0.511584,-0.509367 +-0.565825,-0.568546 +-0.523019,-0.518866 +-0.557545,-0.552038 +-0.53705,-0.540156 +-0.584481,-0.582712 +-0.559168,-0.560333 +-0.552854,-0.560071 +-0.57783,-0.575061 +-0.563184,-0.563241 +-0.572376,-0.57389 +-0.560446,-0.552904 +-0.583125,-0.584037 +-0.559541,-0.561526 +-0.585273,-0.581998 +-0.564475,-0.570656 +-0.568951,-0.570988 +-0.569536,-0.56582 +-0.546588,-0.550445 +-0.556378,-0.552796 +-0.549132,-0.544122 +-0.552509,-0.556861 +-0.545557,-0.542342 +-0.549099,-0.549653 +-0.549005,-0.555901 +-0.556244,-0.55287 +-0.554368,-0.555916 +-0.564476,-0.566627 +-0.559898,-0.55275 +-0.576565,-0.577516 +-0.574251,-0.574827 +-0.561855,-0.557891 +-0.562078,-0.568004 +-0.562171,-0.564268 +-0.581126,-0.578836 +-0.56954,-0.574043 +-0.588333,-0.584537 +-0.574229,-0.569449 +-0.571915,-0.574746 +-0.56523,-0.561565 +-0.544283,-0.545677 +-0.543992,-0.550465 +-0.542592,-0.540611 +-0.549173,-0.550982 +-0.548417,-0.549112 +-0.554814,-0.547763 +-0.539051,-0.53919 +-0.554874,-0.555172 +-0.555717,-0.55376 +-0.552153,-0.558846 +-0.550261,-0.552297 +-0.56457,-0.562724 +-0.576047,-0.578127 +-0.55608,-0.55041 +-0.567634,-0.56362 +-0.567753,-0.570157 +-0.564825,-0.563683 +-0.553865,-0.558167 +-0.568999,-0.574527 +-0.557088,-0.555047 +-0.555232,-0.554843 +-0.564331,-0.561331 +-0.554095,-0.547644 +-0.571377,-0.572467 +-0.550602,-0.552522 +-0.545327,-0.547487 +-0.55678,-0.563474 +-0.561837,-0.561974 +-0.554057,-0.550987 +-0.562212,-0.560246 +-0.562787,-0.556514 +-0.554463,-0.553034 +-0.563119,-0.566879 +-0.551318,-0.553639 +-0.553352,-0.55875 +-0.558637,-0.561218 +-0.55358,-0.549521 +-0.545029,-0.542049 +-0.556907,-0.552491 +-0.556274,-0.552928 +-0.545906,-0.549904 +-0.55974,-0.563496 +-0.568817,-0.572448 +-0.55987,-0.563413 +-0.571765,-0.56819 +-0.572785,-0.568222 +-0.552911,-0.549738 +-0.550208,-0.547017 +-0.535334,-0.538224 +-0.550711,-0.556018 +-0.548122,-0.551169 +-0.550638,-0.55314 +-0.557701,-0.555515 +-0.545521,-0.539716 +-0.55234,-0.549121 +-0.55035,-0.54861 +-0.549998,-0.551737 +-0.538374,-0.544246 +-0.558077,-0.561712 +-0.55506,-0.556163 +-0.552152,-0.550466 +-0.565825,-0.560326 +-0.556514,-0.55238 +-0.562348,-0.561643 +-0.554281,-0.556249 +-0.553179,-0.558084 +-0.547004,-0.551449 +-0.549384,-0.549992 +-0.554207,-0.5518 +-0.552862,-0.548447 +-0.552078,-0.547755 +-0.54001,-0.539224 +-0.549207,-0.552 +-0.551833,-0.556094 +-0.538086,-0.54182 +-0.558914,-0.559976 +-0.566742,-0.563798 +-0.554381,-0.549915 +-0.569983,-0.567061 +-0.560231,-0.559098 +-0.558932,-0.561661 +-0.56092,-0.565788 +-0.552238,-0.554502 +-0.546358,-0.547089 +-0.548723,-0.546564 +-0.560856,-0.555662 +-0.545994,-0.543932 +-0.54186,-0.542046 +-0.534332,-0.535779 +-0.532719,-0.537867 +-0.541602,-0.543992 +-0.55668,-0.555319 +-0.561528,-0.560559 +-0.563184,-0.55867 +-0.570133,-0.567051 +-0.553157,-0.55552 +-0.564389,-0.565469 +-0.56107,-0.564343 +-0.552941,-0.556732 +-0.567387,-0.564584 +-0.561131,-0.55923 +-0.557636,-0.555954 +-0.56271,-0.558608 +-0.553013,-0.555507 +-0.548865,-0.552083 +-0.544601,-0.544816 +-0.537298,-0.54097 +-0.557599,-0.556074 +-0.553692,-0.549108 +-0.54755,-0.54819 +-0.557809,-0.555425 +-0.5493,-0.549517 +-0.538877,-0.544383 +-0.541267,-0.540659 +-0.556359,-0.556793 +-0.558732,-0.559693 +-0.560112,-0.55448 +-0.562697,-0.562452 +-0.544313,-0.546029 +-0.547983,-0.546434 +-0.549613,-0.554467 +-0.541314,-0.542877 +-0.560534,-0.557014 +-0.550291,-0.55155 +-0.558433,-0.555093 +-0.55889,-0.556036 +-0.544668,-0.549232 +-0.546719,-0.54663 +-0.548337,-0.549804 +-0.607965,-0.611628 +-0.623231,-0.618527 +-0.608531,-0.606842 +-0.603543,-0.603835 +-0.599009,-0.595315 +-0.606143,-0.610203 +-0.591495,-0.595138 +-0.589537,-0.588012 +-0.587107,-0.589972 +-0.59057,-0.587641 +-0.597909,-0.592558 +-0.602157,-0.604153 +-0.594979,-0.593665 +-0.597181,-0.598858 +-0.605666,-0.612171 +-0.601306,-0.599626 +-0.609646,-0.608966 +-0.60787,-0.607225 +-0.606651,-0.599703 +-0.615094,-0.615811 +-0.616692,-0.619467 +-0.61046,-0.610567 +-0.60682,-0.613467 +-0.601376,-0.602041 +-0.609122,-0.604472 +-0.611557,-0.611324 +-0.598663,-0.592987 +-0.58954,-0.587349 +-0.589228,-0.595262 +-0.588826,-0.589915 +-0.579382,-0.583592 +-0.587724,-0.591284 +-0.584399,-0.577682 +-0.598048,-0.595418 +-0.614281,-0.611759 +-0.603422,-0.598969 +-0.605748,-0.612322 +-0.614278,-0.618966 +-0.610323,-0.61129 +-0.615228,-0.61981 +-0.623212,-0.617602 +-0.601986,-0.595033 +-0.618704,-0.618767 +-0.622386,-0.618606 +-0.604038,-0.608055 +-0.605409,-0.614401 +-0.5976,-0.597373 +-0.610165,-0.612243 +-0.617643,-0.615449 +-0.610575,-0.600242 +-0.61172,-0.611074 +-0.617046,-0.61728 +-0.605541,-0.606211 +-0.61075,-0.621353 +-0.619349,-0.621804 +-0.609739,-0.607087 +-0.617149,-0.617178 +-0.628417,-0.618734 +-0.621062,-0.616262 +-0.607294,-0.611859 +-0.608286,-0.608709 +-0.601611,-0.609403 +-0.605153,-0.612217 +-0.610954,-0.605515 +-0.603696,-0.60166 +-0.615472,-0.610008 +-0.62619,-0.617588 +-0.609371,-0.614399 +-0.608809,-0.613267 +-0.61891,-0.622288 +-0.618615,-0.627566 +-0.629664,-0.626192 +-0.618741,-0.611685 +-0.615763,-0.61361 +-0.618422,-0.610425 +-0.609707,-0.610967 +-0.603547,-0.612661 +-0.600241,-0.602389 +-0.607113,-0.613127 +-0.603481,-0.604419 +-0.620029,-0.60993 +-0.621079,-0.617747 +-0.608503,-0.604918 +-0.619627,-0.617153 +-0.615608,-0.625432 +-0.623878,-0.629174 +-0.616929,-0.618327 +-0.611703,-0.614621 +-0.626223,-0.617759 +-0.612159,-0.604741 +-0.61284,-0.612837 +-0.607498,-0.605286 +-0.598331,-0.604805 +-0.594801,-0.603885 +-0.59951,-0.599176 +-0.601191,-0.601854 +-0.595114,-0.590652 +-0.618351,-0.608476 +-0.609525,-0.609204 +-0.6025,-0.603712 +-0.60593,-0.608907 +-0.618232,-0.62788 +-0.627199,-0.628836 +-0.615046,-0.61214 +-0.624472,-0.62215 +-0.624949,-0.61639 +-0.621348,-0.618214 +-0.606468,-0.610496 +-0.609539,-0.612029 +-0.615198,-0.622178 +-0.606175,-0.610515 diff --git a/src/test/reference_buffers/StemVolumeControlFull b/src/test/reference_buffers/StemVolumeControlFull new file mode 100644 index 00000000000..4be91f1dd60 --- /dev/null +++ b/src/test/reference_buffers/StemVolumeControlFull @@ -0,0 +1,512 @@ +0.404112,0.403791 +0.408334,0.406974 +0.40992,0.409195 +0.409117,0.406796 +0.395998,0.392895 +0.426084,0.422948 +0.406942,0.403839 +0.430642,0.426529 +0.430095,0.428198 +0.395429,0.396128 +0.413935,0.412437 +0.401321,0.401469 +0.422262,0.420434 +0.429876,0.425349 +0.414503,0.41117 +0.425963,0.422254 +0.41815,0.417941 +0.408604,0.409948 +0.413187,0.411913 +0.421863,0.419923 +0.42467,0.422644 +0.421308,0.416303 +0.416492,0.410384 +0.428819,0.424434 +0.421308,0.417056 +0.433458,0.431836 +0.401607,0.400231 +0.202249,0.200165 +0.173285,0.172044 +0.210055,0.204134 +0.168691,0.16 +0.196897,0.1903 +0.180524,0.174446 +0.203624,0.197865 +0.179092,0.175916 +0.175173,0.172049 +0.190879,0.187875 +0.183437,0.179556 +0.19917,0.190551 +0.174018,0.167532 +0.209128,0.20281 +0.195493,0.187692 +0.18173,0.179327 +0.17968,0.178055 +0.18047,0.178548 +0.21074,0.207859 +0.205783,0.199388 +0.196771,0.19012 +0.19992,0.19231 +0.209868,0.200218 +0.203913,0.195775 +0.193779,0.188654 +0.183388,0.17706 +0.193711,0.186832 +0.183983,0.176992 +0.198569,0.188488 +0.199721,0.189828 +0.208113,0.199006 +0.191369,0.184115 +0.17977,0.177465 +0.200142,0.197778 +0.173476,0.169533 +0.200333,0.198251 +0.174306,0.169197 +0.206646,0.199756 +0.189596,0.184647 +0.195763,0.188744 +0.207203,0.203576 +0.159945,0.156974 +0.208074,0.202214 +0.17225,0.168391 +0.214487,0.205449 +0.187958,0.177055 +0.209135,0.200375 +0.180234,0.172018 +0.198156,0.19494 +0.158338,0.156707 +-0.266737,-0.267637 +-0.295616,-0.296997 +-0.250943,-0.253963 +-0.287363,-0.291064 +-0.260057,-0.264586 +-0.27851,-0.279755 +-0.259717,-0.260536 +-0.297084,-0.29556 +-0.268141,-0.264295 +-0.293816,-0.29453 +-0.28025,-0.280818 +-0.288395,-0.292299 +-0.297386,-0.304686 +-0.278994,-0.28188 +-0.313321,-0.316706 +-0.299661,-0.299808 +-0.304736,-0.301854 +-0.289789,-0.291142 +-0.292174,-0.292239 +-0.285899,-0.288456 +-0.282188,-0.287396 +-0.27417,-0.276196 +-0.269022,-0.270692 +-0.272707,-0.270652 +-0.258187,-0.255258 +-0.272434,-0.269655 +-0.258288,-0.255022 +-0.260087,-0.259958 +-0.258475,-0.257186 +-0.259229,-0.259552 +-0.293583,-0.290981 +-0.29806,-0.292144 +-0.29347,-0.28996 +-0.279235,-0.271081 +-0.282388,-0.276777 +-0.305081,-0.301853 +-0.294102,-0.290272 +-0.302168,-0.302063 +-0.284809,-0.281076 +-0.271383,-0.267748 +-0.285065,-0.281828 +-0.277434,-0.272533 +-0.276187,-0.273228 +-0.257926,-0.255087 +-0.267223,-0.266665 +-0.260695,-0.25829 +-0.28384,-0.280579 +-0.261304,-0.259331 +-0.285025,-0.279633 +-0.273622,-0.269117 +-0.0473539,-0.0412775 +-0.0380691,-0.0310858 +-0.0437528,-0.0407515 +-0.028074,-0.0226225 +-0.0704383,-0.0652546 +-0.0372735,-0.0341521 +-0.0555498,-0.0485999 +-0.028842,-0.0224618 +-0.0455609,-0.0399505 +-0.0495894,-0.0427919 +-0.0481889,-0.0437442 +-0.0522981,-0.0469899 +-0.0443993,-0.0381321 +-0.0425986,-0.0385997 +-0.023587,-0.0192569 +-0.0529947,-0.0463115 +-0.0376475,-0.0316343 +-0.0574069,-0.0510795 +-0.0540905,-0.0455025 +-0.0491715,-0.0443686 +-0.0629984,-0.0583407 +-0.0311962,-0.026636 +-0.0491696,-0.0483519 +-0.0526493,-0.0466721 +-0.0580143,-0.052781 +-0.0525306,-0.0493286 +-0.0412884,-0.0337754 +-0.0385292,-0.0346698 +-0.0454978,-0.0427327 +-0.0475771,-0.0439193 +-0.0384114,-0.0383123 +-0.0374338,-0.0358873 +-0.0233544,-0.0190286 +-0.0570166,-0.053712 +-0.053301,-0.0471798 +-0.0463348,-0.038318 +-0.0522653,-0.0496506 +-0.039063,-0.0357685 +-0.0746263,-0.0719344 +-0.0661842,-0.0660325 +-0.0743088,-0.0681992 +-0.0625528,-0.0570452 +-0.0535839,-0.0478884 +-0.0775621,-0.0688394 +-0.0516612,-0.0482971 +-0.0775346,-0.0760728 +-0.0358811,-0.0344705 +-0.0598378,-0.0617933 +-0.0198388,-0.0206789 +-0.0549204,-0.0534468 +-0.466077,-0.466056 +-0.531552,-0.529713 +-0.479475,-0.478796 +-0.522432,-0.527419 +-0.470969,-0.474299 +-0.515226,-0.519675 +-0.51038,-0.514639 +-0.530449,-0.52807 +-0.527382,-0.525172 +-0.527497,-0.523348 +-0.527546,-0.522713 +-0.533198,-0.533546 +-0.534489,-0.53346 +-0.513122,-0.512462 +-0.527227,-0.527831 +-0.515345,-0.511905 +-0.543702,-0.540527 +-0.507425,-0.505143 +-0.517193,-0.515322 +-0.514181,-0.517468 +-0.49985,-0.505492 +-0.520677,-0.52657 +-0.507298,-0.514883 +-0.508567,-0.513162 +-0.495837,-0.496592 +-0.522484,-0.524581 +-0.505406,-0.507048 +-0.518723,-0.521156 +-0.50249,-0.509521 +-0.516629,-0.520148 +-0.519116,-0.522349 +-0.507798,-0.511277 +-0.533308,-0.528774 +-0.509639,-0.50914 +-0.521442,-0.521056 +-0.496513,-0.493881 +-0.526031,-0.531822 +-0.507066,-0.509581 +-0.532117,-0.535205 +-0.514252,-0.519668 +-0.514262,-0.51264 +-0.524416,-0.525062 +-0.490848,-0.492625 +-0.534236,-0.534892 +-0.488693,-0.493146 +-0.545462,-0.551445 +-0.492257,-0.495994 +-0.555242,-0.5584 +-0.46819,-0.47167 +-0.552834,-0.551554 +-0.446632,-0.449015 +0.486465,0.482393 +0.580832,0.580507 +0.494126,0.485896 +0.570243,0.565853 +0.502296,0.50089 +0.579011,0.571895 +0.510209,0.511408 +0.559649,0.557829 +0.52468,0.519346 +0.531318,0.531918 +0.549299,0.543078 +0.540058,0.53557 +0.541757,0.541355 +0.530091,0.525657 +0.550634,0.550324 +0.52605,0.526197 +0.534599,0.531741 +0.502658,0.500739 +0.518857,0.51626 +0.524453,0.51947 +0.515072,0.511051 +0.518304,0.516458 +0.517972,0.512794 +0.512421,0.510365 +0.502614,0.501084 +0.514348,0.507426 +0.519824,0.518231 +0.530829,0.525126 +0.523131,0.515075 +0.512343,0.510651 +0.509839,0.502205 +0.528317,0.524267 +0.523977,0.522771 +0.529195,0.522483 +0.522438,0.520267 +0.516252,0.511717 +0.508347,0.501524 +0.499439,0.496345 +0.505155,0.500385 +0.505756,0.502237 +0.502934,0.501683 +0.497947,0.496621 +0.517835,0.516272 +0.507963,0.506555 +0.525548,0.523263 +0.491638,0.487431 +0.523441,0.521257 +0.512602,0.509894 +0.551632,0.54874 +0.497517,0.497546 +0.0716129,0.0678948 +0.0279671,0.0235395 +0.0674461,0.0631587 +0.0261185,0.0176144 +0.069074,0.0632796 +0.0224594,0.0169734 +0.056414,0.0506524 +0.0427353,0.0410829 +0.0403643,0.036723 +0.040473,0.0371858 +0.0432212,0.0406482 +0.0469398,0.0420956 +0.0330913,0.0308558 +0.0550955,0.0538887 +0.0643484,0.0650002 +0.0549083,0.0578963 +0.0537403,0.0552064 +0.0437816,0.0449179 +0.0470855,0.04576 +0.0622772,0.0592867 +0.0382453,0.0357435 +0.0560195,0.0532796 +0.0530812,0.0528824 +0.0522273,0.0523563 +0.0596991,0.059453 +0.0535431,0.0534124 +0.0572159,0.0542925 +0.0631718,0.0605625 +0.0525041,0.0502416 +0.044673,0.0436722 +0.0672342,0.070176 +0.0553008,0.0584076 +0.0641499,0.0683673 +0.0442294,0.0473743 +0.0444185,0.044312 +0.0524912,0.0524795 +0.0401086,0.0383666 +0.0433069,0.0431185 +0.0369471,0.0386591 +0.0446325,0.0456631 +0.0535148,0.0559994 +0.0612992,0.0608752 +0.0521047,0.0502257 +0.0520393,0.0499812 +0.0486534,0.0452866 +0.0656592,0.0663217 +0.0475904,0.049388 +0.0761637,0.0796152 +0.0332772,0.0387137 +0.0566288,0.058676 +0.28203,0.284209 +0.299437,0.30027 +0.291538,0.291452 +0.284936,0.288273 +0.272125,0.275549 +0.286303,0.29112 +0.283542,0.288666 +0.292904,0.295168 +0.279098,0.280234 +0.308188,0.307939 +0.291087,0.291028 +0.292852,0.294271 +0.277086,0.280484 +0.276418,0.280848 +0.292553,0.295709 +0.287296,0.289952 +0.293897,0.29334 +0.272464,0.270406 +0.277455,0.277018 +0.273297,0.271466 +0.273244,0.274209 +0.276671,0.278816 +0.270938,0.269982 +0.260317,0.260904 +0.259355,0.257358 +0.25068,0.247115 +0.256113,0.256707 +0.261702,0.261817 +0.252384,0.255346 +0.249552,0.25592 +0.249841,0.253326 +0.264808,0.2691 +0.26609,0.269768 +0.269933,0.270775 +0.253957,0.257312 +0.254192,0.258006 +0.254074,0.257091 +0.259028,0.263569 +0.246499,0.248891 +0.254337,0.253641 +0.261492,0.260714 +0.26319,0.260941 +0.273735,0.270599 +0.235658,0.236036 +0.255877,0.256104 +0.22926,0.228728 +0.270449,0.272893 +0.243656,0.242203 +0.275995,0.274407 +0.222404,0.224382 +-0.187415,-0.189171 +-0.236072,-0.233242 +-0.182311,-0.177701 +-0.216987,-0.21704 +-0.208478,-0.20402 +-0.215415,-0.214433 +-0.188776,-0.190408 +-0.193089,-0.189617 +-0.191561,-0.191529 +-0.229017,-0.227028 +-0.21193,-0.206792 +-0.219374,-0.218186 +-0.199835,-0.197261 +-0.189507,-0.186717 +-0.206775,-0.206541 +-0.197542,-0.195153 +-0.227748,-0.223496 +-0.214386,-0.211959 +-0.216696,-0.212814 +-0.206143,-0.201966 +-0.196316,-0.197199 +-0.210822,-0.209347 +-0.199559,-0.198712 +-0.157031,-0.15963 +-0.159062,-0.155519 +-0.15633,-0.156173 +-0.139053,-0.140572 +-0.134403,-0.131553 +-0.130569,-0.134769 +-0.1576,-0.159241 +-0.132971,-0.131551 +-0.147368,-0.150199 +-0.142324,-0.138458 +-0.141905,-0.138696 +-0.154884,-0.154786 +-0.126094,-0.121944 +-0.14198,-0.141854 +-0.148033,-0.148182 +-0.148508,-0.144798 +-0.142033,-0.140233 +-0.144414,-0.141138 +-0.135555,-0.130719 +-0.147991,-0.147269 +-0.146042,-0.146399 +-0.150802,-0.150847 +-0.157293,-0.16098 +-0.126383,-0.12751 +-0.170433,-0.168935 +-0.1391,-0.140918 +-0.167751,-0.166116 +-0.343655,-0.343973 +-0.380108,-0.385708 +-0.352501,-0.353574 +-0.365098,-0.36939 +-0.349209,-0.35313 +-0.342639,-0.33947 +-0.359093,-0.361027 +-0.372612,-0.372619 +-0.365613,-0.364576 +-0.364564,-0.371848 +-0.366198,-0.369283 +-0.364063,-0.367541 +-0.383012,-0.388944 +-0.380302,-0.378318 +-0.38598,-0.386535 +-0.37995,-0.382158 +-0.381269,-0.380574 +-0.3759,-0.381392 +-0.364276,-0.369473 +-0.3714,-0.372893 +-0.364433,-0.367706 +-0.382644,-0.382149 +-0.364087,-0.361057 +-0.372363,-0.374096 +-0.394444,-0.396666 +-0.381265,-0.384552 +-0.390529,-0.399496 +-0.401432,-0.406376 +-0.405185,-0.40796 +-0.403751,-0.409269 +-0.404307,-0.403283 +-0.403138,-0.405912 +-0.397557,-0.405058 +-0.403641,-0.406441 +-0.405128,-0.414338 +-0.388869,-0.394937 +-0.402001,-0.400987 +-0.384324,-0.387518 +-0.40869,-0.405817 +-0.407548,-0.405654 +-0.390018,-0.395193 +-0.407894,-0.409846 +-0.394076,-0.399922 +-0.425151,-0.431496 +-0.390988,-0.391343 +-0.400948,-0.402594 +-0.387847,-0.388932 +-0.433304,-0.433582 +-0.385783,-0.390919 +-0.414452,-0.421563 +-0.818097,-0.823091 +-0.865229,-0.871082 +-0.825941,-0.828165 +-0.862411,-0.859136 +-0.837802,-0.83758 +-0.855433,-0.853568 +-0.84332,-0.842566 +-0.85935,-0.865051 +-0.8405,-0.84199 +-0.864891,-0.866988 +-0.840886,-0.842976 +-0.857176,-0.85265 +-0.865727,-0.86528 +-0.853765,-0.854345 +-0.870615,-0.87133 +-0.840069,-0.847225 +-0.835097,-0.840037 +-0.833106,-0.836272 +-0.834828,-0.837783 +-0.8327,-0.83064 +-0.851575,-0.849801 +-0.830676,-0.831013 +-0.834257,-0.834895 +-0.830199,-0.833634 +-0.823365,-0.827297 +-0.838643,-0.839558 +-0.830927,-0.830458 +-0.841318,-0.838996 +-0.842235,-0.838548 +-0.841099,-0.840285 +-0.823191,-0.824363 +-0.828229,-0.830822 +-0.831383,-0.835556 +-0.837198,-0.839082 diff --git a/src/test/reference_buffers/StemVolumeControlSilence b/src/test/reference_buffers/StemVolumeControlSilence new file mode 100644 index 00000000000..ede46e228a8 --- /dev/null +++ b/src/test/reference_buffers/StemVolumeControlSilence @@ -0,0 +1,512 @@ +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 +0,0 diff --git a/src/test/stemcontrolobjecttest.cpp b/src/test/stemcontrolobjecttest.cpp new file mode 100644 index 00000000000..cf01a8545e0 --- /dev/null +++ b/src/test/stemcontrolobjecttest.cpp @@ -0,0 +1,254 @@ +#include + +#include +#include +#include + +#include "control/pollingcontrolproxy.h" +#include "mixxxtest.h" +#include "test/signalpathtest.h" + +class StemControlTest : public BaseSignalPathTest { + protected: + QString getGroupForStem(const QString& deckGroup, int stemIdx) { + DEBUG_ASSERT(deckGroup.endsWith("]")); + return QStringLiteral("%1Stem%2]") + .arg(deckGroup.left(deckGroup.size() - 1), + QString::number(stemIdx)); + } + + void SetUp() override { + BaseSignalPathTest::SetUp(); + + const QString kStemFileLocationTest = getTestDir().filePath("stems/test.stem.mp4"); + TrackPointer pStemFile(Track::newTemporary(kStemFileLocationTest)); + + loadTrack(m_pMixerDeck1, pStemFile); + loadTrack(m_pMixerDeck3, pStemFile); + + m_pPlay = std::make_unique(m_sGroup1, "play"); + + m_pStem1Volume = std::make_unique( + getGroupForStem(m_sGroup1, 1), "volume"); + m_pStem2Volume = std::make_unique( + getGroupForStem(m_sGroup1, 2), "volume"); + m_pStem3Volume = std::make_unique( + getGroupForStem(m_sGroup1, 3), "volume"); + m_pStem4Volume = std::make_unique( + getGroupForStem(m_sGroup1, 4), "volume"); + m_pStem1Mute = std::make_unique(getGroupForStem(m_sGroup1, 1), "mute"); + m_pStem2Mute = std::make_unique(getGroupForStem(m_sGroup1, 2), "mute"); + m_pStem3Mute = std::make_unique(getGroupForStem(m_sGroup1, 3), "mute"); + m_pStem4Mute = std::make_unique(getGroupForStem(m_sGroup1, 4), "mute"); + m_pStem1Color = std::make_unique( + getGroupForStem(m_sGroup1, 1), "color"); + m_pStem2Color = std::make_unique( + getGroupForStem(m_sGroup1, 2), "color"); + m_pStem3Color = std::make_unique( + getGroupForStem(m_sGroup1, 3), "color"); + m_pStem4Color = std::make_unique( + getGroupForStem(m_sGroup1, 4), "color"); + + m_pStemCount = std::make_unique(m_sGroup1, "stem_count"); + } + + void setCurrentPosition(mixxx::audio::FramePos position) { + m_pChannel1->getEngineBuffer()->queueNewPlaypos(position, EngineBuffer::SEEK_STANDARD); + ProcessBuffer(); + } + + void loadTrack(Deck* pDeck, TrackPointer pTrack) { + BaseSignalPathTest::loadTrack(pDeck, pTrack); + // Because there is connection across the main thread in caching reader + // thread, we need to manually process the eventloop to trigger + // `BaseTrackPlayerImpl::slotTrackLoaded` Here is the chain of + // connections (Symbol (thread)) EngineDeck::slotLoadTrack (main) -> + // EngineBuffer::loadTrack (main) -> CachingReader*::newTrack (main) -> + // CachingReaderWorker::trackLoaded (CachingReader) -> + // EngineBuffer::loaded (CachingReader, direct) -> + // BaseTrackPlayerImpl::slotTrackLoaded (main) + QCoreApplication::processEvents(QEventLoop::WaitForMoreEvents, 100); + } + + std::unique_ptr m_pPlay; + std::unique_ptr m_pStem1Volume; + std::unique_ptr m_pStem2Volume; + std::unique_ptr m_pStem3Volume; + std::unique_ptr m_pStem4Volume; + std::unique_ptr m_pStem1Mute; + std::unique_ptr m_pStem2Mute; + std::unique_ptr m_pStem3Mute; + std::unique_ptr m_pStem4Mute; + std::unique_ptr m_pStem1Color; + std::unique_ptr m_pStem2Color; + std::unique_ptr m_pStem3Color; + std::unique_ptr m_pStem4Color; + std::unique_ptr m_pStemCount; +}; + +TEST_F(StemControlTest, StemCount) { + EXPECT_EQ(m_pStemCount->get(), 4.0); + + QString kTrackLocationTest = getTestDir().filePath(QStringLiteral("sine-30.wav")); + TrackPointer pTrack(Track::newTemporary(kTrackLocationTest)); + loadTrack(m_pMixerDeck1, pTrack); + + EXPECT_EQ(m_pStemCount->get(), 0.0); + + kTrackLocationTest = getTestDir().filePath("stems/test.stem.mp4"); + pTrack = Track::newTemporary(kTrackLocationTest); + loadTrack(m_pMixerDeck1, pTrack); + + EXPECT_EQ(m_pStemCount->get(), 4.0); +} + +TEST_F(StemControlTest, StemColor) { + EXPECT_EQ(m_pStem1Color->get(), 0xfd << 16 | 0x4a << 8 | 0x4a); + EXPECT_EQ(m_pStem2Color->get(), 0xff << 16 | 0xff << 8 | 0x00); + EXPECT_EQ(m_pStem3Color->get(), 0x00 << 16 | 0xe8 << 8 | 0xe8); + EXPECT_EQ(m_pStem4Color->get(), 0xad << 16 | 0x65 << 8 | 0xff); + + QString kTrackLocationTest = getTestDir().filePath(QStringLiteral("sine-30.wav")); + TrackPointer pTrack(Track::newTemporary(kTrackLocationTest)); + loadTrack(m_pMixerDeck1, pTrack); + + EXPECT_EQ(m_pStem1Color->get(), -1.0); + EXPECT_EQ(m_pStem2Color->get(), -1.0); + EXPECT_EQ(m_pStem3Color->get(), -1.0); + EXPECT_EQ(m_pStem4Color->get(), -1.0); + + kTrackLocationTest = getTestDir().filePath("stems/test.stem.mp4"); + pTrack = Track::newTemporary(kTrackLocationTest); + loadTrack(m_pMixerDeck1, pTrack); + + EXPECT_EQ(m_pStem1Color->get(), 0xfd << 16 | 0x4a << 8 | 0x4a); + EXPECT_EQ(m_pStem2Color->get(), 0xff << 16 | 0xff << 8 | 0x00); + EXPECT_EQ(m_pStem3Color->get(), 0x00 << 16 | 0xe8 << 8 | 0xe8); + EXPECT_EQ(m_pStem4Color->get(), 0xad << 16 | 0x65 << 8 | 0xff); +} + +TEST_F(StemControlTest, Volume) { + m_pChannel1->getEngineBuffer()->queueNewPlaypos( + mixxx::audio::FramePos{0}, EngineBuffer::SEEK_STANDARD); + m_pPlay->set(1.0); + m_pStem1Volume->set(0.0); + m_pStem2Volume->set(0.0); + m_pStem3Volume->set(0.0); + m_pStem4Volume->set(0.0); + + m_pEngineMixer->process(kMaxEngineChannels * kMaxEngineFrames); + assertBufferMatchesReference(m_pEngineMixer->getMainBuffer(), + kProcessBufferSize, + "StemVolumeControlSilence"); + + m_pChannel1->getEngineBuffer()->queueNewPlaypos( + mixxx::audio::FramePos{0}, EngineBuffer::SEEK_STANDARD); + m_pStem1Volume->set(1.0); + + m_pEngineMixer->process(kMaxEngineChannels * kMaxEngineFrames); + assertBufferMatchesReference(m_pEngineMixer->getMainBuffer(), + kProcessBufferSize, + "StemVolumeControlDrumOnly"); + + m_pChannel1->getEngineBuffer()->queueNewPlaypos( + mixxx::audio::FramePos{0}, EngineBuffer::SEEK_STANDARD); + m_pStem2Volume->set(0.8); + + m_pEngineMixer->process(kMaxEngineChannels * kMaxEngineFrames); + assertBufferMatchesReference(m_pEngineMixer->getMainBuffer(), + kProcessBufferSize, + "StemVolumeControlDrumAndBass"); + + m_pChannel1->getEngineBuffer()->queueNewPlaypos( + mixxx::audio::FramePos{0}, EngineBuffer::SEEK_STANDARD); + m_pStem1Volume->set(0.5); + m_pStem3Volume->set(0.2); + m_pStem4Volume->set(0.4); + + m_pEngineMixer->process(kMaxEngineChannels * kMaxEngineFrames); + assertBufferMatchesReference(m_pEngineMixer->getMainBuffer(), + kProcessBufferSize, + "StemVolumeControlFull"); +} + +TEST_F(StemControlTest, VolumeResetOnLoad) { + m_pStem1Volume->set(0.1); + m_pStem2Volume->set(0.2); + m_pStem3Volume->set(0.3); + m_pStem4Volume->set(0.4); + m_pStem1Mute->set(1.0); + m_pStem2Mute->set(1.0); + m_pStem3Mute->set(0.0); + m_pStem4Mute->set(1.0); + m_pConfig->setValue( + ConfigKey("[Mixer Profile]", "stem_auto_reset"), false); + + QString kTrackLocationTest = getTestDir().filePath(QStringLiteral("sine-30.wav")); + TrackPointer pTrack(Track::newTemporary(kTrackLocationTest)); + loadTrack(m_pMixerDeck1, pTrack); + + EXPECT_EQ(m_pStem1Volume->get(), 0.1); + EXPECT_EQ(m_pStem2Volume->get(), 0.2); + EXPECT_EQ(m_pStem3Volume->get(), 0.3); + EXPECT_EQ(m_pStem4Volume->get(), 0.4); + EXPECT_EQ(m_pStem1Mute->get(), 1.0); + EXPECT_EQ(m_pStem2Mute->get(), 1.0); + EXPECT_EQ(m_pStem3Mute->get(), 0.0); + EXPECT_EQ(m_pStem4Mute->get(), 1.0); + + m_pConfig->setValue( + ConfigKey("[Mixer Profile]", "stem_auto_reset"), true); + loadTrack(m_pMixerDeck1, pTrack); + + EXPECT_EQ(m_pStem1Volume->get(), 1.0); + EXPECT_EQ(m_pStem2Volume->get(), 1.0); + EXPECT_EQ(m_pStem3Volume->get(), 1.0); + EXPECT_EQ(m_pStem4Volume->get(), 1.0); + EXPECT_EQ(m_pStem1Mute->get(), 0.0); + EXPECT_EQ(m_pStem2Mute->get(), 0.0); + EXPECT_EQ(m_pStem3Mute->get(), 0.0); + EXPECT_EQ(m_pStem4Mute->get(), 0.0); +} + +TEST_F(StemControlTest, Mute) { + m_pChannel1->getEngineBuffer()->queueNewPlaypos( + mixxx::audio::FramePos{0}, EngineBuffer::SEEK_STANDARD); + m_pPlay->set(1.0); + m_pStem1Mute->set(1.0); + m_pStem2Mute->set(1.0); + m_pStem3Mute->set(1.0); + m_pStem4Mute->set(1.0); + + m_pEngineMixer->process(kMaxEngineChannels * kMaxEngineFrames); + assertBufferMatchesReference(m_pEngineMixer->getMainBuffer(), + kProcessBufferSize, + "StemVolumeControlSilence"); // Same than volume test + + m_pChannel1->getEngineBuffer()->queueNewPlaypos( + mixxx::audio::FramePos{0}, EngineBuffer::SEEK_STANDARD); + m_pStem1Mute->set(0.0); + + m_pEngineMixer->process(kMaxEngineChannels * kMaxEngineFrames); + assertBufferMatchesReference(m_pEngineMixer->getMainBuffer(), + kProcessBufferSize, + "StemVolumeControlDrumOnly"); // Same than volume test + + m_pChannel1->getEngineBuffer()->queueNewPlaypos( + mixxx::audio::FramePos{0}, EngineBuffer::SEEK_STANDARD); + m_pStem2Mute->set(0.0); + + m_pEngineMixer->process(kMaxEngineChannels * kMaxEngineFrames); + assertBufferMatchesReference(m_pEngineMixer->getMainBuffer(), + kProcessBufferSize, + "StemMuteControlDrumAndBass"); + + m_pChannel1->getEngineBuffer()->queueNewPlaypos( + mixxx::audio::FramePos{0}, EngineBuffer::SEEK_STANDARD); + m_pStem3Mute->set(0.0); + m_pStem4Mute->set(0.0); + + m_pEngineMixer->process(kMaxEngineChannels * kMaxEngineFrames); + assertBufferMatchesReference(m_pEngineMixer->getMainBuffer(), + kProcessBufferSize, + "StemMuteControlFull"); +} diff --git a/src/track/track.h b/src/track/track.h index 6075257cd1b..471c2aae688 100644 --- a/src/track/track.h +++ b/src/track/track.h @@ -338,7 +338,13 @@ class Track : public QObject { // lock thread-unsafe copy constructors of QList return m_stemInfo; } - // Setter is only available internally. See setStemInfosWhileLocked + // Setter is only available internally. See setStemPointsWhileLocked + + bool hasStem() const { + const QMutexLocker lock(&m_qMutex); + // lock thread-unsafe copy constructors of QList + return !m_stemInfo.isEmpty(); + } #endif enum class ImportStatus { diff --git a/src/waveform/renderers/allshader/waveformrendererfiltered.cpp b/src/waveform/renderers/allshader/waveformrendererfiltered.cpp index 32fce65652a..0ddf164cc3e 100644 --- a/src/waveform/renderers/allshader/waveformrendererfiltered.cpp +++ b/src/waveform/renderers/allshader/waveformrendererfiltered.cpp @@ -43,6 +43,13 @@ void WaveformRendererFiltered::paintGL() { if (data == nullptr) { return; } +#ifdef __STEM__ + auto stemInfo = pTrack->getStemInfo(); + // If this track is a stem track, skip the rendering + if (!stemInfo.isEmpty() && waveform->hasStem()) { + return; + } +#endif const float devicePixelRatio = m_waveformRenderer->getDevicePixelRatio(); const int length = static_cast(m_waveformRenderer->getLength() * devicePixelRatio); diff --git a/src/waveform/renderers/allshader/waveformrendererhsv.cpp b/src/waveform/renderers/allshader/waveformrendererhsv.cpp index 2c16a07c872..b03a17a304e 100644 --- a/src/waveform/renderers/allshader/waveformrendererhsv.cpp +++ b/src/waveform/renderers/allshader/waveformrendererhsv.cpp @@ -43,6 +43,13 @@ void WaveformRendererHSV::paintGL() { if (data == nullptr) { return; } +#ifdef __STEM__ + auto stemInfo = pTrack->getStemInfo(); + // If this track is a stem track, skip the rendering + if (!stemInfo.isEmpty() && waveform->hasStem()) { + return; + } +#endif const float devicePixelRatio = m_waveformRenderer->getDevicePixelRatio(); const int length = static_cast(m_waveformRenderer->getLength() * devicePixelRatio); diff --git a/src/waveform/renderers/allshader/waveformrendererrgb.cpp b/src/waveform/renderers/allshader/waveformrendererrgb.cpp index f9aba439892..828a8a71bbb 100644 --- a/src/waveform/renderers/allshader/waveformrendererrgb.cpp +++ b/src/waveform/renderers/allshader/waveformrendererrgb.cpp @@ -54,6 +54,13 @@ void WaveformRendererRGB::paintGL() { if (data == nullptr) { return; } +#ifdef __STEM__ + auto stemInfo = pTrack->getStemInfo(); + // If this track is a stem track, skip the rendering + if (!stemInfo.isEmpty() && waveform->hasStem()) { + return; + } +#endif const float devicePixelRatio = m_waveformRenderer->getDevicePixelRatio(); const int length = static_cast(m_waveformRenderer->getLength() * devicePixelRatio); diff --git a/src/waveform/renderers/allshader/waveformrendererstem.cpp b/src/waveform/renderers/allshader/waveformrendererstem.cpp new file mode 100644 index 00000000000..a1d03a63377 --- /dev/null +++ b/src/waveform/renderers/allshader/waveformrendererstem.cpp @@ -0,0 +1,208 @@ +#include "waveform/renderers/allshader/waveformrendererstem.h" + +#include +#include +#include + +#include "track/track.h" +#include "util/math.h" +#include "waveform/renderers/allshader/matrixforwidgetgeometry.h" +#include "waveform/renderers/allshader/rgbdata.h" +#include "waveform/renderers/waveformwidgetrenderer.h" +#include "waveform/waveform.h" + +namespace { +constexpr int kMaxSupportedStems = 4; +} // anonymous namespace + +namespace allshader { + +WaveformRendererStem::WaveformRendererStem( + WaveformWidgetRenderer* waveformWidget, + ::WaveformRendererAbstract::PositionSource type) + : WaveformRendererSignalBase(waveformWidget), + m_isSlipRenderer(type == ::WaveformRendererAbstract::Slip) { +} + +void WaveformRendererStem::onSetup(const QDomNode& node) { + Q_UNUSED(node); +} + +void WaveformRendererStem::initializeGL() { + WaveformRendererSignalBase::initializeGL(); + m_shader.init(); + m_textureShader.init(); + auto group = m_pEQEnabled->getKey().group; + for (int stemIdx = 1; stemIdx <= kMaxSupportedStems; stemIdx++) { + DEBUG_ASSERT(group.endsWith("]")); + QString stemGroup = QStringLiteral("%1Stem%2]") + .arg(group.left(group.size() - 1), + QString::number(stemIdx)); + m_pStemGain.emplace_back( + std::make_unique(stemGroup, + QStringLiteral("volume").arg(stemIdx))); + m_pStemMute.emplace_back(std::make_unique( + stemGroup, QStringLiteral("mute").arg(stemIdx))); + } +} + +void WaveformRendererStem::paintGL() { + TrackPointer pTrack = m_waveformRenderer->getTrackInfo(); + if (!pTrack || (m_isSlipRenderer && !m_waveformRenderer->isSlipActive())) { + return; + } + + auto stemInfo = pTrack->getStemInfo(); + // If this track isn't a stem track, skip the rendering + if (stemInfo.isEmpty()) { + return; + } + auto positionType = m_isSlipRenderer ? ::WaveformRendererAbstract::Slip + : ::WaveformRendererAbstract::Play; + + ConstWaveformPointer waveform = pTrack->getWaveform(); + if (waveform.isNull()) { + return; + } + + const int dataSize = waveform->getDataSize(); + if (dataSize <= 1) { + return; + } + + const WaveformData* data = waveform->data(); + if (data == nullptr) { + return; + } + // If this waveform doesn't contain stem data, skip the rendering + if (!waveform->hasStem()) { + return; + } + + const float devicePixelRatio = m_waveformRenderer->getDevicePixelRatio(); + const int length = static_cast(m_waveformRenderer->getLength() * devicePixelRatio); + + // See waveformrenderersimple.cpp for a detailed explanation of the frame and index calculation + const int visualFramesSize = dataSize / 2; + const double firstVisualFrame = + m_waveformRenderer->getFirstDisplayedPosition(positionType) * visualFramesSize; + const double lastVisualFrame = + m_waveformRenderer->getLastDisplayedPosition(positionType) * visualFramesSize; + + // Represents the # of visual frames per horizontal pixel. + const double visualIncrementPerPixel = + (lastVisualFrame - firstVisualFrame) / static_cast(length); + + // Per-band gain from the EQ knobs. + float allGain(1.0); + // applyCompensation = true, as we scale to match filtered.all + getGains(&allGain, false, nullptr, nullptr, nullptr); + + const float breadth = static_cast(m_waveformRenderer->getBreadth()) * devicePixelRatio; + const float halfBreadth = breadth / 2.0f; + + const float heightFactor = allGain * halfBreadth / m_maxValue; + + // Effective visual frame for x + double xVisualFrame = qRound(firstVisualFrame / visualIncrementPerPixel) * + visualIncrementPerPixel; + + const int numVerticesPerLine = 6; // 2 triangles + + const int reserved = numVerticesPerLine * (8 * length + 1); + + m_vertices.clear(); + m_vertices.reserve(reserved); + m_colors.clear(); + m_colors.reserve(reserved); + + m_vertices.addRectangle(0.f, + halfBreadth - 0.5f * devicePixelRatio, + static_cast(length), + m_isSlipRenderer ? halfBreadth : halfBreadth + 0.5f * devicePixelRatio); + m_colors.addForRectangle(0.f, 0.f, 0.f, 0.f); + + const double maxSamplingRange = visualIncrementPerPixel / 2.0; + + for (int visualIdx = 0; visualIdx < length; ++visualIdx) { + for (int stemIdx = 0; stemIdx < 4; stemIdx++) { + // Stem is drawn twice with different opacity level, this allow to + // see the maximum signal by transparency + for (int layerIdx = 0; layerIdx < 2; layerIdx++) { + QColor stemColor = stemInfo[stemIdx].getColor(); + float color_r = stemColor.redF(), + color_g = stemColor.greenF(), + color_b = stemColor.blueF(), + color_a = stemColor.alphaF() * (layerIdx ? 0.75f : 0.15f); + const int visualFrameStart = std::lround(xVisualFrame - maxSamplingRange); + const int visualFrameStop = std::lround(xVisualFrame + maxSamplingRange); + + const int visualIndexStart = std::max(visualFrameStart * 2, 0); + const int visualIndexStop = + std::min(std::max(visualFrameStop, visualFrameStart + 1) * 2, dataSize - 1); + + const float fVisualIdx = static_cast(visualIdx); + + // Find the max values for current eq in the waveform data. + // - Max of left and right + uchar u8max{}; + for (int chn = 0; chn < 2; chn++) { + // data is interleaved left / right + for (int i = visualIndexStart + chn; i < visualIndexStop + chn; i += 2) { + const WaveformData& waveformData = data[i]; + + u8max = math_max(u8max, waveformData.stems[stemIdx]); + } + } + + // Cast to float + float max = static_cast(u8max); + + // Apply the gains + if (layerIdx) { + max *= m_pStemMute[stemIdx]->toBool() + ? 0.f + : static_cast(m_pStemGain[stemIdx]->get()); + } + + // Lines are thin rectangles + // shawdow + m_vertices.addRectangle(fVisualIdx - 0.5f, + halfBreadth - heightFactor * max, + fVisualIdx + 0.5f, + m_isSlipRenderer ? halfBreadth : halfBreadth + heightFactor * max); + + m_colors.addForRectangle(color_r, color_g, color_b, color_a); + } + } + xVisualFrame += visualIncrementPerPixel; + } + + DEBUG_ASSERT(reserved == m_vertices.size()); + DEBUG_ASSERT(reserved == m_colors.size()); + + const QMatrix4x4 matrix = matrixForWidgetGeometry(m_waveformRenderer, true); + + const int matrixLocation = m_shader.matrixLocation(); + const int positionLocation = m_shader.positionLocation(); + const int colorLocation = m_shader.colorLocation(); + + m_shader.bind(); + m_shader.enableAttributeArray(positionLocation); + m_shader.enableAttributeArray(colorLocation); + + m_shader.setUniformValue(matrixLocation, matrix); + + m_shader.setAttributeArray( + positionLocation, GL_FLOAT, m_vertices.constData(), 2); + m_shader.setAttributeArray( + colorLocation, GL_FLOAT, m_colors.constData(), 4); + + glDrawArrays(GL_TRIANGLES, 0, m_vertices.size()); + + m_shader.disableAttributeArray(positionLocation); + m_shader.disableAttributeArray(colorLocation); + m_shader.release(); +} + +} // namespace allshader diff --git a/src/waveform/renderers/allshader/waveformrendererstem.h b/src/waveform/renderers/allshader/waveformrendererstem.h new file mode 100644 index 00000000000..757bfe763d3 --- /dev/null +++ b/src/waveform/renderers/allshader/waveformrendererstem.h @@ -0,0 +1,44 @@ +#pragma once + +#include + +#include "shaders/rgbashader.h" +#include "shaders/textureshader.h" +#include "util/class.h" +#include "waveform/renderers/allshader/rgbadata.h" +#include "waveform/renderers/allshader/vertexdata.h" +#include "waveform/renderers/allshader/waveformrenderersignalbase.h" + +class QOpenGLTexture; + +namespace allshader { +class WaveformRendererStem; +} + +class allshader::WaveformRendererStem final : public allshader::WaveformRendererSignalBase { + public: + explicit WaveformRendererStem(WaveformWidgetRenderer* waveformWidget, + ::WaveformRendererAbstract::PositionSource type = + ::WaveformRendererAbstract::Play); + + // override ::WaveformRendererSignalBase + void onSetup(const QDomNode& node) override; + + void initializeGL() override; + void paintGL() override; + + private: + mixxx::RGBAShader m_shader; + mixxx::TextureShader m_textureShader; + VertexData m_vertices; + RGBAData m_colors; + + bool m_isSlipRenderer; + + std::vector> m_pStemGain; + std::vector> m_pStemMute; + + void drawTexture(float x, float y, QOpenGLTexture* texture); + + DISALLOW_COPY_AND_ASSIGN(WaveformRendererStem); +}; diff --git a/src/waveform/renderers/allshader/waveformrenderertextured.cpp b/src/waveform/renderers/allshader/waveformrenderertextured.cpp index 9dfcb1d6b73..dc137b73208 100644 --- a/src/waveform/renderers/allshader/waveformrenderertextured.cpp +++ b/src/waveform/renderers/allshader/waveformrenderertextured.cpp @@ -307,6 +307,13 @@ void WaveformRendererTextured::paintGL() { if (pWaveform->data() == nullptr) { return; } +#ifdef __STEM__ + auto stemInfo = pTrack->getStemInfo(); + // If this track is a stem track, skip the rendering + if (!stemInfo.isEmpty() && pWaveform->hasStem()) { + return; + } +#endif const double trackSamples = m_waveformRenderer->getTrackSamples(); if (trackSamples <= 0) { diff --git a/src/waveform/renderers/allshader/waveformrendermark.cpp b/src/waveform/renderers/allshader/waveformrendermark.cpp index 65d25630544..1a66df4deb4 100644 --- a/src/waveform/renderers/allshader/waveformrendermark.cpp +++ b/src/waveform/renderers/allshader/waveformrendermark.cpp @@ -225,6 +225,10 @@ void allshader::WaveformRenderMark::paintGL() { static_cast(pMark->m_pGraphics.get()) ->texture(); + if (!pTexture) { + continue; + } + const float currentMarkPoint = std::round( static_cast( diff --git a/src/waveform/waveform.h b/src/waveform/waveform.h index 6b27d8e8ee2..fc415e31db6 100644 --- a/src/waveform/waveform.h +++ b/src/waveform/waveform.h @@ -24,7 +24,7 @@ struct WaveformFilteredData { struct WaveformData { WaveformFilteredData filtered; - unsigned char stems[mixxx::kMaxSupportedStem]; + unsigned char stems[mixxx::kMaxSupportedStems]; }; class Waveform { @@ -129,6 +129,10 @@ class Waveform { // constructor runs. const WaveformData* data() const { return &m_data[0];} + bool hasStem() const { + return m_stemCount > 0; + } + void dump() const; private: diff --git a/src/waveform/waveformfactory.h b/src/waveform/waveformfactory.h index f4c7d1427ab..86059d45a7e 100644 --- a/src/waveform/waveformfactory.h +++ b/src/waveform/waveformfactory.h @@ -27,16 +27,19 @@ class Waveform; #define WAVEFORM_5_DESCRIPTION "Waveform 5.0" #define WAVEFORMSUMMARY_5_DESCRIPTION "WaveformSummary 5.0" -// Used from Mixxx 2.? with Stem data +#ifdef __STEM__ +// Used from Mixxx 2.6 with Stem data #define WAVEFORM_6_VERSION "Waveform-6.0" -#define WAVEFORMSUMMARY_6_VERSION "WaveformSummary-6.0" #define WAVEFORM_6_DESCRIPTION "Waveform 6.0" -#define WAVEFORMSUMMARY_6_DESCRIPTION "WaveformSummary 6.0" #define WAVEFORM_CURRENT_VERSION WAVEFORM_6_VERSION -#define WAVEFORMSUMMARY_CURRENT_VERSION WAVEFORMSUMMARY_6_VERSION #define WAVEFORM_CURRENT_DESCRIPTION WAVEFORM_6_DESCRIPTION -#define WAVEFORMSUMMARY_CURRENT_DESCRIPTION WAVEFORMSUMMARY_6_DESCRIPTION +#else +#define WAVEFORM_CURRENT_VERSION WAVEFORM_5_VERSION +#define WAVEFORM_CURRENT_DESCRIPTION WAVEFORM_5_DESCRIPTION +#endif +#define WAVEFORMSUMMARY_CURRENT_VERSION WAVEFORMSUMMARY_5_VERSION +#define WAVEFORMSUMMARY_CURRENT_DESCRIPTION WAVEFORMSUMMARY_5_DESCRIPTION class WaveformFactory { public: diff --git a/src/waveform/widgets/allshader/waveformwidget.cpp b/src/waveform/widgets/allshader/waveformwidget.cpp index 120bc62dfb1..2b507ff7afc 100644 --- a/src/waveform/widgets/allshader/waveformwidget.cpp +++ b/src/waveform/widgets/allshader/waveformwidget.cpp @@ -14,6 +14,7 @@ #include "waveform/renderers/allshader/waveformrendererrgb.h" #include "waveform/renderers/allshader/waveformrenderersimple.h" #include "waveform/renderers/allshader/waveformrendererslipmode.h" +#include "waveform/renderers/allshader/waveformrendererstem.h" #include "waveform/renderers/allshader/waveformrenderertextured.h" #include "waveform/renderers/allshader/waveformrendermark.h" #include "waveform/renderers/allshader/waveformrendermarkrange.h" @@ -31,6 +32,12 @@ WaveformWidget::WaveformWidget(QWidget* parent, addRenderer(); addRenderer(); +#ifdef __STEM__ + // The following two renderers work in tandem: if the rendered waveform is + // for a stem track, WaveformRendererSignalBase will skip rendering and let + // WaveformRendererStem do the rendering, and vice-versa. + addRenderer(); +#endif allshader::WaveformRendererSignalBase* waveformSignalRenderer = addWaveformSignalRenderer( type, options, ::WaveformRendererAbstract::Play); @@ -44,6 +51,9 @@ WaveformWidget::WaveformWidget(QWidget* parent, // The following renderer will add an overlay waveform if a slip is in progress addRenderer(); addRenderer(::WaveformRendererAbstract::Slip); +#ifdef __STEM__ + addRenderer(::WaveformRendererAbstract::Slip); +#endif addWaveformSignalRenderer(type, options, ::WaveformRendererAbstract::Slip); addRenderer(::WaveformRendererAbstract::Slip); addRenderer(::WaveformRendererAbstract::Slip);