Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
9432196
Only highlight crates/playlists of a single selected track
uklotzde Aug 16, 2019
107287d
Fix shift behaviour for ComponentContainers
Holzhaus Sep 10, 2019
2d53150
Add/move release-related properties to AlbumInfo
uklotzde May 21, 2018
9c7233b
Add more track-related properties to TrackInfo
uklotzde May 21, 2018
6032ca5
Add work/movement tags that have been introduced by Apple
uklotzde May 29, 2018
98a4f46
Rephrase comments
uklotzde Sep 17, 2019
da22a46
Add extension points for synchronization of external libraries
uklotzde Sep 7, 2019
2831c4e
Move transaction boundaries from DirectoryDAO into TrackCollection
uklotzde Sep 19, 2019
fed23f1
Replace += with append() and insert()
uklotzde Sep 20, 2019
40564ba
Clarify execution order of operations
uklotzde Sep 20, 2019
11ecb27
Use early exit if possible
uklotzde Sep 20, 2019
9f3b442
Update external track collections after internal database
uklotzde Sep 21, 2019
2b40b43
Fix handling of duplicate/replaced tracks
uklotzde Sep 21, 2019
d1f1065
Exclude optional extra metadata from default build
uklotzde Sep 22, 2019
39c7967
Repeat link to MusicBrainz Picard documentation
uklotzde Sep 22, 2019
210883d
Handle MP3 "TIT1" (old grouping/work) and "GRP1" (new grouping) frames
uklotzde Sep 22, 2019
0a9e7a9
Rename variables: singular -> plural
uklotzde Sep 22, 2019
a39c37d
beat loops snap to the closest (fractional) beat in quantized mode
goddisignz Sep 17, 2019
3bef0df
requested changes
goddisignz Sep 22, 2019
a1ce2f8
Fix debug assertion
uklotzde Sep 22, 2019
2bd98e9
Simplify lambda expression
uklotzde Sep 22, 2019
6e280ed
Fix creation of temporary tracks in CueControlTest
uklotzde Sep 22, 2019
5cb7a1e
open cover art view on left click release
ronso0 Sep 23, 2019
6443427
Properly wrap LV2 searchpath on nix builds
poelzi Sep 23, 2019
4f37fef
Merge pull request #2284 from uklotzde/dev_metadata_extra
daschuer Sep 24, 2019
e5a1dc8
Merge pull request #2294 from uklotzde/cuecontroltest
daschuer Sep 24, 2019
4006c9d
Merge branch 'master' of git@github.com:mixxxdj/mixxx.git into dev_ex…
uklotzde Sep 25, 2019
584c6c8
Merge pull request #2266 from Holzhaus/fix-componentcontainer-shift
Be-ing Sep 26, 2019
7229062
Remove forward declarations of Qt classes and fix formatting
uklotzde Sep 26, 2019
cf9b09e
Fix inheritance of LocationDelegate
uklotzde Sep 26, 2019
1ec481b
Add missing __EXTRA_METADATA__ ifdefs
uklotzde Sep 27, 2019
7fee55e
Fix writing of ID3v2 grouping tag (GRP1 vs. TIT1)
uklotzde Sep 27, 2019
6366325
Improve consistency of ID3v2 TIT1/GRP1/MVNM frame mapping
uklotzde Sep 27, 2019
a6d7a15
fixed failing test
goddisignz Sep 27, 2019
674a5b5
Merge pull request #2301 from uklotzde/extra_metadata
daschuer Sep 27, 2019
fa81c2b
Merge pull request #2300 from uklotzde/locationdelegate
daschuer Sep 27, 2019
6bba535
Merge pull request #2296 from ronso0/cover-drag
daschuer Sep 27, 2019
2000704
Merge pull request #2295 from poelzi/feature/lv2-nix
daschuer Sep 27, 2019
04a1d47
Merge pull request #2286 from goddisignz/quantized_loop_snap
daschuer Sep 27, 2019
42bf81c
Add missing #include directive
uklotzde Sep 28, 2019
b6c641c
Use PainterScope everywhere
uklotzde Sep 28, 2019
940fb37
Improve readability of code
uklotzde Sep 28, 2019
b26ddff
More restrictive artist/title parsing from file names
uklotzde Sep 26, 2019
98873d9
Move file name parsing into TrackInfo
uklotzde Sep 26, 2019
2c0430f
Add tests for parsing artist/title from file names
uklotzde Sep 26, 2019
7839b7d
Merge pull request #2302 from uklotzde/painterscope
daschuer Sep 28, 2019
63fc79c
Merge pull request #2285 from uklotzde/dev_external_library_sync
daschuer Sep 28, 2019
9ebcacb
Merge pull request #2242 from uklotzde/2.2_track_selected
daschuer Sep 28, 2019
8629a7e
Define constants for both artist/title separators
uklotzde Sep 28, 2019
5998ee2
Merge pull request #2304 from uklotzde/parse_artist_title
daschuer Sep 29, 2019
1d882d8
Merge branch 'master' of git@github.com:mixxxdj/mixxx.git into new-si…
uklotzde Sep 29, 2019
29ed622
Fix include directives and reduce dependencies
uklotzde Sep 29, 2019
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
1 change: 1 addition & 0 deletions build/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,7 @@ def sources(self, build):
"src/database/schemamanager.cpp",

"src/library/trackcollection.cpp",
"src/library/externaltrackcollection.cpp",
"src/library/basesqltablemodel.cpp",
"src/library/basetrackcache.cpp",
"src/library/columncache.cpp",
Expand Down
16 changes: 12 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{ nixroot ? (import <nixpkgs> {}) }:
{ nixroot ? (import <nixpkgs> {})
, defaultLv2Plugins ? false
, lv2Plugins ? []
}:
let inherit (nixroot) stdenv pkgs lib
chromaprint fftw flac libid3tag libmad libopus libshout libsndfile lilv
libusb1 libvorbis libebur128 pkgconfig portaudio portmidi protobuf qt5 glib
Expand Down Expand Up @@ -42,14 +45,19 @@ let inherit (nixroot) stdenv pkgs lib

shell-run = nixroot.writeShellScriptBin "run" ''
BUILDDIR=$(ls -1 -d -t lin64_build lin_build | head -1)
$BUILDDIR/mixxx --settingsPath ./devsettings/ --resourcePath ./res "$@"
/usr/bin/env LV2_PATH=${lib.makeSearchPathOutput "lib" "lib/lv2" allLv2Plugins}:$LV2_PATH $BUILDDIR/mixxx --settingsPath ./devsettings/ --resourcePath ./res "$@"
'';

shell-debug = nixroot.writeShellScriptBin "debug" ''
BUILDDIR=$(ls -1 -d -t lin64_build lin_build | head -1)
gdb --args $BUILDDIR/mixxx --settingsPath ./devsettings/ --resourcePath ./res "$@"
'';

allLv2Plugins = lv2Plugins ++ (if defaultLv2Plugins then [
nixroot.x42-plugins nixroot.zam-plugins nixroot.rkrlv2 nixroot.mod-distortion
nixroot.infamousPlugins nixroot.artyFX
] else []);

in stdenv.mkDerivation rec {
name = "mixxx-${version}";
# reading the version from git output is very hard to do without wasting lots of diskspace and runtime
Expand Down Expand Up @@ -83,7 +91,7 @@ in stdenv.mkDerivation rec {
libusb1 libvorbis libebur128 pkgconfig portaudio portmidi protobuf qt5.full
rubberband scons sqlite taglib soundtouch vamp.vampSDK opusfile upower hidapi
ccache git glib x11 libGLU lilv lame lv2 makeWrapper qt5.qtbase
];
] ++ allLv2Plugins;

sconsFlags = [
"build=debug"
Expand All @@ -102,7 +110,7 @@ in stdenv.mkDerivation rec {
installPhase = ''
runHook preInstall
scons $sconsFlags "prefix=$out" install
wrapProgram $out/bin/mixxx --suffix QT_PLUGIN_PATH : ${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix} --set QTDIR ${qt5.full}
wrapProgram $out/bin/mixxx --suffix QT_PLUGIN_PATH : ${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix} --set QTDIR ${qt5.full} --prefix LV2_PATH : ${lib.makeSearchPath "lib/lv2" allLv2Plugins}
runHook postInstall
'';

Expand Down
54 changes: 48 additions & 6 deletions res/controllers/midi-components-0.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,34 @@
}
}
},
forEachComponentContainer: function (operation, recursive) {
if (typeof operation !== 'function') {
print('ERROR: ComponentContainer.forEachComponentContainer requires a function argument');
return;
}
if (recursive === undefined) { recursive = true; }

var that = this;
var applyOperationTo = function (obj) {
if (obj instanceof ComponentContainer) {
operation.call(that, obj);

if (recursive) {
obj.forEachComponentContainer(operation);
}
} else if (Array.isArray(obj)) {
obj.forEach(function (element) {
applyOperationTo(element);
});
}
};

for (var memberName in this) {
if (this.hasOwnProperty(memberName)) {
applyOperationTo(this[memberName]);
}
}
},
reconnectComponents: function (operation, recursive) {
this.forEachComponent(function (component) {
component.disconnect();
Expand All @@ -545,6 +573,7 @@
},
isShifted: false,
shift: function () {
// Shift direct child Components
this.forEachComponent(function (component) {
// Controls for push type Buttons depend on getting reset to 0 when the
// Button is released for correct behavior. If there is a skin button
Expand All @@ -568,11 +597,18 @@
}
component.shift();
}
// Set isShifted for child ComponentContainers forEachComponent is iterating through recursively
this.isShifted = true;
});
}, false);

// Shift child ComponentContainers
this.forEachComponentContainer(function (container) {
container.shift();
}, false);

// Set isShifted for each ComponentContainer recursively
this.isShifted = true;
},
unshift: function () {
// Unshift direct child Components
this.forEachComponent(function (component) {
// Refer to comment in ComponentContainer.shift() above for explanation
if (typeof component.unshift === 'function') {
Expand All @@ -588,9 +624,15 @@
}
component.unshift();
}
// Set isShifted for child ComponentContainers forEachComponent is iterating through recursively
this.isShifted = false;
});
}, false);

// Unshift child ComponentContainers
this.forEachComponentContainer(function (container) {
container.unshift();
}, false);

// Unset isShifted for each ComponentContainer recursively
this.isShifted = false;
},
applyLayer: function (newLayer, reconnectComponents) {
if (reconnectComponents !== false) {
Expand Down
45 changes: 33 additions & 12 deletions src/engine/controls/loopingcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ LoopingControl::LoopingControl(QString group,
m_loopSamples.setValue(m_oldLoopSamples);
m_currentSample.setValue(0.0);
m_pActiveBeatLoop = NULL;

m_pRateControl = NULL;
//Create loop-in, loop-out, loop-exit, and reloop/exit ControlObjects
m_pLoopInButton = new ControlPushButton(ConfigKey(group, "loop_in"));
connect(m_pLoopInButton, &ControlObject::valueChanged,
Expand Down Expand Up @@ -682,6 +682,10 @@ void LoopingControl::setLoopOutToCurrentPosition() {
m_loopSamples.setValue(loopSamples);
}

void LoopingControl::setRateControl(RateControl* rateControl) {
m_pRateControl = rateControl;
}

void LoopingControl::slotLoopOut(double pressed) {
if (m_pTrack == nullptr) {
return;
Expand Down Expand Up @@ -1060,16 +1064,19 @@ void LoopingControl::slotBeatLoop(double beats, bool keepStartPoint, bool enable
newloopSamples.start = currentSample;
}
} else {
// loop_in is set to the previous beat if quantize is on. The
// closest beat might be ahead of play position which would cause a seek.
// TODO: If in reverse, should probably choose nextBeat.
// loop_in is set to the closest beat if quantize is on and the loop size is >= 1 beat.
// The closest beat might be ahead of play position and will cause a catching loop.
double prevBeat;
double nextBeat;
pBeats->findPrevNextBeats(currentSample, &prevBeat, &nextBeat);

if (m_pQuantizeEnabled->toBool() && prevBeat != -1) {
double beatLength = nextBeat - prevBeat;
double loopLength = beatLength * beats;

double closestBeat = pBeats->findClosestBeat(currentSample);
if (beats >= 1.0) {
newloopSamples.start = prevBeat;
newloopSamples.start = closestBeat;
} else {
// In case of beat length less then 1 beat:
// (| - beats, ^ - current track's position):
Expand All @@ -1078,15 +1085,29 @@ void LoopingControl::slotBeatLoop(double beats, bool keepStartPoint, bool enable
//
// If we press 1/2 beatloop we want loop from 50% to 100%,
// If I press 1/4 beatloop, we want loop from 50% to 75% etc
double beat_len = nextBeat - prevBeat;
double loops_per_beat = 1.0 / beats;
double beat_pos = currentSample - prevBeat;
int beat_frac =
static_cast<int>(floor((beat_pos / beat_len) *
loops_per_beat));
newloopSamples.start = prevBeat + beat_len / loops_per_beat * beat_frac;
double samplesSinceLastBeat = currentSample - prevBeat;

// find the previous beat fraction and check if the current position is closer to this or the next one
// place the new loop start to the closer one
double previousFractionBeat = prevBeat + floor(samplesSinceLastBeat / loopLength) * loopLength;
double samplesSinceLastFractionBeat = currentSample - previousFractionBeat;

if (samplesSinceLastFractionBeat <= (loopLength / 2.0)) {
newloopSamples.start = previousFractionBeat;
} else {
newloopSamples.start = previousFractionBeat + loopLength;
}
}

// If running reverse, move the loop one loop size to the left.
// Thus, the loops end will be closest to the current position
bool reverse = false;
if (m_pRateControl != NULL) {
reverse = m_pRateControl->isReverseButtonPressed();
}
if (reverse) {
newloopSamples.start -= loopLength;
}
} else {
newloopSamples.start = currentSample;
}
Expand Down
10 changes: 6 additions & 4 deletions src/engine/controls/loopingcontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
#include <QObject>
#include <QStack>

#include "preferences/usersettings.h"
#include "control/controlvalue.h"
#include "engine/controls/enginecontrol.h"
#include "track/track.h"
#include "engine/controls/ratecontrol.h"
#include "preferences/usersettings.h"
#include "track/beats.h"
#include "control/controlvalue.h"
#include "track/track.h"

#define MINIMUM_AUDIBLE_LOOP_SIZE 300 // In samples

Expand Down Expand Up @@ -50,7 +51,7 @@ class LoopingControl : public EngineControl {
double getSyncPositionInsideLoop(double dRequestedPlaypos, double dSyncedPlayPos);

void notifySeek(double dNewPlaypos) override;

void setRateControl(RateControl* rateControl);
bool isLoopingEnabled();

public slots:
Expand Down Expand Up @@ -129,6 +130,7 @@ class LoopingControl : public EngineControl {
ControlPushButton* m_pLoopHalveButton;
ControlPushButton* m_pLoopDoubleButton;
ControlObject* m_pSlipEnabled;
RateControl* m_pRateControl;
ControlObject* m_pPlayButton;

bool m_bLoopingEnabled;
Expand Down
7 changes: 7 additions & 0 deletions src/engine/controls/ratecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,3 +556,10 @@ void RateControl::resetRateTemp(void)
void RateControl::notifySeek(double playPos) {
m_pScratchController->notifySeek(playPos);
}

bool RateControl::isReverseButtonPressed() {
if (m_pReverseButton) {
return m_pReverseButton->toBool();
}
return false;
}
1 change: 1 addition & 0 deletions src/engine/controls/ratecontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class RateControl : public EngineControl {
static void setRateRampSensitivity(int);
static int getRateRampSensitivity();
void notifySeek(double dNewPlaypos) override;
bool isReverseButtonPressed();

public slots:
void slotReverseRollActivate(double);
Expand Down
12 changes: 9 additions & 3 deletions src/engine/enginebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,13 @@ EngineBuffer::EngineBuffer(const QString& group, UserSettingsPointer pConfig,
// quantization (alignment) of loop in/out positions and (hot)cues with
// beats.
QuantizeControl* quantize_control = new QuantizeControl(group, pConfig);
addControl(quantize_control);
m_pQuantize = ControlObject::getControl(ConfigKey(group, "quantize"));

// Create the Loop Controller
m_pLoopingControl = new LoopingControl(group, pConfig);
addControl(m_pLoopingControl);

addControl(quantize_control);
m_pQuantize = ControlObject::getControl(ConfigKey(group, "quantize"));

m_pEngineSync = pMixingEngine->getEngineSync();

m_pSyncControl = new SyncControl(group, pConfig, pChannel, m_pEngineSync);
Expand All @@ -198,9 +197,12 @@ EngineBuffer::EngineBuffer(const QString& group, UserSettingsPointer pConfig,
addControl(m_pVinylControlControl);
#endif

// Create the Rate Controller
m_pRateControl = new RateControl(group, pConfig);
// Add the Rate Controller
addControl(m_pRateControl);
// Looping Control needs Rate Control for Reverse Button
m_pLoopingControl->setRateControl(m_pRateControl);

// Create the BPM Controller
m_pBpmControl = new BpmControl(group, pConfig);
Expand Down Expand Up @@ -532,6 +534,10 @@ TrackPointer EngineBuffer::getLoadedTrack() const {
return m_pCurrentTrack;
}

bool EngineBuffer::isReverse() {
return m_reverse_old;
}

void EngineBuffer::ejectTrack() {
// clear track values in any case, this may fix Bug #1450424
//qDebug() << "EngineBuffer::ejectTrack()";
Expand Down
2 changes: 2 additions & 0 deletions src/engine/enginebuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ class EngineBuffer : public EngineObject {
bool getQueuedSeekPosition(double* pSeekPosition);
TrackPointer getLoadedTrack() const;

bool isReverse();

double getExactPlayPos();
double getVisualPlayPos();
double getTrackSamples();
Expand Down
4 changes: 2 additions & 2 deletions src/library/basesqltablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <QtDebug>
#include <QUrl>
#include <QTableView>

#include "library/basesqltablemodel.h"

Expand All @@ -21,6 +20,7 @@
#include "util/duration.h"
#include "util/assert.h"
#include "util/performancetimer.h"
#include "widget/wlibrarytableview.h"

static const bool sDebug = false;

Expand Down Expand Up @@ -1113,7 +1113,7 @@ QMimeData* BaseSqlTableModel::mimeData(const QModelIndexList &indexes) const {
}

QAbstractItemDelegate* BaseSqlTableModel::delegateForColumn(const int i, QObject* pParent) {
WLibraryTableView* pTableView = qobject_cast<WLibraryTableView*>(pParent);
auto* pTableView = qobject_cast<WLibraryTableView*>(pParent);
DEBUG_ASSERT(pTableView);

if (i == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_RATING)) {
Expand Down
24 changes: 12 additions & 12 deletions src/library/coverartdelegate.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#include <QTableView>
#include <QPainter>

#include "library/coverartdelegate.h"
#include "library/coverartcache.h"
#include "library/dao/trackschema.h"
#include "library/trackmodel.h"

#include "widget/wlibrarytableview.h"

#include "util/math.h"


CoverArtDelegate::CoverArtDelegate(WLibraryTableView* parent)
: TableItemDelegate(parent),
m_pTableView(parent),
Expand All @@ -25,16 +29,15 @@ CoverArtDelegate::CoverArtDelegate(WLibraryTableView* parent)

CoverArtCache* pCache = CoverArtCache::instance();
if (pCache) {
connect(pCache, SIGNAL(coverFound(const QObject*, const CoverInfoRelative&,
QPixmap, bool)),
this, SLOT(slotCoverFound(const QObject*, const CoverInfoRelative&,
QPixmap, bool)));
connect(pCache,
&CoverArtCache::coverFound,
this,
&CoverArtDelegate::slotCoverFound);
}

TrackModel* pTrackModel = NULL;
QTableView* pTableView = NULL;
if (QTableView *tableView = qobject_cast<QTableView*>(parent)) {
pTableView = tableView;
TrackModel* pTrackModel = nullptr;
QTableView* pTableView = qobject_cast<QTableView*>(parent);
if (pTableView) {
pTrackModel = dynamic_cast<TrackModel*>(pTableView->model());
}

Expand All @@ -56,9 +59,6 @@ CoverArtDelegate::CoverArtDelegate(WLibraryTableView* parent)
}
}

CoverArtDelegate::~CoverArtDelegate() {
}

void CoverArtDelegate::slotOnlyCachedCoverArt(bool b) {
m_bOnlyCachedCover = b;

Expand Down
Loading