Skip to content

Commit

Permalink
Added support for staring the MIDI listener.
Browse files Browse the repository at this point in the history
  • Loading branch information
oubiwann committed Dec 21, 2021
1 parent afdba50 commit 22413f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions rebar.config.script
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Project = "src/github.com/ut-proj/midiserver",
Binary = "bin/midiserver",
{ok, CurrentDirectory} = file:get_cwd(),
os:putenv("PRECOMPILED_MIDISERVER", Binary),
os:putenv("MIDI_IN", "0"),
os:putenv("GOPATH", filename:join([CurrentDirectory, GoPrefix])),
os:putenv("MIDISERVER", filename:join([CurrentDirectory, GoPrefix, Project, Binary])),
os:putenv("GO111MODULE", "on"),
Expand Down
4 changes: 3 additions & 1 deletion src/undermidi/go/execserver.lfe
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
(defun initial-state ()
(let ((log-level (logjam:read-log-level "config/sys.config")))
`#m(opts ()
args ("-loglevel" ,(go-log-level log-level) "-daemon" "-log-reportcaller")
args ("-loglevel" ,(go-log-level log-level)
"-daemon" "-log-reportcaller"
"-midi-in" ,(undermidi.go.shared:midi-in))
binary ,(undermidi.go.shared:midiserver)
pid undefined
os-pid undefined)))
Expand Down
3 changes: 3 additions & 0 deletions src/undermidi/go/shared.lfe
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
(if (use-go-src?)
(os:getenv "MIDISERVER")
(os:getenv "PRECOMPILED_MIDISERVER")))

(defun midi-in ()
(os:getenv "MIDI_IN"))

0 comments on commit 22413f6

Please sign in to comment.