fix: snap default '1' + Power button reads masterConnected directly
- snapValue default '1' (was 'free'), piano roll snapVal default '1' (was '1/16') - Power button: remove shared isFxActive, use masteringSettings.masterConnected
This commit is contained in:
@@ -989,18 +989,16 @@ const MasterStripConsole = ({ masterVolume, setMasterVolume, showMasteringModal,
|
||||
),
|
||||
React.createElement("button", {
|
||||
id: "fxBtn",
|
||||
className: "btn-daw h-[18px] rounded font-extrabold text-[10px] transition-all" + (isFxActive ? " btn-teal-active" : ""),
|
||||
className: "btn-daw h-[18px] rounded font-extrabold text-[10px] transition-all",
|
||||
onClick: function() { setShowMasteringModal(true); },
|
||||
title: "Mở MASTERING PANEL để chỉnh sửa"
|
||||
}, "FX"),
|
||||
React.createElement("button", {
|
||||
id: "powerBtn",
|
||||
className: "btn-daw h-[18px] rounded text-xs transition-all" + (isFxActive ? " btn-teal-active" : ""),
|
||||
className: "btn-daw h-[18px] rounded text-xs transition-all" + (isMasterActive ? " btn-teal-active" : ""),
|
||||
onClick: function() {
|
||||
var newActive = !isFxActive;
|
||||
setIsFxActive(newActive);
|
||||
if (setMasteringSettings) {
|
||||
setMasteringSettings(function(prev) { return Object.assign({}, prev, { isBypassed: !newActive, masterConnected: newActive }); });
|
||||
setMasteringSettings(function(prev) { return Object.assign({}, prev, { isBypassed: prev.masterConnected ? false : true, masterConnected: !prev.masterConnected }); });
|
||||
}
|
||||
},
|
||||
title: "Bật/Tắt MASTERING PANEL Bypass"
|
||||
@@ -5789,7 +5787,7 @@ Ví dụ: Nhạc phim epic, dàn nhạc giao hưởng, tempo 130 BPM, giọng Cm
|
||||
|
||||
const PianoRollTabEditor = ({ st, zoom, bpm, viewportWidth, activeTracks, onClose, onUpdateNotes, onSaveNotes, setSubTabs, onPlayPause, onStop, isPlaying, playPreviewNote, showToast, midiDevices, recordingState, recTempMidiNotes, onRecord, selectedMidiInputId, onMidiInputSelect, activeMidiPitches, onInstrumentSelect, onRescheduleMidi, onSeekPlayhead }) => {
|
||||
const [activeRollTool, setActiveRollTool] = React.useState('select');
|
||||
const [snapVal, setSnapVal] = React.useState('1/16');
|
||||
const [snapVal, setSnapVal] = React.useState('1');
|
||||
const [ccMode, setCcMode] = React.useState('velocity');
|
||||
const [rollZoom, setRollZoom] = React.useState(60); // local horizontal zoom factor
|
||||
const [aiBarStart, setAiBarStart] = React.useState(0);
|
||||
@@ -9043,7 +9041,7 @@ const App = () => {
|
||||
}
|
||||
};
|
||||
const [activeTool, setActiveTool] = useState('select'); // 'select' | 'grab' | 'razor'
|
||||
const [snapValue, setSnapValue] = useState('free'); // 'free', '1', '1/2', '1/4', '1/8', '1/16', '1/32'
|
||||
const [snapValue, setSnapValue] = useState('1'); // 'free', '1', '1/2', '1/4', '1/8', '1/16', '1/32'
|
||||
|
||||
const snapTime = (time, snapVal, bpmVal) => {
|
||||
if (snapVal === 'free') return time;
|
||||
|
||||
Reference in New Issue
Block a user