[CM] Snd 24.7

2024-09-09 Thread bil
Snd 24.7: s7: added complex-vectors. These are directly compatible with gsl_vector_complex. make-iterator's optional third argument can be #t which tells s7 to choose the carrier based on the iterated sequence. s7_immutable has been deprecated, replaced by s7_set_immutable which has t

Re: [CM] S7 C function arguments corrupted in loop

2024-09-01 Thread bil
Thanks very much for the bug report! That was a tricky one -- I managed to overoptimize op_x_aa, using a constant list where it got stepped on. A quick fix, around line 90626, change sc->value = c_function_call(f)(sc, with_list_t2(fx_call(sc, cdr(code)), fx_call(sc, cddr(code; to sc-

Re: [CM] How to create directory via S7 Scheme?

2024-08-12 Thread bil
Good luck with Goldfish Scheme! Massimiliano Gubinelli has been poking me to check out the Mogan project (to deal with an s7 problem), but I never seem to get around to it (he is probably grinding his teeth, causing his dentist to shake his head and mutter). _

[CM] Snd 24.6

2024-08-02 Thread bil
Snd 24.6: Kjetil Metheussen made a new version of s7webserver that works in Python3 as well as Python2 and updated the s7webserver Makefile johnm donated gsl_vector_size and several helper functions to libgsl.scm s7: dynamic-unwind has changed slightly (unwinder gets the arg list, not just

Re: [CM] How to create directory programmatically?

2024-08-01 Thread bil
You can load libc.scm, which ties most of libc into s7, then call mkdir as (*libc* 'mkdir): ((*libc* 'mkdir) "new-dir") ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] Applying a function to every file in dir?

2024-07-23 Thread bil
framples and srate refer to the currently opened sound if none is passed as an argument, so the open-sound merely provides a fallback, but leaves the file open, and has no effect on sndwarp, unless I'm misreading that code. The file argument to sndwarp worked in the single-file case because you ga

Re: [CM] Applying a function to every file in dir?

2024-07-23 Thread bil
I think you don't need the open-sound, but the file passed to sndwarp should be (string-append indir file), not just file (the latter defaults to the current directory). ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mail

Re: [CM] newbie - how to build and run

2024-07-19 Thread bil
README.Snd has a list of the packages you need when you use the --with-motif switch. I haven't checked it since about version 22.04 of Ubuntu. You'll need xpm and maybe xt, and probably one header file, shape.h from libext. Also the x11-fonts-misc package. __

Re: [CM] Memory leak (with patch)

2024-07-14 Thread bil
You were misled by the word "allocated"? The message is reporting overall GC stats. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] Setting up snd/emacs

2024-07-05 Thread bil
This is probably a typo, but just in case... I open a .csm file but you've set the autoload-file for .cms files? ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] making a debugger?

2024-07-02 Thread bil
s7.html has a section toward the end of the file about repl.scm and nrepl.acm. These have a function drop-into-repl which can be used to poke around in the current context. I think you could call this when an error is hit, or if you're in a "raw" terminal, when you hit some key like C-C. The fil

Re: [CM] Snd 24.5

2024-07-02 Thread bil
Thanks for pointing this out -- I have updated the homepage. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

[CM] Snd 24.5

2024-06-28 Thread bil
Snd 24.5: in s7, added (settable) symbol-initial-value (the #_... value) changed invalid-escape-function to invalid-exit-function new *s7* fields: symbol-quote?, symbol-printer, and make-function added function-arglist in sublet, varlet and s7_load_with_environment, ()

Re: [CM] S7 wrapper around SDL

2024-06-25 Thread bil
That's an interesting project! I don't know anything about SDL, so I can't offer any sage advice. On the matrix library, there's also the libgsl stuff in the s7 tarball. If you're writing the matrix functions in Scheme and notice anything that seems unnaturally slow, please let me know. Good L

Re: [CM] about jack and clm-5

2024-06-14 Thread bil
:SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE :SBCL :UNIX) * (load "all.lisp") ; using existing configuration file mus-config.h ; Compiling "/home/bil/clm/xen.c" ; Compiling "/home/bil/clm/io.c" ; Compiling "/home/bil/clm/headers.c" ; Compiling "/hom

Re: [CM] ring-modulate

2024-06-04 Thread bil
It looks like rm-radians is not used in new-effects.scm, so that code is multiplying the input samples by an oscil at rm-frequency. This is the same as the code in examp.scm without the envelope. ring-modulate is just a multiply, so I think you want (ring-modulate mysnd (oscil os)) where the "os"

Re: [CM] s7 got some love in the Lisp game jam

2024-06-02 Thread bil
Iain, thanks a million for the kind words about s7 in reddit and Hacker News. When you're tired and down, a pat on the back makes a big difference. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

[CM] Snd 24.4

2024-05-16 Thread bil
Snd 24.4: s7: added (settable) port-string checked: sbcl 2.4.4 ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

[CM] Snd 24.3

2024-04-14 Thread bil
Snd 24.3: s7: format now always returns a string (where it used to return #f it now returns "") sam.c: bugfixes and improvements thanks to David Jaffe checked: sbcl 2.4.3 Thanks!: Michael Edwards, Norman Gray, David Jaffe ___ Cmdist mailing list

[CM] Snd 24.2

2024-03-11 Thread bil
Snd 24.2 mostly work on optimizations in s7 checked: sbcl 2.4.2 Thanks!: James Hearon ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

[CM] Snd 24.1

2024-02-01 Thread bil
Snd 24.1 More optimizations, minor bug fixes, and rewrites. checked: sbcl 2.4.1 Thanks!: Norman Gray, Andreas Enge ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] select color

2024-01-11 Thread bil
I do not know what the problem is; that code has not changed in many years. Perhaps you're running Wayland and it is mixing colors (via a sort of transparency effect I guess, like happens on a Mac). ___ Cmdist mailing list Cmdist@ccrma.stanford.edu htt

Re: [CM] snd 24.1 (motif) some widgets dont default to 'managed'

2024-01-08 Thread bil
Thanks for the bug report. I have fixed extsnd.html. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

[CM] Snd 24.0

2024-01-01 Thread bil
Snd 24.0: in s7, fixed various bugs, made a few more optimizations. checked: sbcl 2.3.11, sbcl 2.4.0 Thanks!: Norman Gray, James Hearon ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] bug-report: crash in snd-motif.scm - 'XLoadQueryFont'

2023-12-14 Thread bil
I think this is the same problem that Kenneth Flak reported in July. Here's a portion of my reply: "... In snd-motif.scm, there are two uses of the font "9x15" -- this is a very old (but very good) fixed width font that may now be relegated to the X miscellaneous fonts package. You may have to

Re: [CM] make-sampler vs. open

2023-12-07 Thread bil
I'd need to see you sampler code to see what the problem is, but this sequence works: ;; write a square-wave to test.snd (with-sound (:output "test.snd" :to-snd #f) (let ((g (make-square-wave 440.0))) (do ((i 0 (+ i 1))) ((= i 44100)) (outa i (square-wave g) ;; read it us

Re: [CM] snd: set working dir?

2023-11-29 Thread bil
Is that chdir (haven't had my coffee yet) -- if so, maybe ((*libc* 'chdir) "new-dir")? ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

[CM] Snd 23.9

2023-11-24 Thread bil
Snd 23.9: s7: added optional let argument to immutable? and immutable! finally added error checks to the tree-* functions see lint.scm for the previous versions s7_make_c_pointer_wrapper_with_type ' (apostrophe) now is (#_quote ...) and similarly for the quasiquote helpers

Re: [CM] doc update suggestion.

2023-11-21 Thread bil
Thanks! I added that to the s7 README.md file, and also added a short section to s7.html. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] What motivated the change from CL to Scheme?

2023-11-09 Thread bil
I mostly have bill's wonderful old 'birds.scm' file chirping away in python. It made me laugh!! When Jonathan Harvey used file that in a piece (almost unedited!) a reviewer said they were recordings. Can't win sometimes. ___ Cmdist mailing list C

Re: [CM] What motivated the change from CL to Scheme?

2023-11-09 Thread bil
I can speak to the CLM/Snd side of this which was closely associated with Common Music. I followed Rick's lead, but I was already searching for an alternative to Common Lisp. The sound editor, Snd, was a C version of an earlier editor named Dpysnd, written in SAIL at SAIL in the 70's and 80's.

Re: [CM] Are s7 GC questions in scope here?

2023-11-05 Thread bil
Any s7 questions are ok in this list. I can't tell what you're doing, but this doesn't strike me as a GC problem. If you can send me enough of your program that I can run it, I'm willing to try to see what is wrong. ___ Cmdist mailing list Cmdist@cc

Re: [CM] v.ins compile error

2023-10-25 Thread bil
I think you forgot to load "all.lisp" -- you need the clm code loaded before trying to compile v.ins. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

[CM] Snd 23.8

2023-10-13 Thread bil
Snd 23.8: s7: error handling, reader-cond, various (*s7* 'max-*) checks checked: sbcl 2.3.9 ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

[CM] Snd 23.7

2023-09-10 Thread bil
Snd 23.7: various minor optimizations and bugfixes in s7 checked: sbcl 2.3.8 ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] cons value for float vector

2023-09-07 Thread bil
I think you want to use a multidimensional float-vector: (let* ((fsize 10) (im (make-float-vector (list fsize 2))) (x 1) (y 1.0) ) (do ((k 0 (+ k 1))) ((>= k fsize)) (set! (im k 0) x) ; this will be turned into a float (set! (im k 1) y) (format #t "

[CM] Snd 23.6

2023-08-06 Thread bil
Snd 23.6: various small improvements and bugfixes in Snd and s7. checked: sbcl 2.3.7 Thanks!: Kenneth Flak ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] [SND] How to split multichannel files into mono files?

2023-07-31 Thread bil
One way is to loop through the channels calling save-sound-as on each, something like: (do ((i 0 (+ i 1))) ((= i (channels snd))) (save-sound-as filename snd :channel i)) where filename needs to be different for each channel. ___ Cmd

Re: [CM] [SND] how to record when using jack?

2023-07-31 Thread bil
Snd no longer has any recording ability. Originally there was a simple recorder (although it had great VU meters), and I could maintain it. But at that time audio hardware was changing rapidly, especially adding many more channels. I got many requests for support for new devices which I did not

Re: [CM] [SND] Files from (save-region) can't be read by other applications

2023-07-28 Thread bil
I changed this to use default-output-header-type. Snd used mus-next because it stores data as doubles, and it's simpler to write/read double samples, but mus-riff does not support that sample type (or didn't the last time I looked). So you'll need to use: (save-region r (format #f "test~A.wav"

Re: [CM] new-effects.scm crashes snd

2023-07-25 Thread bil
In new-effects.scm the only font mentioned that might be a problem is the "built-in" X font (for stuff like XC_crosshair). In snd-motif.scm, there are two uses of the font "9x15" -- this is a very old (but very good) fixed width font that may now be relegated to the X miscellaneous fonts package.

Re: [CM] Retrieving FFT info at cursor programmatically?

2023-07-24 Thread bil
One way is to call snd-spectrum using channel->float-vector to get the data. If you already have the fft data in snd, you can use the peaks function to write it either to the listener or a text file. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu ht

Re: [CM] Getting snd to work with conjure/neovim

2023-07-13 Thread bil
Dave Phillips wrote a tutorial for Snd a long time ago -- for Snd 6.0 (2003), I think. It eventually got out of sync with the program, but I still have a copy -- I can send it to you if you like. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https:

Re: [CM] Copy/paste text from/to listener?

2023-07-12 Thread bil
I was using mouse selection to test it. I might not say anything in the Snd docs because it's an X/Motif thing (i.e. the "clipboard" I think it's called. Look for "interclient communication" in the X docs, and XA_PRIMARY). It doesn't work for me on a Mac.

Re: [CM] Getting snd to work with conjure/neovim

2023-07-12 Thread bil
To get all the current names, use (symbol-table) in scheme, or s7_symbol_table and s7_for_each_symbol in C. I can send you the output of (format #f "~W" (symbol-table)) It's too long to include here (4266 names, 57k bytes). I guess you already know this, but snd-completion.c and snd-help.c h

Re: [CM] Copy/paste text from/to listener?

2023-07-12 Thread bil
It works both directions and in both the Motif and terminal versions for me (I tried it with a terminal and emacs). The notcurses repl may not work in this regard -- I'll check later today. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-

[CM] Snd 23.5

2023-07-01 Thread bil
Snd 23.5 s7: various small bugs and optimizations. checked: sbcl 2.3.5|6 Thanks!: Anders Vinjar, Todd Ingalls, johnm, Kjetil Matheussen ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] Getting snd to work with conjure/neovim

2023-06-27 Thread bil
No, I don't know how emacs does it. It used to be going through the emacs file comint.el, if I remember right. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] Getting snd to work with conjure/neovim

2023-06-26 Thread bil
This appears to be some pipe issue with stdin -- if you run Snd from a terminal, then type expressions in that terminal, get_stdin_string is called and the expressions are evaluated, etc. If you call Snd as a target of a pipe (or whatever the correct terminology is), it works once, but then stdin

Re: [CM] Getting snd to work with conjure/neovim

2023-06-26 Thread bil
0x76e5bc0f in __GI___poll (fds=0x7fffd790, nfds=1, timeout=5) at ../sysdeps/unix/sysv/linux/poll.c:29 I think that you're in XtAppMainLoop waiting for an event; that is, snd is waiting for you to send input etc. ___ Cmdist mailing li

Re: [CM] Getting snd to work with conjure/neovim

2023-06-24 Thread bil
[I forgot to "reply all"]: In the motif version, XtAppAddInput in snd-motif.c sets get_stdin_string as the function to call when input is available on stdin. That function tries to get a full string, then evals it. It doesn't return the value of the incoming expression -- you have to use the wr

Re: [CM] Spectrogram usage

2023-06-15 Thread bil
I just tried it with a file 80 seconds long, and it worked fine. If you want to use it with a multichannel file, set channel layout to "separate" -- you can use the channel layout item in the view menu, or (set! (channel-style) channels-separate) in the listener. Or maybe uncheck the "unite" but

Re: [CM] libs7: inconsist naming of s7 optimizing registration

2023-06-15 Thread bil
The short answer is that it's an historical artifact, and I try not to change s7.h unless it's absolutely necessary. The long form: the s7_p_* procedures came first when I was developing the second level of the optimizer, and at that time I thought I'd always need the s7_scheme* argument, so ther

Re: [CM] Spectrogram usage

2023-06-14 Thread bil
Everything seems to work for me. I'm running on Ubuntu, using X, not Wayland I think (but I hope that doesn't matter). I built snd --with-motif --with-gl, opened a file (oboe.snd), clicked 'f' (for fft) and unclicked 'w' (for time domain wave), went to the Options:Transform options dialog, set s

Re: [CM] Getting snd to work with conjure/neovim

2023-06-13 Thread bil
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.

Re: [CM] Getting snd to work with conjure/neovim

2023-06-13 Thread bil
I'm glad you found that -- I was puzzling my way through the conjure docs -- I know nothing about conjure or neovim. Another possible problem might be which snd repl you're using. If you're running the no-gui snd, it's the code in repl.scm, but I'm not sure which repl is running in this case -- th

[CM] Snd 23.4

2023-05-25 Thread bil
Snd 23.4 fixed a move-formants bug which also affected bullfrog and leopard-frog in animals.scm. checked: FC 38, Ubuntu 23.04, sbcl 2.3.4 Thanks!: johnm, Todd Ingalls ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/ma

Re: [CM] Issue with formant-bank

2023-05-19 Thread bil
Ouch! I optimized formant-bank at some point, and broke that instrument. I think this slower version works: (definstrument (move-formants start file amp radius move-env num-formants) (let* ((frms (make-vector num-formants)) (beg (seconds->samples start)) (dur (mus-sound-fr

Re: [CM] libs7: a bazel-enabled distrib of s7

2023-05-04 Thread bil
That's very impressive! I'll add a pointer to it to s7's README.md. Thanks! (The libarb support in s7 was really just for my amusement -- I wanted to play with the Bessel functions). ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.st

Re: [CM] Protecting Scheme data structures from GC?

2023-04-30 Thread bil
Do you have any suggestions for what one can do to cut GC times down on a code level when there is a lot of code going? Avoid creating things unnecessarily, and don't keep large structures around when they're no longer needed. The (*s7* 'memory-usage) function can show how many objects of each

Re: [CM] Protecting Scheme data structures from GC?

2023-04-29 Thread bil
To keep an environment from the being garbage collected, assign it to a global variable -- as long as the variable holds the environment, it will be safe. This won't speed up the GC. It's possible to make s7 strings that are not seen at all by the GC (make_permament_string), but it's much tricki

[CM] Snd 23.3

2023-04-19 Thread bil
Snd 23.3 s7: autoload bugfix checked: sbcl 2.3.3 Thanks!: john M693, Todd Ingalls ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] Python bindings

2023-03-23 Thread bil
Sounds good -- whenever you're ready, let me know what files to include in sndlib, or whatever you want. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] Python bindings

2023-03-23 Thread bil
Wow! That's a lot of work! What would be the best way to include this in sndlib? I don't have a git site for that library -- just the libraries at the ccrma ftp site. I don't often change the sndlib files (except the s7 files). ___ Cmdist mailing

[CM] Snd 23.2

2023-03-13 Thread bil
Snd 23.2 the usual minor bugfixes and whatnot. checked: sbcl 2.3.2 Thanks!: Woody Douglass ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] Broken Motif build on OSX

2023-03-07 Thread bil
I think some of the newer Motif packages (like post-2012) need both /usr/include/X11/extensions/Print.h and /usr/include/X11/bitmaps/gray -- in the latter case I sometimes have to create the bitmaps directory. I can send you copies of these files if needed. There was a time when everyone was sayi

Re: [CM] Possible bug in call-with-exit

2023-03-01 Thread bil
I think s7_call_with_catch needs to set a jump point for the sc->longjmp_ok case, but I haven't figured out yet how to capture the error handler result in all cases. Here's what I have now: (ca line 51216) else { declare_jump_info(); TRACK(sc); store_jump_info(sc);

[CM] Snd 23.1

2023-02-10 Thread bil
Snd 23.1: clm: Michael Edwards fixed a bug in scentroid.ins. s7: David St-Hilaire integrated s7 into tic-80. checked: FC 37, sbcl 2.3.1 Thanks!: David St-Hilaire, Michael Edwards ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stan

[CM] Fwd: Re: S7 integrated in TIC-80, and bug reports

2023-02-03 Thread bil
Original Message Subject: Re: [CM] S7 integrated in TIC-80, and bug reports Date: 2023-02-03 10:52 From: b...@ccrma.stanford.edu To: David St-Hilaire Would there be a way to give a better error message? The error message is the third argument to error_nr. One simple change

[CM] Fwd: Re: S7 integrated in TIC-80, and bug reports

2023-02-03 Thread bil
(sorry about the chaotic state of cmdist -- all my fault). Original Message Subject: Re: [CM] S7 integrated in TIC-80, and bug reports Date: 2023-02-03 10:10 From: David St-Hilaire To: b...@ccrma.stanford.edu Hi bil! I implemented your changes and it's working very we

Re: [CM] S7 integrated in TIC-80, and bug reports

2023-02-03 Thread bil
Here's a first stab at it -- put this code at line 1430 or thereabouts in s7.c (after the error_nr forward declaration), then build s7 with -DDISABLE_FILE_OUTPUT=1: #ifndef DISABLE_FILE_OUTPUT #define DISABLE_FILE_OUTPUT 0 #endif #if DISABLE_FILE_OUTPUT static FILE *old_fopen(const char *pathn

Re: [CM] S7 integrated in TIC-80, and bug reports

2023-02-03 Thread bil
Do you need to disallow reading a file? If it's just creating or altering a file that needs to be blocked, you could redirect fopen and fwrite (in s7.c) to functions that raise an error. I don't think s7 uses creat, open (except with O_RDONLY), or write. Also build it with WITH_C_LOADER=0 (to d

Re: [CM] S7 integrated in TIC-80, and bug reports

2023-02-02 Thread bil
Defining noreturn to nothing is fine; in gcc it makes a measurable difference in speed, but it's just a minor optimization. I can't find a compiler feature macro to tell me I'm running C23. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-m

Re: [CM] S7 integrated in TIC-80, and bug reports

2023-02-02 Thread bil
I don't think standard scheme allows set! with a target that is a pair, or at least I can't find anything about it in r7rs.pdf. In s7, the target needs a setter. The jmp_bufs are needed to unwind the C stack if an error is raised. It might work to make longjmp a no-op -- the stack will grow as e

Re: [CM] S7 integrated in TIC-80, and bug reports

2023-02-02 Thread bil
I forgot to say that I get this from the repl: (define-macro (test x . args) `(list ,@(map car args))) (test 10 ('x 1) ('y 2)) '(x y) On the noreturn problem, I'm using this: #ifdef _MSC_VER #define noreturn _Noreturn /* deprecated in C23 */ ... which I got from somewhere online. I wonder

Re: [CM] S7 integrated in TIC-80, and bug reports

2023-02-02 Thread bil
On the first issue, it looks to me like you have your own map function -- scheme_map is not an s7 function. It is passing a null pointer to s7_integer. As s7.html explains (under "FFI notes"), the C-side functions do very little error checking. ___ Cmd

Re: [CM] S7 integrated in TIC-80, and bug reports

2023-02-02 Thread bil
Thanks for the info and bug reports. Are you catching scheme errors or using a repl? In the repl, I get: (define-macro (test x . args) (list ,@(map car args))) (test 10 ('x 1) ('y 2)) ;unquote (',') occurred outside quasiquote: (test 10 ('x 1) ('y 2)) ;(test 10 ('x 1) ('y 2)) ; test: (lis

Re: [CM] loading libc_s7.so

2023-01-10 Thread bil
This is probably the "pipewire problem"; apparently the issue (at pipewire) was closed and labelled that it was no longer a problem -- someone at pipewire is embarrassed about unfixed bugs, I guess. The cmdist archives for early September has: The workaround for the pipewire problem in Snd (or re

Re: [CM] Use ICU4C to support Unicode character case-mapping.

2023-01-10 Thread bil
Are these modification containing 3rd library port welcomed to snd project? I don't know in advance -- I need to see the proposed changes. Thanks very much for looking into this. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanfo

[CM] Snd 23.0

2023-01-01 Thread bil
Snd 23.0: In Snd, drag and drop can handle "percent-encoded" file names, thanks to Tito Latini. In clm, Orm Finnendahl got Juan Pampin's ATS system running: https://github.com/ormf/cl-ats. In s7: reverted s7.h to previous version; use tools/s7.def instead. checked: Ubuntu 22.10 (gcc 12.2.

Re: [CM] Cannot compile s7 on msvc

2022-12-31 Thread bil
warning C4013: 'lookup' undefined; assuming extern returning int I was trying to get rid of some #if's and forgot to include the lookup forward declaration in the msvc case; here's a change that ought to fix that problem: at line 4061, add the declaration static inline s7_pointer lookup(s7_sch

Re: [CM] CLM-5 in-any from interpreted CL

2022-12-19 Thread bil
The common lisp clm didn't support that kind of setf in the run loop. I think you need to do it this way: (defparameter *test* (make-double-array 100 :initial-element (double 0.0))) (definstrument get-samples (arr) (let ((num (length arr))) (file->array "oboe.snd" 0 0 num arr) arr))

Re: [CM] CLM-5 in-any from interpreted CL

2022-12-18 Thread bil
Wow, that goes back about 20 years! Why can't you use definstrument and a compiler? I looked at the lisp code, and I think in-any returns a file->sample generator, but all these IO functions expect you're using the run macro to set up the buffers in C. But the run macro only runs to completion a

Re: [CM] Copying files using the provided R7RS byte-vector procedures

2022-12-08 Thread bil
I forgot to say you also need to set (*s7* 'print-length) to be as big as the byte-vector -- perhaps write-bytevector could use let-temporarily for this, but you really don't want to write out a huge vector to *stdout* inadvertently. ___ Cmdist mailing

Re: [CM] Variables in R7RS libraries

2022-12-08 Thread bil
I don't want to implement that count-value variable business -- I think it violates lexical scope by turning "count-value" into a weird symbol macro equivalent to (let-ref experiment 'count-value). So you have any number of count-value's floating around, and if you set! one anywhere, all the res

Re: [CM] Copying files using the provided R7RS byte-vector procedures

2022-12-08 Thread bil
I didn't notice that read-bytevector should return # if no bytes are read. Here are changes to r7rs.scm that make your code work I think (but I doubt it's faster): 127c127,129 < (if (= i start) # i)) --- (if (< i lim) (copy (subvector bv 0 i)) bv)) 130,13

Re: [CM] s7 does not measure seconds correctly

2022-11-30 Thread bil
argh I clicked the wrong damn button (define (jiffies-per-second) 10) (define (current-jiffy) (with-let *libc* (let ((res (clock_gettime CLOCK_MONOTONIC))) (+ (* 10 (cadr res)) (caddr res) (define (current-second) (* 1.0 ((*libc* 'time) (c-pointer 0 'time_t*

Re: [CM] s7 does not measure seconds correctly

2022-11-30 Thread bil
For awhile the thing currently called (*s7* 'cpu-time) was returning the wall clock time by accident. I think the r7rs.scm functions should be: ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] [Rudolf Adamkovič] s7 cannot not find a member of a list

2022-11-29 Thread bil
That looks like a bug in member (and assoc) to me -- I think I over-optimized environment handling -- I'll make a new s7 tarball. The fix is to comment out line 1863 in s7.c. Thanks! (It would also work in the old version to use (member (make-foo) (list (make-foo)) equivalent?)) __

Re: [CM] Variables in R7RS libraries

2022-11-27 Thread bil
I don't see how your work-around fits the paragraph you quote; please send me a working example of the problem, and I'll look at it. I trying very hard not to say what I think of r7rs libraries... ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https

[CM] Snd 22.9

2022-11-21 Thread bil
Snd 22.9 s7: added support for NaN "payloads": new functions nan and nan-payload to create such a NaN or get its payload, read-time support for +nan.123 (123 is the payload), and so on. S7_EXPORT for MSVC thanks to vladimir florentino checked: sbcl 2.2.10 Thanks!: Hyogeol Lee,

Re: [CM] Funky output in error messages

2022-11-20 Thread bil
The error message (the first line) is the same in each case. I don't know where the other output is coming from. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] Port output function receives string 1 char at a time

2022-11-20 Thread bil
Thanks for the suggested code, but that is not how I want to do it, if I do it at all. This is a minor optimization, so it should not introduce compile-time switches that split s7 into two incompatible versions; I'd have to add stuff to ffitest.c and the documentation and so on. I'll look at it

Re: [CM] Port output function receives string 1 char at a time

2022-11-19 Thread bil
That was the way Rick Taube wanted it back around 2010 (he was writing Grace, a GUI version of his CommonMusic). I can probably add a string output choice -- will look at it later. ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanf

Re: [CM] Patch to enable S7 use across DLLs and EXEs on Windows

2022-11-19 Thread bil
Thanks very much! I'll merge those changes into my version. (It may take a day or two). ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Re: [CM] Recent s7 broken on MSVC

2022-11-03 Thread bil
Thanks very much for the bug report. If this is a recent version of s7 (see S7_DATE in s7.h), I think the problem is that the MSVC version of the code calls unbound_variable where everyone else returns NULL. I don't have access to a machine running MSVC, and I can't remember now why the two case

[CM] Snd 22.8

2022-10-15 Thread bil
Snd 22.8 A bit early, but I want to try something that doesn't fit at the end of the cycle. s7: s7_number_to_real_with_location. s7_wrong_type_error. s7_make_string_wrapper_with_length. s7_make_semipermanent_string. CL-style doc strings, (symbol...) settable. checked: sbcl 2.2.9 __

Re: [CM] Idea: using handles instead of pointers, s7_clone

2022-09-23 Thread bil
I just noticed your s7_clone is not necessarily making a new s7 instance -- in this case you'll have two views into one s7; if these are in separate threads, the two s7's will be colliding in their use of the evaluator -- it is not thread safe in the sense that any number of threads can be calling

Re: [CM] Idea: using handles instead of pointers, s7_clone

2022-09-23 Thread bil
To expand a bit on Elijah's note: I don't think this will reduce cache misses or make objects smaller. To evaluate anything, you have to access the things being evaluated. Most of the points in the article you mention do not apply to s7 -- s7 manages its own memory, the cells are already packed t

[CM] Snd 22.7

2022-09-13 Thread bil
Snd 22.7 s7: (*s7* 'number-separator) and heap-analyze|scan and stomping on bugs, of course checked: sbcl 2.2.8 Thanks!: Tito Latini, IOhannes Zmoelnig ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinf

  1   2   3   4   5   6   7   >