From iainduncanlists at gmail.com Fri May 1 10:36:15 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Fri, 1 May 2020 10:36:15 -0700 Subject: [CM] Issues building S7 on windows with MSVC Message-ID: Hi list, I'm trying to build S7 with MSVC 2019, and hitting some snags. I would like to get it working on MSVC because the Max SDK targets that compiler and it seems like it will be a real bear to get Max externals building on gcc on windows. If anyone has insights into the issues and can tell me what the right thing to do is, that would be lovely Issues I'm stuck on right now, below. Thanks! iain error C:2065 'F_OK': undeclared identifier (line 26134) if (access(filename, F_OK) == 0) return(b); - so F_OK is not being recognized, not sure what to do with this, it's used in two places error line: 39815 C2100: illegal indirection #if MS_WINDOWS struct sort_r_data tmp = {arg, compar}; qsort_s(*base, nmemb, size, &sort_r_arg_swap, &tmp); #else - I assume it's qsort call as it looks different from the neighboring ones: void local_qsort_r(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *, void *), void *arg) { #if defined(__linux__) qsort_r(base, nmemb, size, compar, arg); #else #if defined(__APPLE__) || defined(__FreeBSD__) /* not in OpenBSD or NetBSD as far as I can tell */ struct sort_r_data tmp = {arg, compar}; qsort_r(base, nmemb, size, &tmp, &sort_r_arg_swap); #else #if MS_WINDOWS struct sort_r_data tmp = {arg, compar}; qsort_s(*base, nmemb, size, &sort_r_arg_swap, &tmp); #else -------------- next part -------------- An HTML attachment was scrubbed... URL: From taube at illinois.edu Fri May 1 11:11:22 2020 From: taube at illinois.edu (Taube, Heinrich K) Date: Fri, 1 May 2020 18:11:22 +0000 Subject: [CM] Issues building S7 on windows with MSVC In-Reply-To: References: Message-ID: I think I was able to build in on windows, IIRC Bill had to patch a few places in the chain. Ill get a chance to look to look at it later today. > On May 1, 2020, at 12:36 PM, Iain Duncan wrote: > > Hi list, I'm trying to build S7 with MSVC 2019, and hitting some snags. I would like to get it working on MSVC because the Max SDK targets that compiler and it seems like it will be a real bear to get Max externals building on gcc on windows. If anyone has insights into the issues and can tell me what the right thing to do is, that would be lovely > > Issues I'm stuck on right now, below. > Thanks! > iain > > error C:2065 'F_OK': undeclared identifier (line 26134) > if (access(filename, F_OK) == 0) > return(b); > - so F_OK is not being recognized, not sure what to do with this, it's used in two places > > error line: 39815 C2100: illegal indirection > #if MS_WINDOWS > struct sort_r_data tmp = {arg, compar}; > qsort_s(*base, nmemb, size, &sort_r_arg_swap, &tmp); > #else > - I assume it's qsort call as it looks different from the neighboring ones: > > void local_qsort_r(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *, void *), void *arg) > { > #if defined(__linux__) > qsort_r(base, nmemb, size, compar, arg); > #else > #if defined(__APPLE__) || defined(__FreeBSD__) /* not in OpenBSD or NetBSD as far as I can tell */ > struct sort_r_data tmp = {arg, compar}; > qsort_r(base, nmemb, size, &tmp, &sort_r_arg_swap); > #else > #if MS_WINDOWS > struct sort_r_data tmp = {arg, compar}; > qsort_s(*base, nmemb, size, &sort_r_arg_swap, &tmp); > #else > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist From bil at ccrma.Stanford.EDU Fri May 1 11:26:35 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Fri, 01 May 2020 11:26:35 -0700 Subject: [CM] Issues building S7 on windows with MSVC In-Reply-To: References: Message-ID: <0a0151c5439cef9bd5259dd83fd9358d@ccrma.stanford.edu> Both of those problems were fixed in late February. The qsort line should be qsort_s(base, nmemb, size, sort_r_arg_swap, &tmp); and access should be if (_access(filename, 0) != -1) From iainduncanlists at gmail.com Fri May 1 13:16:11 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Fri, 1 May 2020 13:16:11 -0700 Subject: [CM] Issues building S7 on windows with MSVC In-Reply-To: <0a0151c5439cef9bd5259dd83fd9358d@ccrma.stanford.edu> References: <0a0151c5439cef9bd5259dd83fd9358d@ccrma.stanford.edu> Message-ID: Ah fantastic, I think I must have grabbed the wrong copies of s7.c, I meant to try with the latest tarball and must have made a mistake copying between machines. Thanks Bill, I'll try it out this afternoon and see how it goes. iain On Fri, May 1, 2020 at 11:26 AM wrote: > Both of those problems were fixed in late February. > The qsort line should be > > qsort_s(base, nmemb, size, sort_r_arg_swap, &tmp); > > and access should be > > if (_access(filename, 0) != -1) > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iainduncanlists at gmail.com Fri May 1 14:18:26 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Fri, 1 May 2020 14:18:26 -0700 Subject: [CM] Issues building S7 on windows with MSVC In-Reply-To: References: <0a0151c5439cef9bd5259dd83fd9358d@ccrma.stanford.edu> Message-ID: Hi everyone, just wanted to confirm the current tarball is compiling fine on MSVC 2019, my apologies for the mistaken post. thanks! iain On Fri, May 1, 2020 at 1:16 PM Iain Duncan wrote: > Ah fantastic, I think I must have grabbed the wrong copies of s7.c, I > meant to try with the latest tarball and must have made a mistake copying > between machines. > > Thanks Bill, I'll try it out this afternoon and see how it goes. > > iain > > On Fri, May 1, 2020 at 11:26 AM wrote: > >> Both of those problems were fixed in late February. >> The qsort line should be >> >> qsort_s(base, nmemb, size, sort_r_arg_swap, &tmp); >> >> and access should be >> >> if (_access(filename, 0) != -1) >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From wdouglass at carnegierobotics.com Wed May 6 07:21:07 2020 From: wdouglass at carnegierobotics.com (Woody Douglass) Date: Wed, 6 May 2020 14:21:07 +0000 Subject: [CM] Constant tables in s7 Message-ID: <3aa80c520f834f80b1ea812d754fe902@carnegierobotics.com> A general question: is there a reason that constant tables, like exponent_table, slashify_table, char_ok_in_a_name, etc... are declared as static pointers, and then calloc'd? I'm trying to unit test some code that hooks s7, and my testing apparattus is reporting a bunch of leaks. So i've been looking at a generalized "free" for s7, and came across this. Would it be better to declare them as static arrays? that way the calloc calls could be avoided and memory leak tools would be happier. I'd be happy to submit a patch if you guys (especially bil) think this is a good idea. Thanks, Woody Douglass -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.s.matheussen at gmail.com Wed May 6 07:47:57 2020 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Wed, 6 May 2020 16:47:57 +0200 Subject: [CM] Constant tables in s7 In-Reply-To: <3aa80c520f834f80b1ea812d754fe902@carnegierobotics.com> References: <3aa80c520f834f80b1ea812d754fe902@carnegierobotics.com> Message-ID: I think this was a patch from me. The reason is to shorten the time it takes to scan memory for pointers if the program runs BDW-GC or a similar garbage collector. On Wed, May 6, 2020 at 4:24 PM Woody Douglass wrote: > > A general question: is there a reason that constant tables, like exponent_table, slashify_table, char_ok_in_a_name, etc... are declared as static pointers, and then calloc'd? I'm trying to unit test some code that hooks s7, and my testing apparattus is reporting a bunch of leaks. So i've been looking at a generalized "free" for s7, and came across this. > > Would it be better to declare them as static arrays? that way the calloc calls could be avoided and memory leak tools would be happier. I'd be happy to submit a patch if you guys (especially bil) think this is a good idea. > > Thanks, > Woody Douglass > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist From wdouglass at carnegierobotics.com Wed May 6 11:47:26 2020 From: wdouglass at carnegierobotics.com (Woody Douglass) Date: Wed, 6 May 2020 18:47:26 +0000 Subject: [CM] s7 git, and a cleanup patch Message-ID: <3931d4f68e4a4458a08edea226a7d9ba@carnegierobotics.com> All, Two things: 1) I'm planning on automating updates to my s7 github mirror, so stay tuned. I'm working on a script to be run nightly that pushes changes from svn to git. This will destroy the previous history, which kind of stinks, but it has the benefit of staying much more up to date 2) see the attached patch: it was helpful in finding a leak in my code, and may be helpful to others too. It adds a pair of cleanup functions to s7, and some tracking of "permanant" malloc'd buffers. Let me know what you guys think. -Woody -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-s7-cleanup.patch Type: application/octet-stream Size: 13195 bytes Desc: 0001-s7-cleanup.patch URL: From bil at ccrma.Stanford.EDU Wed May 6 12:56:46 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 06 May 2020 12:56:46 -0700 Subject: [CM] s7 git, and a cleanup patch In-Reply-To: <3931d4f68e4a4458a08edea226a7d9ba@carnegierobotics.com> References: <3931d4f68e4a4458a08edea226a7d9ba@carnegierobotics.com> Message-ID: <8b8e1b1c83e3855e84c362e533b72d07@ccrma.stanford.edu> Thanks for the suggestion. I was planning to do something similar eventually, so I'll keep this patch at hand until I'm ready to tackle it. I think I'd allocate your permanent_alloc_blocks array in blocks so to speak so you don't have to call realloc all the time. To track down memory leaks, valgrind's suppression file can be used to leave all the s7 allocations out of the report. This may be specific to Linux. From iainduncanlists at gmail.com Thu May 7 09:29:58 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Thu, 7 May 2020 09:29:58 -0700 Subject: [CM] Scheme for Max out for windows now Message-ID: Hi folks, I have a binary release out for windows now for Scheme for Max, which also means I know enough to be dangerous for compiling on Windows. Once I've compiled some Juce with S7 code on windows I should be able to pitch in build testing for CM on windows. Release here: https://github.com/iainctduncan/scheme-for-max/releases/tag/0.1.5-beta iain -------------- next part -------------- An HTML attachment was scrubbed... URL: From wdouglass at carnegierobotics.com Thu May 7 10:04:14 2020 From: wdouglass at carnegierobotics.com (Woody Douglass) Date: Thu, 7 May 2020 17:04:14 +0000 Subject: [CM] s7 git, and a cleanup patch In-Reply-To: <8b8e1b1c83e3855e84c362e533b72d07@ccrma.stanford.edu> References: <3931d4f68e4a4458a08edea226a7d9ba@carnegierobotics.com>, <8b8e1b1c83e3855e84c362e533b72d07@ccrma.stanford.edu> Message-ID: Found a few problems with yesterday's patch, here's a newer version On 2020-05-06 15:57:08-04:00 bil at ccrma.Stanford.EDU wrote: Thanks for the suggestion. I was planning to do something similar eventually, so I'll keep this patch at hand until I'm ready to tackle it. I think I'd allocate your permanent_alloc_blocks array in blocks so to speak so you don't have to call realloc all the time. To track down memory leaks, valgrind's suppression file can be used to leave all the s7 allocations out of the report. This may be specific to Linux. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-s7-cleanup.patch Type: application/octet-stream Size: 14812 bytes Desc: 0001-s7-cleanup.patch URL: From iainduncanlists at gmail.com Fri May 8 11:39:58 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Fri, 8 May 2020 11:39:58 -0700 Subject: [CM] Right way to get latest S7 and CM sources? Message-ID: hi folks, I found some inconsistent behaviour on windows with loop.scm and I want to make sure I'm doing some tests with the correct latest files before posting details here in case it's just a versioning mismatch of my S7 and CM scheme files. So couple of questions: - What is the best way to ensure I have the latest release for s7, is the Snd release on SVN, or the tarball link on s7.html? - I assume to have the latest version of loop as used in CM, I go to the CM sources. I though Rick said he was moving to git, but the CM website source link goes to 3.9. Is Grace 3.10.2 to the canonical latest? or is there a dev version? thanks iain -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Fri May 8 12:35:15 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Fri, 08 May 2020 12:35:15 -0700 Subject: [CM] =?utf-8?q?Right_way_to_get_latest_S7_and_CM_sources=3F?= In-Reply-To: References: Message-ID: <96cce05003aff18b2d4d2f3b21017e6c@ccrma.stanford.edu> > What is the best way to ensure I have the latest release for s7, is the > Snd release on SVN, or the tarball link on s7.html? These are always the same. I update them nearly every morning. You can also check the S7_DATE string in s7.h. From iainduncanlists at gmail.com Fri May 8 12:42:16 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Fri, 8 May 2020 12:42:16 -0700 Subject: [CM] Right way to get latest S7 and CM sources? In-Reply-To: <96cce05003aff18b2d4d2f3b21017e6c@ccrma.stanford.edu> References: <96cce05003aff18b2d4d2f3b21017e6c@ccrma.stanford.edu> Message-ID: Thanks Bill. good to know. iain On Fri, May 8, 2020 at 12:35 PM wrote: > > What is the best way to ensure I have the latest release for s7, is the > > Snd release on SVN, or the tarball link on s7.html? > > These are always the same. I update them nearly every morning. > You can also check the S7_DATE string in s7.h. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From taube at illinois.edu Fri May 8 13:04:47 2020 From: taube at illinois.edu (Taube, Heinrich K) Date: Fri, 8 May 2020 20:04:47 +0000 Subject: [CM] Right way to get latest S7 and CM sources? In-Reply-To: References: Message-ID: you will need to get the sources for cm/grace from its new location: https://github.com/ricktaube/grace.git at some point i will close the old sourceforge site but Im simply too busy right now to deal with it. I will also have to set up my windows machine here at home to see if i need to push any commits after I got grace to comile and link with s7. the machine been sitting in a corner of my dining room for several weeks since i move my office stuff home due to covid. it will take me till tomorrow to get it set up and networked etc. On May 8, 2020, at 1:39 PM, Iain Duncan > wrote: hi folks, I found some inconsistent behaviour on windows with loop.scm and I want to make sure I'm doing some tests with the correct latest files before posting details here in case it's just a versioning mismatch of my S7 and CM scheme files. So couple of questions: - What is the best way to ensure I have the latest release for s7, is the Snd release on SVN, or the tarball link on s7.html? - I assume to have the latest version of loop as used in CM, I go to the CM sources. I though Rick said he was moving to git, but the CM website source link goes to 3.9. Is Grace 3.10.2 to the canonical latest? or is there a dev version? 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 iainduncanlists at gmail.com Fri May 8 13:32:38 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Fri, 8 May 2020 13:32:38 -0700 Subject: [CM] Right way to get latest S7 and CM sources? In-Reply-To: References: Message-ID: Thanks Rick. I will make some test scripts with known latest sources to see if I can get the weird behaviour on demand, and if so, report back. thanks Iain On Fri, May 8, 2020 at 1:04 PM Taube, Heinrich K wrote: > you will need to get the sources for cm/grace from its new location: > > https://github.com/ricktaube/grace.git > > at some point i will close the old sourceforge site but Im simply too busy > right now to deal with it. > > I will also have to set up my windows machine here at home to see if i > need to push any commits after I got grace to comile and link with s7. the > machine been sitting in a corner of my dining room for several weeks since > i move my office stuff home due to covid. it will take me till tomorrow to > get it set up and networked etc. > > > On May 8, 2020, at 1:39 PM, Iain Duncan wrote: > > hi folks, I found some inconsistent behaviour on windows with loop.scm and > I want to make sure I'm doing some tests with the correct latest files > before posting details here in case it's just a versioning mismatch of my > S7 and CM scheme files. So couple of questions: > > - What is the best way to ensure I have the latest release for s7, is the > Snd release on SVN, or the tarball link on s7.html? > > - I assume to have the latest version of loop as used in CM, I go to the > CM sources. I though Rick said he was moving to git, but the CM website > source link goes to 3.9. Is Grace 3.10.2 to the canonical latest? or is > there a dev version? > > 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 iainduncanlists at gmail.com Sat May 9 13:50:37 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Sat, 9 May 2020 13:50:37 -0700 Subject: [CM] Errors building latest S7 (today's) on VS2019, Windows 10 Message-ID: Hi all, in order to sort out my macro issues I made a little test project specifically for verifying builds across OSX and Windows. I have it grabbing the latest S7 from the mirror on github (thanks Woody, super handy that!). With the current version of S7.h and S7.c, I get the following issues on Visual Studio 2019, Windows 10: compiling S7 throws errors for lines 11121 to 11125: Error C2491 'asinh': definition of dllimport function not allowed Error C2491 'acosh': definition of dllimport function not allowed Error C2491 'atanh': definition of dllimport function not allowed Error C2491 'cbrt': definition of dllimport function not allowed If I comment those out, it builds fine. But I imagine that's not the right solution... :-) If there's anything I can do to assist, let me know, I'm set up to build easily on win 10, VS 2019 now. HTH iain -------------- next part -------------- An HTML attachment was scrubbed... URL: From iainduncanlists at gmail.com Sat May 9 13:56:22 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Sat, 9 May 2020 13:56:22 -0700 Subject: [CM] Errors with loop macro on windows (OSX fine) Message-ID: Ok, now that I've made a test project, I think I can helpfully report. I am using the version of loop.scm downloaded from Rick's github, and S7 from the mirror. I've made a standalone C program that embeds s7, loads loop.scm, and tries to use it. It's working fine on OSX. On Windows 10, loop loads, but calling it makes the program hang until I do Control-C. (I did have to monkey patch s7.c to make that work, see previous email) In case it is useful (or I've just done something stupid!!), my test project is here, with text file README describing the results: https://github.com/iainctduncan/scheme-for-max/tree/master/test-code/s7-test If there's anything I can do to help, let me know. I'm just going to leave loop.scm turned off by default in my windows package for now. HTH Iain -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Sat May 9 14:02:12 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Sat, 09 May 2020 14:02:12 -0700 Subject: [CM] Errors building latest S7 (today's) on VS2019, Windows 10 In-Reply-To: References: Message-ID: <647326c6a149e89fa758a91233eea686@ccrma.stanford.edu> > compiling S7 throws errors for lines 11121 to 11125: > Error C2491 'asinh': definition of dllimport function not allowed I misunderstood something Rick sent me -- in s7.c at line 11119 enclose the asinh etc in (_MSC_VER < 1700) #if (_MSC_VER < 1700) /* in MS C, we need to provide inverse hyperbolic trig funcs and cbrt */ static double asinh(double x) {return(log(x + sqrt(1.0 + x * x)));} static double acosh(double x) {return(log(x + sqrt(x * x - 1.0)));} /* perhaps less prone to numerical troubles (untested): 2.0 * log(sqrt(0.5 * (x + 1.0)) + sqrt(0.5 * (x - 1.0))) */ static double atanh(double x) {return(log((1.0 + x) / (1.0 - x)) / 2.0);} static double cbrt(double x) {if (x >= 0.0) return(pow(x, 1.0 / 3.0)); return(-pow(-x, 1.0 / 3.0));} #endif I'm guessing about the 1700. From taube at illinois.edu Sat May 9 14:06:37 2020 From: taube at illinois.edu (Taube, Heinrich K) Date: Sat, 9 May 2020 21:06:37 +0000 Subject: [CM] Errors with loop macro on windows (OSX fine) In-Reply-To: References: Message-ID: <2F00F6F5-2B78-4F85-9A3D-C32CA057B043@illinois.edu> are you able to get your program to load a scheme test file with some s7 expressions and see that they execute sucessfully? Im asking because I could compile and link to sndlib/s7 but it would not evaluate expression not involved with loop at all. On May 9, 2020, at 3:56 PM, Iain Duncan > wrote: Ok, now that I've made a test project, I think I can helpfully report. I am using the version of loop.scm downloaded from Rick's github, and S7 from the mirror. I've made a standalone C program that embeds s7, loads loop.scm, and tries to use it. It's working fine on OSX. On Windows 10, loop loads, but calling it makes the program hang until I do Control-C. (I did have to monkey patch s7.c to make that work, see previous email) In case it is useful (or I've just done something stupid!!), my test project is here, with text file README describing the results: https://github.com/iainctduncan/scheme-for-max/tree/master/test-code/s7-test If there's anything I can do to help, let me know. I'm just going to leave loop.scm turned off by default in my windows package for now. HTH Iain -------------- next part -------------- An HTML attachment was scrubbed... URL: From iainduncanlists at gmail.com Sat May 9 14:07:33 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Sat, 9 May 2020 14:07:33 -0700 Subject: [CM] Errors building latest S7 (today's) on VS2019, Windows 10 In-Reply-To: <647326c6a149e89fa758a91233eea686@ccrma.stanford.edu> References: <647326c6a149e89fa758a91233eea686@ccrma.stanford.edu> Message-ID: Confirming that fixed it. At least on my setup. Thanks! iain On Sat, May 9, 2020 at 2:02 PM wrote: > > compiling S7 throws errors for lines 11121 to 11125: > > Error C2491 'asinh': definition of dllimport function not > allowed > > I misunderstood something Rick sent me -- in s7.c at line 11119 > enclose the asinh etc in (_MSC_VER < 1700) > > #if (_MSC_VER < 1700) > /* in MS C, we need to provide inverse hyperbolic trig funcs and cbrt > */ > static double asinh(double x) {return(log(x + sqrt(1.0 + x * x)));} > static double acosh(double x) {return(log(x + sqrt(x * x - 1.0)));} > /* perhaps less prone to numerical troubles (untested): 2.0 * > log(sqrt(0.5 * (x + 1.0)) + sqrt(0.5 * (x - 1.0))) */ > static double atanh(double x) {return(log((1.0 + x) / (1.0 - x)) / > 2.0);} > static double cbrt(double x) {if (x >= 0.0) return(pow(x, 1.0 / 3.0)); > return(-pow(-x, 1.0 / 3.0));} > #endif > > I'm guessing about the 1700. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iainduncanlists at gmail.com Sat May 9 14:23:25 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Sat, 9 May 2020 14:23:25 -0700 Subject: [CM] Errors with loop macro on windows (OSX fine) In-Reply-To: <2F00F6F5-2B78-4F85-9A3D-C32CA057B043@illinois.edu> References: <2F00F6F5-2B78-4F85-9A3D-C32CA057B043@illinois.edu> Message-ID: Hi Rick, I just added some basics and they are working fine: defining a function and some vars, calling the function on the vars, displaying the results. I also added putting a function definition into another file (mult.scm), loading it, and calling the function, no issues there either. So on my end, I see no weirdness until I try to actually *call* loop. I've put the updated script up on the git repo in case that is useful. https://github.com/iainctduncan/scheme-for-max/blob/master/test-code/s7-test/s7-test.c iain On Sat, May 9, 2020 at 2:06 PM Taube, Heinrich K wrote: > are you able to get your program to load a scheme test file with some s7 > expressions and see that they execute sucessfully? > Im asking because I could compile and link to sndlib/s7 but it would not > evaluate expression not involved with loop at all. > > > > On May 9, 2020, at 3:56 PM, Iain Duncan wrote: > > Ok, now that I've made a test project, I think I can helpfully report. I > am using the version of loop.scm downloaded from Rick's github, and S7 from > the mirror. I've made a standalone C program that embeds s7, loads > loop.scm, and tries to use it. It's working fine on OSX. On Windows 10, > loop loads, but calling it makes the program hang until I do Control-C. (I > did have to monkey patch s7.c to make that work, see previous email) > > In case it is useful (or I've just done something stupid!!), my test > project is here, with text file README describing the results: > > https://github.com/iainctduncan/scheme-for-max/tree/master/test-code/s7-test > > If there's anything I can do to help, let me know. I'm just going to leave > loop.scm turned off by default in my windows package for now. > > HTH > Iain > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From philippe.cabanon at laposte.net Tue May 12 09:07:26 2020 From: philippe.cabanon at laposte.net (philippe.cabanon at laposte.net) Date: Tue, 12 May 2020 18:07:26 +0200 (CEST) Subject: [CM] Grace and General MIDI Controller numbers In-Reply-To: <1145207656.575748.1589298874213.JavaMail.zimbra@laposte.net> Message-ID: <165505090.585561.1589299646188.JavaMail.zimbra@laposte.net> Hi, I don't understand what I have to type to use the Midi Controlers Numbers in Grace: mp:ctrl? (mp:ctrl :num 10 :val 120 :chan 0)? what values are needed in the parameters and what are their meanings ? mp:press? (ditto) mp:prog? (is the only use the change of instruments or can we utilize the command for other possibilities?) And : how to pan from left to right ? how to up and down the volume ? etc. Thank you, Best regards, Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: From philippe.cabanon at laposte.net Sun May 17 02:39:05 2020 From: philippe.cabanon at laposte.net (philippe.cabanon at laposte.net) Date: Sun, 17 May 2020 11:39:05 +0200 (CEST) Subject: [CM] (no subject) Message-ID: <1853032670.399235.1589708345215.JavaMail.zimbra@laposte.net> Hi everyone, Noone has answered so far. Can anyone help me, please? Here are my questions again: I don't understand what I have to type to use the Midi Controlers Numbers in Grace: mp:ctrl? (mp:ctrl :num 10 :val 120 :chan 0)? what values are needed in the parameters and what are their meanings ? mp:press? (ditto) mp:prog? (is the only use the change of instruments or can we utilize the command for other possibilities?) And : how to pan from left to right ? how to up and down the volume ? etc. Thank you, Looking forward to your answers. Best regards, Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: From iainduncanlists at gmail.com Sun May 17 12:11:43 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Sun, 17 May 2020 12:11:43 -0700 Subject: [CM] What is the "normal" way to handle errors for side effect functions in Scheme? Message-ID: Hi folks, I'm hoping an experienced schemer can help me. I have a collection of FFI functions that are called for their side effects (ie writing to a table or buffer in Max). They can error out if, for example, they are called with a non-existent table name. I know what they should do in Max (post to the error log), but am not sure what the right thing is for them to do in a Scheme API. Right now I have my pure side-effect functions return Scheme nil when they are done. In Python, I would throw an exception. If anyone can point me at how to implement this so that experienced schemer's doing thing the API is garbage, that would be lovely. thanks! iain -------------- next part -------------- An HTML attachment was scrubbed... URL: From iainduncanlists at gmail.com Sun May 17 12:31:43 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Sun, 17 May 2020 12:31:43 -0700 Subject: [CM] What is the "normal" way to handle errors for side effect functions in Scheme? In-Reply-To: References: Message-ID: Here's a snippet of what I'm trying, corrections or confirmation welcome: // error and abort if not an int vector and table name if( !s7_is_vector(s7_source_vector) || !s7_is_int_vector(s7_source_vector) ){ // error posts to the max console char *error_msg = "vector->table: arg 1 must be an integer vector"; error(error_msg); return s7_error(s7, s7_make_symbol(s7, "io-error"), s7_make_string(s7, error_msg) ); }else{ // do other stuff, let's say it's all good return s7_nil(s7); } On Sun, May 17, 2020 at 12:11 PM Iain Duncan wrote: > Hi folks, I'm hoping an experienced schemer can help me. I have a > collection of FFI functions that are called for their side effects (ie > writing to a table or buffer in Max). They can error out if, for example, > they are called with a non-existent table name. I know what they should do > in Max (post to the error log), but am not sure what the right thing is for > them to do in a Scheme API. Right now I have my pure side-effect functions > return Scheme nil when they are done. In Python, I would throw an > exception. If anyone can point me at how to implement this so that > experienced schemer's doing thing the API is garbage, that would be lovely. > > thanks! > iain > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Sun May 17 12:52:46 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Sun, 17 May 2020 12:52:46 -0700 Subject: [CM] =?utf-8?q?What_is_the_=22normal=22_way_to_handle_errors_for_?= =?utf-8?q?side_effect_functions_in_Scheme=3F?= In-Reply-To: References: Message-ID: <15af4ec074f1333fa5444879fbdc1207@ccrma.stanford.edu> That code looks fine to me. On the scheme side you'll want a catch somewhere. The other common choice is to return some error indication, and then the scheme side has to check for that. All the s7 C-library tie-ins (like libgsl) call s7_error. From iainduncanlists at gmail.com Sun May 17 12:55:14 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Sun, 17 May 2020 12:55:14 -0700 Subject: [CM] What is the "normal" way to handle errors for side effect functions in Scheme? In-Reply-To: <15af4ec074f1333fa5444879fbdc1207@ccrma.stanford.edu> References: <15af4ec074f1333fa5444879fbdc1207@ccrma.stanford.edu> Message-ID: Thanks Bill, much appreciated. for the next release with the table and buffer i/o I'm going to retool various functions to do that and to return the value being passed through so that they are consistent with how things like vector-set! and vector->list work. thanks for the tips! iain On Sun, May 17, 2020 at 12:52 PM wrote: > That code looks fine to me. On the scheme side you'll want > a catch somewhere. The other common choice is to return some > error indication, and then the scheme side has to check for > that. All the s7 C-library tie-ins (like libgsl) call s7_error. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iainduncanlists at gmail.com Sun May 17 13:28:58 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Sun, 17 May 2020 13:28:58 -0700 Subject: [CM] Another Scheme API question Message-ID: I have another question for make my API seem scheme-ish. I'm going to bring my side-effects functions that write to data structures to be in alignment with vector-set! etc so that they return the value that was just used to set a slot. But I'm less sure what should happen for side effect functions that just do something with a value. Specifically, I have functions that send values out the Max object outlets, ie: (out 0 :foobar) ;; sends :foobar out outlet 0 At the moment, I have the out function return s7_nil, which I did because I didn't know what it should do and thought this was roughly equivalent to returning void. I could just as easily have it return the value that was just sent out, which could conceivably be useful for making chains with a threading macro (where -> passes on the value as first arg of the next function) out 0 foobar -> some-other-function If anyone can comment on what is standard in Scheme land for a pure side effect function that is not a setter, I'm all ears. thanks iain -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Sun May 17 14:22:15 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Sun, 17 May 2020 14:22:15 -0700 Subject: [CM] Another Scheme API question In-Reply-To: References: Message-ID: <1a2244f1d51cbf53e061161919d23b14@ccrma.stanford.edu> In r7rs, I think most of the output functions return an unspecified value, as does vector-set! (I think...), s7_unspecified or #, but this is dumb. s7 normally tries to return a value for the reason you mentioned, so vector-set! returns the value, and output procedures (like display) return the thing output. From iainduncanlists at gmail.com Sun May 17 14:38:59 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Sun, 17 May 2020 14:38:59 -0700 Subject: [CM] Another Scheme API question In-Reply-To: <1a2244f1d51cbf53e061161919d23b14@ccrma.stanford.edu> References: <1a2244f1d51cbf53e061161919d23b14@ccrma.stanford.edu> Message-ID: ok that sounds reasonable, thanks for the help. iain On Sun, May 17, 2020 at 2:22 PM wrote: > In r7rs, I think most of the output functions return an > unspecified value, as does vector-set! (I think...), > s7_unspecified or #, but this is dumb. > s7 normally tries to return a value for the reason > you mentioned, so vector-set! returns the value, > and output procedures (like display) return the thing > output. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lb at zkm.de Sun May 17 11:50:43 2020 From: lb at zkm.de (=?utf-8?Q?ludger_br=C3=BCmmer?=) Date: Sun, 17 May 2020 20:50:43 +0200 Subject: [CM] (no subject) In-Reply-To: <1853032670.399235.1589708345215.JavaMail.zimbra@laposte.net> References: <1853032670.399235.1589708345215.JavaMail.zimbra@laposte.net> Message-ID: <720DB305-9084-42E7-BA49-3B41FB920136@zkm.de> hi Philippe, here an example for pan (define (player) (process for i from 0 to 127 do (mp:ctrl :num 10 :val i :chan 0) ;between 0 Left and 127 Right (mp:midi :key 80 :dur .05 :amp .5 :chan 0) (wait .1) )) (sprout (player) ) ;;;or (sprout (player) "pan.mid?) ;;; and another one for volume fade (define (player-volume) (process for i from 0 to 1 by .1 do (mp:midi :key 80 :dur .05 :amp i :chan 0) (wait .1) )) (sprout (player-volume) ) ;;;or (sprout (player-volume) "volume.mid") viele Gr??e / all the best Ludger Br?mmer -- Prof. Ludger Br?mmer Leitung | Head of Department Hertz-Labor | Hertz-Lab Professor f?r Komposition f?r digitale Medien Musikhochschule Trossingen, mh-trossingen.de /////// / |< ||| | ZKM | Zentrum f?r Kunst und Medien Karlsruhe /////// / |< ||| | ZKM | Center for Art and Media Karlsruhe /////// / |< ||| | ZKM | Centre d'Art et des M?dias Karlsruhe Lorenzstr. 19, D-76135 Karlsruhe Tel +49-(0)721-8100-1601, Fax +49-(0)721-8100-1699 E-Mail: ludger.bruemmer at zkm.de www.zkm.de Aktuelle Ausstellungen ? current exhibitions > Am 17.05.2020 um 11:39 schrieb philippe.cabanon at laposte.net: > > Hi everyone, > > Noone has answered so far. > > Can anyone help me, please? > > Here are my questions again: > > I don't understand what I have to type to use the Midi Controlers Numbers in Grace: > > mp:ctrl? (mp:ctrl :num 10 :val 120 :chan 0)? what values are needed in the parameters and what are their meanings ? > mp:press? (ditto) > mp:prog? (is the only use the change of instruments or can we utilize the command for other possibilities?) > > And : how to pan from left to right ? how to up and down the volume ? etc. > > Thank you, > > Looking forward to your answers. > > Best regards, > Philippe > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zkm-cz.jpg Type: image/jpeg Size: 41457 bytes Desc: not available URL: From philippe.cabanon at laposte.net Mon May 18 00:16:56 2020 From: philippe.cabanon at laposte.net (philippe.cabanon at laposte.net) Date: Mon, 18 May 2020 09:16:56 +0200 (CEST) Subject: [CM] (no subject) In-Reply-To: <720DB305-9084-42E7-BA49-3B41FB920136@zkm.de> References: <1853032670.399235.1589708345215.JavaMail.zimbra@laposte.net> <720DB305-9084-42E7-BA49-3B41FB920136@zkm.de> Message-ID: <1997257788.265820.1589786216146.JavaMail.zimbra@laposte.net> Guten Morgen Ludger, Thank you, I get the idea. In fact, I was wondering if it was possible to modify a sound already emitted, as you do with a knob on a midi controller keyboard (keeping the same original sound). But I'm already going to use the "mp:ctrl" function in the way you suggested. Vielen Dank, Ph.C ----- Mail original ----- De: "ludger br?mmer" ?: "philippe cabanon" Cc: "cmdist at ccrma.stanford.edu" Envoy?: Dimanche 17 Mai 2020 20:50:43 Objet: Re: [CM] (no subject) hi Philippe, here an example for pan (define (player) (process for i from 0 to 127 do (mp:ctrl :num 10 :val i :chan 0) ;between 0 Left and 127 Right (mp:midi :key 80 :dur .05 :amp .5 :chan 0) (wait .1) )) (sprout (player) ) ;;;or (sprout (player) "pan.mid?) ;;; and another one for volume fade (define (player-volume) (process for i from 0 to 1 by .1 do (mp:midi :key 80 :dur .05 :amp i :chan 0) (wait .1) )) (sprout (player-volume) ) ;;;or (sprout (player-volume) "volume.mid") viele Gr??e / all the best Ludger Br?mmer -- Prof. Ludger Br?mmer Leitung | Head of Department Hertz-Labor | Hertz-Lab Professor f?r Komposition f?r digitale Medien Musikhochschule Trossingen, mh-trossingen.de /////// / |< ||| | ZKM | Zentrum f?r Kunst und Medien Karlsruhe /////// / |< ||| | ZKM | Center for Art and Media Karlsruhe /////// / |< ||| | ZKM | Centre d'Art et des M?dias Karlsruhe Lorenzstr. 19, D-76135 Karlsruhe Tel +49-(0)721-8100-1601, Fax +49-(0)721-8100-1699 E-Mail: ludger.bruemmer at zkm.de www.zkm.de Aktuelle Ausstellungen ? current exhibitions Am 17.05.2020 um 11:39 schrieb philippe.cabanon at laposte.net : Hi everyone, Noone has answered so far. Can anyone help me, please? Here are my questions again: I don't understand what I have to type to use the Midi Controlers Numbers in Grace: mp:ctrl? (mp:ctrl :num 10 :val 120 :chan 0)? what values are needed in the parameters and what are their meanings ? mp:press? (ditto) mp:prog? (is the only use the change of instruments or can we utilize the command for other possibilities?) And : how to pan from left to right ? how to up and down the volume ? etc. Thank you, Looking forward to your answers. Best regards, Philippe _______________________________________________ Cmdist mailing list Cmdist at ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zkm-cz.jpg Type: image/jpeg Size: 41457 bytes Desc: not available URL: From philippe.cabanon at laposte.net Tue May 19 06:45:08 2020 From: philippe.cabanon at laposte.net (philippe.cabanon at laposte.net) Date: Tue, 19 May 2020 15:45:08 +0200 (CEST) Subject: [CM] Using PAN function in Grace In-Reply-To: <20200519095626.GA716358@t480s-orm.localdomain> References: <1853032670.399235.1589708345215.JavaMail.zimbra@laposte.net> <720DB305-9084-42E7-BA49-3B41FB920136@zkm.de> <1997257788.265820.1589786216146.JavaMail.zimbra@laposte.net> <20200519095626.GA716358@t480s-orm.localdomain> Message-ID: <498656064.560065.1589895908316.JavaMail.zimbra@laposte.net> Thank you, Orm, that works perfectly, I have replicated your example with other control codes, it seems to me that only N?93 "Chorus Depth" modifies the sound significantly (I didn't succeed with the other codes). (I used the "70 Bassoon" sound which seemed to be better on "long" sounds - 30s here -). One of my ideas was to use the "pan" function on top of the "Steve Reich's Piano Phase" example to separate the 2 pianos along with the phase, just an idea. Thank you again. Ph.C ----- Mail original ----- De: "Orm Finnendahl" ?: "philippe cabanon" Cc: cmdist at ccrma.stanford.edu Envoy?: Mardi 19 Mai 2020 11:56:26 Objet: Re: [CM] (no subject) Am Montag, den 18. Mai 2020 um 09:16:56 Uhr (+0200) schrieb philippe.cabanon at laposte.net: > In fact, I was wondering if it was possible to modify a sound > already emitted, as you do with a knob on a midi controller keyboard > (keeping the same original sound). yes, start a long note: (mp:midi :key 80 :dur 20 :amp .5 :chan 0) then simulate the controller knob: (sprout (process for i below 128 do (mp:ctrl :num 10 :val i :chan 0) (wait .01))) I hope the syntax is ok. I can't test here as I'm using the common lisp version with a slightly different syntax. -- Orm -------------- next part -------------- An HTML attachment was scrubbed... URL: From orm.finnendahl at selma.hfmdk-frankfurt.de Tue May 19 02:56:26 2020 From: orm.finnendahl at selma.hfmdk-frankfurt.de (Orm Finnendahl) Date: Tue, 19 May 2020 11:56:26 +0200 Subject: [CM] (no subject) In-Reply-To: <1997257788.265820.1589786216146.JavaMail.zimbra@laposte.net> References: <1853032670.399235.1589708345215.JavaMail.zimbra@laposte.net> <720DB305-9084-42E7-BA49-3B41FB920136@zkm.de> <1997257788.265820.1589786216146.JavaMail.zimbra@laposte.net> Message-ID: <20200519095626.GA716358@t480s-orm.localdomain> Am Montag, den 18. Mai 2020 um 09:16:56 Uhr (+0200) schrieb philippe.cabanon at laposte.net: > In fact, I was wondering if it was possible to modify a sound > already emitted, as you do with a knob on a midi controller keyboard > (keeping the same original sound). yes, start a long note: (mp:midi :key 80 :dur 20 :amp .5 :chan 0) then simulate the controller knob: (sprout (process for i below 128 do (mp:ctrl :num 10 :val i :chan 0) (wait .01))) I hope the syntax is ok. I can't test here as I'm using the common lisp version with a slightly different syntax. -- Orm From orm.finnendahl at selma.hfmdk-frankfurt.de Tue May 19 09:43:49 2020 From: orm.finnendahl at selma.hfmdk-frankfurt.de (Orm Finnendahl) Date: Tue, 19 May 2020 18:43:49 +0200 Subject: [CM] Using PAN function in Grace In-Reply-To: <498656064.560065.1589895908316.JavaMail.zimbra@laposte.net> References: <1853032670.399235.1589708345215.JavaMail.zimbra@laposte.net> <720DB305-9084-42E7-BA49-3B41FB920136@zkm.de> <1997257788.265820.1589786216146.JavaMail.zimbra@laposte.net> <20200519095626.GA716358@t480s-orm.localdomain> <498656064.560065.1589895908316.JavaMail.zimbra@laposte.net> Message-ID: <20200519164349.GA4696@t480s-orm.localdomain> Am Dienstag, den 19. Mai 2020 um 15:45:08 Uhr (+0200) schrieb philippe.cabanon at laposte.net: > > I have replicated your example with other control codes, it seems to > me that only N?93 "Chorus Depth" modifies the sound significantly (I > didn't succeed with the other codes). Which controls are implemented depends on the softsynth/hardware used. I assume it isn't specified in the MIDI spec what has to get supported, but pan and volume (cc 7) should always work. -- Orm From lb at zkm.de Tue May 19 10:54:38 2020 From: lb at zkm.de (=?utf-8?Q?ludger_br=C3=BCmmer?=) Date: Tue, 19 May 2020 19:54:38 +0200 Subject: [CM] Using PAN function in Grace In-Reply-To: <498656064.560065.1589895908316.JavaMail.zimbra@laposte.net> References: <1853032670.399235.1589708345215.JavaMail.zimbra@laposte.net> <720DB305-9084-42E7-BA49-3B41FB920136@zkm.de> <1997257788.265820.1589786216146.JavaMail.zimbra@laposte.net> <20200519095626.GA716358@t480s-orm.localdomain> <498656064.560065.1589895908316.JavaMail.zimbra@laposte.net> Message-ID: Dear Philippe, another way would be to place the 2 voices on different midi channels and pan each channel wherever you want? viele Gr??e / all the best Ludger Br?mmer -- Prof. Ludger Br?mmer Leitung | Head of Department Hertz-Labor | Hertz-Lab Professor f?r Komposition f?r digitale Medien Musikhochschule Trossingen, mh-trossingen.de /////// / |< ||| | ZKM | Zentrum f?r Kunst und Medien Karlsruhe /////// / |< ||| | ZKM | Center for Art and Media Karlsruhe /////// / |< ||| | ZKM | Centre d'Art et des M?dias Karlsruhe Lorenzstr. 19, D-76135 Karlsruhe Tel +49-(0)721-8100-1601, Fax +49-(0)721-8100-1699 E-Mail: ludger.bruemmer at zkm.de www.zkm.de Aktuelle Ausstellungen ? current exhibitions > Am 19.05.2020 um 15:45 schrieb philippe.cabanon at laposte.net: > > Thank you, Orm, that works perfectly, > > I have replicated your example with other control codes, it seems to me that only N?93 "Chorus Depth" modifies the sound significantly (I didn't succeed with the other codes). > (I used the "70 Bassoon" sound which seemed to be better on "long" sounds - 30s here -). > > One of my ideas was to use the "pan" function on top of the "Steve Reich's Piano Phase" example to separate the 2 pianos along with the phase, just an idea. > > Thank you again. > Ph.C > > > De: "Orm Finnendahl" > ?: "philippe cabanon" > Cc: cmdist at ccrma.stanford.edu > Envoy?: Mardi 19 Mai 2020 11:56:26 > Objet: Re: [CM] (no subject) > > Am Montag, den 18. Mai 2020 um 09:16:56 Uhr (+0200) schrieb > philippe.cabanon at laposte.net: > > In fact, I was wondering if it was possible to modify a sound > > already emitted, as you do with a knob on a midi controller keyboard > > (keeping the same original sound). > > yes, start a long note: > > (mp:midi :key 80 :dur 20 :amp .5 :chan 0) > > then simulate the controller knob: > > (sprout > (process > for i below 128 > do (mp:ctrl :num 10 :val i :chan 0) > (wait .01))) > > I hope the syntax is ok. I can't test here as I'm using the common > lisp version with a slightly different syntax. > > -- > Orm > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zkm-cz.jpg Type: image/jpeg Size: 41457 bytes Desc: not available URL: From iainduncanlists at gmail.com Tue May 19 15:03:21 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Tue, 19 May 2020 15:03:21 -0700 Subject: [CM] Errors with loop macro on windows (OSX fine) In-Reply-To: References: <2F00F6F5-2B78-4F85-9A3D-C32CA057B043@illinois.edu> Message-ID: Hi Rick, just wanted to follow up to see if you were able to determine anything. Totally understand if not, life is nutty right now. :-/ Would it work on my end, do you think, to just use older CM sources for now? Because Grace seems to work fine for me if I use the older release. I could just let people use an old copy of loop for now if you think we won't see fixes on the new sources any time soon. thanks! iain On Sat, May 9, 2020 at 2:23 PM Iain Duncan wrote: > Hi Rick, I just added some basics and they are working fine: defining a > function and some vars, calling the function on the vars, displaying the > results. > > I also added putting a function definition into another file (mult.scm), > loading it, and calling the function, no issues there either. > > So on my end, I see no weirdness until I try to actually *call* loop. > > I've put the updated script up on the git repo in case that is useful. > > https://github.com/iainctduncan/scheme-for-max/blob/master/test-code/s7-test/s7-test.c > > iain > > On Sat, May 9, 2020 at 2:06 PM Taube, Heinrich K > wrote: > >> are you able to get your program to load a scheme test file with some s7 >> expressions and see that they execute sucessfully? >> Im asking because I could compile and link to sndlib/s7 but it would not >> evaluate expression not involved with loop at all. >> >> >> >> On May 9, 2020, at 3:56 PM, Iain Duncan >> wrote: >> >> Ok, now that I've made a test project, I think I can helpfully report. I >> am using the version of loop.scm downloaded from Rick's github, and S7 from >> the mirror. I've made a standalone C program that embeds s7, loads >> loop.scm, and tries to use it. It's working fine on OSX. On Windows 10, >> loop loads, but calling it makes the program hang until I do Control-C. (I >> did have to monkey patch s7.c to make that work, see previous email) >> >> In case it is useful (or I've just done something stupid!!), my test >> project is here, with text file README describing the results: >> >> https://github.com/iainctduncan/scheme-for-max/tree/master/test-code/s7-test >> >> If there's anything I can do to help, let me know. I'm just going to >> leave loop.scm turned off by default in my windows package for now. >> >> HTH >> Iain >> >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From iainduncanlists at gmail.com Tue May 19 19:21:15 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Tue, 19 May 2020 19:21:15 -0700 Subject: [CM] incompatible pointer type warnings Message-ID: Hi Bill and others, I'm trying to clean up the torrent of warnings my project is producing in Xcode now that it's pretty big, and this one has me stumped. here's a snippet of working code: t_max_err s7_obj_to_max_atom(s7_scheme *s7, s7_pointer *s7_obj, t_atom *atom){ if( s7_is_boolean(s7_obj) ){ atom_setlong(atom, (int)s7_boolean(s7, s7_obj)); } I get the following warning for every use of s7_obj like the above: "Incompatible pointer types passing 's7_pointer *' (aka 'struct s7_cell **') to parameter of type 's7_pointer' (aka 'struct s7_cell *'); dereference with *" If I try letting XCode "fix" it, the compiler things I should be using *s7_obj, which of course crashes (had to try it in case I was totally misunderstanding...) Is there something I can do to not get this warning, or do I need to figure out how to tell xcode to just shut up with that one? thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From philippe.cabanon at laposte.net Tue May 19 21:24:28 2020 From: philippe.cabanon at laposte.net (philippe.cabanon at laposte.net) Date: Wed, 20 May 2020 06:24:28 +0200 (CEST) Subject: [CM] Using PAN function in Grace In-Reply-To: References: <1853032670.399235.1589708345215.JavaMail.zimbra@laposte.net> <720DB305-9084-42E7-BA49-3B41FB920136@zkm.de> <1997257788.265820.1589786216146.JavaMail.zimbra@laposte.net> <20200519095626.GA716358@t480s-orm.localdomain> <498656064.560065.1589895908316.JavaMail.zimbra@laposte.net> Message-ID: <557221259.10298.1589948668466.JavaMail.zimbra@laposte.net> Guten Morgen, I had already thought of using two different channels, I made a first try starting from the middle and gradually separating the pan, but it doesn't give much result (it's probably better from 0 to 127 for the second chanel). Moreover, I made a logical mistake by basing myself only on the deviation of the 1st note (0.170 - 0.167), when you have to think about the whole cycle (the 12 notes from e4 to cs5). It's a bit more complicated than I originally thought. But it's an interesting exercise, I hope to finish it during the day. Thank you for your help. (note: my English is from a Deepl translation, so please be indulgent) ----- Mail original ----- De: "ludger br?mmer" ?: "philippe cabanon" Cc: "Orm Finnendahl" , "cmdist at ccrma.stanford.edu" Envoy?: Mardi 19 Mai 2020 19:54:38 Objet: Re: [CM] Using PAN function in Grace Dear Philippe, another way would be to place the 2 voices on different midi channels and pan each channel wherever you want? viele Gr??e / all the best Ludger Br?mmer -- Prof. Ludger Br?mmer Leitung | Head of Department Hertz-Labor | Hertz-Lab Professor f?r Komposition f?r digitale Medien Musikhochschule Trossingen, mh-trossingen.de /////// / |< ||| | ZKM | Zentrum f?r Kunst und Medien Karlsruhe /////// / |< ||| | ZKM | Center for Art and Media Karlsruhe /////// / |< ||| | ZKM | Centre d'Art et des M?dias Karlsruhe Lorenzstr. 19, D-76135 Karlsruhe Tel +49-(0)721-8100-1601, Fax +49-(0)721-8100-1699 E-Mail: ludger.bruemmer at zkm.de www.zkm.de Aktuelle Ausstellungen ? current exhibitions Am 19.05.2020 um 15:45 schrieb philippe.cabanon at laposte.net : Thank you, Orm, that works perfectly, I have replicated your example with other control codes, it seems to me that only N?93 "Chorus Depth" modifies the sound significantly (I didn't succeed with the other codes). (I used the "70 Bassoon" sound which seemed to be better on "long" sounds - 30s here -). One of my ideas was to use the "pan" function on top of the "Steve Reich's Piano Phase" example to separate the 2 pianos along with the phase, just an idea. Thank you again. Ph.C ----- Mail original ----- De: "Orm Finnendahl" < orm.finnendahl at selma.hfmdk-frankfurt.de > ?: "philippe cabanon" < philippe.cabanon at laposte.net > Cc: cmdist at ccrma.stanford.edu Envoy?: Mardi 19 Mai 2020 11:56:26 Objet: Re: [CM] (no subject) Am Montag, den 18. Mai 2020 um 09:16:56 Uhr (+0200) schrieb philippe.cabanon at laposte.net: > In fact, I was wondering if it was possible to modify a sound > already emitted, as you do with a knob on a midi controller keyboard > (keeping the same original sound). yes, start a long note: (mp:midi :key 80 :dur 20 :amp .5 :chan 0) then simulate the controller knob: (sprout (process for i below 128 do (mp:ctrl :num 10 :val i :chan 0) (wait .01))) I hope the syntax is ok. I can't test here as I'm using the common lisp version with a slightly different syntax. -- Orm _______________________________________________ Cmdist mailing list Cmdist at ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zkm-cz.jpg Type: image/jpeg Size: 41457 bytes Desc: not available URL: From k.s.matheussen at gmail.com Tue May 19 23:29:42 2020 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Wed, 20 May 2020 08:29:42 +0200 Subject: [CM] incompatible pointer type warnings In-Reply-To: References: Message-ID: On Wed, May 20, 2020 at 4:24 AM Iain Duncan wrote: > > Hi Bill and others, I'm trying to clean up the torrent of warnings my project is producing in Xcode now that it's pretty big, and this one has me stumped. here's a snippet of working code: > > t_max_err s7_obj_to_max_atom(s7_scheme *s7, s7_pointer *s7_obj, t_atom *atom){ > > if( s7_is_boolean(s7_obj) ){ > > atom_setlong(atom, (int)s7_boolean(s7, s7_obj)); > > } > > > I get the following warning for every use of s7_obj like the above: > > "Incompatible pointer types passing 's7_pointer *' (aka 'struct s7_cell **') to parameter of type 's7_pointer' (aka 'struct s7_cell *'); dereference with *" > > > If I try letting XCode "fix" it, the compiler things I should be using *s7_obj, which of course crashes (had to try it in case I was totally misunderstanding...) > > > Is there something I can do to not get this warning, or do I need to figure out how to tell xcode to just shut up with that one? > This is the signature of s7_integer: s7_int s7_integer(s7_pointer p); so both the xcode warning and auto-fix seems correct. The problem must be elsewhere. Perhaps the signature of s7_obj_to_max_atom should really be t_max_err s7_obj_to_max_atom(s7_scheme *s7, s7_pointer s7_obj, t_atom *atom); ? From wdouglass at carnegierobotics.com Wed May 20 04:04:10 2020 From: wdouglass at carnegierobotics.com (Woody Douglass) Date: Wed, 20 May 2020 11:04:10 +0000 Subject: [CM] incompatible pointer type warnings In-Reply-To: References: Message-ID: Iain, Try this: t_max_err s7_obj_to_max_atom(s7_scheme *s7, s7_pointer s7_obj, t_atom *atom){ if( s7_is_boolean(s7_obj) ){ atom_setlong(atom, (int)s7_boolean(s7, s7_obj)); } s7_pointer is already a pointer, it doesn't need to be `s7_pointer *obj` in the signature. On 2020-05-19 22:22:17-04:00 cmdist-bounces at ccrma.Stanford.EDU wrote: Hi Bill and others, I'm trying to clean up the torrent of warnings my project is producing in Xcode now that it's pretty big, and this one has me stumped. here's a snippet of working code: t_max_err s7_obj_to_max_atom(s7_scheme *s7, s7_pointer *s7_obj, t_atom *atom){ if( s7_is_boolean(s7_obj) ){ atom_setlong(atom, (int)s7_boolean(s7, s7_obj)); } I get the following warning for every use of s7_obj like the above: "Incompatible pointer types passing 's7_pointer *' (aka 'struct s7_cell **') to parameter of type 's7_pointer' (aka 'struct s7_cell *'); dereference with *" If I try letting XCode "fix" it, the compiler things I should be using *s7_obj, which of course crashes (had to try it in case I was totally misunderstanding...) Is there something I can do to not get this warning, or do I need to figure out how to tell xcode to just shut up with that one? thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From iainduncanlists at gmail.com Wed May 20 07:08:41 2020 From: iainduncanlists at gmail.com (Iain Duncan) Date: Wed, 20 May 2020 07:08:41 -0700 Subject: [CM] incompatible pointer type warnings In-Reply-To: References: Message-ID: Ah thanks Woody, that makes sense. Prior to this it had been a long time since I'd done any C, guess I should reread some of my C books more closely! Thanks for the help, iain On Wed, May 20, 2020 at 4:03 AM Woody Douglass < wdouglass at carnegierobotics.com> wrote: > Iain, > > Try this: > > t_max_err s7_obj_to_max_atom(s7_scheme *s7, s7_pointer s7_obj, t_atom > *atom){ > if( s7_is_boolean(s7_obj) ){ > atom_setlong(atom, (int)s7_boolean(s7, s7_obj)); > } > > s7_pointer is already a pointer, it doesn't need to be `s7_pointer *obj` > in the signature. > > > On 2020-05-19 22:22:17-04:00 cmdist-bounces at ccrma.Stanford.EDU wrote: > > Hi Bill and others, I'm trying to clean up the torrent of warnings my > project is producing in Xcode now that it's pretty big, and this one has me > stumped. here's a snippet of working code: > > t_max_err s7_obj_to_max_atom(s7_scheme *s7, s7_pointer *s7_obj, t_atom > *atom){ > > if( s7_is_boolean(s7_obj) ){ > > atom_setlong(atom, (int)s7_boolean(s7, s7_obj)); > > } > > > I get the following warning for every use of s7_obj like the above: > > "Incompatible pointer types passing 's7_pointer *' (aka 'struct s7_cell > **') to parameter of type 's7_pointer' (aka 'struct s7_cell *'); > dereference with *" > > > If I try letting XCode "fix" it, the compiler things I should be using > *s7_obj, which of course crashes (had to try it in case I was totally > misunderstanding...) > > > Is there something I can do to not get this warning, or do I need to > figure out how to tell xcode to just shut up with that one? > > > thanks! > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Wed May 27 02:42:29 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 27 May 2020 02:42:29 -0700 Subject: [CM] Snd 20.4 Message-ID: <5f155002f83929bc44e1b93414ec8d7b@ccrma.stanford.edu> Snd 20.4: s7: added s7_scheme* argument to s7_is_eqv, and all the s7_set_*_function calls that set optimizer functions (the preceding calls were, sadly, not thread-safe). libarb_s7.c: a multiprecision library paralleling GSL. Requires libflint. Only in the gmp version of s7. (I wanted multiprecision Bessel functions). checked: ubuntu 20.04, sbcl-2.0.4, FC 32, gsl 2.6, Ruby 2.7, gcc/clang 10 Thanks!: Elijah, Woody Douglass, Ian Duncan, Kjetil Matheussen From k.s.matheussen at gmail.com Wed May 27 03:24:02 2020 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Wed, 27 May 2020 12:24:02 +0200 Subject: [CM] Snd 20.4 In-Reply-To: <5f155002f83929bc44e1b93414ec8d7b@ccrma.stanford.edu> References: <5f155002f83929bc44e1b93414ec8d7b@ccrma.stanford.edu> Message-ID: Hi Bill, What's the status of multiprecision arithmetic now? Does all calculations (including those that does not require multiprecision) go slower if we enable it? On Wed, May 27, 2020 at 11:46 AM wrote: > > Snd 20.4: > > s7: added s7_scheme* argument to s7_is_eqv, and all the > s7_set_*_function calls that > set optimizer functions (the preceding calls were, sadly, not > thread-safe). > libarb_s7.c: a multiprecision library paralleling GSL. Requires > libflint. > Only in the gmp version of s7. (I wanted multiprecision Bessel > functions). > > checked: ubuntu 20.04, sbcl-2.0.4, FC 32, gsl 2.6, Ruby 2.7, gcc/clang > 10 > > Thanks!: Elijah, Woody Douglass, Ian Duncan, Kjetil Matheussen > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist From bil at ccrma.Stanford.EDU Wed May 27 05:47:46 2020 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 27 May 2020 05:47:46 -0700 Subject: [CM] Snd 20.4 In-Reply-To: References: <5f155002f83929bc44e1b93414ec8d7b@ccrma.stanford.edu> Message-ID: <483d4cf6d3f214984fc7097179472037@ccrma.stanford.edu> Most things are only slightly slower, but there are a few that are as much as 4 times slower. There are timings at the end of s7.c (callgrind numbers for my timing tests). I haven't looked at the standard benchmarks except pi.scm and chudnovsky.scm (which require big integers), and they are either #1 or #2 in speed compared to everyone else. I need to tie the gmp code into the rest of s7's optimizer -- just a small matter of software! I've spent the last 2 months on this, and figure there's another 2 months of work to get the last 10 percent. (But I also need to get gtk4 to work, and so on). I you have a chance to try it out, please let me know how it goes, especially any things that seem slow.