Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/2.5' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Jul 14, 2024
2 parents e115f03 + ba221b0 commit d61841c
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 20 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ For help using Mixxx, there are a variety of options:

- [Mixxx manual][manual]
- [Mixxx wiki][wiki]
- [Frequently Asked Questions][FAQ]
- [Hardware Compatibility]
- [Creating Skins]

Expand Down Expand Up @@ -103,7 +102,6 @@ license.
[blog]: https://mixxx.org/news/
[manual]: https://manual.mixxx.org/
[wiki]: https://github.com/mixxxdj/mixxx/wiki
[faq]: https://github.com/mixxxdj/mixxx/wiki/Faq
[visualstudio2019]: https://docs.microsoft.com/visualstudio/install/install-visual-studio?view=vs-2019
[easybugs]: https://github.com/mixxxdj/mixxx/issues?q=is%3Aopen+is%3Aissue+label%3Aeasy
[creating skins]: https://mixxx.org/wiki/doku.php/Creating-Skins
Expand Down
25 changes: 12 additions & 13 deletions res/controllers/Numark-Scratch-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,35 @@ var NumarkScratch = {};

/*
* USER CONFIGURABLE SETTINGS.
* Change settings in the preferences
*/

// Defines the Beatloop Roll sizes for the 4 pads, for available values see:
// https://manual.mixxx.org/2.4/en/chapters/appendix/mixxx_controls.html#control-[ChannelN]-beatlooproll_X_activate
// https://manual.mixxx.org/latest/en/chapters/appendix/mixxx_controls.html#control-[ChannelN]-beatlooproll_X_activate
// Default: [0.25, 0.5, 1, 2]
NumarkScratch.autoLoopSizes = [
"0.25",
"0.5",
"1",
"2",
engine.getSetting("beatLoopRollsSize1") || 0.25,
engine.getSetting("beatLoopRollsSize2") || 0.5,
engine.getSetting("beatLoopRollsSize3") || 1,
engine.getSetting("beatLoopRollsSize4") || 2,
];

// Defines how the Loop Encoder functions.
// If 'true' the Encoder scrolls the library/loads track. Shift + Encoder manages looping.
// If 'false' the Encoder manages looping. Shift + Encoder scrolls the library/loads track (Serato default).
// Default: false
NumarkScratch.invertLoopEncoderFunction = false;
NumarkScratch.invertLoopEncoderFunction = !!engine.getSetting("invertLoopEncoderFunction");

// Defines the bightness of button LEDs when they inactive.
// '0x00' sets the LEDSs to completely off. '0x01 sets the LEDs to dim.
// Default: 0x01 (dim)
NumarkScratch.LOW_LIGHT = 0x01;
// Define whether or not to keep LEDs dimmed if they are inactive.
// 0x01 ('true' in UI) will keep them dimmed, 0x00 ('false' in UI) will turn them off. Default: 0x01 ('true')
NumarkScratch.noLight = 0x00;
NumarkScratch.dimLight = 0x01;
components.Button.prototype.off = engine.getSetting("inactiveLightsAlwaysBacklit") ? NumarkScratch.dimLight : NumarkScratch.noLight;

/*
* CODE
*/


components.Button.prototype.off = NumarkScratch.LOW_LIGHT;

