Skip to content

Commit

Permalink
Add rendergraph waveform
Browse files Browse the repository at this point in the history
  • Loading branch information
acolombier committed Nov 25, 2024
1 parent f98dc08 commit acd0993
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 9 deletions.
2 changes: 1 addition & 1 deletion res/controllers/TraktorKontrolS4MK3Screens.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Mixxx.Controls 1.0 as MixxxControls

import S4MK3 as S4MK3

Mixxx.Controller {
Mixxx.ControllerScreen {
id: root

required property string screenId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ QtObject {
property color cyan: "#00FFFF"
property color turquoise: "#40e0d0"
property color blue: "#0080FF"
property color plum: "#dda0dd"
property color plum: "#ff7eff"
property color violet: "#ee82ee"
property color purple: "#9f00c5"
property color magenta: "#ff6fff"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import '../Widgets' as Widgets
import '../Overlays' as Overlays
import '../ViewModels' as ViewModels

import "../../../../../qml/" as Skin
import Mixxx 1.0 as Mixxx
import Mixxx.Controls 1.0 as MixxxControls

Item {
id: view
Expand All @@ -31,20 +32,168 @@ Item {
// WAVEFORM Position
//------------------------------------------------------------------------------------------------------------------

Skin.WaveformRow {
Mixxx.ControlProxy {
id: scratchPositionEnableControl

group: root.group
key: "scratch_position_enable"
}

Mixxx.ControlProxy {
id: scratchPositionControl

group: root.group
key: "scratch_position"
}

Mixxx.ControlProxy {
id: wheelControl

group: root.group
key: "wheel"
}

Mixxx.ControlProxy {
id: rateRatioControl

group: root.group
key: "rate_ratio"
}

Mixxx.ControlProxy {
id: zoomControl

group: root.group
key: "waveform_zoom"
}

MixxxControls.WaveformDisplay {
id: singleWaveform
group: `[Channel${view.deckId}]`
x: 0
width: 316
// height: (settings.alwaysShowTempoInfo || deckInfo.adjustEnabled ? (settings.hideStripe ? content.waveformHeight + display.secondRowHeight-51 : content.waveformHeight-38) : (!deckInfo.showBPMInfo ? (settings.hideStripe ? content.waveformHeight + display.secondRowHeight-13 : content.waveformHeight) : (settings.hideStripe ? content.waveformHeight + display.secondRowHeight-51 : content.waveformHeight-38))) + (settings.hidePhase && settings.hidePhrase ? 16 : 0) + (!settings.hidePhase && !settings.hidePhrase ? -16 : 0)
height: view.height

shader.axesColor: 'transparent'

zoomControlRatio: 100
Behavior on height { PropertyAnimation { duration: 90} }
// anchors.left: parent.left
// anchors.top: phase.bottom
anchors.fill: parent
zoom: zoomControl.value
backgroundColor: "#36000000"

Mixxx.WaveformRendererEndOfTrack {
color: 'blue'
}

Mixxx.WaveformRendererPreroll {
color: '#998977'
}

Mixxx.WaveformRendererMarkRange {
// <!-- Loop -->
Mixxx.WaveformMarkRange {
startControl: "loop_start_position"
endControl: "loop_end_position"
enabledControl: "loop_enabled"
color: '#00b400'
opacity: 0.7
disabledColor: '#FFFFFF'
disabledOpacity: 0.6
}
// <!-- Intro -->
Mixxx.WaveformMarkRange {
startControl: "intro_start_position"
endControl: "intro_end_position"
color: '#2c5c9a'
opacity: 0.6
durationTextColor: '#ffffff'
durationTextLocation: 'after'
}
// <!-- Outro -->
Mixxx.WaveformMarkRange {
startControl: "outro_start_position"
endControl: "outro_end_position"
color: '#2c5c9a'
opacity: 0.6
durationTextColor: '#ffffff'
durationTextLocation: 'before'
}
}

Mixxx.WaveformRendererRGB {
axesColor: '#00ffffff'
lowColor: 'red'
midColor: 'green'
highColor: 'blue'
}

Mixxx.WaveformRendererStem { }

Mixxx.WaveformRendererBeat {
color: '#cfcfcf'
}

Mixxx.WaveformRendererMark {
playMarkerColor: 'cyan'
playMarkerBackground: 'transparent'
defaultMark: Mixxx.WaveformMark {
align: "bottom|right"
color: "#FF0000"
textColor: "#FFFFFF"
text: " %1 "
}

untilMark.showTime: true
untilMark.showBeats: true
untilMark.align: Mixxx.WaveformUntilMark.AlignCenter
untilMark.textSize: 14

Mixxx.WaveformMark {
control: "cue_point"
text: 'C'
align: 'top|right'
color: 'red'
textColor: '#FFFFFF'
}
Mixxx.WaveformMark {
control: "loop_start_position"
text: ''
align: 'top|left'
color: 'green'
textColor: '#FFFFFF'
}
Mixxx.WaveformMark {
control: "loop_end_position"
align: 'bottom|right'
color: 'green'
textColor: '#FFFFFF'
}
Mixxx.WaveformMark {
control: "intro_start_position"
align: 'top|right'
color: 'blue'
textColor: '#FFFFFF'
}
Mixxx.WaveformMark {
control: "intro_end_position"
text: ''
align: 'top|left'
color: 'blue'
textColor: '#FFFFFF'
}
Mixxx.WaveformMark {
control: "outro_start_position"
text: ''
align: 'top|right'
color: 'blue'
textColor: '#FFFFFF'
}
Mixxx.WaveformMark {
control: "outro_end_position"
align: 'top|left'
color: 'blue'
textColor: '#FFFFFF'
}
}
}

//--------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit acd0993

Please sign in to comment.