Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to build20241015 #14

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7794337
eve osc ok 20241001
evelynnev Oct 1, 2024
83b6074
eve osc ok 20241002
evelynnev Oct 2, 2024
853cea7
eve osc ok 20241002
evelynnev Oct 2, 2024
034e460
eve osc ok 20241002
evelynnev Oct 2, 2024
94f02ad
eve osc ok 20241002
evelynnev Oct 2, 2024
df13928
eve osc ok 20241002
evelynnev Oct 2, 2024
fc216c7
eve osc ok 20241002
evelynnev Oct 2, 2024
f059ebb
eve osc ok 20241002
evelynnev Oct 2, 2024
87a9397
eve osc ok 20241002
evelynnev Oct 2, 2024
605b32b
eve osc ok 20241003
evelynnev Oct 3, 2024
16e7ea6
eve osc ok 20241003
evelynnev Oct 3, 2024
2b2180b
eve ok 20241004
evelynnev Oct 4, 2024
4f813e2
eve ok 20241004
evelynnev Oct 4, 2024
7f2d4a1
StemsCueLoopWidget
evelynnev Oct 13, 2024
07c4d99
Cue stems widget (#11)
Eve00000 Oct 13, 2024
67533f7
removed ints in SeratoMarkersEntry
evelynnev Oct 14, 2024
9c64310
changed bool & pollingproxy flags; removed 100 in SeratoMarkersEntry …
evelynnev Oct 14, 2024
d2dd1aa
cuetest.cpp remove 100 lines 35-38
evelynnev Oct 14, 2024
390da2c
dbase names snake, type real, all converted to new type
evelynnev Oct 14, 2024
3d40779
markers, seratomarkers, tests
evelynnev Oct 14, 2024
b7f60fb
changed all exists to polling with flags
evelynnev Oct 15, 2024
0a6b903
changed all exists to polling with flags
evelynnev Oct 15, 2024
6fd3a65
Merge branch 'mixxxdj:main' into main
Eve00000 Oct 15, 2024
d036182
Merge branch 'OSC_in_Mixxx/2.6' into MergeToBuild20241015
evelynnev Oct 15, 2024
2697faa
merge conflicts
evelynnev Oct 15, 2024
45e96a4
mainwindow-nowplaying, basetrackplayer-status
evelynnev Oct 15, 2024
1015b0a
enginebuffer original changes for CO (long)
evelynnev Oct 15, 2024
ab1f921
enginebuffer update
evelynnev Oct 15, 2024
18a5f79
conflicts solved
evelynnev Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,8 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/preferences/dialog/dlgpreflibrarydlg.ui
src/preferences/dialog/dlgprefmixer.cpp
src/preferences/dialog/dlgprefmixerdlg.ui
src/preferences/dialog/dlgprefosc.cpp
src/preferences/dialog/dlgprefoscdlg.ui
src/preferences/dialog/dlgprefrecord.cpp
src/preferences/dialog/dlgprefrecorddlg.ui
src/preferences/dialog/dlgprefreplaygain.cpp
Expand Down Expand Up @@ -2558,6 +2560,42 @@ add_library(rekordbox_metadata STATIC EXCLUDE_FROM_ALL
target_include_directories(rekordbox_metadata SYSTEM PUBLIC lib/rekordbox-metadata)
target_link_libraries(mixxx-lib PRIVATE rekordbox_metadata)

IF(WIN32)
set(IpSystemTypePath src/osc/ip/win32)
set(LIBS ${LIBS} Ws2_32 winmm)
ELSE(WIN32)
set(IpSystemTypePath src/osc/ip/posix)
ENDIF(WIN32)

#eve osc
ADD_LIBRARY(oscpack
src/osc/ip/IpEndpointName.cpp
src/osc/ip/IpEndpointName.h
src/osc/ip/NetworkingUtils.h
${IpSystemTypePath}/NetworkingUtils.cpp
src/osc/ip/PacketListener.h
src/osc/ip/TimerListener.h
src/osc/ip/UdpSocket.h
${IpSystemTypePath}/UdpSocket.cpp
src/osc/osc/MessageMappingOscPacketListener.h
src/osc/osc/OscException.h
src/osc/osc/OscHostEndianness.h
src/osc/osc/OscOutboundPacketStream.cpp
src/osc/osc/OscOutboundPacketStream.h
src/osc/osc/OscPacketListener.h
src/osc/osc/OscPrintReceivedElements.cpp
src/osc/osc/OscPrintReceivedElements.h
src/osc/osc/OscReceivedElements.cpp
src/osc/osc/OscReceivedElements.h
src/osc/osc/OscTypes.cpp
src/osc/osc/OscTypes.h
)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
#target_link_libraries(mixxx oscpack ${LIBS})
target_include_directories(mixxx-lib SYSTEM PRIVATE ip)
target_include_directories(mixxx-lib SYSTEM PRIVATE osc)
target_link_libraries(mixxx-lib PRIVATE oscpack)

#silence "enumeration values not handled in switch" in generated code
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(rekordbox_metadata PRIVATE -Wno-switch)
Expand Down
Binary file added src/RCa13796
Binary file not shown.
Binary file added src/RCb13796
Binary file not shown.
119 changes: 106 additions & 13 deletions src/engine/controls/cuecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@
m_pTrackSamples = ControlObject::getControl(ConfigKey(group, "track_samples"));

m_pQuantizeEnabled = ControlObject::getControl(ConfigKey(group, "quantize"));
connect(m_pQuantizeEnabled, &ControlObject::valueChanged,
this, &CueControl::quantizeChanged,
connect(m_pQuantizeEnabled,
&ControlObject::valueChanged,
this,
&CueControl::quantizeChanged,
Qt::DirectConnection);

m_pClosestBeat = ControlObject::getControl(ConfigKey(group, "beat_closest"));
Expand Down Expand Up @@ -341,8 +343,10 @@

// Hotcue controls
for (const auto& pControl : std::as_const(m_hotcueControls)) {
connect(pControl, &HotcueControl::hotcuePositionChanged,
this, &CueControl::hotcuePositionChanged,
connect(pControl,
&HotcueControl::hotcuePositionChanged,
this,
&CueControl::hotcuePositionChanged,
Qt::DirectConnection);
connect(pControl,
&HotcueControl::hotcueEndPositionChanged,
Expand Down Expand Up @@ -607,8 +611,8 @@
}

void CueControl::cueUpdated() {
//auto lock = lockMutex(&m_mutex);
// We should get a trackCuesUpdated call anyway, so do nothing.
// auto lock = lockMutex(&m_mutex);
// We should get a trackCuesUpdated call anyway, so do nothing.
}

void CueControl::loadCuesFromTrack() {
Expand Down Expand Up @@ -839,7 +843,7 @@
};

void CueControl::hotcueSet(HotcueControl* pControl, double value, HotcueSetMode mode) {
//qDebug() << "CueControl::hotcueSet" << value;
// qDebug() << "CueControl::hotcueSet" << value;

if (value <= 0) {
return;
Expand All @@ -859,6 +863,10 @@
mixxx::audio::FramePos cueStartPosition;
mixxx::audio::FramePos cueEndPosition;
mixxx::CueType cueType = mixxx::CueType::Invalid;
double pass2CueCreationStem1Vol;
double pass2CueCreationStem2Vol;
double pass2CueCreationStem3Vol;
double pass2CueCreationStem4Vol;

bool loopEnabled = m_pLoopEnabled->toBool();
if (mode == HotcueSetMode::Auto) {
Expand All @@ -882,6 +890,42 @@
mode = HotcueSetMode::Cue;
}
}
// EveCue-Loop
PollingControlProxy proxyStem(getGroup(), "stem_count", ControlFlag::AllowMissingOrInvalid);
if (proxyStem.get() > 1) {
const QString groupBaseName = getGroup().remove("[").remove("]");
const QString stemGroups[] = {
QString("[%1Stem1]").arg(groupBaseName),
QString("[%1Stem2]").arg(groupBaseName),
QString("[%1Stem3]").arg(groupBaseName),
QString("[%1Stem4]").arg(groupBaseName),
};

// get the mute multiplier
auto getMuteMultiplier = [](const QString& group) -> int {
PollingControlProxy proxyMute(group, "mute", ControlFlag::AllowMissingOrInvalid);
return static_cast<bool>(proxyMute.get()) ? -1 : 1;
};

// get the volume value adjusted by the mute multiplier
auto getVolume = [](const QString& group, int muteMultiplier) -> double {
PollingControlProxy proxyVolume(group, "volume", ControlFlag::AllowMissingOrInvalid);
return static_cast<double>(proxyVolume.get()) * muteMultiplier;
};

// calc stem volume values
pass2CueCreationStem1Vol = getVolume(stemGroups[0], getMuteMultiplier(stemGroups[0]));
pass2CueCreationStem2Vol = getVolume(stemGroups[1], getMuteMultiplier(stemGroups[1]));
pass2CueCreationStem3Vol = getVolume(stemGroups[2], getMuteMultiplier(stemGroups[2]));
pass2CueCreationStem4Vol = getVolume(stemGroups[3], getMuteMultiplier(stemGroups[3]));

} else {
pass2CueCreationStem1Vol = 1.0;
pass2CueCreationStem2Vol = 1.0;
pass2CueCreationStem3Vol = 1.0;
pass2CueCreationStem4Vol = 1.0;
}
// EveCue-Loop

switch (mode) {
case HotcueSetMode::Cue: {
Expand Down Expand Up @@ -954,7 +998,11 @@
hotcueIndex,
cueStartPosition,
cueEndPosition,
color);
color,
pass2CueCreationStem1Vol,
pass2CueCreationStem2Vol,
pass2CueCreationStem3Vol,
pass2CueCreationStem4Vol);

// TODO(XXX) deal with spurious signals
attachCue(pCue, pControl);
Expand Down Expand Up @@ -1108,20 +1156,52 @@
}

void CueControl::hotcueActivate(HotcueControl* pControl, double value, HotcueSetMode mode) {
//qDebug() << "CueControl::hotcueActivate" << value;
// qDebug() << "CueControl::hotcueActivate" << value;

CuePointer pCue = pControl->getCue();
if (value > 0) {
// pressed
if (pCue && pCue->getPosition().isValid() &&
pCue->getType() != mixxx::CueType::Invalid) {
// EveCue-Loop
PollingControlProxy proxyStem(getGroup(),
"stem_count",
ControlFlag::AllowMissingOrInvalid);
if (proxyStem.get() > 1) {
const QString groupBaseName = getGroup().remove('[').remove(']');
const std::vector<QString> stemGroups = {
QString("[%1Stem1]").arg(groupBaseName),
QString("[%1Stem2]").arg(groupBaseName),
QString("[%1Stem3]").arg(groupBaseName),
QString("[%1Stem4]").arg(groupBaseName)};

auto setMuteAndVolume = [](const QString& group,
double volume) {
PollingControlProxy proxyMute(
group, "mute", ControlFlag::AllowMissingOrInvalid);
proxyMute.set(volume < 0 ? 1 : 0);
PollingControlProxy proxyVolume(group,
"volume",
ControlFlag::AllowMissingOrInvalid);
proxyVolume.set(std::abs(volume));
};

setMuteAndVolume(stemGroups[0], pCue->getStem1vol());
setMuteAndVolume(stemGroups[1], pCue->getStem2vol());
setMuteAndVolume(stemGroups[2], pCue->getStem3vol());
setMuteAndVolume(stemGroups[3], pCue->getStem4vol());
}
// EveCue-Loop
if (m_pPlay->toBool() && m_currentlyPreviewingIndex == Cue::kNoHotCue) {
// playing by Play button

switch (pCue->getType()) {
case mixxx::CueType::HotCue:

hotcueGoto(pControl, value);
break;
case mixxx::CueType::Loop:

if (m_pCurrentSavedLoopControl != pControl) {
setCurrentSavedLoopControlAndActivate(pControl);
} else {
Expand Down Expand Up @@ -1575,15 +1655,15 @@

void CueControl::pause(double v) {
auto lock = lockMutex(&m_trackMutex);
//qDebug() << "CueControl::pause()" << v;
// qDebug() << "CueControl::pause()" << v;
if (v > 0.0) {
m_pPlay->set(0.0);
}
}

void CueControl::playStutter(double v) {
auto lock = lockMutex(&m_trackMutex);
//qDebug() << "playStutter" << v;
// qDebug() << "playStutter" << v;
if (v > 0.0) {
if (m_pPlay->toBool()) {
if (m_currentlyPreviewingIndex != Cue::kNoHotCue) {
Expand Down Expand Up @@ -2011,8 +2091,8 @@
// This is also called from the engine thread. No locking allowed.
bool CueControl::updateIndicatorsAndModifyPlay(
bool newPlay, bool oldPlay, bool playPossible) {
//qDebug() << "updateIndicatorsAndModifyPlay" << newPlay << playPossible
// << m_iCurrentlyPreviewingHotcues << m_bPreviewing;
// qDebug() << "updateIndicatorsAndModifyPlay" << newPlay << playPossible
// << m_iCurrentlyPreviewingHotcues << m_bPreviewing;
CueMode cueMode = static_cast<CueMode>(static_cast<int>(m_pCueMode->get()));
if ((cueMode == CueMode::Denon || cueMode == CueMode::Numark) &&
newPlay && !oldPlay && playPossible &&
Expand Down Expand Up @@ -2726,6 +2806,19 @@
m_hotcueType->forceSet(static_cast<double>(type));
}

void HotcueControl::setStem1vol(double stem1vol) {
m_hotcueStem1vol->set(static_cast<double>(stem1vol));

Check failure on line 2810 in src/engine/controls/cuecontrol.cpp

View workflow job for this annotation

GitHub Actions / coverage

‘m_hotcueStem1vol’ was not declared in this scope; did you mean ‘m_hotcueSetLoop’?

Check failure on line 2810 in src/engine/controls/cuecontrol.cpp

View workflow job for this annotation

GitHub Actions / coverage

‘m_hotcueStem1vol’ was not declared in this scope; did you mean ‘m_hotcueSetLoop’?
}
void HotcueControl::setStem2vol(double stem2vol) {
m_hotcueStem2vol->set(static_cast<double>(stem2vol));

Check failure on line 2813 in src/engine/controls/cuecontrol.cpp

View workflow job for this annotation

GitHub Actions / coverage

‘m_hotcueStem2vol’ was not declared in this scope; did you mean ‘m_hotcueSetLoop’?

Check failure on line 2813 in src/engine/controls/cuecontrol.cpp

View workflow job for this annotation

GitHub Actions / coverage

‘m_hotcueStem2vol’ was not declared in this scope; did you mean ‘m_hotcueSetLoop’?
}
void HotcueControl::setStem3vol(double stem3vol) {
m_hotcueStem3vol->set(static_cast<double>(stem3vol));

Check failure on line 2816 in src/engine/controls/cuecontrol.cpp

View workflow job for this annotation

GitHub Actions / coverage

‘m_hotcueStem3vol’ was not declared in this scope; did you mean ‘m_hotcueSetLoop’?

Check failure on line 2816 in src/engine/controls/cuecontrol.cpp

View workflow job for this annotation

GitHub Actions / coverage

‘m_hotcueStem3vol’ was not declared in this scope; did you mean ‘m_hotcueSetLoop’?
}
void HotcueControl::setStem4vol(double stem4vol) {
m_hotcueStem4vol->set(static_cast<double>(stem4vol));

Check failure on line 2819 in src/engine/controls/cuecontrol.cpp

View workflow job for this annotation

GitHub Actions / coverage

‘m_hotcueStem4vol’ was not declared in this scope; did you mean ‘m_hotcueSetLoop’?

Check failure on line 2819 in src/engine/controls/cuecontrol.cpp

View workflow job for this annotation

GitHub Actions / coverage

‘m_hotcueStem4vol’ was not declared in this scope; did you mean ‘m_hotcueSetLoop’?
}

void HotcueControl::setStatus(HotcueControl::Status status) {
m_pHotcueStatus->forceSet(static_cast<double>(status));
}
Expand Down
5 changes: 5 additions & 0 deletions src/engine/controls/cuecontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ class HotcueControl : public QObject {
void setColor(mixxx::RgbColor::optional_t newColor);
mixxx::RgbColor::optional_t getColor() const;

void setStem1vol(double stem1vol);
void setStem2vol(double stem2vol);
void setStem3vol(double stem3vol);
void setStem4vol(double stem4vol);

/// Used for caching the preview state of this hotcue control
/// for the case the cue is deleted during preview.
mixxx::CueType getPreviewingType() const {
Expand Down
Loading
Loading