Created
September 14, 2013 06:10
-
-
Save shurane/6559249 to your computer and use it in GitHub Desktop.
Yay, Overtone works with a local copy of SuperCollider on Windows. [lib.clj](https://github.com/overtone/overtone/blob/master/src/overtone/helpers/lib.clj#L345) was the culprit!
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
;; commands to run in the REPL | |
(use 'overtone.core) | |
(boot-external-server) | |
(definst foo [] (saw 220)) | |
(foo) | |
(kill foo) | |
;; voila! |
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
(defn windows-sc-path | |
"Returns a string representing the path for SuperCollider on Windows, | |
or nil if not on Windows." | |
[] | |
(when (windows-os?) | |
(let [p-files-x86 (System/getenv "PROGRAMFILES(X86)") | |
p-files-x86 (File. p-files-x86) | |
p-files-x86 (map str (.listFiles p-files-x86)) | |
p-files (System/getenv "PROGRAMFILES") | |
p-files (File. p-files) | |
p-files (map str (.listFiles p-files)) | |
parent-dir (map str (.listFiles (File. ".."))) | |
joined (concat p-files p-files-x86 parent-dir) ;; join the output of the 3 directories | |
sc-files (filter #(.contains % "SuperCollider") joined) | |
recent-sc (last (sort (seq sc-files)))] | |
recent-sc))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment