Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
64 changes: 64 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
*.diff
*.log
*.o
*.orig
*.os
*.patch
!build/appveyor/NSIS.patch
*.pyc
*.rej
*_build
*~
.#*

dist32
dist64

src/mixxx.rc.include
src/mixxx.res

.sconf_temp
.sconsign.branch
.sconsign.dblite

*.sqlite

*.cfg
!/res/keyboard/*.cfg

cache

lib/*/*.a
lib/*/lib/*.a

mixxx
mixxx-test

src/test/test_data
src/test/golden_buffers/*.actual

res/qrc_mixxx.cc
res/developer_skins

*.wixobj
*.wixpdb
*.msi
*.mst
*.cab
build/wix/subdirs/*.wxs
# The following 2 files are autogenerated by scons at release time
# based on .tmpl template file for the second one.
build/wix/bundle/bundleloc.wxs
build/wix/ProductID.wxi

*.obj
*.pdb
lib/*/*.lib
lib/*/lib/*.lib

lib/qtscript-bytearray/*.cc

.idea
*.vscode
compile_commands.json

46 changes: 46 additions & 0 deletions res/controllers/Pioneer-DDJ-400-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,52 @@ PioneerDDJ400.vuMeterUpdate = function(value, group){

};


PioneerDDJ400.samplerModePadPressed = function(channel, control, value, status, group) {
if (value === 0) {
return; // ignore release
}

const isLoaded = engine.getValue(group, 'track_loaded') === 1;

if (!isLoaded) {
return;
}

engine.setValue(group, 'cue_gotoandplay', 1);

startSampleFlicker(status, control, group);
};

const TimersPioneerDDJ400 = {};

function startSampleFlicker(channel, control, group) {
var val = 0x7f;

stopFlicker(channel, control);
TimersPioneerDDJ400[channel][control] = engine.beginTimer(250, function() {
val = 0x7f - val;

midi.sendShortMsg(channel, control, val);

const isPlaying = engine.getValue(group, 'play') === 1;

if (!isPlaying) {
stopFlicker(channel, control);
midi.sendShortMsg(channel, control, 0x7f);
}
});
}

function stopFlicker(channel, control) {
TimersPioneerDDJ400[channel] = TimersPioneerDDJ400[channel] || {};

if (TimersPioneerDDJ400[channel][control] !== undefined) {
engine.stopTimer(TimersPioneerDDJ400[channel][control]);
TimersPioneerDDJ400[channel][control] = undefined;
}
}

PioneerDDJ400.shutdown = function() {
midi.sendShortMsg(0xB0, 0x02, 0); // reset vumeter
midi.sendShortMsg(0xB1, 0x02, 0); // reset vumeter
Expand Down
Loading