From ef0eb19041689c829c55aacf5de52a286540b0ce Mon Sep 17 00:00:00 2001 From: Mustafa Date: Tue, 27 May 2014 16:39:51 -0700 Subject: [PATCH] detect os and run scsynth --- oregano/main.rkt | 10 ++++++---- oregano/system.rkt | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 oregano/system.rkt diff --git a/oregano/main.rkt b/oregano/main.rkt index c371ff8..1336639 100644 --- a/oregano/main.rkt +++ b/oregano/main.rkt @@ -3,19 +3,21 @@ (require "instrument.rkt" "gui.rkt" - "sample.rkt") + "sample.rkt" + "system.rkt") ;; setup (require rsc3) -;; TODO - run scsynth + +(run-super-collider) + ;; show osc messages on server (send-msg (dump-osc 1)) -(with-sc3 reset) +(reset) (sleep 0.1) - (provide (all-from-out "instrument.rkt" "gui.rkt" diff --git a/oregano/system.rkt b/oregano/system.rkt new file mode 100644 index 0000000..f4090e2 --- /dev/null +++ b/oregano/system.rkt @@ -0,0 +1,16 @@ +#lang racket + + + +(provide (all-defined-out)) + +;; run scsynth +(define (run-super-collider) + (match (system-type 'os) + ('unix (when (not (system "ps -e | grep scsynth > /dev/null")) + (thread (lambda () + (system "./start_server_linux.sh"))))) + ('macosx 1) + ('windows 1) + (else 1))) +