Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/2.3' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed May 13, 2022
2 parents 495225f + 839bf4b commit d5da303
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions lib/qm-dsp/base/KaiserWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ KaiserWindow::parametersForTransitionWidth(double attenuation,
{
Parameters p;
p.length = 1 + (attenuation > 21.0 ?
ceil((attenuation - 7.95) / (2.285 * transition)) :
ceil(5.79 / transition));
std::ceil((attenuation - 7.95) / (2.285 * transition)) :
std::ceil(5.79 / transition));
p.beta = (attenuation > 50.0 ?
0.1102 * (attenuation - 8.7) :
attenuation > 21.0 ?
Expand Down
2 changes: 1 addition & 1 deletion lib/qm-dsp/dsp/rateconversion/Resampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Resampler::initialise(double snr, double bandwidth)
// the centre of the filter.

int h = int(m_filterLength / 2);
int n = ceil(double(m_filterLength - h) / outputSpacing);
int n = static_cast<int>(std::ceil(double(m_filterLength - h) / outputSpacing));

m_phase = (h + n * outputSpacing) % inputSpacing;

Expand Down
4 changes: 2 additions & 2 deletions lib/qm-dsp/dsp/tempotracking/TempoTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ double TempoTrack::tempoMM(double* ACF, double* weight, int tsig)
double log2PeriodRatio = log( static_cast<double>(i)/
static_cast<double>(j) ) /
log(2.0);
rcfMat[i][j] = ( abs(1.0-abs(log2PeriodRatio)) );
rcfMat[i][j] = ( fabs(1.0-fabs(log2PeriodRatio)) );
rcfMat[i][j] += ( 0.01*( 1./(m_tempoScratch[i]+m_tempoScratch[j]) ) );
}
}
Expand Down Expand Up @@ -401,7 +401,7 @@ void TempoTrack::stepDetect( double* periodP, double* periodG, int currentIdx, i
double stepthresh = 1 * 3.9017;

if( *flag ) {
if(abs(periodG[ currentIdx ] - periodP[ currentIdx ]) > stepthresh) {
if(fabs(periodG[ currentIdx ] - periodP[ currentIdx ]) > stepthresh) {
// do nuffin'
}
} else {
Expand Down
19 changes: 9 additions & 10 deletions res/controllers/Denon-MC7000-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,15 @@ MC7000.PadButtons = function(channel, control, value, status, group) {
var deckOffset = deckNumber - 1;
var i, j;

// The following modes are currently unhandled and could be
// added as if-branches in the future:

// - MC7000.PADModeCueLoop
// - MC7000.PADModeFlip
// - MC7000.PADModeSlicerLoop
// - MC7000.PADModeVelSamp
// - MC7000.PADModePitch

// activate and clear Hot Cues
if (MC7000.PADModeCue[deckNumber] && engine.getValue(group, "track_loaded") === 1) {
for (i = 1; i <= 8; i++) {
Expand All @@ -512,10 +521,6 @@ MC7000.PadButtons = function(channel, control, value, status, group) {
midi.sendShortMsg(0x94 + deckOffset, 0x1C + i - 1, MC7000.padColor.hotcueoff);
}
}
} else if (MC7000.PADModeCueLoop[deckNumber]) {
return;
} else if (MC7000.PADModeFlip[deckNumber]) {
return;
} else if (MC7000.PADModeRoll[deckNumber]) {
// TODO(all): check for actual beatloop_size and apply back after a PAD Roll
i = control - 0x14;
Expand Down Expand Up @@ -560,8 +565,6 @@ MC7000.PadButtons = function(channel, control, value, status, group) {
} else {
midi.sendShortMsg(0x94 + deckOffset, control, MC7000.padColor.sliceron);
}
} else if (MC7000.PADModeSlicerLoop[deckNumber]) {
return;
} else if (MC7000.PADModeSampler[deckNumber]) {
for (i = 1; i <= 8; i++) {
if (control === 0x14 + i - 1 && value >= 0x01) {
Expand All @@ -588,10 +591,6 @@ MC7000.PadButtons = function(channel, control, value, status, group) {
}
}
}
} else if (MC7000.PADModeVelSamp[deckNumber]) {
return;
} else if (MC7000.PADModePitch[deckNumber]) {
return;
}
};

Expand Down

0 comments on commit d5da303

Please sign in to comment.