mute a note when another is pressed
I would like to add to this code that when $C1 is pressed, $G1 does not sound.
but when $C1 is released, $G1 sounds (It can now sound ... that is, it is enabled again)
this is the code:
on init
make_perfview
set_ui_height_px(300)
declare $C1
$C1:= 36
declare $Csos1
$Csos1:= 37
declare $D1
$D1:= 38
declare $Dsos1
$Dsos1:= 39
declare $E1
$E1:= 40
declare $F1
$F1:= 41
declare $Fsos1
$Fsos1:= 42
declare $G1
$G1:= 43
declare $Gsos1
$Gsos1:= 44
declare $A1
$A1:= 45
declare $Asos1
$Asos1:= 46
declare $B1
$B1:= 47
set_key_pressed_support(1)
declare ui_switch $Cmaj
end on
on note
if ($Cmaj= 1)
disallow_group($ALL_GROUPS)
allow_group(0)
end if
if ($EVENT_NOTE=$C1 and $Cmaj=1)
play_note($C1 -12, 60, 0, -1)
end if
if ($EVENT_NOTE=$Csos1 and $Cmaj=1)
play_note($EVENT_NOTE -12, 60, 0, -1)
end if
if ($EVENT_NOTE=$D1 and $Cmaj=1)
play_note($EVENT_NOTE -12, 60, 0, -1)
end if
if ($EVENT_NOTE=$Dsos1 and $Cmaj=1)
play_note($EVENT_NOTE -12, 60, 0, -1)
end if
if ($EVENT_NOTE=$E1 and $Cmaj=1)
play_note($EVENT_NOTE -12, 60, 0, -1)
end if
if ($EVENT_NOTE=$F1 and $Cmaj=1)
play_note($EVENT_NOTE -12, 60, 0, -1)
end if
if ($EVENT_NOTE=$Fsos1 and $Cmaj=1)
play_note($EVENT_NOTE -12, 60, 0, -1)
end if
if ($EVENT_NOTE=$G1 and $Cmaj=1)
play_note($EVENT_NOTE -12, 60, 0, -1)
end if
if ($EVENT_NOTE=$Gsos1 and $Cmaj=1)
play_note($EVENT_NOTE -12, 60, 0, -1)
end if
if ($EVENT_NOTE=$A1 and $Cmaj=1)
play_note($EVENT_NOTE -12, 60, 0, -1)
end if
if ($EVENT_NOTE=$Asos1 and $Cmaj=1)
play_note($EVENT_NOTE -12, 60, 0, -1)
end if
if ($EVENT_NOTE=$B1 and $Cmaj=1)
play_note($EVENT_NOTE -12, 60, 0, -1)
end if
end on
on ui_control($Cmaj)
if ($Cmaj= 1)
end if
end on
Categories
- All Categories
- 19 Welcome
- 1.4K Hangout
- 60 NI News
- 763 Tech Talks
- 4K Native Access
- 16.3K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.6K Kontakt
- 1.6K Reaktor
- 374 Battery 4
- 833 Guitar Rig & FX
- 424 Massive X & Synths
- 1.2K Other Software & Hardware
- 5.7K Maschine
- 7.2K Traktor
- 7.2K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators