[CM] Getting snd to work with conjure/neovim
Kenneth Flak
kennethflak at protonmail.com
Sat Jun 24 10:47:09 PDT 2023
Had a bit of time to dig further into the whole nvim/conjure/snd thing, and I might be making some headway here.
Would it be reasonable to assume that snd executes commands from stdin as one-shot events? I do get a return value back to the repo on exit from snd, but not immediately after executing a command.
Test code:
(begin
(open-sound "/home/kf/xylophone.wav")
(scale-channel 0.1)
(save-sound-as "/home/kf/xylophone-scaled-1.wav")
(exit)
)
This produces this log in conjure:
; --------------------------------------------------------------------------------
; snd (started)
; --------------------------------------------------------------------------------
; eval (root-form): (begin (open-sound "/home/kf/xylophone.wav"...
; debug: send
"(begin
(open-sound \"/home/kf/xylophone.wav\")
(scale-channel 0.1)
(save-sound-as \"/home/kf/xylophone-scaled-1.wav\")
(exit)
)
"
; debug: receive
"err"
; debug: receive
"out"
; process exited with code 1
; --------------------------------------------------------------------------------
; snd (stopped)
If I omit the (exit) in the code, the processing happens, but snd blocks any further input until it exits (manually or programmatically).
Best,
Kenneth
--
Roosna & Flak - Contemporary Dance & Music
Web: roosnaflak.com
Code: {github,gitlab}.com/kflak
Mastodon: @kf at sonomu.club
On 13 Jun 2023 10:58, bil at ccrma.Stanford.EDU wrote:
>> Does snd spit out anything like a prefix or exit code or
>> something through stdout when evaluating an expression,
>> in addition to the return value?
>
>I don't think so. Is snd still running after you get that
>value? Currently snd blocks SIGTTIN and SIGTTOU.
>
--
Roosna & Flak - Contemporary Dance & Music
Web: roosnaflak.com
Code: {github,gitlab}.com/kflak
Mastodon: @kf at sonomu.club
On 13 Jun 2023 20:27, Kjetil Matheussen wrote:
>On Tue, Jun 13, 2023 at 7:26 PM Kenneth Flak <kennethflak at protonmail.com> wrote:
>>
>>
>> Hmmm... seems my excitement was a bit premature. The first expression I evaluate works fine, but after that I am unable to get anything working. Need to do a bit more digging, it seems...
>>
>
>Maybe try to compile snd with the "--with-webserver" option? This
>makes snd into a webserver you can send data in and out of.
>
>Just start snd first (in a separate terminal), and then use
>"s7webserver_repl.py" as REPL for conjure.
More information about the Cmdist
mailing list