Created
October 9, 2021 04:35
-
-
Save littletsu/1f0c8d6c963ce5b994147fc06c8ca532 to your computer and use it in GitHub Desktop.
Pure Data Toggle DSP Hotkey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this before global hotkeys are defined | |
# then replace or add the desired toggle dsp hotkey with ::pd_bindings::toggle_dsp | |
# example: "bind_capslock all $::modifier-Key w {::pd_bindings::toggle_dsp}" | |
# (replacing CTRL-W Exit hotkey with toggle dsp) | |
set ::pd_bindings::dsp_on false | |
proc ::pd_bindings::toggle_dsp {} { | |
if {$::pd_bindings::dsp_on} { | |
pdsend "pd dsp 0" | |
set ::pd_bindings::dsp_on false | |
} else { | |
pdsend "pd dsp 1" | |
set ::pd_bindings::dsp_on true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment