(setenv "SURMULOTDIR" (expand-file-name "surmulot" default-directory)) 

(setenv "INCDIR" (substitute-in-file-name "$SURMULOTDIR/csound/INCLUDE"))
(setenv "OPCODEDIR" (substitute-in-file-name "$SURMULOTDIR/csound/plugins"))
(setenv "OPCODEDIR64" (substitute-in-file-name "$SURMULOTDIR/csound/plugins64"))
(setenv "SADIR" (substitute-in-file-name "$SURMULOTDIR/csound/ANALYSIS"))
(setenv "SFDIR" (substitute-in-file-name "$SURMULOTDIR/csound/RENDERED"))
(setenv "SSDIR" (substitute-in-file-name "$SURMULOTDIR/csound/SAMPLES"))
(setenv "RAWWAVE_PATH" (substitute-in-file-name "$SURMULOTDIR/csound/SAMPLES"))
(setenv "CSOUNDRC" (substitute-in-file-name "$SURMULOTDIR/csound/.csoundrc"))

(cd (expand-file-name "surmulot/keykit/bin" default-directory))

(if (file-exists-p "key.exe")
    (shell-command "key.exe"))
