From zmoelnig at iem.at Mon Jul 1 23:59:39 2024 From: zmoelnig at iem.at (IOhannes m zmoelnig) Date: Tue, 2 Jul 2024 08:59:39 +0200 Subject: [CM] Snd 24.5 In-Reply-To: <4f1b38eb0bc92fd2d908d5283db2b293@ccrma.stanford.edu> References: <4f1b38eb0bc92fd2d908d5283db2b293@ccrma.stanford.edu> Message-ID: On 6/28/24 15:09, bil at ccrma.Stanford.EDU wrote: > Snd 24.5: where? gfasmdr IOhannes -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature.asc Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: From anders at avinjar.no Tue Jul 2 00:44:02 2024 From: anders at avinjar.no (Anders Vinjar) Date: Tue, 02 Jul 2024 09:44:02 +0200 Subject: [CM] Snd 24.5 In-Reply-To: (IOhannes m. zmoelnig's message of "Tue, 2 Jul 2024 08:59:39 +0200") References: <4f1b38eb0bc92fd2d908d5283db2b293@ccrma.stanford.edu> Message-ID: <87h6d8fdbx.fsf@avinjar.no> > where? /ftp:ftp at ccrma-ftp.stanford.edu:/pub/Lisp/snd-24.5.tar.gz or /ftp:ftp at ccrma-ftp.stanford.edu:/pub/Lisp/snd-24.tar.gz From zmoelnig at iem.at Tue Jul 2 00:51:05 2024 From: zmoelnig at iem.at (IOhannes m zmoelnig) Date: Tue, 2 Jul 2024 09:51:05 +0200 Subject: [CM] Snd 24.5 In-Reply-To: <87h6d8fdbx.fsf@avinjar.no> References: <4f1b38eb0bc92fd2d908d5283db2b293@ccrma.stanford.edu> <87h6d8fdbx.fsf@avinjar.no> Message-ID: <3b351aa9-cc42-480f-b105-e4cf7d3a45ba@iem.at> On 7/2/24 09:44, Anders Vinjar wrote: > > > where? > > /ftp:ftp at ccrma-ftp.stanford.edu:/pub/Lisp/snd-24.5.tar.gz > > or > > /ftp:ftp at ccrma-ftp.stanford.edu:/pub/Lisp/snd-24.tar.gz > thanks. cool to see an ftp server still in action these days. snd is also available via https: however: the website itself () still lists the old 24.4 release. For the Debian packaging of 'snd', I heavily rely on a public website that lists the current release. automation tools build on that. it would be cool if the homepage could be updated. gfdan IOhannes -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature.asc Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: From bil at ccrma.Stanford.EDU Tue Jul 2 05:06:29 2024 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 02 Jul 2024 05:06:29 -0700 Subject: [CM] Snd 24.5 In-Reply-To: <3b351aa9-cc42-480f-b105-e4cf7d3a45ba@iem.at> References: <4f1b38eb0bc92fd2d908d5283db2b293@ccrma.stanford.edu> <87h6d8fdbx.fsf@avinjar.no> <3b351aa9-cc42-480f-b105-e4cf7d3a45ba@iem.at> Message-ID: <5b226485ca3e67560e59539018215476@ccrma.stanford.edu> Thanks for pointing this out -- I have updated the homepage. From iainduncanlists at gmail.com Tue Jul 2 07:58:37 2024 From: iainduncanlists at gmail.com (Iain Duncan) Date: Tue, 2 Jul 2024 07:58:37 -0700 Subject: [CM] S7 wrapper around SDL In-Reply-To: <6ddb5b097ca0e733d27a418e0490348d@ccrma.stanford.edu> References: <202406241858.45OIwL4v058047@zeus.jtan.com> <6ddb5b097ca0e733d27a418e0490348d@ccrma.stanford.edu> Message-ID: Very cool, I looked into SDL a while back and am interested to see how this progresses! Please do keep us posted here. :-) iain On Tue, Jun 25, 2024 at 2:29?AM wrote: > 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 Luck with SDL/OpenGL (I was > pleased to see openGL in use!) > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iainduncanlists at gmail.com Tue Jul 2 07:58:59 2024 From: iainduncanlists at gmail.com (Iain Duncan) Date: Tue, 2 Jul 2024 07:58:59 -0700 Subject: [CM] Snd 24.5 In-Reply-To: <5b226485ca3e67560e59539018215476@ccrma.stanford.edu> References: <4f1b38eb0bc92fd2d908d5283db2b293@ccrma.stanford.edu> <87h6d8fdbx.fsf@avinjar.no> <3b351aa9-cc42-480f-b105-e4cf7d3a45ba@iem.at> <5b226485ca3e67560e59539018215476@ccrma.stanford.edu> Message-ID: Thanks for all the work again! :-) iain On Tue, Jul 2, 2024 at 5:06?AM wrote: > Thanks for pointing this out -- I have updated the > homepage. > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iainduncanlists at gmail.com Tue Jul 2 08:00:42 2024 From: iainduncanlists at gmail.com (Iain Duncan) Date: Tue, 2 Jul 2024 08:00:42 -0700 Subject: [CM] making a debugger? Message-ID: Hi Bill and other s7 folks. I'm curious what the smartest way to make execution stop in the middle of some code is, for the purpose of having an interactive debugger. ideally with as little change to containing code as possible. Perhaps this exists already in the s7 sources and I just haven't found it! thanks iain -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Tue Jul 2 09:20:53 2024 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 02 Jul 2024 09:20:53 -0700 Subject: [CM] =?utf-8?q?making_a_debugger=3F?= In-Reply-To: References: Message-ID: <9b8de4958316c723178c50aca951c39b@ccrma.stanford.edu> 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 file debug.scm has (very lightly tested) functions for break points and the like-- it also could drop into a repl. I have wanted for a long time to tie the object->let code in s7 into a debugger, so you could examine structures and so on. s7 badly needs a decent debugger. From iainduncanlists at gmail.com Tue Jul 2 09:22:17 2024 From: iainduncanlists at gmail.com (Iain Duncan) Date: Tue, 2 Jul 2024 09:22:17 -0700 Subject: [CM] making a debugger? In-Reply-To: <9b8de4958316c723178c50aca951c39b@ccrma.stanford.edu> References: <9b8de4958316c723178c50aca951c39b@ccrma.stanford.edu> Message-ID: Thanks Bill, I'll take a look at those. Trying to rig up at least a half a debugger for my WASM use. :-) iain On Tue, Jul 2, 2024 at 9:20?AM wrote: > 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 file debug.scm has (very lightly tested) > functions for break points and the like-- it also could drop into > a repl. I have wanted for a long time to tie the object->let > code in s7 into a debugger, so you could examine structures > and so on. s7 badly needs a decent debugger. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chohag at jtan.com Thu Jul 4 01:23:23 2024 From: chohag at jtan.com (chohag at jtan.com) Date: Thu, 04 Jul 2024 09:23:23 +0100 Subject: [CM] S7 wrapper around SDL In-Reply-To: References: <202406241858.45OIwL4v058047@zeus.jtan.com> <6ddb5b097ca0e733d27a418e0490348d@ccrma.stanford.edu> Message-ID: <202407040823.4648NPwj107749@zeus.jtan.com> SDL is a means to an end not the goal so I wrote the wrapper to support the small sliver of SDL that I need and left it alone (progress since my last email: zero). In fact I originally obtained an OpenGL context using xlib directly but for this project I thought the portability would be nice despite the extra baggage so SDL was sort of wedged in at the last minute. I was hoping to get the code it's part of into a clean and practical state to show off the use of s7sdl but of course that just slips back ever further, so I've extracted the relevant parts from that into their own demo: git clone http://zeus.jtan.com/~chohag/balls.git There's a lot in there that's not particularly relevant (not to mention incomplete) because I didn't plan on making something new for this demo: I've only stripped out some parts that were wholly unnecessary such as fonts and tidied up a bit. The main addition to the SDL wrapper itself is the draw tree implementation split between balls.w and draw.w and of course the event handler. Matthew Iain Duncan writes: > --00000000000078c0c4061c44f3c4 > Content-Type: text/plain; charset="UTF-8" > Content-Transfer-Encoding: quoted-printable > > Very cool, I looked into SDL a while back and am interested to see how this > progresses! Please do keep us posted here. :-) > > iain > > On Tue, Jun 25, 2024 at 2:29=E2=80=AFAM wrote: > > > 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 Luck with SDL/OpenGL (I was > > pleased to see openGL in use!) > > > > _______________________________________________ > > Cmdist mailing list > > Cmdist at ccrma.stanford.edu > > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > > From kennethflak at protonmail.com Fri Jul 5 02:28:27 2024 From: kennethflak at protonmail.com (Kenneth Flak) Date: Fri, 05 Jul 2024 09:28:27 +0000 Subject: [CM] Setting up snd/emacs Message-ID: <87cyns6vd2.fsf@protonmail.com> Hi, I'm somewhat belatedly starting to realize the absolute awesomeness of emacs, and I'm now trying to get snd working with it... However, my initial attempts aren't workind very well.. This is what I have in my init.el right now, and I was hoping that it would do something magical whenever I open a .csm file (as suggested in the docs) (load-file "~/dots/emacs/inf-snd.el") (set-default 'auto-mode-alist (append '(("\\.rbs$" . snd-ruby-mode) ("\\.cms$" . snd-scheme-mode)) auto-mode-alist)) (autoload 'run-snd-scheme "inf-snd" "Start inferior Snd-Scheme process" t) (setq inf-snd-scheme-program-name "snd -separate") No magic is happening, unfortunately. I am left hanging in Fundamental mode and that's about it... The snd-*-commands show up in M-x, but they don't really do very much. I'm running emacs 29.4, arch linux and the latest version of sndwarp Grateful for any help! Best, Kenneth From bil at ccrma.Stanford.EDU Fri Jul 5 10:41:17 2024 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Fri, 05 Jul 2024 10:41:17 -0700 Subject: [CM] Setting up snd/emacs In-Reply-To: <87cyns6vd2.fsf@protonmail.com> References: <87cyns6vd2.fsf@protonmail.com> Message-ID: <0c1ab5cd04c416a7b79f3be8eeab9c26@ccrma.stanford.edu> This is probably a typo, but just in case... > I open a .csm file but you've set the autoload-file for .cms files? From kennethflak at protonmail.com Fri Jul 5 12:09:18 2024 From: kennethflak at protonmail.com (Kenneth Flak) Date: Fri, 05 Jul 2024 19:09:18 +0000 Subject: [CM] Setting up snd/emacs In-Reply-To: <0c1ab5cd04c416a7b79f3be8eeab9c26@ccrma.stanford.edu> References: <87cyns6vd2.fsf@protonmail.com> <0c1ab5cd04c416a7b79f3be8eeab9c26@ccrma.stanford.edu> Message-ID: <87le2fac6c.fsf@protonmail.com> Doh! I completely missed that typo... Fixing this seems to do the trick :-D Thanks so much for pointing out my latent dyslexia Kenneth writes: > This is probably a typo, but just in case... > >> I open a .csm file > > but you've set the autoload-file for .cms files? From kennethflak at protonmail.com Fri Jul 5 12:10:10 2024 From: kennethflak at protonmail.com (Kenneth Flak) Date: Fri, 05 Jul 2024 19:10:10 +0000 Subject: [CM] Setting up snd/emacs In-Reply-To: References: <87cyns6vd2.fsf@protonmail.com> Message-ID: <87h6d3ac4v.fsf@protonmail.com> "Kjetil Matheussen" writes: Very nice tip indeed. Will definitely look into it! Best, Kenneth > Just a small tip: > > I'm using the s7webserver (included with s7) to communicate with > snd from emacs. > This way you don't have to run the s7 process directly in emacs. > You just communicate back and forth between s7 and emacs on a > socket. > > If s7 crashes or hangs, emacs does not crash or hang, and vice > versa. > > You can also restart s7 at any time without having to restart > scheme in emacs. > > My .emacs looks has these two lines: > (setq inferior-scheme-program "/home/kjetil/bin/scheme") > (setq scheme-program-name "/home/kjetil/bin/scheme") > > And /home/kjetil/bin/scheme looks like this: > lrwxrwxrwx. 1 kjetil kjetil 47 Jul 5 12:27 scheme -> > /home/kjetil/s7/s7webserver/s7webserver_repl.py > > (make sure you use python2 for the script, python3 does not seem > to work) > > To compile up s7webserver, this should be enough: > cd s7webserver > make > > > > On Fri, Jul 5, 2024 at 11:31?AM Kenneth Flak > wrote: >> >> >> Hi, >> >> I'm somewhat belatedly starting to realize the absolute >> awesomeness of emacs, and I'm now trying to get snd working >> with >> it... However, my initial attempts aren't workind very well.. >> >> This is what I have in my init.el right now, and I was hoping >> that >> it would do something magical whenever I open a .csm file (as >> suggested in the docs) >> >> (load-file "~/dots/emacs/inf-snd.el") >> (set-default 'auto-mode-alist >> (append '(("\\.rbs$" . snd-ruby-mode) >> ("\\.cms$" . snd-scheme-mode)) >> auto-mode-alist)) >> (autoload 'run-snd-scheme "inf-snd" "Start inferior >> Snd-Scheme >> process" t) >> (setq inf-snd-scheme-program-name "snd -separate") >> >> No magic is happening, unfortunately. I am left hanging in >> Fundamental mode and that's about it... The snd-*-commands show >> up >> in M-x, but they don't really do very much. >> >> I'm running emacs 29.4, arch linux and the latest version of >> sndwarp >> >> Grateful for any help! >> >> Best, >> Kenneth >> >> >> _______________________________________________ >> Cmdist mailing list >> Cmdist at ccrma.stanford.edu >> https://cm-mail.stanford.edu/mailman/listinfo/cmdist From chohag at jtan.com Sun Jul 7 12:32:38 2024 From: chohag at jtan.com (chohag at jtan.com) Date: Sun, 07 Jul 2024 20:32:38 +0100 Subject: [CM] SDL is unchanged still but here's another for ImGui Message-ID: <202407071932.467JWeXU425428@zeus.jtan.com> Continuing from my SDL wrapper I have an S7 interface to ImGui. As with SDL it's just been started and I've only got as far as I need to make sure the libraries initialise and talk to each other. On the other hand in both cases what's left is mostly writing the S7 interface functions which for the most part should require only naming the constant or function. Anyone like writing long lists of repetetive code? Unfortunately due to the way I've put together the project these libraries are for, I've had to abandon s7imgui.scm and write it in C directly but converting it back to a scheme module is straightforward and (I've tested this) the ImGui .o files can be linked into a loadable .so by cload.scm. I'm copying the ImGui mailing list in to this email (if they've got one, the project looks very modern) so they're aware that there's another language interface in the works; any comments or suggestions there are very welcome. The demo can (still) be cloned from http://zeus.jtan.com/~chohag/balls.git The interesting files for ImGui are: cimgui.cpp & cimgui.h - C interface to ImGui s7imgui.w - S7 wrapper around cimgui glimgui.wpp - renderer, the "backend" in ImGui terms And of course (build-ui) and the surrounding code from balls.scm. The backend in glimgui.wpp expects to be used with the threaded OpenGL draw tree that builds on s7sdl.scm (the undocumented draw.w) but only *uses* the wrapper in s7imgui.w, it's not an essential part of it. Finally if anyone is interested I have ~750 lines of nuklear.scm which I got to as far as displaying a window before I decided to use ImGui instead. I'll not be using it again so if anyone wants to finish an S7 wrapper around nuklear then let me know before it ends up getting lost in the bowels of my $HOME. Matthew ... Too modern for a mailing list, there is at least a contact address. From gray at nxg.name Mon Jul 8 07:43:21 2024 From: gray at nxg.name (Norman Gray) Date: Mon, 08 Jul 2024 15:43:21 +0100 Subject: [CM] SDL is unchanged still but here's another for ImGui In-Reply-To: <202407071932.467JWeXU425428@zeus.jtan.com> References: <202407071932.467JWeXU425428@zeus.jtan.com> Message-ID: <98B36E45-B0B9-461B-B43B-8098BA75D67B@nxg.name> Matthew, hello. On 7 Jul 2024, at 20:32, chohag at jtan.com wrote: > On the other hand in both cases what's left is mostly writing the > S7 interface functions which for the most part should require only > naming the constant or function. Anyone like writing long lists of > repetetive code? Writing no; generating... sometimes. Faced with a similar problem, I've used s7 to generate C before. Specifically, I can point towards util-extra.c.in at [1], which includes #(...) forms within the source, which expand to C, using a very simple function in scheme-macro-filter.scm there. I take the opportunity to mention this, partly to join in very late on a snd/s7 list thread of a month or so ago, expressing communal enthusiasm for s7 (thread 's7 got some love in the Lisp game jam'). The program I'm pointing to does a lot of its work in s7, although (in the terms of the blogpost which started that thread) I can't tell if it uses the 'icing' or 'cake' model: C calls s7 main calls C calls s7. The point of this paragraph is to log that I've become more and more of an s7 fan, in the sense that it seems to have exactly the right tone to match the extension problem very well. So thanks, Bill. Best wishes, Norman [1] https://heptapod.host/nxg/beastie/ -- Norman Gray : https://nxg.me.uk From chohag at jtan.com Mon Jul 8 10:48:26 2024 From: chohag at jtan.com (chohag at jtan.com) Date: Mon, 08 Jul 2024 18:48:26 +0100 Subject: [CM] SDL is unchanged still but here's another for ImGui In-Reply-To: <98B36E45-B0B9-461B-B43B-8098BA75D67B@nxg.name> References: <202407071932.467JWeXU425428@zeus.jtan.com> <98B36E45-B0B9-461B-B43B-8098BA75D67B@nxg.name> Message-ID: <202407081748.468HmSuo042338@zeus.jtan.com> Norman Gray writes: > > Matthew, hello. > > On 7 Jul 2024, at 20:32, chohag at jtan.com wrote: > > > On the other hand in both cases what's left is mostly writing the > > S7 interface functions which for the most part should require only > > naming the constant or function. Anyone like writing long lists of > > repetetive code? > > Writing no; generating... sometimes. Indeed consider that tongue in cheek. I expect (hope!) by the end there'll be a higher ratio of generated:written code. At this early stage I'm more concerned with feeling out how the API will be exported and a little bit of repetition isn't a huge problem yet. There's also still a few features of S7 I'm not taking advantage of yet like function signatures and I wouldn't like to have to inject them into tangled up macros. > Faced with a similar problem, I've used s7 to generate C before. Specifically, I can point towards util-extra.c.in at [1], which includes #(...) forms within the source, which expand to C, using a very simple function in scheme-macro-filter.scm there. Thanks I'll take a look. I tend to lean toward CPP macros through familiarity but that may change as I build up a body of code, provided I can keep magic out of the build process. > I take the opportunity to mention this, partly to join in very late on a snd/s7 list thread of a month or so ago, expressing communal enthusiasm for s7 (thread 's7 got some love in the Lisp game jam'). The program I'm pointing to does a lot of its > work in s7, although (in the terms of the blogpost which started that thread) I can't tell if it uses the 'icing' or 'cake' model: C calls s7 main calls C calls s7. The point of this paragraph is to log that I've become more and more of an s7 fan, > in the sense that it seems to have exactly the right tone to match the extension problem very well. So thanks, Bill. This is essentially why I've settled on S7. There's no "FFI" as such, instead I can flit back and forth between S7 and C seamlessly as needed. I guess that makes S7 the ... fork? Matthew From gray at nxg.name Mon Jul 8 12:49:36 2024 From: gray at nxg.name (Norman Gray) Date: Mon, 08 Jul 2024 20:49:36 +0100 Subject: [CM] SDL is unchanged still but here's another for ImGui In-Reply-To: <202407081748.468HmSuo042338@zeus.jtan.com> References: <202407071932.467JWeXU425428@zeus.jtan.com> <98B36E45-B0B9-461B-B43B-8098BA75D67B@nxg.name> <202407081748.468HmSuo042338@zeus.jtan.com> Message-ID: Matthew, hello. On 8 Jul 2024, at 18:48, chohag at jtan.com wrote: >> Faced with a similar problem, I've used s7 to generate C before. >> Specifically, I can point towards util-extra.c.in at [1], which >> includes #(...) forms within the source, which expand to C, using a >> very simple function in scheme-macro-filter.scm there. > > Thanks I'll take a look. I tend to lean toward CPP macros through > familiarity but that may change as I build up a body of code, provided > I can keep magic out of the build process. I'm fully sympathetic with the less-magic point of view. I've written a modest amount of CPP macro cleverness over the years, and I find my tolerance for CPP magic has gone _down_ rather than up over the years.[*] As it happens, my previous version of that scheme-macro-filter.scm program was also written in the service of creating an FFI for a library. That is, exactly the problem of writing repetitive code which I might want to change my mind about. I started off writing a pile of CPP macros, and quickly confused myself. I had at the time recently stumbled across s7, thought hmm...., and very quickly knocked together the core of the macro-filter program. Have fun! Norman [*] At one point, a while ago, I participated in the maintenance of a library which was written in object-oriented C. This being the 90s, and C++ still rather unstable, the original author of the library had elected to implement the OO system entirely in CPP macros. This was simultaneously extremely impressive, and completely paralysing, since it meant that almost the only changes I was confident making were cut-and-paste-and-tweak. I've had Views about the desirable features of a macro system ever since. -- Norman Gray : https://nxg.me.uk From chohag at jtan.com Mon Jul 8 15:53:26 2024 From: chohag at jtan.com (chohag at jtan.com) Date: Mon, 08 Jul 2024 23:53:26 +0100 Subject: [CM] SDL is unchanged still but here's another for ImGui In-Reply-To: References: <202407071932.467JWeXU425428@zeus.jtan.com> <98B36E45-B0B9-461B-B43B-8098BA75D67B@nxg.name> <202407081748.468HmSuo042338@zeus.jtan.com> Message-ID: <202407082253.468MrSd2063493@zeus.jtan.com> Norman Gray writes: > > I'm fully sympathetic with the less-magic point of view. I've written a > modest amount of CPP macro cleverness over the years, and I find my > tolerance for CPP magic has gone _down_ rather than up over the > years.[*] > > As it happens, my previous version of that scheme-macro-filter.scm > program was also written in the service of creating an FFI for a > library. That is, exactly the problem of writing repetitive code which > I might want to change my mind about. I started off writing a pile of > CPP macros, and quickly confused myself. I had at the time recently I think we forget how powerful our tools are sometimes. Consider the lists of constants in s7sdl.scm. Each group has a shell command that will extract the list from the SDL headers in the event that it changes but in fact these were worked out after I'd copied the lists into my editor with a simple mouse motion (it fits on a screen!) and sorted and formatted them with a few keystrokes. That would not have been fun 25 years ago. Similarly with a few simple commands I can turn a list of symbols into a sequence of instructions and all their metadata quicker than I can work out how to write a macro to get the compiler to do it. Sometimes I feel a bit dirty but I'm usually three or four tasks ahead already. > [*] At one point, a while ago, I participated in the maintenance of a > library which was written in object-oriented C. This being the 90s, and > C++ still rather unstable, the original author of the library had > elected to implement the OO system entirely in CPP macros. This was Wild times. But on the other hand at least we had very little JavaScript. However on the gripping hand there was perl. Matthew From omar at miracleworld.net Mon Jul 8 11:06:47 2024 From: omar at miracleworld.net (Omar Cornut) Date: Mon, 8 Jul 2024 20:06:47 +0200 Subject: [CM] SDL is unchanged still but here's another for ImGui In-Reply-To: <202407081748.468HmSuo042338@zeus.jtan.com> References: <202407071932.467JWeXU425428@zeus.jtan.com> <98B36E45-B0B9-461B-B43B-8098BA75D67B@nxg.name> <202407081748.468HmSuo042338@zeus.jtan.com> Message-ID: Hello, Language bindings for dear imgui may be added at https://github.com/ocornut/imgui/wiki/Bindings#language-bindings May I recommend you may be able to use Dear Bindings for bindings generation: https://github.com/ocornut/imgui/wiki/Bindings#binding-generators Cheers, (Otherwise, please kindly remove me and the dearimgui address from this thread. ? i am not really comfortable with this address being included in a mailing list post as it seems like a likely vector for bots to index the address. Thank you.) On Mon 8 Jul 2024 at 19:48, wrote: > Norman Gray writes: > > > > Matthew, hello. > > > > On 7 Jul 2024, at 20:32, chohag at jtan.com wrote: > > > > > On the other hand in both cases what's left is mostly writing the > > > S7 interface functions which for the most part should require only > > > naming the constant or function. Anyone like writing long lists of > > > repetetive code? > > > > Writing no; generating... sometimes. > > Indeed consider that tongue in cheek. I expect (hope!) by the end > there'll be a higher ratio of generated:written code. At this early > stage I'm more concerned with feeling out how the API will be > exported and a little bit of repetition isn't a huge problem yet. > > There's also still a few features of S7 I'm not taking advantage > of yet like function signatures and I wouldn't like to have to > inject them into tangled up macros. > > > Faced with a similar problem, I've used s7 to generate C before. > Specifically, I can point towards util-extra.c.in at [1], which includes > #(...) forms within the source, which expand to C, using a very simple > function in scheme-macro-filter.scm there. > > Thanks I'll take a look. I tend to lean toward CPP macros through > familiarity but that may change as I build up a body of code, provided > I can keep magic out of the build process. > > > I take the opportunity to mention this, partly to join in very late on a > snd/s7 list thread of a month or so ago, expressing communal enthusiasm for > s7 (thread 's7 got some love in the Lisp game jam'). The program I'm > pointing to does a lot of its > > work in s7, although (in the terms of the blogpost which started that > thread) I can't tell if it uses the 'icing' or 'cake' model: C calls s7 > main calls C calls s7. The point of this paragraph is to log that I've > become more and more of an s7 fan, > > in the sense that it seems to have exactly the right tone to match the > extension problem very well. So thanks, Bill. > > This is essentially why I've settled on S7. There's no "FFI" as > such, instead I can flit back and forth between S7 and C seamlessly > as needed. I guess that makes S7 the ... fork? > > Matthew > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From omar at miracleworld.net Mon Jul 8 11:12:33 2024 From: omar at miracleworld.net (Omar Cornut) Date: Mon, 8 Jul 2024 20:12:33 +0200 Subject: [CM] SDL is unchanged still but here's another for ImGui In-Reply-To: References: <202407071932.467JWeXU425428@zeus.jtan.com> <98B36E45-B0B9-461B-B43B-8098BA75D67B@nxg.name> <202407081748.468HmSuo042338@zeus.jtan.com> Message-ID: (Just to clarify i am happy to help and answer specific questions (on github) but here it seems i was added to a seemingly random thread for no particular reason :) but let me know if I missed something! Good luck!) On Mon 8 Jul 2024 at 20:06, Omar Cornut wrote: > Hello, > > Language bindings for dear imgui may be added at > https://github.com/ocornut/imgui/wiki/Bindings#language-bindings > > May I recommend you may be able to use Dear Bindings for bindings > generation: > https://github.com/ocornut/imgui/wiki/Bindings#binding-generators > > Cheers, > > (Otherwise, please kindly remove me and the dearimgui address from this > thread. ? i am not really comfortable with this address being included in > a mailing list post as it seems like a likely vector for bots to index the > address. Thank you.) > > > > On Mon 8 Jul 2024 at 19:48, wrote: > >> Norman Gray writes: >> > >> > Matthew, hello. >> > >> > On 7 Jul 2024, at 20:32, chohag at jtan.com wrote: >> > >> > > On the other hand in both cases what's left is mostly writing the >> > > S7 interface functions which for the most part should require only >> > > naming the constant or function. Anyone like writing long lists of >> > > repetetive code? >> > >> > Writing no; generating... sometimes. >> >> Indeed consider that tongue in cheek. I expect (hope!) by the end >> there'll be a higher ratio of generated:written code. At this early >> stage I'm more concerned with feeling out how the API will be >> exported and a little bit of repetition isn't a huge problem yet. >> >> There's also still a few features of S7 I'm not taking advantage >> of yet like function signatures and I wouldn't like to have to >> inject them into tangled up macros. >> >> > Faced with a similar problem, I've used s7 to generate C before. >> Specifically, I can point towards util-extra.c.in at [1], which includes >> #(...) forms within the source, which expand to C, using a very simple >> function in scheme-macro-filter.scm there. >> >> Thanks I'll take a look. I tend to lean toward CPP macros through >> familiarity but that may change as I build up a body of code, provided >> I can keep magic out of the build process. >> >> > I take the opportunity to mention this, partly to join in very late on >> a snd/s7 list thread of a month or so ago, expressing communal enthusiasm >> for s7 (thread 's7 got some love in the Lisp game jam'). The program I'm >> pointing to does a lot of its >> > work in s7, although (in the terms of the blogpost which started that >> thread) I can't tell if it uses the 'icing' or 'cake' model: C calls s7 >> main calls C calls s7. The point of this paragraph is to log that I've >> become more and more of an s7 fan, >> > in the sense that it seems to have exactly the right tone to match the >> extension problem very well. So thanks, Bill. >> >> This is essentially why I've settled on S7. There's no "FFI" as >> such, instead I can flit back and forth between S7 and C seamlessly >> as needed. I guess that makes S7 the ... fork? >> >> Matthew >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From chohag at jtan.com Sun Jul 14 12:31:12 2024 From: chohag at jtan.com (chohag at jtan.com) Date: Sun, 14 Jul 2024 20:31:12 +0100 Subject: [CM] Memory leak (with patch) Message-ID: <202407141931.46EJVE3L365243@zeus.jtan.com> I just spent an hour looking for a memory leak that isn't there. This small patch might have saved me the trouble. :) Cheers, Matthew -------------- next part -------------- --- s7/profile.scm Sun Oct 15 16:07:25 2023 +++ balls/profile.scm Sun Jul 14 20:24:01 2024 @@ -80,7 +80,7 @@ (max 0.0 (- (car (vector-ref vect 0)) excl)))) (let ((gc-info (*s7* 'gc-info))) - (format *profile-port* "cells allocated: ~A, GC calls: ~D, GC time: ~,3F seconds~%" + (format *profile-port* "cell allocations: ~A, GC calls: ~D, GC time: ~,3F seconds~%" (let ((num (with-let *s7* (+ (- heap-size free-heap-size) gc-total-freed)))) (cond ((< num 1000) (format #f "~D" num)) From bil at ccrma.Stanford.EDU Sun Jul 14 13:10:22 2024 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Sun, 14 Jul 2024 13:10:22 -0700 Subject: [CM] Memory leak (with patch) In-Reply-To: <202407141931.46EJVE3L365243@zeus.jtan.com> References: <202407141931.46EJVE3L365243@zeus.jtan.com> Message-ID: <37ba8bf4df9723ab476bc2e8d4e44150@ccrma.stanford.edu> You were misled by the word "allocated"? The message is reporting overall GC stats. From ahcnz at orcon.net.nz Thu Jul 18 04:48:17 2024 From: ahcnz at orcon.net.nz (adam) Date: Thu, 18 Jul 2024 23:48:17 +1200 Subject: [CM] newbie - how to build and run Message-ID: <5f52acc5957c80855f1501727ac7e277dc27c6c6.camel@orcon.net.nz> System is desktop Ubuntu 20.04 64-bit. snd-24.5.tar.gz unzipped to ~/Downloads/snd-24.5$ $ ./configure --with-pulseaudio $ make ---> Options selected ------------------------- Snd version ...........: 24.5 CFLAGS ................: -O2 -I. -g -O2 LDFLAGS ...............: -Wl,-export-dynamic LIBS...................: -lm -ldl prefix.................: /usr/local extension language.....: s7 audio system...........: pulseaudio graphics toolkit.......: None optional libraries.....: fftw-3.3.8 random features........: environs...............: x86_64-pc-linux-gnu gcc $ make install $ snd ~/csound/test.wav writing libc_s7.c loading libc_s7.so <1> That's promising. Need graphics, so make clean and re-run with --with-gui $ make gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\" -O2 -I. -g -O2 s7.c gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\" -O2 -I. -g -O2 headers.c In file included from snd.h:35, from headers.c:40: snd-x0.h:4:10: fatal error: Xm/XmAll.h: No such file or directory 4 | #include | ^~~~~~~~~~~~ compilation terminated. make: *** [makefile:55: headers.o] Error 1 Perhaps I need --with-motif in place of --with-gui ? What is motif I wonder. With its associated libraries as outlined in README.Snd line 48 ? From cm at jrigg.co.uk Thu Jul 18 05:36:07 2024 From: cm at jrigg.co.uk (John Rigg) Date: Thu, 18 Jul 2024 13:36:07 +0100 Subject: [CM] newbie - how to build and run In-Reply-To: <5f52acc5957c80855f1501727ac7e277dc27c6c6.camel@orcon.net.nz> References: <5f52acc5957c80855f1501727ac7e277dc27c6c6.camel@orcon.net.nz> Message-ID: On Thu, Jul 18, 2024 at 11:48:17PM +1200, adam wrote: > snd-x0.h:4:10: fatal error: Xm/XmAll.h: No such file or directory > 4 | #include > | ^~~~~~~~~~~~ You need to install libmotif-dev package. Use --with-motif. John From zmoelnig at iem.at Thu Jul 18 05:43:06 2024 From: zmoelnig at iem.at (IOhannes m zmoelnig) Date: Thu, 18 Jul 2024 14:43:06 +0200 Subject: [CM] newbie - how to build and run In-Reply-To: <5f52acc5957c80855f1501727ac7e277dc27c6c6.camel@orcon.net.nz> References: <5f52acc5957c80855f1501727ac7e277dc27c6c6.camel@orcon.net.nz> Message-ID: <8319c79a-addd-494a-9a6f-8fd0d774d02e@iem.at> On 7/18/24 13:48, adam wrote: > System is desktop Ubuntu 20.04 64-bit. [...] > Perhaps I need --with-motif in place of --with-gui ? What is motif I wonder. > With its associated libraries as outlined in README.Snd line 48 ? > since you are on a Debian-derivative, the easiest way to install all the dependencies needed (to build the Debian package 'snd'), is to 1. enable source repositories (e.g. ) 2. install the dependencies: ``` sudo apt-get build-dep snd ``` this will *probably* give you more than you asked for (but then you could play around with other build-options as well...) gmasr IOhannes -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature.asc Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: From ahcnz at orcon.net.nz Thu Jul 18 22:07:08 2024 From: ahcnz at orcon.net.nz (adam) Date: Fri, 19 Jul 2024 17:07:08 +1200 Subject: [CM] newbie - how to build and run In-Reply-To: <8319c79a-addd-494a-9a6f-8fd0d774d02e@iem.at> References: <5f52acc5957c80855f1501727ac7e277dc27c6c6.camel@orcon.net.nz> <8319c79a-addd-494a-9a6f-8fd0d774d02e@iem.at> Message-ID: <213ff1f926fd39596d50be91dd31ccfdd75fa7af.camel@orcon.net.nz> Thank you. It was --with-motif I was looking for. Strangely or not, I can't see libmotif-dev package after $ sudo apt-get build-dep snd The following packages will be REMOVED: adlplug:i386 jackd2 jackd2-firewire libjack-jackd2-0 libjack-jackd2-0:i386 The following NEW packages will be installed: cdbs dh-translations gir1.2-harfbuzz-0.0 icu-devtools intltool jackd1 jq libatk- bridge2.0-dev libatk1.0-dev libatspi2.0-dev libdatrie-dev libdbus-1-dev libegl-dev libegl1-mesa-dev libepoxy-dev libfribidi-dev libgdk-pixbuf2.0-dev libgl-dev libgl1-mesa-dev libgles-dev libgles1 libglvnd-dev libglx-dev libgmp-dev libgmpxx4ldbl libgraphite2-dev libgsl-dev libgtk-3-dev libharfbuzz-dev libharfbuzz- gobject0 libicu-dev libjack-dev libjack0 libjq1 libmpc-dev libmpfr-dev libonig5 libopengl-dev libpango1.0-dev libthai-dev libwayland-bin libwayland-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxkbcommon-dev libxmu-dev libxmu-headers libxrandr-dev libxtst-dev libzita-alsa-pcmi0 libzita-resampler1 pango1.0-tools python3-scour scour wayland-protocols x11proto-input-dev x11proto-randr-dev x11proto- record-dev x11proto-xinerama-dev xutils-dev 0 upgraded, 65 newly installed, 5 to remove and 14 not upgraded. On Thu, 2024-07-18 at 14:43 +0200, IOhannes m zmoelnig wrote: > On 7/18/24 13:48, adam wrote: > > System is desktop Ubuntu 20.04 64-bit. > [...] > > Perhaps I need --with-motif in place of --with-gui ? What is motif I wonder. > > With its associated libraries as outlined in README.Snd line 48 ? > > > > since you are on a Debian-derivative, the easiest way to install all the > dependencies needed (to build the Debian package 'snd'), is to > > 1. enable source repositories (e.g. > ;) > > 2. install the dependencies: > ``` > sudo apt-get build-dep snd > ``` > > this will *probably* give you more than you asked for (but then you > could play around with other build-options as well...) > > gmasr > IOhannes > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist From cm at jrigg.co.uk Thu Jul 18 23:47:51 2024 From: cm at jrigg.co.uk (John Rigg) Date: Fri, 19 Jul 2024 07:47:51 +0100 Subject: [CM] newbie - how to build and run In-Reply-To: <213ff1f926fd39596d50be91dd31ccfdd75fa7af.camel@orcon.net.nz> References: <5f52acc5957c80855f1501727ac7e277dc27c6c6.camel@orcon.net.nz> <8319c79a-addd-494a-9a6f-8fd0d774d02e@iem.at> <213ff1f926fd39596d50be91dd31ccfdd75fa7af.camel@orcon.net.nz> Message-ID: On Fri, Jul 19, 2024 at 05:07:08PM +1200, adam wrote: > Thank you. It was --with-motif I was looking for. > > Strangely or not, I can't see libmotif-dev package after > $ sudo apt-get build-dep snd > > > The following packages will be REMOVED: > adlplug:i386 jackd2 jackd2-firewire libjack-jackd2-0 libjack-jackd2-0:i386 > The following NEW packages will be installed: > cdbs dh-translations gir1.2-harfbuzz-0.0 icu-devtools intltool jackd1 jq libatk- > bridge2.0-dev libatk1.0-dev libatspi2.0-dev libdatrie-dev libdbus-1-dev > libegl-dev libegl1-mesa-dev libepoxy-dev libfribidi-dev libgdk-pixbuf2.0-dev libgl-dev > libgl1-mesa-dev libgles-dev libgles1 libglvnd-dev libglx-dev libgmp-dev > libgmpxx4ldbl libgraphite2-dev libgsl-dev libgtk-3-dev libharfbuzz-dev libharfbuzz- > gobject0 libicu-dev libjack-dev libjack0 libjq1 libmpc-dev libmpfr-dev > libonig5 libopengl-dev libpango1.0-dev libthai-dev libwayland-bin libwayland-dev > libxcomposite-dev libxcursor-dev libxdamage-dev libxfixes-dev libxft-dev > libxi-dev libxinerama-dev libxkbcommon-dev libxmu-dev libxmu-headers libxrandr-dev > libxtst-dev libzita-alsa-pcmi0 libzita-resampler1 pango1.0-tools > python3-scour scour wayland-protocols x11proto-input-dev x11proto-randr-dev x11proto- > record-dev x11proto-xinerama-dev xutils-dev > 0 upgraded, 65 newly installed, 5 to remove and 14 not upgraded. Looks like Ubuntu is using an older version of snd with the optional GTK3 GUI. That option was removed in recent versions of snd. Current version uses Motif. John From ahcnz at orcon.net.nz Fri Jul 19 04:09:17 2024 From: ahcnz at orcon.net.nz (adam) Date: Fri, 19 Jul 2024 23:09:17 +1200 Subject: [CM] newbie - how to build and run In-Reply-To: References: <5f52acc5957c80855f1501727ac7e277dc27c6c6.camel@orcon.net.nz> <8319c79a-addd-494a-9a6f-8fd0d774d02e@iem.at> <213ff1f926fd39596d50be91dd31ccfdd75fa7af.camel@orcon.net.nz> Message-ID: Installed the libmotif-dev package. Get a new make error as below. Perhaps this is X libs missing. Perhaps I should apt-get build-dep snd just to get all X sources? gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\" -O2 -I. -g -O2 snd-find.c gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\" -O2 -I. -g -O2 snd-snd.c gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\" -O2 -I. -g -O2 snd-help.c snd-help.c:117:12: fatal error: X11/xpm.h: No such file or directory 117 | #include | ^~~~~~~~~~~ compilation terminated. make: *** [makefile:55: snd-help.o] Error 1 From bil at ccrma.Stanford.EDU Fri Jul 19 04:37:24 2024 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Fri, 19 Jul 2024 04:37:24 -0700 Subject: [CM] newbie - how to build and run In-Reply-To: References: <5f52acc5957c80855f1501727ac7e277dc27c6c6.camel@orcon.net.nz> <8319c79a-addd-494a-9a6f-8fd0d774d02e@iem.at> <213ff1f926fd39596d50be91dd31ccfdd75fa7af.camel@orcon.net.nz> Message-ID: 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. From cm at jrigg.co.uk Fri Jul 19 12:17:30 2024 From: cm at jrigg.co.uk (John Rigg) Date: Fri, 19 Jul 2024 20:17:30 +0100 Subject: [CM] newbie - how to build and run In-Reply-To: References: <5f52acc5957c80855f1501727ac7e277dc27c6c6.camel@orcon.net.nz> <8319c79a-addd-494a-9a6f-8fd0d774d02e@iem.at> <213ff1f926fd39596d50be91dd31ccfdd75fa7af.camel@orcon.net.nz> Message-ID: On Fri, Jul 19, 2024 at 11:09:17PM +1200, adam wrote: > Installed the libmotif-dev package. Get a new make error as below. > > Perhaps this is X libs missing. Perhaps I should apt-get build-dep snd > just to get all X sources? If you do that you'll end up with all the GTK3 development stuff, which is huge and not required here. As Bil pointed out you'll need libxpm-dev and libxt-dev, maybe some others (check the docs). John From ahcnz at orcon.net.nz Fri Jul 19 18:00:01 2024 From: ahcnz at orcon.net.nz (adam) Date: Sat, 20 Jul 2024 13:00:01 +1200 Subject: [CM] newbie - how to build and run In-Reply-To: References: <5f52acc5957c80855f1501727ac7e277dc27c6c6.camel@orcon.net.nz> <8319c79a-addd-494a-9a6f-8fd0d774d02e@iem.at> <213ff1f926fd39596d50be91dd31ccfdd75fa7af.camel@orcon.net.nz> Message-ID: On Fri, 2024-07-19 at 20:17 +0100, John Rigg wrote: > On Fri, Jul 19, 2024 at 11:09:17PM +1200, adam wrote: > > Installed the libmotif-dev package. Get a new make error as below. > > > > Perhaps this is X libs missing. Perhaps I should apt-get build-dep snd > > just to get all X sources? > > If you do that you'll end up with all the GTK3 development stuff, which > is huge and not required here. > > As Bil pointed out you'll need libxpm-dev and libxt-dev, maybe some others > (check the docs). > > John > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist Thank you. Those two 2 libraries were needed. Pops up with the GUI now. $ ./configure --with-gui --with-pulseaudio --with-gl The high-lighted text in the pull-down options is a little hard to read, is my only grumble. Am up and running so I'll work through Getting Started. From kennethflak at protonmail.com Tue Jul 23 02:00:29 2024 From: kennethflak at protonmail.com (Kenneth Flak) Date: Tue, 23 Jul 2024 09:00:29 +0000 Subject: [CM] Applying a function to every file in dir? Message-ID: <87v80wbhzo.fsf@protonmail.com> Hi guys, What is the appropriate way to apply this transformation to every file in a directory? Can't find a way to list the files... (let ((stretch 8) (file "/home/kf/Documents/REAPER Media/keen/keen-002.wav")) (with-sound (:output "/home/kf/mySamples/keen/keen-002.wav" :scaled-to (db->linear 0)) (open-sound file) (sndwarp 0 ; beginning (* stretch (/ (framples) (srate))) ; duration file :stretch stretch :randw 0.2 :rev 0.01 :overlaps 40 ) )) Best, Kenneth From kennethflak at protonmail.com Tue Jul 23 02:45:17 2024 From: kennethflak at protonmail.com (Kenneth Flak) Date: Tue, 23 Jul 2024 09:45:17 +0000 Subject: [CM] Applying a function to every file in dir? Message-ID: <87sew0v3v8.fsf@protonmail.com> OK, making some progress here... This cycles through files, but I only get silence in the resulting files. I also get these errors: >; with-sound mus-error: ("can't open /home/kf/snd/keen-007.wav: No such file or directory") >; with-sound mus-error: ("can't open /home/kf/snd/keen-017.wav: No such file or directory") >; with-sound mus-error: ("can't open /home/kf/snd/keen-015.wav: No such file or directory") >; with-sound mus-error: ("can't open /home/kf/snd/keen-006.wav: No such file or directory") >; with-sound mus-error: ("can't open /home/kf/snd/keen-009.wav: No such file or directory") which is weird, as I haven't specified that directory...? Anyway, the current code is: (let ((stretch 8) (indir "/home/kf/Documents/REAPER Media/keen/") (outdir "/home/kf/mySamples/keen/")) (for-each-sound-file (lambda (file) (with-sound (:output (string-append outdir file) :scaled-to (db->linear 0)) (open-sound (string-append indir file)) (sndwarp 0 ; beginning (* stretch (/ (framples) (srate))) ; duration file :stretch stretch :randw 0.2 :rev 0.01 :overlaps 40 ))) indir)) Grateful for any help! Best, Kenneth Kenneth Flak writes: > Hi guys, > > What is the appropriate way to apply this transformation to > every file > in a directory? Can't find a way to list the files... > > (let ((stretch 8) > (file "/home/kf/Documents/REAPER Media/keen/keen-002.wav")) > (with-sound (:output "/home/kf/mySamples/keen/keen-002.wav" > :scaled-to (db->linear 0)) > (open-sound file) > (sndwarp 0 ; beginning > (* stretch (/ (framples) (srate))) ; duration > file > :stretch stretch > :randw 0.2 > :rev 0.01 > :overlaps 40 > ) > )) > > Best, > Kenneth From bil at ccrma.Stanford.EDU Tue Jul 23 06:51:36 2024 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 23 Jul 2024 06:51:36 -0700 Subject: [CM] =?utf-8?q?Applying_a_function_to_every_file_in_dir=3F?= In-Reply-To: <87sew0v3v8.fsf@protonmail.com> References: <87sew0v3v8.fsf@protonmail.com> Message-ID: <164c7b5862707a1609f7a8399b395053@ccrma.stanford.edu> 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). From kennethflak at protonmail.com Tue Jul 23 10:49:53 2024 From: kennethflak at protonmail.com (Kenneth Flak) Date: Tue, 23 Jul 2024 17:49:53 +0000 Subject: [CM] Applying a function to every file in dir? In-Reply-To: <164c7b5862707a1609f7a8399b395053@ccrma.stanford.edu> References: <87sew0v3v8.fsf@protonmail.com> <164c7b5862707a1609f7a8399b395053@ccrma.stanford.edu> Message-ID: <87frs0uhfl.fsf@protonmail.com> writes: > 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). Hi Bill, Tanks for the tip. I tried to omit (open-sound), but this give me an error: # >framples: no such sound: # "*stdout*"[5]: (sndwarp 0 (* stretch (/ (framples) (srate))) file :stretch stretch :randw 0.2 :rev 0.01 :overlaps 40) Reducing the example to a single file, this is the code: (let ((stretch 8) (file "/home/kf/Documents/REAPER Media/keen/keen-005.wav")) (with-sound (:output "/home/kf/mySamples/keen/keen-005.wav" :scaled-to (db->linear 0)) ;; (open-sound file) ; if I enable this, everything works as it should (sndwarp 0 ; beginning (* stretch (/ (framples) (srate))) ; duration file :stretch stretch ;; :srate 0.5 ; pitch shift. 1.0 unchanged, 0.5 1 octave down. :randw 0.2 :rev 0.01 :overlaps 40 ) )) Kenneth From bil at ccrma.Stanford.EDU Tue Jul 23 12:45:29 2024 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 23 Jul 2024 12:45:29 -0700 Subject: [CM] =?utf-8?q?Applying_a_function_to_every_file_in_dir=3F?= In-Reply-To: <87frs0uhfl.fsf@protonmail.com> References: <87sew0v3v8.fsf@protonmail.com> <164c7b5862707a1609f7a8399b395053@ccrma.stanford.edu> <87frs0uhfl.fsf@protonmail.com> Message-ID: <4c832a8eea8af16e1f6108c5f651c086@ccrma.stanford.edu> 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 gave the full file-name. I think for-each-sound-file passes you the file-names without any directory info. (let ((stretch 8) (indir "/home/kf/Documents/REAPER Media/keen/") (outdir "/home/kf/mySamples/keen/")) (for-each-sound-file (lambda (file) (with-sound (:output (string-append outdir file) :scaled-to (db->linear 0)) (let ((dir+file (string-append indir file))) (sndwarp 0 ; beginning (* stretch (/ (mus-sound-framples dir+file) (mus-sound-srate dir+file))) ; duration dir+file :stretch stretch :randw 0.2 :rev 0.01 :overlaps 40 )))) indir)) From iainduncanlists at gmail.com Thu Jul 25 07:52:54 2024 From: iainduncanlists at gmail.com (Iain Duncan) Date: Thu, 25 Jul 2024 07:52:54 -0700 Subject: [CM] Announcing seriousmusictraining.com - s7-powered online music-ed tools. Message-ID: Hi colleagues, I'm excited to announce that yesterday, on the very last day of my forties (ha), I launched my s7-powered online music ed project. The elevator pitch is essentially: online ear and harmony training tools that don't suck - that are actually effective, efficient, and can be customized for the serious student. The engine is entirely in s7 running in WASM, communicating with a minimal UI/IO layer in JavaScript and using a scheduler running in C++ in a WASM audio worklet. The apps aren't winning any beauty contests, but they work really well and do things I've never seen anywhere else, and being able to build it in Scheme has been fantastic. They work in Chrome, FF, and Edge. I plan to create videos/blogs about how I got my scheme code playing well with JS (and improving it further) and create better example code. If you're interested in looking at it, the demos and videos are the best place to start. http://seriousmusictraining.com Massive thanks to Bill and everyone who has contributed to s7 and helped me out on the list on my path to lisp-infection! :-) iain -------------- next part -------------- An HTML attachment was scrubbed... URL: