freenode/#lisp - IRC Chatlog
Search
3:52:12
slondr
Like, I want to do something along the lines of (play 'C) and hear a C note from my computer
4:01:02
Xach
slondr: i wish i could suggest something, but it's not an area i know anything about when it comes to CL.
4:01:21
Xach
and those who might know may be asleep! but maybe a q on reddit or stackoverflow would get an answer eventually.
4:07:29
moon-child
slondr: nothing that I know of, but I bet you could build something pretty easily off of oss
4:08:53
moon-child
sin waves are easy to construct. A4 is (usually) 440Hz, and you scale by increments of 2^1/12
4:11:39
beach
slondr: I am sure there are systems that use the MIDI interface. OpenMusic must be doing something like that.
4:11:50
moon-child
didn't mean to imply that it was; just thought that you were. What midi interface were you referring to?
4:13:39
moon-child
I think that's for interacting with midi hardware devices; both input and output, but not a regular speaker
4:15:36
slondr
Although if there's nothing that does precisely what I'd like, it may be worth the extra effort
4:18:26
moon-child
slondr: a little googling suggests https://ccrma.stanford.edu/software/snd/snd/clm.html
4:19:18
edgar-rft
slondr: don't know how much it is maintained but looks reasonably simple -> https://www.cliki.net/sb-simple-audio
4:20:22
edgar-rft
slondr: another alternative would be -> https://filonenko-mikhail.github.io/cl-portaudio/
4:24:19
slondr
My use case is I have some other function that generates note sequences, eg (E G B A C), I just want to hear what that sequence sounds like, preferably without defining instruments or dealing with frequences and all that other stuff
4:25:35
beach
slondr: That's a very specific use case that you can't expect to have a pre-existing library for.
4:25:54
beach
slondr: Normally, you would want to know the instrument, the duration, the volume, etc.
11:20:18
ecm
It's not indenting sub-functions under a function like it would with let or some other built-in function
11:33:37
ck_
like I predicted ;) your emacs is set to indent using tabs, that's the issue you need to address first
11:40:57
beach
So, how exactly did you create this code? How did you start emacs, SLIME, and how did you create the buffer?
11:41:55
ecm
I opened the file as normal, I've added a slime-company hook for the file, I then started slime, loaded croatoan, compiled the file and did a C-M-q expecting to indent properly
11:45:27
ck_
what's wrong with cmq? "C-M-q (translated from <escape> C-q) runs the command indent-sexp"
14:23:52
puchacz
hi, to play with ecl (I am interested in android), I need to sudo apt get ecl first, to get any version, then compile the newest one and follow some tutorials?
14:29:07
spoeplau
I'm trying to do (defctype foo :pointer) with several types '(foo bar baz), and I'm looking for a way to do something like (dolist (name '(foo bar baz)) (defctype name :pointer)). It doesn't quite work like this because "name" isn't evaluated, and the best I've been able to come up with so far is to define my own macro and then call it just once. Is there a better way?
14:37:38
spoeplau
_death: I have some more complex cases too, that one was just to illustrate what I'm trying to do
14:39:51
_death
spoeplau: you can define a META macro, something like (defmacro meta (form) (let ((generate (gensym))) `(macrolet ((,generate () ,form)) (,generate))))
14:40:31
_death
then (meta `(progn ,@(mapcar (lambda (name) `(defctype ,name :pointer)) '(foo bar baz))))
14:42:47
_death
some years ago discussion here resulted in a METALIST operator as well, https://github.com/death/gnusdumps/blob/master/driver/main.lisp#L121
14:47:30
_death
with METALIST it would be (metalist (name) "Define a foreign pointer type alias for NAME." `(defctype ,name :pointer) ((foo) (bar) (baz)))
14:52:02
_death
ralt: I remember you had some pull requests.. nice to hear that it worked for you, I wrote it for a thing that became irrelevant t me a year or two later.. the publish part is still broken design