NumarkScratch.init = function() {
// Initialize component containers
NumarkScratch.deck = new components.ComponentContainer();
Expand Down
96 changes: 93 additions & 3 deletions res/controllers/Numark-Scratch.midi.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,102 @@
<?xml version='1.0' encoding='utf-8'?>
<MixxxControllerPreset schemaVersion="1" mixxxVersion="2.3.0+">
<MixxxControllerPreset schemaVersion="1" mixxxVersion="2.5.0+">
<info>
<name>Numark Scratch</name>
<author>Al Hadebe(NotYourAverageAl)</author>
<description>Mapping for the Numark Scratch Mixer</description>
<forums>NumarkScratch</forums>
<manual>NumarkScratch</manual>
<forums>https://mixxx.discourse.group/t/numark-scratch-mapping/25186</forums>
<manual>https://manual.mixxx.org/latest/en/hardware/controllers/numark_scratch</manual>
</info>
<settings>
<group label="Alternative Mapping">
<option
variable="invertLoopEncoderFunction"
type="boolean"
default="false"
label="Invert the Loop Encoder functionality">
<description>
By default the Encoder manages looping and Shift + Encoder scrolls the library/loads track.
If this option is selected the Encoder scrolls the library/loads track and Shift + Encoder manages looping.
</description>
</option>
</group>
<group label="Mixer Lighting">
<option
variable="inactiveLightsAlwaysBacklit"
type="boolean"
default="true"
label="Keep LEDs dimmed instead of off when inactive">
<description>
This will consistently ensure buttons are backlit, which can be helpful in low-light environments.
Please note the PAD MODE and CUE buttons are hardware controlled and always dim when inactive.
</description>
</option>
</group>
<group label="Beatloop Roll Size">
<row orientation="vertical">
<option
variable="beatLoopRollsSize1"
type="enum"
label="First Pad">
<value label="1/32">0.03125</value>
<value label="1/16">0.0625</value>
<value label="1/8">0.125</value>
<value label="1/4" default="true">0.25</value>
<value label="1/2">0.5</value>
<value label="1">1</value>
<value label="2">2</value>
<value label="4">4</value>
<value label="8">8</value>
<description>The first pad.</description>
</option>
<option
variable="beatLoopRollsSize2"
type="enum"
label="Second Pad">
<value label="1/32">0.03125</value>
<value label="1/16">0.0625</value>
<value label="1/8">0.125</value>
<value label="1/4">0.25</value>
<value label="1/2" default="true">0.5</value>
<value label="1">1</value>
<value label="2">2</value>
<value label="4">4</value>
<value label="8">8</value>
<description>The second pad.</description>
</option>
<option
variable="beatLoopRollsSize3"
type="enum"
label="Third Pad">
<value label="1/32">0.03125</value>
<value label="1/16">0.0625</value>
<value label="1/8">0.125</value>
<value label="1/4">0.25</value>
<value label="1/2">0.5</value>
<value label="1" default="true">1</value>
<value label="2">2</value>
<value label="4">4</value>
<value label="8">8</value>
<description>The third pad.</description>
</option>
<option
variable="beatLoopRollsSize4"
type="enum"
label="Fourth Pad">
<value label="1/32">0.03125</value>
<value label="1/16">0.0625</value>
<value label="1/8">0.125</value>
<value label="1/4">0.25</value>
<value label="1/2">0.5</value>
<value label="1">1</value>
<value label="2" default="true">2</value>
<value label="4">4</value>
<value label="8">8</value>
<description>The fourth pad.</description>
</option>
</row>
</group>
</settings>
<controller id="Numark-Scratch">
<scriptfiles>
<file functionprefix="" filename="lodash.mixxx.js"/>
Expand Down
3 changes: 1 addition & 2 deletions res/controllers/midi-components-0.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,7 @@
if (this.max === Component.prototype.max) {
this.max = (1 << 14) - 1;
}
value = (value << 7) + (this._firstLSB ? this._firstLSB : 0);
this.input(channel, control, value, status, group);
this.input(channel, control, (value << 7) + (this._firstLSB ? this._firstLSB : 0), status, group);
}
this.MSB = value;
},
Expand Down
5 changes: 5 additions & 0 deletions src/library/tabledelegates/multilineeditdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ MultiLineEditor::MultiLineEditor(QWidget* pParent,
// Add event filter to catch right-clicks and key presses, see eventFilter()
installEventFilter(this);

// Explicitly set the font, otherwise the font might be reset
// after first edit.
const auto font = m_pTableView->font();
setFont(font);

// Adjust size to fit content and maybe shift vertically to fit into the
// library view. documentSizeChanged() is emitted when the layout has been
// adjusted according to text changes, incl. initial fill.
Expand Down

0 comments on commit d61841c

Please sign in to comment.