Skip to content

Commit c9b886c

Browse files
committed
Divide column settings into Instrument, Timing, and MIDI Effects tabs
1 parent 2cd2ccd commit c9b886c

9 files changed

Lines changed: 74 additions & 43 deletions

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Bug fixes:
2424

2525
Other:
2626

27+
* Divide column settings into Instrument, Timing, and MIDI Effects tabs
28+
2729
2.0.0
2830
=====
2931

src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ set(QML_SOURCE_FILES
224224
${QML_BASE_DIR}/Dialogs/AddMidiCcSettingDialog.qml
225225
${QML_BASE_DIR}/Dialogs/AddPitchBendAutomationDialog.qml
226226
${QML_BASE_DIR}/Dialogs/ColumnSettingsDialog.qml
227+
${QML_BASE_DIR}/Dialogs/ColumnSettingsDialog_InstrumentSettings.qml
227228
${QML_BASE_DIR}/Dialogs/ColumnSettingsDialog_MidiEffects.qml
229+
${QML_BASE_DIR}/Dialogs/ColumnSettingsDialog_TimingSettings.qml
228230
${QML_BASE_DIR}/Dialogs/DelayCalculatorDialog.qml
229231
${QML_BASE_DIR}/Dialogs/DeleteUnusedPatternsDialog.qml
230232
${QML_BASE_DIR}/Dialogs/EditMidiCcAutomationsDelegate.qml

src/common/constants.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ QString webSiteUrl();
3838
size_t defaultPatternLineCount();
3939
size_t defaultTrackCount();
4040

41+
int transposeMin();
42+
int transposeMax();
43+
4144
namespace NahdXml {
4245

4346
QString xmlKeyFileFormatVersion();

src/view/qml/Constants.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ QtObject {
1616
readonly property int trackBorderFocusedWidth: 2
1717
readonly property int trackHeaderHeight: 40
1818

19+
readonly property int transposeMin: -48
20+
readonly property int transposeMax: 48
21+
1922
readonly property int positionBarBorderWidth: 1
2023
readonly property double positionBarOpacity: 0.25
2124
}

src/view/qml/Dialogs/ColumnSettingsDialog.qml

Lines changed: 47 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ Dialog {
1111
title: "<strong>" + qsTr("Column settings for track %1, column %2").arg(columnSettingsModel.trackIndex + 1).arg(columnSettingsModel.columnIndex + 1) + "</strong>"
1212
modal: true
1313
function initialize() {
14-
delaySpinBox.value = columnSettingsModel.delay;
15-
transposeSpinBox.value = columnSettingsModel.transpose;
14+
instrumentSettings.initialize();
15+
timingSettings.initialize();
1616
midiEffects.initialize();
17+
tabBar.currentIndex = 0;
1718
}
1819
function saveSettings() {
1920
columnSettingsModel.save();
@@ -42,51 +43,60 @@ Dialog {
4243
anchors.fill: parent
4344
spacing: 10
4445

45-
GroupBox {
46-
title: qsTr("General")
47-
Layout.fillWidth: true
46+
StackLayout {
47+
height: parent.height - tabBar.height - parent.spacing
4848
width: parent.width
49+
currentIndex: tabBar.currentIndex
4950

50-
RowLayout {
51-
spacing: 10
52-
Label {
53-
text: qsTr("Transpose:")
54-
}
55-
SpinBox {
56-
id: transposeSpinBox
57-
from: -48
58-
to: 48
59-
editable: true
60-
Keys.onReturnPressed: focus = false
61-
onValueModified: columnSettingsModel.transpose = value
51+
ScrollView {
52+
id: instrumentScrollView
53+
clip: true
54+
ScrollBar.vertical.policy: ScrollBar.AsNeeded
55+
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
56+
rightPadding: 10
57+
ColumnSettingsDialog_InstrumentSettings {
58+
id: instrumentSettings
59+
width: instrumentScrollView.availableWidth
6260
}
6361
}
64-
}
6562

66-
GroupBox {
67-
title: qsTr("Timing")
68-
Layout.fillWidth: true
69-
width: parent.width
70-
71-
RowLayout {
72-
spacing: 10
73-
Label {
74-
text: qsTr("Delay (ms):")
63+
ScrollView {
64+
id: timingScrollView
65+
clip: true
66+
ScrollBar.vertical.policy: ScrollBar.AsNeeded
67+
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
68+
rightPadding: 10
69+
ColumnSettingsDialog_TimingSettings {
70+
id: timingSettings
71+
width: timingScrollView.availableWidth
7572
}
76-
SpinBox {
77-
id: delaySpinBox
78-
from: -10000
79-
to: 10000
80-
editable: true
81-
Keys.onReturnPressed: focus = false
82-
onValueModified: columnSettingsModel.delay = value
73+
}
74+
75+
ScrollView {
76+
id: midiEffectsScrollView
77+
clip: true
78+
ScrollBar.vertical.policy: ScrollBar.AsNeeded
79+
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
80+
rightPadding: 10
81+
ColumnSettingsDialog_MidiEffects {
82+
id: midiEffects
83+
width: midiEffectsScrollView.availableWidth
8384
}
8485
}
8586
}
8687

87-
ColumnSettingsDialog_MidiEffects {
88-
id: midiEffects
89-
Layout.fillWidth: true
88+
TabBar {
89+
id: tabBar
90+
width: parent.width
91+
TabButton {
92+
text: qsTr("Instrument")
93+
}
94+
TabButton {
95+
text: qsTr("Timing")
96+
}
97+
TabButton {
98+
text: qsTr("MIDI Effects")
99+
}
90100
}
91101
}
92102

src/view/qml/Dialogs/TrackSettingsDialog_InstrumentSettings.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ ColumnLayout {
245245
}
246246
SpinBox {
247247
id: transposeSpinBox
248-
from: -24
249-
to: 24
248+
from: Constants.transposeMin
249+
to: Constants.transposeMax
250250
editable: true
251251
Layout.column: 2
252252
Layout.row: 5

src/view/qml/Editor/MainContextMenu_Column.qml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import "../Components"
66
Menu {
77
title: qsTr("Column")
88
width: rootItem.width
9+
Action {
10+
text: qsTr("Settings")
11+
onTriggered: UiService.requestColumnSettingsDialog(editorService.position.track, editorService.position.column)
12+
}
13+
MenuSeparator {}
914
Action {
1015
text: qsTr("Cut")
1116
shortcut: "Alt+F3"

src/view/qml/Editor/MainContextMenu_Track.qml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import "../Components"
66
Menu {
77
title: qsTr("Track")
88
width: rootItem.width
9+
Action {
10+
text: qsTr("Settings")
11+
onTriggered: UiService.requestTrackSettingsDialog(editorService.position.track)
12+
}
13+
MenuSeparator {}
914
Action {
1015
text: qsTr("Cut")
1116
shortcut: "Shift+F3"

src/view/qml/Manual.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,15 @@ <h3 style="color: orange;">Transposition</h3>
121121

122122
<h2 style="color: orange; border-bottom: 1px solid #444; margin-top: 20px;">Advanced Features</h2>
123123
<h3 style="color: orange;">Column Settings</h3>
124-
<p>Accessed by <strong>right-clicking</strong> a note column and selecting <strong>Column settings</strong>, this dialog allows you to fine-tune the behavior of individual columns.</p>
124+
<p>Accessed by clicking the <strong>wheel icon</strong> in the column header or by <strong>right-clicking</strong> a note column and selecting <strong>Column settings</strong>, this dialog allows you to fine-tune the behavior of individual columns using three tabs:</p>
125125
<ul>
126-
<li><strong>Delay (ms)</strong>: Shift all notes in the column forward or backward in time.</li>
127-
<li><strong>Transpose</strong>: Transpose all notes in the column. This value is added to the track-level transpose.</li>
126+
<li><strong>Instrument</strong>: Set the <strong>Transpose</strong> value for all notes in the column. This value is added to the track-level transpose.</li>
127+
<li><strong>Timing</strong>: Adjust the <strong>Delay (ms)</strong> to shift all notes in the column forward or backward in time.</li>
128+
<li><strong>MIDI Effects</strong>: Manage <strong>Chord Automation</strong> and the <strong>Arpeggiator</strong> for the column.</li>
128129
</ul>
129130

130131
<h3 style="color: orange;">Chord Automation & Arpeggiator</h3>
131-
<p>Located in the <strong>Column Settings</strong>, these tools allow you to generate complex harmony and movement from a single note.</p>
132+
<p>Located in the <strong>MIDI Effects</strong> tab of the Column Settings, these tools allow you to generate complex harmony and movement from a single note.</p>
132133
<ul>
133134
<li><strong>Chord Automation</strong>: Set semi-tone offsets for up to three additional notes relative to your root note. Each chord note has its own velocity and delay settings, allowing for thick, humanized chords.</li>
134135
<li><strong>Arpeggiator</strong>: When enabled, the chord notes (including the root note) are played sequentially.

0 commit comments

Comments
 (0)