From bil at ccrma.Stanford.EDU Wed Jul 1 02:32:31 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 01 Jul 2020 02:32:31 -0700 Subject: [CM] Snd 20.5 Message-ID: Snd 20.5: s7: continued work on gmp stuff checked: sbcl 2.0.5|6 Thanks!: Kjetil, Fernando, James Hearon From chris.actondev at gmail.com Thu Jul 2 02:58:41 2020 From: chris.actondev at gmail.com (Christos Vagias) Date: Thu, 2 Jul 2020 11:58:41 +0200 Subject: [CM] s7: garbage collector bug? Message-ID: Hi Bil, I've stumbled upon something which seems like a bug in the gc. I attach a snippet (which uses google test). I hope it is verbose enough to demonstrate the problem. To summarize, I definced a c_type to handle dynamic float arrays. The test as it is attached passes. However the test will not pass if the line proceeding the "problem 1" comment is uncommented. The 2nd (minor) problem I stumbled upon is that one has to call "(gc)" twice for the free methods to be called. Another comment/question: how come there is no s7_run_gc function? From what I can tell you can only trigger it from the scheme side with "(gc)" -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: gc_snippet.cpp Type: text/x-c++src Size: 1762 bytes Desc: not available URL: From k.s.matheussen at gmail.com Thu Jul 2 04:03:46 2020 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Thu, 2 Jul 2020 13:03:46 +0200 Subject: [CM] s7: garbage collector bug? In-Reply-To: References: Message-ID: Hi Christos, I don't know the exact reason why float_arr_gc__free isn't called immediately in this specific case, although I can think of several, but since S7 doesn't have a precise garbage collector, you can not expect unused objects to be freed immediately. On Thu, Jul 2, 2020 at 12:03 PM Christos Vagias wrote: > > Hi Bil, > > I've stumbled upon something which seems like a bug in the gc. > I attach a snippet (which uses google test). I hope it is verbose enough to demonstrate the problem. > > To summarize, I definced a c_type to handle dynamic float arrays. > The test as it is attached passes. However the test will not pass if the line proceeding the "problem 1" comment is uncommented. > > The 2nd (minor) problem I stumbled upon is that one has to call "(gc)" twice for the free methods to be called. > > Another comment/question: how come there is no s7_run_gc function? From what I can tell you can only trigger it from the scheme side with "(gc)" > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist From k.s.matheussen at gmail.com Thu Jul 2 04:28:12 2020 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Thu, 2 Jul 2020 13:28:12 +0200 Subject: [CM] s7: garbage collector bug? In-Reply-To: References: Message-ID: I guess "gc temporaries" (search for "gc_temps_size" in s7.c) is the most likely reason. On Thu, Jul 2, 2020 at 1:03 PM Kjetil Matheussen wrote: > > Hi Christos, > > I don't know the exact reason why float_arr_gc__free isn't called > immediately in this specific case, although I can think of several, > but since S7 doesn't have a precise garbage collector, you can not > expect unused objects to be freed immediately. > > On Thu, Jul 2, 2020 at 12:03 PM Christos Vagias > wrote: > > > > Hi Bil, > > > > I've stumbled upon something which seems like a bug in the gc. > > I attach a snippet (which uses google test). I hope it is verbose enough to demonstrate the problem. > > > > To summarize, I definced a c_type to handle dynamic float arrays. > > The test as it is attached passes. However the test will not pass if the line proceeding the "problem 1" comment is uncommented. > > > > The 2nd (minor) problem I stumbled upon is that one has to call "(gc)" twice for the free methods to be called. > > > > Another comment/question: how come there is no s7_run_gc function? From what I can tell you can only trigger it from the scheme side with "(gc)" > > _______________________________________________ > > Cmdist mailing list > > Cmdist at ccrma.stanford.edu > > https://cm-mail.stanford.edu/mailman/listinfo/cmdist From bil at ccrma.Stanford.EDU Thu Jul 2 05:34:35 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Thu, 02 Jul 2020 05:34:35 -0700 Subject: [CM] =?utf-8?q?s7=3A_garbage_collector_bug=3F?= In-Reply-To: References: Message-ID: Kjetil is correct, and this is explained in s7.html. Your object will eventually by gc'd. Calling the gc from C is asking for trouble. From chris.actondev at gmail.com Thu Jul 2 08:15:14 2020 From: chris.actondev at gmail.com (Christos Vagias) Date: Thu, 2 Jul 2020 17:15:14 +0200 Subject: [CM] s7: garbage collector bug? In-Reply-To: References: Message-ID: I see. "S7 doesn't have a precise garbage collector": that was a useful insight. And indeed when making the assignment in a loop (let's say 10 or 100 times) I can see the gc calling the free function. In a loop of 5 times I still had no calls. Thank you both! On Thu, 2 Jul 2020 at 14:34, wrote: > Kjetil is correct, and this is explained in s7.html. > Your object will eventually by gc'd. Calling the gc > from C is asking for trouble. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kennethflak at protonmail.com Tue Jul 7 05:19:26 2020 From: kennethflak at protonmail.com (Kenneth Flak) Date: Tue, 07 Jul 2020 12:19:26 +0000 Subject: [CM] Beginner's tutorials? Message-ID: <20200707121922.o2mhblatzavzyevf@t480s.localdomain> Hi list, I have been thinking of learning snd properly for a while, but I am a bit stuck: the amount of stuff to learn is a bit overwhelming for the limited time I have to dig into these things. Are there any bite-sized tutorials out there for the time-challenged casual learner? My main interest is in relatively simple treatments: bouncing stereo files into mono files, defining a bunch of regions and batch export them, apply some eq and compression, noise suppression, those kinds of things. Currently I am using Audacity for these things, but I like the keyboard-driven/textual interface of snd more, and Audacity doesn't let me get directly destructive with my source files... All the best, Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club From bil at ccrma.Stanford.EDU Tue Jul 7 07:37:21 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 07 Jul 2020 07:37:21 -0700 Subject: [CM] =?utf-8?q?s7=3A_change_subvector_parameter_order=3F?= Message-ID: <268b32dc76d64fffc7bb83c14437cbf5@ccrma.stanford.edu> I'd like to change subvector to be similar to substring: (subvector vect offset len) rather than the current: (subvector vect len (offset 0)). Years ago I thought the offset wouldn't be all that useful -- live and learn. After this change, you could still use the old form via: (define* (subvector vect len (offset 0)) (#_subvector vect offset len)) Does anyone violently object? From bil at ccrma.Stanford.EDU Tue Jul 7 07:45:37 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 07 Jul 2020 07:45:37 -0700 Subject: [CM] =?utf-8?q?Beginner=27s_tutorials=3F?= In-Reply-To: <20200707121922.o2mhblatzavzyevf@t480s.localdomain> References: <20200707121922.o2mhblatzavzyevf@t480s.localdomain> Message-ID: snd.html was intended as that sort of introduction, but it doesn't cover the topics you mention. Also about 20 years ago Dave Phillips wrote a nice intro to Snd, but by Snd 14 it had become so out-dated that I stopped including it in the Snd tarball. It would be good to add a "how to" or "cookbook" section to snd.html. From k.s.matheussen at gmail.com Tue Jul 7 07:52:01 2020 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Tue, 7 Jul 2020 16:52:01 +0200 Subject: [CM] s7: change subvector parameter order? In-Reply-To: <268b32dc76d64fffc7bb83c14437cbf5@ccrma.stanford.edu> References: <268b32dc76d64fffc7bb83c14437cbf5@ccrma.stanford.edu> Message-ID: No objection. My preference would be (subvector vect start end) though. On Tue, Jul 7, 2020 at 4:40 PM wrote: > > I'd like to change subvector to be similar to substring: > (subvector vect offset len) rather than the current: > (subvector vect len (offset 0)). Years ago I thought > the offset wouldn't be all that useful -- live and learn. > After this change, you could still use the old form via: > (define* (subvector vect len (offset 0)) > (#_subvector vect offset len)) > Does anyone violently object? > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist From kennethflak at protonmail.com Tue Jul 7 08:49:54 2020 From: kennethflak at protonmail.com (Kenneth Flak) Date: Tue, 07 Jul 2020 15:49:54 +0000 Subject: [CM] Beginner's tutorials? In-Reply-To: References: <20200707121922.o2mhblatzavzyevf@t480s.localdomain> Message-ID: <20200707154950.xqse6ybltjyhtojw@t480s.localdomain> Just realized that I should have narrowed the scope of my question a bit :-) I enjoyed very much snd.html, and it does work as a good intro. But it would be great to have a kind of cookbook section, and I'd be happy to contribute to it if I could figure out these three things (which I guess should be reasonably simple): 1. record from arbitrary input channel 2. extract mono channel from stereo/multichannel file 3. visually select multiple regions in an audio file and batch export these as separate file. Any help much appreciated! Best, Kenneth -- Roosna & Flak - Contemporary Dance & Music Web: roosnaflak.com Voice: +372 5565 1666 Code: {github,gitlab}.com/kflak Mastodon: @kf at sonomu.club On 7 juli 2020 07:45, bil at ccrma.Stanford.EDU wrote: > >snd.html was intended as that sort of introduction, but it >doesn't cover the topics you mention. Also about 20 years >ago Dave Phillips wrote a nice intro to Snd, but by Snd 14 >it had become so out-dated that I stopped including it in >the Snd tarball. It would be good to add a "how to" or >"cookbook" section to snd.html. > From bil at ccrma.Stanford.EDU Tue Jul 7 09:21:07 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 07 Jul 2020 09:21:07 -0700 Subject: [CM] =?utf-8?q?s7=3A_change_subvector_parameter_order=3F?= In-Reply-To: References: <268b32dc76d64fffc7bb83c14437cbf5@ccrma.stanford.edu> Message-ID: > My preference would be (subvector vect start end) though. Right -- that is better. From juanig at ccrma.Stanford.EDU Tue Jul 7 14:08:15 2020 From: juanig at ccrma.Stanford.EDU (Juan Reyes) Date: Tue, 7 Jul 2020 14:08:15 -0700 Subject: [CM] Beginner's tutorials? In-Reply-To: <20200707154950.xqse6ybltjyhtojw@t480s.localdomain> References: <20200707121922.o2mhblatzavzyevf@t480s.localdomain> <20200707154950.xqse6ybltjyhtojw@t480s.localdomain> Message-ID: <8a6475b1-ca49-9d5f-3ce7-b2b68504f0fd@ccrma.stanford.edu> Hi Kenneth, There is a Wiki I wrote -several- years ago here: [1]. And here is another one at Users at PlanetCCRMA: [2]. Some things to keep on mind. It helps to know about the Unix command window and also familiarity with Emacs commands. Its power under the hood is S7, just like with Emacs you can do almost anything imaginable once you know how to do it. As per your questions, Snd's recording interface was awesome to say the least. But AFAIK, I don't think Snd has recording capabilities anymore. As far as extracting a mono channel from an interleaved multichannel file, you can write a S7 function to do that. Cut-and-paste is not as intuitive, but if you know your Emacs commands, sure can be done. In addition to these, you can also do sample-rate conversion on the fly, granulation, eq, and reverb (check controls). However, Don't want to sound over optimistic but to a great extend a lot of signal processing that can be done with Matlab, is possible on S7. I also use it for batch processing of sound files. Most of features are documented or embedded in Snd's 'scm' or 'cms' files. Don't expect Snd to behave like Ardour or Audacity. --* Juan Reyes [1] https://ccrma.stanford.edu/wiki/Snd [2] https://ccrma.stanford.edu/guides/planetccrma/SND.html > Just realized that I should have narrowed the scope of my question a > bit :-) I enjoyed very much snd.html, and it does work as a good > intro. But it would be great to have a kind of cookbook section, and > I'd be happy to contribute to it if I could figure out these three > things (which I guess should be reasonably simple): > > 1. record from arbitrary input channel 2. extract mono channel from > stereo/multichannel file 3. visually select multiple regions in an > audio file and batch export these as separate file. > > Any help much appreciated! > > Best, Kenneth > From juanig at ccrma.Stanford.EDU Tue Jul 7 14:37:08 2020 From: juanig at ccrma.Stanford.EDU (Juan Reyes) Date: Tue, 7 Jul 2020 14:37:08 -0700 Subject: [CM] Beginner's tutorials? In-Reply-To: <20200707154950.xqse6ybltjyhtojw@t480s.localdomain> References: <20200707121922.o2mhblatzavzyevf@t480s.localdomain> <20200707154950.xqse6ybltjyhtojw@t480s.localdomain> Message-ID: <57f26e36-19f1-292d-9017-ec19779b1f09@ccrma.stanford.edu> > 2. extract mono channel from stereo/multichannel file Just found code to extract a channel from a soundfile. Hopefully this would give you a start on Snd's interface. --* Juan ;; instrument or function definition on S7 to be loaded on Snd's ;;;listener:: (definstrument (extract file (start 0.0) (att 1.0) (chan 0)) ;; (let* ((in-file-sr (mus-sound-srate file)) (in-file-dur (/ (frames file) in-file-sr)) (out-start-time 0) (out-duration (- in-file-dur start)) (readA (make-readin :file file :channel chan)) (beg (seconds->samples out-start-time)) (end (seconds->samples in-file-dur)) ) (do ((i beg (1+ i))) ((= i end)) (begin (let* ((sample (readin readA))) (outa i (* att sample))))) )) Once this code has been saved, load it on Snd's listener by typing something like: ;; (load "extractch.cms") - Function or instrument call on the listener (in order to get the channel extracted): ;; ;; (with-sound () (extract "eight-channels.wav" :chan 2)) ;; ;; This instrument call will open a new window in Snd.!! ;; and will extract channel 3 from file "eight-channels.wav" ;; From kennethflak at protonmail.com Wed Jul 8 06:57:22 2020 From: kennethflak at protonmail.com (Kenneth Flak) Date: Wed, 08 Jul 2020 13:57:22 +0000 Subject: [CM] Beginner's tutorials? In-Reply-To: <57f26e36-19f1-292d-9017-ec19779b1f09@ccrma.stanford.edu> References: <20200707121922.o2mhblatzavzyevf@t480s.localdomain> <20200707154950.xqse6ybltjyhtojw@t480s.localdomain> <57f26e36-19f1-292d-9017-ec19779b1f09@ccrma.stanford.edu> Message-ID: Fantastic! Thanks so much :-) Roosna & Flak - Contemporary Dance & Music https://roosnaflak.com On Wed, Jul 8, 2020 at 00:37, Juan Reyes wrote: >> 2. extract mono channel from stereo/multichannel file > > Just found code to extract a channel from a soundfile. Hopefully this > would give you a start on Snd's interface. > > --* Juan > > ;; instrument or function definition on S7 to be loaded on Snd's > ;;;listener:: > > (definstrument (extract file > (start 0.0) > (att 1.0) > (chan 0)) > ;; > (let* ((in-file-sr (mus-sound-srate file)) > (in-file-dur (/ (frames file) in-file-sr)) > (out-start-time 0) > (out-duration (- in-file-dur start)) > (readA (make-readin :file file :channel chan)) > (beg (seconds->samples out-start-time)) > (end (seconds->samples in-file-dur)) > ) > (do ((i beg (1+ i))) > ((= i end)) > (begin > (let* ((sample (readin readA))) > (outa i (* att sample))))) > )) > > Once this code has been saved, load it on Snd's listener by typing > something like: > > ;; (load "extractch.cms") > > - Function or instrument call on the listener (in order to get the > channel extracted): > > ;; > ;; (with-sound () (extract "eight-channels.wav" :chan 2)) > ;; > ;; This instrument call will open a new window in Snd.!! > ;; and will extract channel 3 from file "eight-channels.wav" > ;; > > _______________________________________________ > 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 treegestalt at gmail.com Fri Jul 10 15:39:49 2020 From: treegestalt at gmail.com (Forrest Curo) Date: Fri, 10 Jul 2020 15:39:49 -0700 Subject: [CM] compilation problem, ubuntu 20.04 Message-ID: premake 4 is happy -- but then the trouble sets in: ------------ forrest at beefurr:~/cm$ premake4 Building configurations... Running action 'gmake'... Generating Makefile... Generating juce.make... Generating Grace.make... Done. forrest at beefurr:~/cm$ make ==== Building juce (debug) ==== Creating lib Creating obj/juce/Debug juce_audio_basics.cpp juce_audio_devices.cpp juce_audio_formats.cpp In file included from juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:64: warning: "__STDC_LIMIT_MACROS" redefined 64 | #define __STDC_LIMIT_MACROS 1 | In file included from /usr/include/c++/9/cstdint:41, from /usr/include/c++/9/bits/char_traits.h:621, from /usr/include/c++/9/string:40, from /usr/include/c++/9/stdexcept:39, from juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/system/juce_StandardHeader.h:68, from juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/juce_core.h:143, from juce/modules/juce_audio_formats/../juce_audio_basics/juce_audio_basics.h:28, from juce/modules/juce_audio_formats/juce_audio_formats.h:28, from juce/modules/juce_audio_formats/juce_audio_formats.cpp:39: /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h:5: note: this is the location of the previous definition 5 | # define __STDC_LIMIT_MACROS | In file included from juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, from juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:65:39: error: ?long int juce::FlacNamespace::lround(double)? conflicts with a previous declaration 65 | static inline long int lround(double x) { | ^ In file included from /usr/include/features.h:461, from /usr/include/sched.h:22, from juce/modules/juce_audio_formats/../juce_core/native/juce_BasicNativeHeaders.h:168, from juce/modules/juce_audio_formats/juce_audio_formats.cpp:38: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:320:1: note: previous declaration ?long int lround(double)? 320 | __MATHDECL (long int,lround,, (_Mdouble_ __x)); | ^~~~~~~~~~ In file included from juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, from juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c: In function ?int juce::FlacNamespace::FLAC__lpc_quantize_coefficients(const FLAC__real*, unsigned int, unsigned int, juce::FlacNamespace::FLAC__int32*, int*)?: juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:218:20: error: call of overloaded ?lround(juce::FlacNamespace::FLAC__double&)? is ambiguous 218 | q = lround(error); | ^ In file included from juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/system/juce_StandardHeader.h:66, from juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/juce_core.h:143, from juce/modules/juce_audio_formats/../juce_audio_basics/juce_audio_basics.h:28, from juce/modules/juce_audio_formats/juce_audio_formats.h:28, from juce/modules/juce_audio_formats/juce_audio_formats.cpp:39: /usr/include/c++/9/cmath:1628:3: note: candidate: ?constexpr long int std::lround(long double)? 1628 | lround(long double __x) | ^~~~~~ /usr/include/c++/9/cmath:1624:3: note: candidate: ?constexpr long int std::lround(float)? 1624 | lround(float __x) | ^~~~~~ In file included from /usr/include/features.h:461, from /usr/include/sched.h:22, from juce/modules/juce_audio_formats/../juce_core/native/juce_BasicNativeHeaders.h:168, from juce/modules/juce_audio_formats/juce_audio_formats.cpp:38: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:320:1: note: candidate: ?long int lround(double)? 320 | __MATHDECL (long int,lround,, (_Mdouble_ __x)); | ^~~~~~~~~~ In file included from juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, from juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:65:24: note: candidate: ?long int juce::FlacNamespace::lround(double)? 65 | static inline long int lround(double x) { | ^~~~~~ In file included from juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, from juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:247:20: error: call of overloaded ?lround(juce::FlacNamespace::FLAC__double&)? is ambiguous 247 | q = lround(error); | ^ In file included from juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/system/juce_StandardHeader.h:66, from juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/juce_core.h:143, from juce/modules/juce_audio_formats/../juce_audio_basics/juce_audio_basics.h:28, from juce/modules/juce_audio_formats/juce_audio_formats.h:28, from juce/modules/juce_audio_formats/juce_audio_formats.cpp:39: /usr/include/c++/9/cmath:1628:3: note: candidate: ?constexpr long int std::lround(long double)? 1628 | lround(long double __x) | ^~~~~~ /usr/include/c++/9/cmath:1624:3: note: candidate: ?constexpr long int std::lround(float)? 1624 | lround(float __x) | ^~~~~~ In file included from /usr/include/features.h:461, from /usr/include/sched.h:22, from juce/modules/juce_audio_formats/../juce_core/native/juce_BasicNativeHeaders.h:168, from juce/modules/juce_audio_formats/juce_audio_formats.cpp:38: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:320:1: note: candidate: ?long int lround(double)? 320 | __MATHDECL (long int,lround,, (_Mdouble_ __x)); | ^~~~~~~~~~ In file included from juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, from juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:65:24: note: candidate: ?long int juce::FlacNamespace::lround(double)? 65 | static inline long int lround(double x) { | ^~~~~~ make[1]: *** [juce.make:168: obj/juce/Debug/juce_audio_formats.o] Error 1 make: *** [Makefile:17: juce] Error 2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From treegestalt at gmail.com Fri Jul 10 16:33:31 2020 From: treegestalt at gmail.com (Forrest Curo) Date: Fri, 10 Jul 2020 16:33:31 -0700 Subject: [CM] compilation problem, ubuntu 20.04 In-Reply-To: References: Message-ID: I get the identical error on a toshiba laptop running ubuntu 18.04 On Fri, Jul 10, 2020 at 3:39 PM Forrest Curo wrote: > premake 4 is happy -- but then the trouble sets in: > ------------ > forrest at beefurr:~/cm$ premake4 > Building configurations... > Running action 'gmake'... > Generating Makefile... > Generating juce.make... > Generating Grace.make... > Done. > forrest at beefurr:~/cm$ make > ==== Building juce (debug) ==== > Creating lib > Creating obj/juce/Debug > juce_audio_basics.cpp > juce_audio_devices.cpp > juce_audio_formats.cpp > In file included from > juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: > juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:64: > warning: "__STDC_LIMIT_MACROS" redefined > 64 | #define __STDC_LIMIT_MACROS 1 > | > In file included from /usr/include/c++/9/cstdint:41, > from /usr/include/c++/9/bits/char_traits.h:621, > from /usr/include/c++/9/string:40, > from /usr/include/c++/9/stdexcept:39, > from > juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/system/juce_StandardHeader.h:68, > from > juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/juce_core.h:143, > from > juce/modules/juce_audio_formats/../juce_audio_basics/juce_audio_basics.h:28, > from > juce/modules/juce_audio_formats/juce_audio_formats.h:28, > from > juce/modules/juce_audio_formats/juce_audio_formats.cpp:39: > /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h:5: note: this is the > location of the previous definition > 5 | # define __STDC_LIMIT_MACROS > | > In file included from > juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, > from > juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: > juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:65:39: > error: ?long int juce::FlacNamespace::lround(double)? conflicts with a > previous declaration > 65 | static inline long int lround(double x) { > | ^ > In file included from /usr/include/features.h:461, > from /usr/include/sched.h:22, > from > juce/modules/juce_audio_formats/../juce_core/native/juce_BasicNativeHeaders.h:168, > from > juce/modules/juce_audio_formats/juce_audio_formats.cpp:38: > /usr/include/x86_64-linux-gnu/bits/mathcalls.h:320:1: note: previous > declaration ?long int lround(double)? > 320 | __MATHDECL (long int,lround,, (_Mdouble_ __x)); > | ^~~~~~~~~~ > In file included from > juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, > from > juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: > juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c: In > function ?int juce::FlacNamespace::FLAC__lpc_quantize_coefficients(const > FLAC__real*, unsigned int, unsigned int, juce::FlacNamespace::FLAC__int32*, > int*)?: > juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:218:20: > error: call of overloaded ?lround(juce::FlacNamespace::FLAC__double&)? is > ambiguous > 218 | q = lround(error); > | ^ > In file included from > juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/system/juce_StandardHeader.h:66, > from > juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/juce_core.h:143, > from > juce/modules/juce_audio_formats/../juce_audio_basics/juce_audio_basics.h:28, > from > juce/modules/juce_audio_formats/juce_audio_formats.h:28, > from > juce/modules/juce_audio_formats/juce_audio_formats.cpp:39: > /usr/include/c++/9/cmath:1628:3: note: candidate: ?constexpr long int > std::lround(long double)? > 1628 | lround(long double __x) > | ^~~~~~ > /usr/include/c++/9/cmath:1624:3: note: candidate: ?constexpr long int > std::lround(float)? > 1624 | lround(float __x) > | ^~~~~~ > In file included from /usr/include/features.h:461, > from /usr/include/sched.h:22, > from > juce/modules/juce_audio_formats/../juce_core/native/juce_BasicNativeHeaders.h:168, > from > juce/modules/juce_audio_formats/juce_audio_formats.cpp:38: > /usr/include/x86_64-linux-gnu/bits/mathcalls.h:320:1: note: candidate: > ?long int lround(double)? > 320 | __MATHDECL (long int,lround,, (_Mdouble_ __x)); > | ^~~~~~~~~~ > In file included from > juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, > from > juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: > juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:65:24: > note: candidate: ?long int juce::FlacNamespace::lround(double)? > 65 | static inline long int lround(double x) { > | ^~~~~~ > In file included from > juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, > from > juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: > juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:247:20: > error: call of overloaded ?lround(juce::FlacNamespace::FLAC__double&)? is > ambiguous > 247 | q = lround(error); > | ^ > In file included from > juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/system/juce_StandardHeader.h:66, > from > juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/juce_core.h:143, > from > juce/modules/juce_audio_formats/../juce_audio_basics/juce_audio_basics.h:28, > from > juce/modules/juce_audio_formats/juce_audio_formats.h:28, > from > juce/modules/juce_audio_formats/juce_audio_formats.cpp:39: > /usr/include/c++/9/cmath:1628:3: note: candidate: ?constexpr long int > std::lround(long double)? > 1628 | lround(long double __x) > | ^~~~~~ > /usr/include/c++/9/cmath:1624:3: note: candidate: ?constexpr long int > std::lround(float)? > 1624 | lround(float __x) > | ^~~~~~ > In file included from /usr/include/features.h:461, > from /usr/include/sched.h:22, > from > juce/modules/juce_audio_formats/../juce_core/native/juce_BasicNativeHeaders.h:168, > from > juce/modules/juce_audio_formats/juce_audio_formats.cpp:38: > /usr/include/x86_64-linux-gnu/bits/mathcalls.h:320:1: note: candidate: > ?long int lround(double)? > 320 | __MATHDECL (long int,lround,, (_Mdouble_ __x)); > | ^~~~~~~~~~ > In file included from > juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, > from > juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: > juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:65:24: > note: candidate: ?long int juce::FlacNamespace::lround(double)? > 65 | static inline long int lround(double x) { > | ^~~~~~ > make[1]: *** [juce.make:168: obj/juce/Debug/juce_audio_formats.o] Error 1 > make: *** [Makefile:17: juce] Error 2 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From treegestalt at gmail.com Fri Jul 10 18:34:12 2020 From: treegestalt at gmail.com (Forrest Curo) Date: Fri, 10 Jul 2020 18:34:12 -0700 Subject: [CM] compilation problem, ubuntu 20.04 In-Reply-To: References: Message-ID: Ah! I vaguely remembered you weren't on sourceforge anymore, looked through old mail, at last found: https://github.com/ricktaube/grace.git (Google searches kept sending me to sourceforge, alas!) On Fri, Jul 10, 2020 at 4:33 PM Forrest Curo wrote: > I get the identical error on a toshiba laptop running ubuntu 18.04 > > On Fri, Jul 10, 2020 at 3:39 PM Forrest Curo > wrote: > >> premake 4 is happy -- but then the trouble sets in: >> ------------ >> forrest at beefurr:~/cm$ premake4 >> Building configurations... >> Running action 'gmake'... >> Generating Makefile... >> Generating juce.make... >> Generating Grace.make... >> Done. >> forrest at beefurr:~/cm$ make >> ==== Building juce (debug) ==== >> Creating lib >> Creating obj/juce/Debug >> juce_audio_basics.cpp >> juce_audio_devices.cpp >> juce_audio_formats.cpp >> In file included from >> juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: >> juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:64: >> warning: "__STDC_LIMIT_MACROS" redefined >> 64 | #define __STDC_LIMIT_MACROS 1 >> | >> In file included from /usr/include/c++/9/cstdint:41, >> from /usr/include/c++/9/bits/char_traits.h:621, >> from /usr/include/c++/9/string:40, >> from /usr/include/c++/9/stdexcept:39, >> from >> juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/system/juce_StandardHeader.h:68, >> from >> juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/juce_core.h:143, >> from >> juce/modules/juce_audio_formats/../juce_audio_basics/juce_audio_basics.h:28, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.h:28, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.cpp:39: >> /usr/lib/gcc/x86_64-linux-gnu/9/include/stdint.h:5: note: this is the >> location of the previous definition >> 5 | # define __STDC_LIMIT_MACROS >> | >> In file included from >> juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: >> juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:65:39: >> error: ?long int juce::FlacNamespace::lround(double)? conflicts with a >> previous declaration >> 65 | static inline long int lround(double x) { >> | ^ >> In file included from /usr/include/features.h:461, >> from /usr/include/sched.h:22, >> from >> juce/modules/juce_audio_formats/../juce_core/native/juce_BasicNativeHeaders.h:168, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.cpp:38: >> /usr/include/x86_64-linux-gnu/bits/mathcalls.h:320:1: note: previous >> declaration ?long int lround(double)? >> 320 | __MATHDECL (long int,lround,, (_Mdouble_ __x)); >> | ^~~~~~~~~~ >> In file included from >> juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: >> juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c: In >> function ?int juce::FlacNamespace::FLAC__lpc_quantize_coefficients(const >> FLAC__real*, unsigned int, unsigned int, juce::FlacNamespace::FLAC__int32*, >> int*)?: >> juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:218:20: >> error: call of overloaded ?lround(juce::FlacNamespace::FLAC__double&)? is >> ambiguous >> 218 | q = lround(error); >> | ^ >> In file included from >> juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/system/juce_StandardHeader.h:66, >> from >> juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/juce_core.h:143, >> from >> juce/modules/juce_audio_formats/../juce_audio_basics/juce_audio_basics.h:28, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.h:28, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.cpp:39: >> /usr/include/c++/9/cmath:1628:3: note: candidate: ?constexpr long int >> std::lround(long double)? >> 1628 | lround(long double __x) >> | ^~~~~~ >> /usr/include/c++/9/cmath:1624:3: note: candidate: ?constexpr long int >> std::lround(float)? >> 1624 | lround(float __x) >> | ^~~~~~ >> In file included from /usr/include/features.h:461, >> from /usr/include/sched.h:22, >> from >> juce/modules/juce_audio_formats/../juce_core/native/juce_BasicNativeHeaders.h:168, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.cpp:38: >> /usr/include/x86_64-linux-gnu/bits/mathcalls.h:320:1: note: candidate: >> ?long int lround(double)? >> 320 | __MATHDECL (long int,lround,, (_Mdouble_ __x)); >> | ^~~~~~~~~~ >> In file included from >> juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: >> juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:65:24: >> note: candidate: ?long int juce::FlacNamespace::lround(double)? >> 65 | static inline long int lround(double x) { >> | ^~~~~~ >> In file included from >> juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: >> juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:247:20: >> error: call of overloaded ?lround(juce::FlacNamespace::FLAC__double&)? is >> ambiguous >> 247 | q = lround(error); >> | ^ >> In file included from >> juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/system/juce_StandardHeader.h:66, >> from >> juce/modules/juce_audio_formats/../juce_audio_basics/../juce_core/juce_core.h:143, >> from >> juce/modules/juce_audio_formats/../juce_audio_basics/juce_audio_basics.h:28, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.h:28, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.cpp:39: >> /usr/include/c++/9/cmath:1628:3: note: candidate: ?constexpr long int >> std::lround(long double)? >> 1628 | lround(long double __x) >> | ^~~~~~ >> /usr/include/c++/9/cmath:1624:3: note: candidate: ?constexpr long int >> std::lround(float)? >> 1624 | lround(float __x) >> | ^~~~~~ >> In file included from /usr/include/features.h:461, >> from /usr/include/sched.h:22, >> from >> juce/modules/juce_audio_formats/../juce_core/native/juce_BasicNativeHeaders.h:168, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.cpp:38: >> /usr/include/x86_64-linux-gnu/bits/mathcalls.h:320:1: note: candidate: >> ?long int lround(double)? >> 320 | __MATHDECL (long int,lround,, (_Mdouble_ __x)); >> | ^~~~~~~~~~ >> In file included from >> juce/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp:76, >> from >> juce/modules/juce_audio_formats/juce_audio_formats.cpp:110: >> juce/modules/juce_audio_formats/codecs/flac/libFLAC/lpc_flac.c:65:24: >> note: candidate: ?long int juce::FlacNamespace::lround(double)? >> 65 | static inline long int lround(double x) { >> | ^~~~~~ >> make[1]: *** [juce.make:168: obj/juce/Debug/juce_audio_formats.o] Error 1 >> make: *** [Makefile:17: juce] Error 2 >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From treegestalt at gmail.com Sat Jul 11 13:14:52 2020 From: treegestalt at gmail.com (Forrest Curo) Date: Sat, 11 Jul 2020 13:14:52 -0700 Subject: [CM] how to insert values into strings? Message-ID: example: with val = 25 shell("echo \"i 23 0 1 val 90\" > testfif") simply sends the string, as is, to my fifo. I'm not finding string functions listed in the documentation. (?) Forrest Curo San Diego -------------- next part -------------- An HTML attachment was scrubbed... URL: From neil.baylis at gmail.com Sat Jul 11 15:30:34 2020 From: neil.baylis at gmail.com (Neil Baylis) Date: Sat, 11 Jul 2020 15:30:34 -0700 Subject: [CM] Building cm Message-ID: Hi, I recently retrieved an old project of mine that was written for cm. I left myself a readme file with instructions for running it: cm --load "main.scm" Now I'm on a new computer and want to run this again. However, I can't remember how I obtained or built the cm executable that I was using back then (in 2009). Searching online, I can find instructions for building the Grace application, but that's not exactly what I want. Building grace doesn't give me a cm executable, and I don't want to be messing with the Grace GUI for this project. Grace gives me a "Grace console" window, but it doesn't give me a REPL. I know this used to be possible, because I still have my project. I guess I'm just not looking in the right place. Can someone point me to instructions for downloading and building the cm executable? Thanks, Neil Baylis -------------- next part -------------- An HTML attachment was scrubbed... URL: From treegestalt at gmail.com Sat Jul 11 16:41:58 2020 From: treegestalt at gmail.com (Forrest Curo) Date: Sat, 11 Jul 2020 16:41:58 -0700 Subject: [CM] how to insert values into strings? In-Reply-To: References: Message-ID: Not speaking 'Scheme' is a real handicap. Anyway: begin variable x = 25 system(string-append("echo \"i 23 0 1 ", number->string( x), " 55\" > testfif")) end (Phew!) On Sat, Jul 11, 2020 at 1:14 PM Forrest Curo wrote: > example: > > with val = 25 > shell("echo \"i 23 0 1 val 90\" > testfif") > > simply sends the string, as is, to my fifo. > > I'm not finding string functions listed in the documentation. > (?) > > > Forrest Curo > San Diego > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.actondev at gmail.com Sun Jul 12 18:21:12 2020 From: chris.actondev at gmail.com (Christos Vagias) Date: Mon, 13 Jul 2020 03:21:12 +0200 Subject: [CM] s7 autoload bug Message-ID: Hi, It seems that I found a bug concerning the autoload. The following test fails: - autoloads for aod.lib1, aod.lib2, aod.extra.foo - OK: loading aod.lib1 & aod.lib2 - FAIL: loading aod.extra.foo TEST(s7_environments, autoloads_bug) { const char *autoloads[6] = { // each pair of entries is entity name + file name "aod.lib1", "aod/lib1.scm", "aod.lib2", "aod/lib2.scm", "aod.extra.foo", "aod/extra/foo.scm", }; s7_scheme* sc1 = s7_init(); s7_autoload_set_names(sc1, autoloads, 3); char* sexp = "(begin " "(require aod.lib1)" "(require aod.lib2)" "1)"; // ok that works ASSERT_EQ(1, s7_integer(s7_eval_c_string(sc1, sexp))); s7_scheme* sc2 = s7_init(); s7_autoload_set_names(sc2, autoloads, 3); char* sexp2 = "(begin " "(require aod.extra.foo)" "2)"; // THAT FAILS!! ASSERT_EQ(2, s7_integer(s7_eval_c_string(sc2, sexp2))); /** * ---------- ;require: no autoload info for aod.extra.foo ; (require aod.extra.foo) ; ((lambda (hook lst) (if (do ((p lst (cdr ... ; (2) * ----------- */ } -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Mon Jul 13 06:10:36 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 13 Jul 2020 06:10:36 -0700 Subject: [CM] s7 autoload bug In-Reply-To: References: Message-ID: Thanks for the bug report. This is actually a bug in the documentation -- the array of names should be sorted alphabetically, but I forgot to mention that in s7.html. Try const char *autoloads[6] = { "aod.extra.foo", "aod/extra/foo", "aod.lib1", "aod/lib1.scm", "aod.lib2", "aod/lib2.scm", }; From chris.actondev at gmail.com Sat Jul 18 11:51:28 2020 From: chris.actondev at gmail.com (Christos Vagias) Date: Sat, 18 Jul 2020 20:51:28 +0200 Subject: [CM] s7: bubbling up errors (bug?) Message-ID: Hi all, Stumbled upon a possible bug, unless I misunderstood something, about bubbling up errors. s7 version 9.3, 2020-7-18 (catch #t (lambda () (catch #t (lambda () (throw 'some-error "::: ERROR ::: (~A)~%" 1)) (lambda args (format *stderr* "1st level exception args: ~A\n" args) (apply format *stderr* (cadr args)) ;; that works (apply throw args)))) (lambda args (format *stderr* "2nd level exc args: ~A~%" args) (apply format *stderr* (cadr args)) ;; that will FAIL!!! )) In the second catch, the args have the "info" wrapped around an extra list. Therefore, the (apply format *stderr* (cadr args)) fails on the 2nd level The printout (notice the difference between 1st and 2nd level) 1st level exception args: (some-error ("::: ERROR ::: (~A)~%" 1)) ::: ERROR ::: (1) 2nd level exc args: (some-error (("::: ERROR ::: (~A)~%" 1))) And the exception from trying to "apply format" ;format argument 2, ("::: ERROR ::: (~A)~%" 1), is a pair but should be a string ; (apply format *stderr* (cadr args)) ; *stdout*, line 13, position: 388 ; ns-make-empty-let: (apply format *stderr*... ; args: (some-error (("::: ERROR ::: (~... ; ((let? *ns*)) ; ((let? *ns*)) ; ((let? *ns*)) -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Sat Jul 18 13:01:32 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Sat, 18 Jul 2020 13:01:32 -0700 Subject: [CM] =?utf-8?q?s7=3A_bubbling_up_errors_=28bug=3F=29?= In-Reply-To: References: Message-ID: <5e8183aa929c02dc0e6066c1ccd18745@ccrma.stanford.edu> throw is (throw tag . info), that is it takes its trailing args and puts them in a list. The first throw gets the args: 'some-error "..." 1. It passes these as: 'some-error ("..." 1) to the first error handler (that's why you can apply format to cadr -- cadr has been turned into a list). You throw that again using apply, so its args the second time are: some-error '("..." 1), (I'm trying to show that the second call is not like the first -- it has only one trailing arg, the list '("..." 1). Once again throw treats it as a rest arg, and puts it in a list, then the second error handler sees: some-error (("..." 1)). If you want to rethrow, the second throw needs to match the first one, use (apply throw (car args) (cadr args)). It might be better to use (lambda (type info) for the error handler, so you can say (catch #t (lambda () (catch #t (lambda () (throw 'some-error "::: ERROR ::: (~A)~%" 1)) (lambda (type info) (apply format *stderr* info) (apply throw type info)))) (lambda (type info) (apply format *stderr* info) )) From chris.actondev at gmail.com Sat Jul 18 13:46:04 2020 From: chris.actondev at gmail.com (Christos Vagias) Date: Sat, 18 Jul 2020 22:46:04 +0200 Subject: [CM] s7: bubbling up errors (bug?) In-Reply-To: <5e8183aa929c02dc0e6066c1ccd18745@ccrma.stanford.edu> References: <5e8183aa929c02dc0e6066c1ccd18745@ccrma.stanford.edu> Message-ID: Oh, I see! Thanks a lot for the clarification (and thorough explanation). I saw this line from the documentation (apply throw args))))) ; and pass the error on up and didn't take into account the signature of throw. Thanks again! On Sat, 18 Jul 2020 at 22:01, wrote: > throw is (throw tag . info), that is it takes its trailing args and puts > them > in a list. The first throw gets the args: 'some-error "..." 1. It > passes > these as: 'some-error ("..." 1) to the first error handler (that's why > you > can apply format to cadr -- cadr has been turned into a list). You > throw > that again using apply, so its args the second time are: some-error > '("..." 1), > (I'm trying to show that the second call is not like the first -- it has > only one trailing arg, the list '("..." 1). Once again throw treats it > as > a rest arg, and puts it in a list, then the second error handler sees: > some-error (("..." 1)). If you want to rethrow, the second throw needs > to match the first one, use (apply throw (car args) (cadr args)). > It might be better to use (lambda (type info) for the error handler, > so you can say > > (catch #t > (lambda () > (catch #t > (lambda () > (throw 'some-error "::: ERROR ::: (~A)~%" 1)) > (lambda (type info) > (apply format *stderr* info) > (apply throw type info)))) > (lambda (type info) > (apply format *stderr* info) > )) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Sat Jul 18 14:21:24 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Sat, 18 Jul 2020 14:21:24 -0700 Subject: [CM] =?utf-8?q?s7=3A_bubbling_up_errors_=28bug=3F=29?= In-Reply-To: References: <5e8183aa929c02dc0e6066c1ccd18745@ccrma.stanford.edu> Message-ID: <4830d50efeabb5ca001727c96bab2202@ccrma.stanford.edu> It is confusing that the error handler gets a sort of packaged version of the arguments from throw and error. I don't remember why this was done -- Guile 1.8 (my starting point) has (throw type . info), but I can't remember how they passed that to the catch error handler. It's not impossible that I overlooked a dot somewhere... From iainduncanlists at gmail.com Mon Jul 27 09:30:01 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Mon, 27 Jul 2020 09:30:01 -0700 Subject: [CM] Creating a chatty email list for S7 users? Message-ID: Hi everyone, I have a few people I have been corresponding with about uses for S7, both in and out of Max, and I think it would be good for community and new users if these conversations could be found in an archive. However, they are much too noisy and sometimes off-topic for this list and would annoy many subscribers. I would like to make some form of archived and searchable S7 users thing. I wanted to check here in case CCRMA folks (Bill in particular) have a pref for this. i.e. would you prefer to keep on the CCRMA list serves, and if so, could we make such a thing and I would be happy to mod it? Open to suggestions here. thanks iain -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Mon Jul 27 10:38:08 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 27 Jul 2020 10:38:08 -0700 Subject: [CM] =?utf-8?q?Creating_a_chatty_email_list_for_S7_users=3F?= In-Reply-To: References: Message-ID: <29587f5642c161bca760591217c1b473@ccrma.stanford.edu> Sounds like a good idea to me, but I don't think mailman (ccrma's choice) is ideal. As you say it's not searchable (I actually wasted some time recently on this). While doing that I was surprised to see that cmdist has the "private archive" bit set, which I think means that only list members can read the archive; all this time I thought it was publicly readable. I wonder if it this should be changed? From wdouglass at carnegierobotics.com Mon Jul 27 10:41:45 2020 From: wdouglass at carnegierobotics.com (Woody Douglass) Date: Mon, 27 Jul 2020 17:41:45 +0000 Subject: [CM] Creating a chatty email list for S7 users? In-Reply-To: <29587f5642c161bca760591217c1b473@ccrma.stanford.edu> References: , <29587f5642c161bca760591217c1b473@ccrma.stanford.edu> Message-ID: For the record, I thought it was strange that the archive is private, but didn't question it. I think the archive should be public. -Woody ________________________________ From: cmdist-bounces at ccrma.Stanford.EDU on behalf of bil at ccrma.Stanford.EDU Sent: Monday, July 27, 2020 1:38:08 PM To: Iain Duncan Cc: cmdist at ccrma.Stanford.EDU Subject: Re: [CM] Creating a chatty email list for S7 users? Sounds like a good idea to me, but I don't think mailman (ccrma's choice) is ideal. As you say it's not searchable (I actually wasted some time recently on this). While doing that I was surprised to see that cmdist has the "private archive" bit set, which I think means that only list members can read the archive; all this time I thought it was publicly readable. I wonder if it this should be changed? _______________________________________________ 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 chris.actondev at gmail.com Mon Jul 27 10:58:06 2020 From: chris.actondev at gmail.com (Christos Vagias) Date: Mon, 27 Jul 2020 19:58:06 +0200 Subject: [CM] Creating a chatty email list for S7 users? In-Reply-To: References: <29587f5642c161bca760591217c1b473@ccrma.stanford.edu> Message-ID: Hi Iaian, everyone, Making the archive public will provide some ways for searching I suppose. So that leaves us with the community/chat/forum. A nice option seems to be *discourse* which provides a forum-like functionality. It's paid but - it's open source, so it can be self-hosted - has a plan for free hosting for open-source projects (they do have restrictions though: https://blog.discourse.org/2018/11/free-hosting-for-open-source-v2/ ) Another solution would be "GitHub Discussions". But I guess that would be viable if S7 gets an official repo in github (any about this? ccrma does have its own github organization) Github discussions though is something really new, haven't seen it in action in any project & haven't ever used it. Christos On Mon, 27 Jul 2020 at 19:41, Woody Douglass wrote: > For the record, I thought it was strange that the archive is private, but > didn't question it. I think the archive should be public. > > > -Woody > ------------------------------ > *From:* cmdist-bounces at ccrma.Stanford.EDU < > cmdist-bounces at ccrma.Stanford.EDU> on behalf of bil at ccrma.Stanford.EDU < > bil at ccrma.Stanford.EDU> > *Sent:* Monday, July 27, 2020 1:38:08 PM > *To:* Iain Duncan > *Cc:* cmdist at ccrma.Stanford.EDU > *Subject:* Re: [CM] Creating a chatty email list for S7 users? > > Sounds like a good idea to me, but I don't think > mailman (ccrma's choice) is ideal. As you say it's > not searchable (I actually wasted some time recently > on this). While doing that I was surprised to see > that cmdist has the "private archive" bit set, which > I think means that only list members can read the archive; > all this time I thought it was publicly readable. > I wonder if it this should be changed? > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > _______________________________________________ > 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 28 08:57:04 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Tue, 28 Jul 2020 08:57:04 -0700 Subject: [CM] Creating a chatty email list for S7 users? In-Reply-To: References: <29587f5642c161bca760591217c1b473@ccrma.stanford.edu> Message-ID: I'm glad there is interest. I would respectfully disagree on the archive privacy. I have found mailing list archives really helpful for finding out about the health of projects, and the archive being public would help people find out that S7 is alive and well. But I can see both sides of that. As to venue, I guess we can think on this. Christos, I'll take a look at the discourse and Github options. I think the main things I'm looking for is an easy way for people to browse past conversations and search for them, and an easy way for people to be subscribed to topics of interest but ignore others. The Max forum has been really helpful for me over and over again in that regard. I have seen one project move to github discussions, but don't know how well it's working for them. I could see github discussions being very helpful for raising profile of activity. But I think that would benefit from us moving the "official mirror" (Woody!) to a github org that is CCRMA or S7 or something to ensure people know they are in the right place. In other news, I got accepted into the Master's in Music Tech at UVic, so for the next 4 years or so I will be able to dedicate a fair bit of time to S7, that's exciting. thanks all iain On Mon, Jul 27, 2020 at 10:58 AM Christos Vagias wrote: > Hi Iaian, everyone, > > Making the archive public will provide some ways for searching I suppose. > So that leaves us with the community/chat/forum. > > A nice option seems to be *discourse* which provides a forum-like > functionality. > It's paid but > - it's open source, so it can be self-hosted > - has a plan for free hosting for open-source projects (they do have > restrictions though: > https://blog.discourse.org/2018/11/free-hosting-for-open-source-v2/ ) > > Another solution would be "GitHub Discussions". But I guess that would be > viable if S7 gets an official repo in github > (any about this? ccrma does have its own github organization) > Github discussions though is something really new, haven't seen it in > action in any project & haven't ever used it. > > Christos > > On Mon, 27 Jul 2020 at 19:41, Woody Douglass < > wdouglass at carnegierobotics.com> wrote: > >> For the record, I thought it was strange that the archive is private, but >> didn't question it. I think the archive should be public. >> >> >> -Woody >> ------------------------------ >> *From:* cmdist-bounces at ccrma.Stanford.EDU < >> cmdist-bounces at ccrma.Stanford.EDU> on behalf of bil at ccrma.Stanford.EDU < >> bil at ccrma.Stanford.EDU> >> *Sent:* Monday, July 27, 2020 1:38:08 PM >> *To:* Iain Duncan >> *Cc:* cmdist at ccrma.Stanford.EDU >> *Subject:* Re: [CM] Creating a chatty email list for S7 users? >> >> Sounds like a good idea to me, but I don't think >> mailman (ccrma's choice) is ideal. As you say it's >> not searchable (I actually wasted some time recently >> on this). While doing that I was surprised to see >> that cmdist has the "private archive" bit set, which >> I think means that only list members can read the archive; >> all this time I thought it was publicly readable. >> I wonder if it this should be changed? >> >> _______________________________________________ >> Cmdist mailing list >> Cmdist at ccrma.stanford.edu >> https://cm-mail.stanford.edu/mailman/listinfo/cmdist >> _______________________________________________ >> 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 bil at ccrma.Stanford.EDU Wed Jul 29 05:22:28 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 29 Jul 2020 05:22:28 -0700 Subject: [CM] cmdist archive In-Reply-To: <29587f5642c161bca760591217c1b473@ccrma.stanford.edu> References: <29587f5642c161bca760591217c1b473@ccrma.stanford.edu> Message-ID: <70877e450b550514e6c34500582dc503@ccrma.stanford.edu> I think the cmdist archive is now public. From chris.actondev at gmail.com Wed Jul 29 10:02:07 2020 From: chris.actondev at gmail.com (Christos Vagias) Date: Wed, 29 Jul 2020 19:02:07 +0200 Subject: [CM] (sub)environments and object->string with :readable Message-ID: Hi, Upon working with object->string with the :readable flag (in order to save/load some state) I stumbled upon the following (note that format "~W" is the same as (object->string obj :readable)) ---- (define *subnamespace* (let () (curlet))) (with-let *subnamespace* (define nested-curlet (let ((nested 1)) (curlet)))) (define top-curlet (let ((top 1)) (curlet))) (format *stderr* "top-curlet is ~W\n" top-curlet ) (with-let *subnamespace* (format *stderr* "nested-curlet is ~W\n" nested-curlet)) ;; top-curlet is (inlet :top 1) ;; nested-curlet is (let ((<1> (inlet :nested 1))) ;; (set! (outlet <1>) (inlet :nested-curlet <1>)) <1>) ---- Is this expected? (the nested-curlet printout) I am using environments to create namespaces-like functionality. Is there a way to print out the nested-curlet as (inlet :nested 1)? Thanks, Christos -------------- next part -------------- An HTML attachment was scrubbed... URL: From iainduncanlists at gmail.com Wed Jul 29 12:58:35 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Wed, 29 Jul 2020 12:58:35 -0700 Subject: [CM] How to make new applicable objects that use generic set/get? Message-ID: Hi S7 Schemers, I'm hoping someone can help out, or point me at some beginner friendly resources as I'm not able to figure this out from the S7.html page. I am making a state management container for my max apps. I'd like to make it follow the generic applicable syntax so that one can call it as if it's a hashtable, allowing code using this to be unaware of implementation. So I want to implement a setter and getter for my function to be able to do: ;; call my setter (set! (my-state-thing :foobar) 99) ;; call my setter (my-state-thing :foobar) I apologize if this is just basic scheme ignorance! thanks iain -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.actondev at gmail.com Wed Jul 29 13:18:54 2020 From: chris.actondev at gmail.com (Christos Vagias) Date: Wed, 29 Jul 2020 22:18:54 +0200 Subject: [CM] How to make new applicable objects that use generic set/get? In-Reply-To: References: Message-ID: Hi Iain, Do you really need the "foobar" to be like a keyword? (the : prefix) If not I, guess one would go like ;; foobar of default value 0 ;; you could use define* to denote the defaults and override them (define (make-state) (let ((foobar 0)) (curlet)) and then (define my-state-thing (make-state)) ;; getter (my-state-thing 'foobar) ;;setter (set! (my-state-thing 'foobar) 99) On Wed, 29 Jul 2020 at 21:59, Iain Duncan wrote: > Hi S7 Schemers, I'm hoping someone can help out, or point me at some > beginner friendly resources as I'm not able to figure this out from the > S7.html page. I am making a state management container for my max apps. I'd > like to make it follow the generic applicable syntax so that one can call > it as if it's a hashtable, allowing code using this to be unaware of > implementation. So I want to implement a setter and getter for my function > to be able to do: > > ;; call my setter > (set! (my-state-thing :foobar) 99) > > ;; call my setter > (my-state-thing :foobar) > > I apologize if this is just basic scheme ignorance! > thanks > iain > > > _______________________________________________ > 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 bil at ccrma.Stanford.EDU Wed Jul 29 13:28:41 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 29 Jul 2020 13:28:41 -0700 Subject: [CM] (sub)environments and object->string with :readable In-Reply-To: References: Message-ID: "readable" in this context means readable by s7. So, yes, that's about what I'd expect. You can do this more simply: (define *subnamespace* (inlet :nested-curlet (inlet :nested 1))) and to print it: (display (*subnamespace* :nested-curlet)) which gives: (inlet 'nested 1) and similarly with (format #f "~S" (*sub...)) From bil at ccrma.Stanford.EDU Wed Jul 29 13:43:12 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 29 Jul 2020 13:43:12 -0700 Subject: [CM] =?utf-8?q?How_to_make_new_applicable_objects_that_use_generi?= =?utf-8?q?c_set/get=3F?= In-Reply-To: References: Message-ID: I'd use a dilambda, I think. (define my-state-thing (let ((actual-state 'Maxwell)) (dilambda (lambda (field) ;; the "getter", so (my-state-thing :foobar) calls this function actual-state) (lambda (field new-value) ;; the "setter", (set! (my-state-thing :foobar) new-value) call this (set! actual-state new-value))))) You could also make my-state-thing a "let": (define my-state-thing (inlet :foobar 99)) From iainduncanlists at gmail.com Wed Jul 29 14:01:44 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Wed, 29 Jul 2020 14:01:44 -0700 Subject: [CM] How to make new applicable objects that use generic set/get? In-Reply-To: References: Message-ID: Thanks Bill and Christos, I'll chew on those and see how I make out! iain On Wed, Jul 29, 2020 at 1:43 PM wrote: > I'd use a dilambda, I think. > > (define my-state-thing > (let ((actual-state 'Maxwell)) > (dilambda > (lambda (field) > ;; the "getter", so (my-state-thing :foobar) calls this > function > actual-state) > (lambda (field new-value) > ;; the "setter", (set! (my-state-thing :foobar) new-value) call > this > (set! actual-state new-value))))) > > You could also make my-state-thing a "let": > (define my-state-thing (inlet :foobar 99)) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.actondev at gmail.com Wed Jul 29 16:22:02 2020 From: chris.actondev at gmail.com (Christos Vagias) Date: Thu, 30 Jul 2020 01:22:02 +0200 Subject: [CM] (sub)environments and object->string with :readable In-Reply-To: References: Message-ID: Hi Bil, thanks for the quick response. The problem that I'm facing is that write/ format ~S doesn't wrap lists around (list ..), thus I cannot use for serialize/deserialize. (my objective is saving/loading state) And the example I gave about the namespace is really simple. In my situation I'm doing things like loading a whole file into a separate namespace Like this example from the documentation (define *lib* (let () (with-let (unlet) (load "any-library.scm" (curlet)) ;; etc.. ))) How could I "write" something that comes from *lib* that is eval'able like the object->string :readable does? (Practically, picture that there is "make-state" function in *lib* that returns a curlet, like we were discussing in the previous email, and you need to serialize/deserialize this state object) I realize that I might be pushing the language limits like this, but I hope there is a solution. On Wed, 29 Jul 2020 at 22:28, wrote: > "readable" in this context means readable by s7. So, yes, that's about > what I'd > expect. You can do this more simply: > > (define *subnamespace* (inlet :nested-curlet (inlet :nested 1))) > > and to print it: > > (display (*subnamespace* :nested-curlet)) > > which gives: > > (inlet 'nested 1) > > and similarly with (format #f "~S" (*sub...)) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Wed Jul 29 17:19:44 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 29 Jul 2020 17:19:44 -0700 Subject: [CM] (sub)environments and object->string with :readable In-Reply-To: References: Message-ID: The previous example would have worked; I thought you were unhappy that it was not simple, but it is intended for s7's use. object->string with :readable and format with ~W are the built-in ways to serialize most s7 objects. (The complexity of the previous example came from s7's attempt to preserve the outlet chain, but the outer let refers back to the inner one -- a circular reference). From iainduncanlists at gmail.com Wed Jul 29 20:50:02 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Wed, 29 Jul 2020 20:50:02 -0700 Subject: [CM] metaobject protocol for S7? Message-ID: Hi all, just curious, as I continue my self-education in various things lispy, if anyone has implemented a metaobject protocol system for S7, or has thoughts for why it's not a good idea or just hasn't been worthwhile. I see that Chicken Scheme has Coops, and Guile has Goops - Chicken and Guile being kissing cousins of S7 in many ways. I'm a ways from properly understanding Scheme object systems yet (still just using the simple examples from the beginning of SICP for my purposes) so I can't say I have opinions one way or another, but I figure others must have thoughts on object systems for Lisps and Schemes and how they may or may not be appropriate for S7. I look forward to anyone's input. thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.actondev at gmail.com Thu Jul 30 02:32:49 2020 From: chris.actondev at gmail.com (Christos Vagias) Date: Thu, 30 Jul 2020 11:32:49 +0200 Subject: [CM] (sub)environments and object->string with :readable In-Reply-To: References: Message-ID: Hi Bil, Indeed it works, but the output of :readable grows out of hand. Here is a snippet. Imagine if there were way more definitions (and nested "sub-namespaces") (define *lib* (let () (curlet))) (with-let *lib* (define (make-state) (let ((a '(1 2 3))) (curlet))) (define make-state-2 (let ((+documentation+ "Makes some state with b")) (lambda () (let ((b '(1 2 3))) (curlet)))))) (define state ((*lib* 'make-state))) (object->string state) ;; => (inlet 'a (1 2 3)) ;; perfect, but not eval'able (object->string state :readable) ;; => ;; (sublet (sublet (sublet (inlet :make-state (lambda () (let ((a '(1 2 3))) (curlet))) :make-state-2 (let ((+documentation+ \"Makes some state with b\")) (lambda () (let ((b '(1 2 3))) (curlet))))))) :a (list 1 2 3)) So the :readable version essentially gives me essentially the source of *lib*.. Also, I realize now that in my application the problem that I faced was the "format ~W.." output was trimmed because it was too long. >From one hand indeed it works as expected (creating a complete definition). But on the other hand this is unusable for saving state. (imagine storing all of this in some database for example.. it's mostly noise) For now actually my problem is solved, since I'm defining the state in the rootlet, but this thing bugs me. On Thu, 30 Jul 2020 at 02:19, wrote: > The previous example would have worked; I thought > you were unhappy that it was not simple, but it is > intended for s7's use. object->string with :readable > and format with ~W are the built-in ways to serialize > most s7 objects. > > (The complexity of the previous example came from s7's > attempt to preserve the outlet chain, but the outer > let refers back to the inner one -- a circular reference). > > -------------- next part -------------- An HTML attachment was scrubbed... URL: