Skip to content

Instantly share code, notes, and snippets.

@mwicat
Last active December 23, 2021 23:17
Show Gist options
  • Save mwicat/8b6f96d2021cada48f0c2cbea1a7b839 to your computer and use it in GitHub Desktop.
Save mwicat/8b6f96d2021cada48f0c2cbea1a7b839 to your computer and use it in GitHub Desktop.
Shift Pitch.ksp
on init
set_script_title("Shift Sample")
declare ui_knob $Shift (-24, 24, 1)
$Shift := 0
set_knob_defval ($Shift,0)
make_persistent ($Shift)
set_knob_unit ($Shift,$KNOB_UNIT_ST)
set_control_help ($Shift,"Shift: Shifts the pitch in semitones while simultaneously compensating with
midi transpose in the opposite direction. The result is an increase or decrease in overtones.")
end on
on note
change_note($EVENT_ID,$EVENT_NOTE-$Shift)
change_tune($EVENT_ID,$Shift*100000,1)
end on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment