Search
Friday, 25th of June 2021, 2:34:21 UTC
3:02:56
beach
Good morning everyone!
3:15:36
kakuhen
Does anyone know here if there has been an attempt to provide a common lisp interface for Audio Units or VST?
3:17:26
moon-child
kakuhen: you may be interested in https://ccrma.stanford.edu/software/snd/
3:21:29
kakuhen
ooh this does look interesting to me; ty
3:40:36
Lord_of_Life_
** NICK Lord_of_Life
3:40:55
pjb
kakuhen: AFAIK, not. Note that VST 3 API is a C++ API. This makes things more difficult.
3:41:50
pjb
kakuhen: also, VST is designed to make plug-ins, and it's difficult to make a plug-in in CL. You'd have to use ecl, and generate a library, and load libecl.so along.
3:42:14
kakuhen
yeah, I figured vst may be hard
3:42:26
pjb
kakuhen: clasp which integrates "natively" with C++ would be nice, but I think it lost the ability to generate libraries like ecl can.
3:42:29
kakuhen
maybe CoreAudio will be a bit simpler since it's mostly a C API
3:42:44
kakuhen
but I have a reference book on Core Audio and it's pretty complicated (for me at least)
3:42:52
kakuhen
a lot of basic data structures it uses, I dont know how you'd make the equivalents on Lisp
3:43:12
pjb
kakuhen: one solution would be to implement a VST module that would forward stuff on a socket, and have a CL process connected to do the job. of course, it would then be much less efficient. Perhaps going thru shared memory would be feasible.
3:43:17
mfiano
an array with a pointer or 2
3:43:30
pjb
kakuhen: I implemented a CoreMIDI interface.
3:43:42
pjb
https://gitlab.com/patchwork/CoreMIDI
9:51:22
Guest63
Question - I'm getting "no dispatch function defined for #\I"
9:51:47
Guest63
I know the solution is (named-readtables:in-readtable cmu-infix:syntax)
9:52:01
Guest63
But for some reason it sometimes works / sometimes doesn't
9:52:38
Guest63
Appears I have to run (named-readtables:in-readtable cmu-infix:syntax) in REPL and cannot just run it as part of a file
10:04:57
phoe
sometimes, what do you mean?
10:05:13
phoe
if you want the readtable in the REPL, you have to switch to it in the REPL
10:05:39
phoe
a file-only IN-READTABLE only affects the file compiler, same as a file-only IN-PACKAGE
10:08:42
Guest63
Does it cascade down in a file? E.g. if I have a file with the above, and then have a "(load ...)", will the file loaded have it?
10:08:47
Guest63
I assume not, but checking
10:09:00
phoe
a proper solution is to use ASDF instead
10:09:24
Guest63
Yeah, I will do that later. Only so much complexity I can handle at this stage :)
11:45:29
jmercouris
I'm having a brain freeze
11:45:37
jmercouris
I have a list of arguments and I want to pass these to a function call
11:45:39
phoe
ACTION turns the heating on?
11:45:45
jmercouris
(funcall #'+ (list 1 2))
11:45:48
jmercouris
that's obviously not right
11:46:38
Guest63
you can also do (funcall #'+ 1 2)
11:46:50
jmercouris
that doesn't help Guest63
11:47:14
phoe
Guest63: in this case, yes, but this is only because you know the number of arguments
11:47:30
Guest63
ah yes, sorry I understand now
11:47:53
edgar-rft
ACTION argues with an unknown number of arguments
11:49:39
Guest63
(defun debate (starting-arg &optional remaining-arg) (apply #'try-arg (cons starting-arg remaining-arg)))
11:50:31
Guest63
It wouldn't be a bug to have a never ending loop, so that debate never ends ;)
12:19:40
flip214
Guest63: TRY-ARG just needs to call DEBATE again....
12:23:26
jcowan
Unfortunately, such a call would not be tail recursive, so the debate goes on until one of the participants blows their stack.
12:37:49
tfb
Real programmers do (apply #'funcall #'funcall #'+ '(1 2 3))
12:40:00
tfb
pretty sure somewhere out there there is code that does (apply #'funcall ...) in real use, sadly (perhaps not with iterated funcalls)
13:06:56
shka
tfb: what is wrong with apply #'funcall anyway? :P
13:12:03
jcowan
It's sort of like (cons 'a (cons 'b (cons 'c (cons 'd '()))))
13:19:15
beach
(APPLY #'FUNCALL is used in the SICL HIR evaluator.
13:19:51
phoe
beach: isn't that redundant? is there a case of APPLY FUNCALL that cannot be reduced to just APPLY?
13:20:09
Bike
probably a host apply and a sicl funcall, or something
13:20:16
beach
Sure, but we have a list where the first element is a function.
13:20:43
beach
So I guess it could be replaced by (apply (first list) (rest list))
13:21:38
beach
But then, the list is computed by LOOP, so an intermediate variable would have to be introduced to hold the result.
13:22:29
beach
So (apply #'funcall (loop ...)) would become (let ((list (loop ...))) (apply (first list) (rest list)))
Friday, 25th of June 2021, 14:34:21 UTC