Skip to content

Commit

Permalink
realtime feedback also on addScene when assigning midi
Browse files Browse the repository at this point in the history
  • Loading branch information
YeonV committed Oct 10, 2024
1 parent 2c931fe commit 8196f53
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Dialogs/SceneDialogs/EditSceneDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ const EditSceneDialog = () => {
const newBtnNumber = parseInt(midiActivate?.split('buttonNumber: ')[1]);
if (newBtnNumber > -1) {
setTimeout(() => {
if (!currentBtnNumber) {
output.send([0x92, newBtnNumber, 57])
if (lastButton.current !== newBtnNumber) {
output.send([0x90, lastButton.current, lpType === 'LPS' ? 0x0C : 0])
}
}
if (currentBtnNumber > -1 && newBtnNumber !== currentBtnNumber) {
output.send([0x92, currentBtnNumber, 99])
output.send([0x92, newBtnNumber, 57])
Expand Down

0 comments on commit 8196f53

Please sign in to comment.