feat: bật tính năng ghi midi note trong piano roll tab
This commit is contained in:
@@ -5483,9 +5483,8 @@ const PianoRollTabEditor = ({ st, zoom, bpm, viewportWidth, onClose, onUpdateNot
|
||||
const [selectedScale, setSelectedScale] = React.useState(null);
|
||||
const selectedScaleRef = React.useRef(null);
|
||||
selectedScaleRef.current = selectedScale;
|
||||
const [snapToScale, setSnapToScale] = React.useState(true);
|
||||
const snapToScaleRef = React.useRef(true);
|
||||
snapToScaleRef.current = snapToScale;
|
||||
snapToScaleRef.current = st.snapToScale !== undefined ? st.snapToScale : true;
|
||||
const [scaleMenuPos, setScaleMenuPos] = React.useState(null);
|
||||
const scaleMenuOriginRef = React.useRef(null);
|
||||
const [showCC, setShowCC] = React.useState(true);
|
||||
@@ -5597,8 +5596,8 @@ const PianoRollTabEditor = ({ st, zoom, bpm, viewportWidth, onClose, onUpdateNot
|
||||
}, /*#__PURE__*/React.createElement("span", {
|
||||
className: "text-zinc-500 font-semibold"
|
||||
}, "Snap to Scale"), /*#__PURE__*/React.createElement("button", {
|
||||
onClick: () => setSnapToScale(!snapToScale),
|
||||
className: `w-7 h-4 rounded-full transition-colors relative ${snapToScale ? 'bg-yellow-600' : 'bg-zinc-700'}`,
|
||||
onClick: () => setSubTabs(prev => prev.map(s => s.id === st.id ? { ...s, snapToScale: !(s.snapToScale !== undefined ? s.snapToScale : true) } : s)),
|
||||
className: `w-7 h-4 rounded-full transition-colors relative ${(st.snapToScale !== undefined ? st.snapToScale : true) ? 'bg-yellow-600' : 'bg-zinc-700'}`,
|
||||
style: { padding: 0 }
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: `w-3 h-3 rounded-full bg-white absolute top-0.5 transition-transform ${snapToScale ? 'translate-x-3.5' : 'translate-x-0.5'}`
|
||||
@@ -9841,7 +9840,7 @@ const App = () => {
|
||||
midiRec.tempTabId = tab.id;
|
||||
pianoRollRecorderRef.current = midiRec;
|
||||
activeMIDIRecordersRef.current['piano_roll'] = midiRec;
|
||||
if (selectedMidiInputId) midiRec.setSelectedMidiInputId(selectedMidiInputId);
|
||||
if (selectedMidiInputId) midiRec.selectedMidiInputId = selectedMidiInputId;
|
||||
setRecStartTimelineTime(startTime);
|
||||
recordingStartTimeRef.current = startTime;
|
||||
setRecordingState('RECORDING');
|
||||
|
||||
Reference in New Issue
Block a user