diff --git a/source/funkin/save/Save.hx b/source/funkin/save/Save.hx index c68caad5f..6a4dd048c 100644 --- a/source/funkin/save/Save.hx +++ b/source/funkin/save/Save.hx @@ -108,10 +108,7 @@ abstract Save(RawSaveData) metronomeVolume: 1.0, hitsoundsEnabledPlayer: true, hitsoundsEnabledOpponent: true, - themeMusic: true, - instVolume: 1.0, - voicesVolume: 1.0, - playbackSpeed: 1.0, + themeMusic: true }, }; } @@ -365,40 +362,6 @@ abstract Save(RawSaveData) return this.optionsChartEditor.themeMusic; } - public var chartEditorInstVolume(get, set):Float; - - function get_chartEditorInstVolume():Float - { - if (this.optionsChartEditor.instVolume == null) this.optionsChartEditor.instVolume = 1.0; - - return this.optionsChartEditor.instVolume; - } - - function set_chartEditorInstVolume(value:Float):Float - { - // Set and apply. - this.optionsChartEditor.instVolume = value; - flush(); - return this.optionsChartEditor.instVolume; - } - - public var chartEditorVoicesVolume(get, set):Float; - - function get_chartEditorVoicesVolume():Float - { - if (this.optionsChartEditor.voicesVolume == null) this.optionsChartEditor.voicesVolume = 1.0; - - return this.optionsChartEditor.voicesVolume; - } - - function set_chartEditorVoicesVolume(value:Float):Float - { - // Set and apply. - this.optionsChartEditor.voicesVolume = value; - flush(); - return this.optionsChartEditor.voicesVolume; - } - public var chartEditorPlaybackSpeed(get, set):Float; function get_chartEditorPlaybackSpeed():Float diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index c9f1e4137..f74164554 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -106,7 +106,6 @@ import haxe.ui.components.Label; import haxe.ui.components.Button; import haxe.ui.components.NumberStepper; import haxe.ui.components.Slider; -import haxe.ui.components.VerticalSlider; import haxe.ui.components.TextField; import haxe.ui.containers.dialogs.CollapsibleDialog; import haxe.ui.containers.Frame; @@ -723,34 +722,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState return hitsoundsEnabledPlayer || hitsoundsEnabledOpponent; } - /** - * Sound multiplier for vocals and hitsounds on the player's side. - */ - var soundMultiplierPlayer(default, set):Float = 1.0; - - function set_soundMultiplierPlayer(value:Float):Float - { - soundMultiplierPlayer = value; - var vocalTargetVolume:Float = (menubarItemVolumeVocals.value ?? 100.0) / 100.0; - if (audioVocalTrackGroup != null) audioVocalTrackGroup.playerVolume = vocalTargetVolume * soundMultiplierPlayer; - - return soundMultiplierPlayer; - } - - /** - * Sound multiplier for vocals and hitsounds on the opponent's side. - */ - var soundMultiplierOpponent(default, set):Float = 1.0; - - function set_soundMultiplierOpponent(value:Float):Float - { - soundMultiplierOpponent = value; - var vocalTargetVolume:Float = (menubarItemVolumeVocals.value ?? 100.0) / 100.0; - if (audioVocalTrackGroup != null) audioVocalTrackGroup.opponentVolume = vocalTargetVolume * soundMultiplierOpponent; - - return soundMultiplierOpponent; - } - // Auto-save /** @@ -1703,14 +1674,24 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState var menubarItemVolumeInstrumental:Slider; /** - * The `Audio -> Vocal Volume` label. + * The `Audio -> Player Volume` label. */ - var menubarLabelVolumeVocals:Label; + var menubarLabelVolumeVocalsPlayer:Label; /** - * The `Audio -> Vocal Volume` slider. + * The `Audio -> Enemy Volume` label. */ - var menubarItemVolumeVocals:Slider; + var menubarLabelVolumeVocalsOpponent:Label; + + /** + * The `Audio -> Player Volume` slider. + */ + var menubarItemVolumeVocalsPlayer:Slider; + + /** + * The `Audio -> Enemy Volume` slider. + */ + var menubarItemVolumeVocalsOpponent:Slider; /** * The `Audio -> Playback Speed` label. @@ -2601,37 +2582,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState performCommand(new SetItemSelectionCommand([], currentSongChartEventData)); } } - - function setupSideSlider(x, y):VerticalSlider - { - var slider = new VerticalSlider(); - slider.allowFocus = false; - slider.x = x; - slider.y = y; - slider.width = NOTE_SELECT_BUTTON_HEIGHT; - slider.height = GRID_SIZE * 4; - slider.pos = slider.max; - slider.tooltip = "Slide to set the volume of sounds on this side."; - slider.zIndex = 110; - slider.styleNames = "sideSlider"; - add(slider); - - return slider; - } - - var sliderY = GRID_INITIAL_Y_POS + 34; - sliderVolumeOpponent = setupSideSlider(GRID_X_POS - 64, sliderY); - sliderVolumePlayer = setupSideSlider(buttonSelectEvent.x + buttonSelectEvent.width, sliderY); - - sliderVolumePlayer.onChange = event -> { - var volume:Float = event.value.toFloat() / 100.0; - soundMultiplierPlayer = volume; - } - - sliderVolumeOpponent.onChange = event -> { - var volume:Float = event.value.toFloat() / 100.0; - soundMultiplierOpponent = volume; - } } /** @@ -2870,15 +2820,17 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState menubarLabelVolumeInstrumental.text = 'Instrumental - ${Std.int(event.value)}%'; }; - menubarItemVolumeVocals.onChange = event -> { + menubarItemVolumeVocalsPlayer.onChange = event -> { var volume:Float = event.value.toFloat() / 100.0; - if (audioVocalTrackGroup != null) - { - audioVocalTrackGroup.playerVolume = volume * soundMultiplierPlayer; - audioVocalTrackGroup.opponentVolume = volume * soundMultiplierOpponent; - } - menubarLabelVolumeVocals.text = 'Voices - ${Std.int(event.value)}%'; - } + if (audioVocalTrackGroup != null) audioVocalTrackGroup.playerVolume = volume; + menubarLabelVolumeVocalsPlayer.text = 'Player - ${Std.int(event.value)}%'; + }; + + menubarItemVolumeVocalsOpponent.onChange = event -> { + var volume:Float = event.value.toFloat() / 100.0; + if (audioVocalTrackGroup != null) audioVocalTrackGroup.opponentVolume = volume; + menubarLabelVolumeVocalsOpponent.text = 'Enemy - ${Std.int(event.value)}%'; + }; menubarItemPlaybackSpeed.onChange = event -> { var pitch:Float = (event.value * 2.0) / 100.0; @@ -5734,7 +5686,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState // Reapply the volume. var instTargetVolume:Float = menubarItemVolumeInstrumental.value ?? 1.0; - var vocalTargetVolume:Float = menubarItemVolumeVocals.value ?? 1.0; + var vocalPlayerTargetVolume:Float = menubarItemVolumeVocalsPlayer.value ?? 1.0; + var vocalOpponentTargetVolume:Float = menubarItemVolumeVocalsOpponent.value ?? 1.0; if (audioInstTrack != null) { @@ -5743,8 +5696,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState } if (audioVocalTrackGroup != null) { - audioVocalTrackGroup.playerVolume = vocalTargetVolume * soundMultiplierPlayer; - audioVocalTrackGroup.opponentVolume = vocalTargetVolume * soundMultiplierOpponent; + audioVocalTrackGroup.playerVolume = vocalPlayerTargetVolume; + audioVocalTrackGroup.opponentVolume = vocalOpponentTargetVolume; } } @@ -5861,9 +5814,9 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState switch (noteData.getStrumlineIndex()) { case 0: // Player - if (hitsoundsEnabledPlayer) this.playSound(Paths.sound('chartingSounds/hitNotePlayer'), hitsoundVolume * soundMultiplierPlayer); + if (hitsoundsEnabledPlayer) this.playSound(Paths.sound('chartingSounds/hitNotePlayer'), hitsoundVolume); case 1: // Opponent - if (hitsoundsEnabledOpponent) this.playSound(Paths.sound('chartingSounds/hitNoteOpponent'), hitsoundVolume * soundMultiplierOpponent); + if (hitsoundsEnabledOpponent) this.playSound(Paths.sound('chartingSounds/hitNoteOpponent'), hitsoundVolume); } } }