From j_hearon at hotmail.com Sat Feb 4 09:49:52 2017 From: j_hearon at hotmail.com (James Hearon) Date: Sat, 4 Feb 2017 17:49:52 +0000 Subject: [CM] cm2 In-Reply-To: References: Message-ID: Hi, re: cm2, with help from Adam I understand I'm supposed to load the cm2.asd. OK. I can load, and eval .lisp file from sbcl using command line, or in emacs with slime; but cannot yet figure out how to get .cm or .scm files working in cm2. Seems like .scm files are in the sources, but not sure how to use a simple .scm with cm2. Thank You, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjkoskin at kolumbus.fi Sat Feb 4 10:27:25 2017 From: mjkoskin at kolumbus.fi (Matti Koskinen) Date: Sat, 4 Feb 2017 20:27:25 +0200 Subject: [CM] cm2 In-Reply-To: References: Message-ID: <1c25f2ba-3381-ba52-3771-24bddc9d1189@kolumbus.fi> hi, scm (scheme) doesn't work with sbcl. sbcl needs lisp-code, if the .cm-files are from the lisp-cm2, they should work, but from newer cm (grace) they are actually scheme, so you can't use them with cm2. please correct me, if I'm completely wrong. -m On 04.02.2017 19:49, James Hearon wrote: > > Hi, > > re: cm2, with help from Adam I understand I'm supposed to load the > cm2.asd. OK. > > I can load, and eval .lisp file from sbcl using command line, or in > emacs with slime; but cannot yet figure out how to get .cm or .scm > files working in cm2. Seems like .scm files are in the sources, but > not sure how to use a simple .scm with cm2. > > > Thank You, > > Jim > > > > _______________________________________________ > 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 mjkoskin at kolumbus.fi Sat Feb 4 11:09:00 2017 From: mjkoskin at kolumbus.fi (Matti Koskinen) Date: Sat, 4 Feb 2017 21:09:00 +0200 Subject: [CM] cm2 In-Reply-To: <1c25f2ba-3381-ba52-3771-24bddc9d1189@kolumbus.fi> References: <1c25f2ba-3381-ba52-3771-24bddc9d1189@kolumbus.fi> Message-ID: just looked at the cm2.sh, where you can define guile, gauche or snd to run scheme, or for running lisp sbcl, clisp, ecl. Probably there where other lisp-flavors too, can't remeber, the code is on another computer. -m On 04.02.2017 20:27, Matti Koskinen wrote: > > hi, > > scm (scheme) doesn't work with sbcl. sbcl needs lisp-code, if the > .cm-files are from the lisp-cm2, they should work, but from newer cm > (grace) they are actually scheme, so you can't use them with cm2. > > > please correct me, if I'm completely wrong. > > > -m > > > > On 04.02.2017 19:49, James Hearon wrote: >> >> Hi, >> >> re: cm2, with help from Adam I understand I'm supposed to load the >> cm2.asd. OK. >> >> I can load, and eval .lisp file from sbcl using command line, or in >> emacs with slime; but cannot yet figure out how to get .cm or .scm >> files working in cm2. Seems like .scm files are in the sources, but >> not sure how to use a simple .scm with cm2. >> >> >> Thank You, >> >> Jim >> >> >> >> _______________________________________________ >> 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 orm.finnendahl at selma.hfmdk-frankfurt.de Sat Feb 4 11:40:17 2017 From: orm.finnendahl at selma.hfmdk-frankfurt.de (Orm Finnendahl) Date: Sat, 4 Feb 2017 20:40:17 +0100 Subject: [CM] cm2 In-Reply-To: References: Message-ID: <20170204194017.GA8438@T460s-orm> Hi Jim, there should be lisp examples in the etc/examples subdirectory of cm2. In the cm2 version I use (2.12.0) they seem to use lisp syntax. Some of them are broken, though (to my knowledge plotter isn't working and the code in some examples doesn't work with the last cm2 version). If you use sbcl and feel adventurous you can install emacs, quicklisp, slime and try cm-incudine together with incudine (an awesome computer music system). cm-incudine is cm2 with some glue to incudine which will give you realtime with a very efficient realtime scheduler and jackmidi support. Optional additional packages are fudi-incudine for sending to pure data in realtime (could also be done with incudine alone) and cl-collider for compiling lisp to supercollider synths and invoking them. Some of the stuff is still experimental, but I'm using it every day and it works very well for my needs. I'm trying to keep cm2 up to date, fixed some bugs and added functionality (also to fomus, especially regarding the lilypond backend). Here are some links: quicklisp: https://www.quicklisp.org/beta/ incudine: http://incudine.sourceforge.net/ cm-incudine: https://github.com/ormf/cm-incudine fudi-incudine: https://github.com/ormf/fudi-incudine cl-collider: https://github.com/byulparan/cl-collider The whole installation process is somewhat involved if you are no experienced emacs/common lisp user, but drop me a note off list in case you're interested and encounter problems. I might be able to help getting it set up. -- Orm Am Samstag, den 04. Februar 2017 um 17:49:52 Uhr (+0000) schrieb James Hearon: > Hi, > > re: cm2, with help from Adam I understand I'm supposed to load the cm2.asd. OK. > > I can load, and eval .lisp file from sbcl using command line, or in emacs with slime; but cannot yet figure out how to get .cm or .scm files working in cm2. Seems like .scm files are in the sources, but not sure how to use a simple .scm with cm2. > > > Thank You, > > Jim > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist From rm at seid-online.de Sat Feb 4 12:32:11 2017 From: rm at seid-online.de (Ralf Mattes) Date: Sat, 4 Feb 2017 21:32:11 +0100 Subject: [CM] cm2 In-Reply-To: References: Message-ID: <20170204203211.6jjvntlfdcw37dzc@seid-online.de> On Sat, Feb 04, 2017 at 05:49:52PM +0000, James Hearon wrote: > Hi, > > re: cm2, with help from Adam I understand I'm supposed to load the cm2.asd. OK. > > I can load, and eval .lisp file from sbcl using command line, or in emacs with slime; but cannot yet figure out how to get .cm or .scm files working in cm2. > Seems like .scm files are in the sources, That's a bit missleading. Common Music is (was?) in fact written in some sort of generic scheme, the common lisp version is actually a converted/compiled version of the scheme code. > but not sure how to use a simple .scm with cm2. CM2 (the system) actually uses some sort of schemish lisp syntax (i.e. 'define instead of 'defun et al.). Where do these .scm files come from. Cheers, Ralf Mattes > > > Thank You, > > Jim > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist From rm at seid-online.de Sat Feb 4 12:34:09 2017 From: rm at seid-online.de (Ralf Mattes) Date: Sat, 4 Feb 2017 21:34:09 +0100 Subject: [CM] cm2 In-Reply-To: References: <1c25f2ba-3381-ba52-3771-24bddc9d1189@kolumbus.fi> Message-ID: <20170204203409.o4no6odobgxy6qes@seid-online.de> On Sat, Feb 04, 2017 at 09:09:00PM +0200, Matti Koskinen wrote: > just looked at the cm2.sh, where you can define guile, gauche or snd to run > scheme, or for running lisp sbcl, clisp, ecl. Probably there where other > lisp-flavors too, can't remeber, the code is on another computer. That once was true, indeed. But since then scheme has moved quite a bit. I doubt that cm2 will run in current guile ... Cheers, Ralf Mattes > > -m > > > > On 04.02.2017 20:27, Matti Koskinen wrote: > > > > hi, > > > > scm (scheme) doesn't work with sbcl. sbcl needs lisp-code, if the > > .cm-files are from the lisp-cm2, they should work, but from newer cm > > (grace) they are actually scheme, so you can't use them with cm2. > > > > > > please correct me, if I'm completely wrong. > > > > > > -m > > > > > > > > On 04.02.2017 19:49, James Hearon wrote: > > > > > > Hi, > > > > > > re: cm2, with help from Adam I understand I'm supposed to load the > > > cm2.asd. OK. > > > > > > I can load, and eval .lisp file from sbcl using command line, or in > > > emacs with slime; but cannot yet figure out how to get .cm or .scm > > > files working in cm2. Seems like .scm files are in the sources, > > > but not sure how to use a simple .scm with cm2. > > > > > > > > > Thank You, > > > > > > Jim > > > > > > > > > > > > _______________________________________________ > > > 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 > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist From rm at seid-online.de Sat Feb 4 12:38:05 2017 From: rm at seid-online.de (Ralf Mattes) Date: Sat, 4 Feb 2017 21:38:05 +0100 Subject: [CM] cm2 In-Reply-To: <20170204194017.GA8438@T460s-orm> References: <20170204194017.GA8438@T460s-orm> Message-ID: <20170204203805.hl4zvv2rcurs6bdq@seid-online.de> On Sat, Feb 04, 2017 at 08:40:17PM +0100, Orm Finnendahl wrote: > Here are some links: > > quicklisp: https://www.quicklisp.org/beta/ > > incudine: http://incudine.sourceforge.net/ > > cm-incudine: https://github.com/ormf/cm-incudine > > fudi-incudine: https://github.com/ormf/fudi-incudine > > cl-collider: https://github.com/byulparan/cl-collider > > The whole installation process is somewhat involved if you are no > experienced emacs/common lisp user, The OP has emacs and slime running, so it's pretty much: - install quicklisp - change to ~/quicklisp/local-projects/ - git clone the above mentioned repositories > but drop me a note off list in > case you're interested and encounter problems. I might be able to help > getting it set up. May I suggest to use githubs issue tracker (and maybe wiki)? That way others might find valuable information. Cheers, RalfD > -- > Orm > > Am Samstag, den 04. Februar 2017 um 17:49:52 Uhr (+0000) schrieb James Hearon: > > Hi, > > > > re: cm2, with help from Adam I understand I'm supposed to load the cm2.asd. OK. > > > > I can load, and eval .lisp file from sbcl using command line, or in emacs with slime; but cannot yet figure out how to get .cm or .scm files working in cm2. Seems like .scm files are in the sources, but not sure how to use a simple .scm with cm2. > > > > > > Thank You, > > > > Jim > > > _______________________________________________ > > 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 > From taube at illinois.edu Sat Feb 4 14:22:56 2017 From: taube at illinois.edu (Taube, Heinrich K) Date: Sat, 4 Feb 2017 22:22:56 +0000 Subject: [CM] cm2 In-Reply-To: <20170204203211.6jjvntlfdcw37dzc@seid-online.de> References: <20170204203211.6jjvntlfdcw37dzc@seid-online.de> Message-ID: <01FCC5A9-AE45-48F3-ABD2-6219E85D3E9C@illinois.edu> Ralf is correct CM is written in a simplified scheme that was easy to port to other schemes, and also to convert to common-lisp. This was all pre S7. After Bill created S7 that allowed true emdedding into C/C++ I didnt see any reason to keep supporting the other schemes since S7 also has terrific built in, lowlevel audio support. At this point I would only recommend using S7 as the scheme. If you want to use COmmon Lisp then stick with CM2, CM2 should work fine there, except maybe a need to tweek the front-end loading. > On Feb 4, 2017, at 2:32 PM, Ralf Mattes wrote: > > On Sat, Feb 04, 2017 at 05:49:52PM +0000, James Hearon wrote: >> Hi, >> >> re: cm2, with help from Adam I understand I'm supposed to load the cm2.asd. OK. >> >> I can load, and eval .lisp file from sbcl using command line, or in emacs with slime; but cannot yet figure out how to get .cm or .scm files working in cm2. > >> Seems like .scm files are in the sources, > > That's a bit missleading. Common Music is (was?) in fact written in some > sort of generic scheme, the common lisp version is actually a > converted/compiled version of the scheme code. > >> but not sure how to use a simple .scm with cm2. > > CM2 (the system) actually uses some sort of schemish lisp syntax (i.e. > 'define instead of 'defun et al.). Where do these .scm files come from. > > Cheers, Ralf Mattes > >> >> >> Thank You, >> >> Jim > >> _______________________________________________ >> 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 > From rm at seid-online.de Sat Feb 4 13:34:43 2017 From: rm at seid-online.de (Ralf Mattes) Date: Sat, 4 Feb 2017 22:34:43 +0100 Subject: [CM] cm2 In-Reply-To: <01FCC5A9-AE45-48F3-ABD2-6219E85D3E9C@illinois.edu> References: <20170204203211.6jjvntlfdcw37dzc@seid-online.de> <01FCC5A9-AE45-48F3-ABD2-6219E85D3E9C@illinois.edu> Message-ID: <20170204213443.u53qg6bw7acicabv@seid-online.de> On Sat, Feb 04, 2017 at 10:22:56PM +0000, Taube, Heinrich K wrote: > Ralf is correct CM is written in a simplified scheme that was easy to port to other schemes, and also to convert to common-lisp. This was all pre S7. After Bill created S7 that allowed true emdedding into C/C++ I didnt see any reason to keep supporting the other schemes since S7 also has terrific built in, lowlevel audio support. At this point I would only recommend using S7 as the scheme. Even so this might be off-topic, s7 is a terrific (and fun to use) scheme. > If you want to use COmmon Lisp then stick with CM2, CM2 should work fine there, except maybe a need to tweek the front-end loading. Yes, a lot of the build setup can be (and needs to be) simplified. We know have asdf and uiop. And Orm did find some serious bug in the process/loop implementation. Cheers, RalfD > > > On Feb 4, 2017, at 2:32 PM, Ralf Mattes wrote: > > > > On Sat, Feb 04, 2017 at 05:49:52PM +0000, James Hearon wrote: > >> Hi, > >> > >> re: cm2, with help from Adam I understand I'm supposed to load the cm2.asd. OK. > >> > >> I can load, and eval .lisp file from sbcl using command line, or in emacs with slime; but cannot yet figure out how to get .cm or .scm files working in cm2. > > > >> Seems like .scm files are in the sources, > > > > That's a bit missleading. Common Music is (was?) in fact written in some > > sort of generic scheme, the common lisp version is actually a > > converted/compiled version of the scheme code. > > > >> but not sure how to use a simple .scm with cm2. > > > > CM2 (the system) actually uses some sort of schemish lisp syntax (i.e. > > 'define instead of 'defun et al.). Where do these .scm files come from. > > > > Cheers, Ralf Mattes > > > >> > >> > >> Thank You, > >> > >> Jim > > > >> _______________________________________________ > >> 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 > > > From taube at illinois.edu Sat Feb 4 14:36:45 2017 From: taube at illinois.edu (Taube, Heinrich K) Date: Sat, 4 Feb 2017 22:36:45 +0000 Subject: [CM] cm2 In-Reply-To: <20170204213443.u53qg6bw7acicabv@seid-online.de> References: <20170204203211.6jjvntlfdcw37dzc@seid-online.de> <01FCC5A9-AE45-48F3-ABD2-6219E85D3E9C@illinois.edu> <20170204213443.u53qg6bw7acicabv@seid-online.de> Message-ID: <1A2FD7D6-9832-4F0F-BEFF-06C5AF77054B@illinois.edu> Yes, thank you so much. I never hit that bug! :/ I do hope I can get back to Cm work this year, the last 2 years has been nsf grants and beginning to commercialize the music theory software Harmonia. in addition to S7, JUCE has also been improving its terrific support now too for audio, sampling and built in Osc support, ability to run on android and iOs devices. > On Feb 4, 2017, at 3:34 PM, Ralf Mattes wrote: > > On Sat, Feb 04, 2017 at 10:22:56PM +0000, Taube, Heinrich K wrote: >> Ralf is correct CM is written in a simplified scheme that was easy to port to other schemes, and also to convert to common-lisp. This was all pre S7. After Bill created S7 that allowed true emdedding into C/C++ I didnt see any reason to keep supporting the other schemes since S7 also has terrific built in, lowlevel audio support. At this point I would only recommend using S7 as the scheme. > > Even so this might be off-topic, s7 is a terrific (and fun to use) > scheme. > >> If you want to use COmmon Lisp then stick with CM2, CM2 should work fine there, except maybe a need to tweek the front-end loading. > > Yes, a lot of the build setup can be (and needs to be) simplified. We > know have asdf and uiop. And Orm did find some serious bug in the > process/loop implementation. > > Cheers, RalfD > > >> >>> On Feb 4, 2017, at 2:32 PM, Ralf Mattes wrote: >>> >>> On Sat, Feb 04, 2017 at 05:49:52PM +0000, James Hearon wrote: >>>> Hi, >>>> >>>> re: cm2, with help from Adam I understand I'm supposed to load the cm2.asd. OK. >>>> >>>> I can load, and eval .lisp file from sbcl using command line, or in emacs with slime; but cannot yet figure out how to get .cm or .scm files working in cm2. >>> >>>> Seems like .scm files are in the sources, >>> >>> That's a bit missleading. Common Music is (was?) in fact written in some >>> sort of generic scheme, the common lisp version is actually a >>> converted/compiled version of the scheme code. >>> >>>> but not sure how to use a simple .scm with cm2. >>> >>> CM2 (the system) actually uses some sort of schemish lisp syntax (i.e. >>> 'define instead of 'defun et al.). Where do these .scm files come from. >>> >>> Cheers, Ralf Mattes >>> >>>> >>>> >>>> Thank You, >>>> >>>> Jim >>> >>>> _______________________________________________ >>>> 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 >>> >> From rm at seid-online.de Sat Feb 4 13:52:37 2017 From: rm at seid-online.de (Ralf Mattes) Date: Sat, 4 Feb 2017 22:52:37 +0100 Subject: [CM] cm2 In-Reply-To: <20170204194017.GA8438@T460s-orm> References: <20170204194017.GA8438@T460s-orm> Message-ID: <20170204215237.ikkydupxv3bpsdpw@seid-online.de> On Sat, Feb 04, 2017 at 08:40:17PM +0100, Orm Finnendahl wrote: > [...] > cm2 up to date, fixed some bugs and added functionality (also to > fomus, especially regarding the lilypond backend). Orm, do you keep those fomus changes under version control? I'm currently looking at the MusicXML output and would have some changes as well. The last change in the Sourceforge repository seems to be from Kilian Sprotte in 2010. I'm tempted to migrate the code to a git repository (while keeping the commit history). Cheers, RalfD From rm at seid-online.de Sat Feb 4 14:05:09 2017 From: rm at seid-online.de (Ralf Mattes) Date: Sat, 4 Feb 2017 23:05:09 +0100 Subject: [CM] cm2 In-Reply-To: <20170204215237.ikkydupxv3bpsdpw@seid-online.de> References: <20170204194017.GA8438@T460s-orm> <20170204215237.ikkydupxv3bpsdpw@seid-online.de> Message-ID: <20170204220509.nfec3d46e6xoy22u@seid-online.de> On Sat, Feb 04, 2017 at 10:52:37PM +0100, Ralf Mattes wrote: > On Sat, Feb 04, 2017 at 08:40:17PM +0100, Orm Finnendahl wrote: > > > [...] > > cm2 up to date, fixed some bugs and added functionality (also to > > fomus, especially regarding the lilypond backend). > > Orm, do you keep those fomus changes under version control? Stupid me., yes you do. Just found your repository on my disk ... Hmm, this looks like you just checked out the subversion tree and imported it into git. That will lobotomize all version history and make you the only commiter. May I suggest that I migrate the subversion code so we keep the version history? (This does take some time but in the long run it seems to be good to be able to check who did what when). Cheers, RalfD From orm.finnendahl at selma.hfmdk-frankfurt.de Sun Feb 5 00:43:00 2017 From: orm.finnendahl at selma.hfmdk-frankfurt.de (Orm Finnendahl) Date: Sun, 5 Feb 2017 09:43:00 +0100 Subject: [CM] cm2 In-Reply-To: <20170204220509.nfec3d46e6xoy22u@seid-online.de> References: <20170204194017.GA8438@T460s-orm> <20170204215237.ikkydupxv3bpsdpw@seid-online.de> <20170204220509.nfec3d46e6xoy22u@seid-online.de> Message-ID: <20170205084300.GA17649@T460s-orm> Hi Ralf, Am Samstag, den 04. Februar 2017 um 23:05:09 Uhr (+0100) schrieb Ralf Mattes: > May I suggest that I migrate the subversion code so we keep the > version history? (This does take some time but in the long run it > seems to be good to be able to check who did what when). yes, I'd much prefer that. I use my own git repository (on a non-public server) which is a bad idea altogether. Let me know when you have published it and I will merge it with my own changes, ok? -- Orm From orm.finnendahl at selma.hfmdk-frankfurt.de Sun Feb 5 00:49:23 2017 From: orm.finnendahl at selma.hfmdk-frankfurt.de (Orm Finnendahl) Date: Sun, 5 Feb 2017 09:49:23 +0100 Subject: [CM] cm2 In-Reply-To: <1A2FD7D6-9832-4F0F-BEFF-06C5AF77054B@illinois.edu> References: <20170204203211.6jjvntlfdcw37dzc@seid-online.de> <01FCC5A9-AE45-48F3-ABD2-6219E85D3E9C@illinois.edu> <20170204213443.u53qg6bw7acicabv@seid-online.de> <1A2FD7D6-9832-4F0F-BEFF-06C5AF77054B@illinois.edu> Message-ID: <20170205084923.GB17649@T460s-orm> Hi Rick, Am Samstag, den 04. Februar 2017 um 22:36:45 Uhr (+0000) schrieb Taube, Heinrich K: > Yes, thank you so much. I never hit that bug! :/ it seems you actually hit the bug a long time ago. I was feeling a bit embarrased having reported it before finding out that you had done quite some tests at the bottom of the scheme sources and already discovered that some loop expressions caused errors. In the meantime I added cltl2 loop's argument destructuring to the code, enabling expressions like "for (x y) on '(1 2 3 4 5)", but that made part of the code a little clumsy and I will have to reorganize a bit when I'll find time. Let me know before you work at it and I will fix that part and can provide information on the reason for the errors to save you time. > in addition to S7, JUCE has also been improving its terrific support > now too for audio, sampling and built in Osc support, ability to run > on android and iOs devices. that's good to know! Yours, Orm From rm at seid-online.de Sun Feb 5 01:47:29 2017 From: rm at seid-online.de (Ralf Mattes) Date: Sun, 5 Feb 2017 10:47:29 +0100 Subject: [CM] cm2 In-Reply-To: <20170205084300.GA17649@T460s-orm> References: <20170204194017.GA8438@T460s-orm> <20170204215237.ikkydupxv3bpsdpw@seid-online.de> <20170204220509.nfec3d46e6xoy22u@seid-online.de> <20170205084300.GA17649@T460s-orm> Message-ID: <20170205094729.i5sf2s32udacsm6a@seid-online.de> On Sun, Feb 05, 2017 at 09:43:00AM +0100, Orm Finnendahl wrote: > Hi Ralf, > > Am Samstag, den 04. Februar 2017 um 23:05:09 Uhr (+0100) schrieb Ralf Mattes: > > > May I suggest that I migrate the subversion code so we keep the > > version history? (This does take some time but in the long run it > > seems to be good to be able to check who did what when). > > yes, I'd much prefer that. I use my own git repository (on a > non-public server) which is a bad idea altogether. Is that different from your fomus repository at github? > Let me know when > you have published it and I will merge it with my own changes, ok? Actually, the svn->git migration was pretty easy, unfortunately your git repository has some problem. Your initial commit mixes code import and local changes, so it's really hard to import/merge (a simple 'git format-patch' of the your initial commit would add all files imported from subversion). Looks like I need to do some repo surgery. Cheers, RalfD > > -- > Orm > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > From rm at seid-online.de Sun Feb 5 04:02:11 2017 From: rm at seid-online.de (Ralf Mattes) Date: Sun, 5 Feb 2017 13:02:11 +0100 Subject: [CM] cm2 In-Reply-To: <20170205094729.i5sf2s32udacsm6a@seid-online.de> References: <20170204194017.GA8438@T460s-orm> <20170204215237.ikkydupxv3bpsdpw@seid-online.de> <20170204220509.nfec3d46e6xoy22u@seid-online.de> <20170205084300.GA17649@T460s-orm> <20170205094729.i5sf2s32udacsm6a@seid-online.de> Message-ID: <20170205120211.pc354tymldp5rnph@seid-online.de> On Sun, Feb 05, 2017 at 10:47:29AM +0100, Ralf Mattes wrote: > ... mported from subversion). Looks like I need to do some repo surgery. O.k. - after some more investigation/code digging. The following files seem to be modified in your initial commit (compared to fomus upstream): | README.md | backend_ly.lisp | data.lisp | doc/ch06s02.html | examples.lisp | fomus.asd | interface.lisp | main.lisp | misc.lisp | modules/ads.lisp | postproc.lisp | quantize.lisp | splitrules.lisp | util.lisp Does that look plausible? Cheers, RalfD > > > > > Cheers, RalfD > > > > > -- > > Orm > > _______________________________________________ > > 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 > From orm.finnendahl at selma.hfmdk-frankfurt.de Sun Feb 5 06:42:32 2017 From: orm.finnendahl at selma.hfmdk-frankfurt.de (Orm Finnendahl) Date: Sun, 5 Feb 2017 15:42:32 +0100 Subject: [CM] cm2 In-Reply-To: <20170205120211.pc354tymldp5rnph@seid-online.de> References: <20170204194017.GA8438@T460s-orm> <20170204215237.ikkydupxv3bpsdpw@seid-online.de> <20170204220509.nfec3d46e6xoy22u@seid-online.de> <20170205084300.GA17649@T460s-orm> <20170205094729.i5sf2s32udacsm6a@seid-online.de> <20170205120211.pc354tymldp5rnph@seid-online.de> Message-ID: <20170205144232.GB794@T460s-orm> Am Sonntag, den 05. Februar 2017 um 13:02:11 Uhr (+0100) schrieb Ralf Mattes: > On Sun, Feb 05, 2017 at 10:47:29AM +0100, Ralf Mattes wrote: > > > ... mported from subversion). Looks like I need to do some repo surgery. > > O.k. - after some more investigation/code digging. The following files > seem to be modified in your initial commit (compared to fomus upstream): > > | README.md > | backend_ly.lisp > | data.lisp > | doc/ch06s02.html > | examples.lisp > | fomus.asd > | interface.lisp > | main.lisp > | misc.lisp > | modules/ads.lisp > | postproc.lisp > | quantize.lisp > | splitrules.lisp > | util.lisp > > Does that look plausible? yes ist does. That's the current version I'm using. -- Orm From rm at seid-online.de Sun Feb 5 06:24:23 2017 From: rm at seid-online.de (Ralf Mattes) Date: Sun, 5 Feb 2017 15:24:23 +0100 Subject: [CM] cm2 In-Reply-To: <20170205144232.GB794@T460s-orm> References: <20170204194017.GA8438@T460s-orm> <20170204215237.ikkydupxv3bpsdpw@seid-online.de> <20170204220509.nfec3d46e6xoy22u@seid-online.de> <20170205084300.GA17649@T460s-orm> <20170205094729.i5sf2s32udacsm6a@seid-online.de> <20170205120211.pc354tymldp5rnph@seid-online.de> <20170205144232.GB794@T460s-orm> Message-ID: <20170205142422.3sgvnh6gyl2hmh35@seid-online.de> On Sun, Feb 05, 2017 at 03:42:32PM +0100, Orm Finnendahl wrote: > Am Sonntag, den 05. Februar 2017 um 13:02:11 Uhr (+0100) schrieb Ralf Mattes: > > On Sun, Feb 05, 2017 at 10:47:29AM +0100, Ralf Mattes wrote: > > > > > ... mported from subversion). Looks like I need to do some repo surgery. > > > > O.k. - after some more investigation/code digging. The following files > > seem to be modified in your initial commit (compared to fomus upstream): > > > > | README.md > > | backend_ly.lisp > > | data.lisp > > | doc/ch06s02.html > > | examples.lisp > > | fomus.asd > > | interface.lisp > > | main.lisp > > | misc.lisp > > | modules/ads.lisp > > | postproc.lisp > > | quantize.lisp > > | splitrules.lisp > > | util.lisp > > > > Does that look plausible? > > yes ist does. That's the current version I'm using. Hmm, from what base did you start? Your initial changes to backend_ly.lisp do not cleanly apply the the upstream version. Strange .... Cheers, RalfD > > -- > Orm > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > From juanig at ccrma.Stanford.EDU Tue Feb 7 08:46:08 2017 From: juanig at ccrma.Stanford.EDU (Juan Reyes) Date: Tue, 7 Feb 2017 10:46:08 -0600 Subject: [CM] cm2 In-Reply-To: <20170204194017.GA8438@T460s-orm> References: <20170204194017.GA8438@T460s-orm> Message-ID: Hi Orm, Thanks for all this info and kudos to Tito for this system. Don't want to get off-topic but "incudine-snd" interface/interaction looks appealing also. BTW, most of the examples on 'etc/examples/intro.cm' should work on cm2 on sbcl. Some have Scheme code embedded and might not evaluate but is just a matter of translating. For instance 'nil' in Lisp is '#f' in Scheme. -- Juan > > If you use sbcl and feel adventurous you can install emacs, > quicklisp, slime and try cm-incudine together with incudine (an > awesome computer music system). cm-incudine is cm2 with some glue to > incudine which will give you realtime with a very efficient realtime > scheduler and jackmidi support. Optional additional packages are > fudi-incudine for sending to pure data in realtime (could also be > done with incudine alone) and cl-collider for compiling lisp to > supercollider synths and invoking them. Some of the stuff is still > experimental, but I'm using it every day and it works very well for > my needs. I'm trying to keep cm2 up to date, fixed some bugs and > added functionality (also to fomus, especially regarding the lilypond > backend). > From juanig at ccrma.Stanford.EDU Wed Feb 15 09:20:03 2017 From: juanig at ccrma.Stanford.EDU (Juan Reyes) Date: Wed, 15 Feb 2017 12:20:03 -0500 Subject: [CM] asdf and clm on sbcl Message-ID: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> Hi, As pointed out back in December, ASDF system definition file for CLM doesn't seem to work. On SBCL (1.3.5) if I type, (require :asdf) (load "clm.asd") I get, "There is no class named COMMON-LISP-USER::COMPILE-OP." On SBCL, besides (require :asdf), do we need to load or get other ASDF features in order to get 'compile-op' working ?. Of course, if I go back to Rick's previous definition I get ASDF working on SBCL again. Thanks, -- Juan Reyes From rm at seid-online.de Wed Feb 15 08:47:55 2017 From: rm at seid-online.de (Ralf Mattes) Date: Wed, 15 Feb 2017 17:47:55 +0100 Subject: [CM] asdf and clm on sbcl In-Reply-To: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> Message-ID: <20170215164754.eny7pq4xpykgirkg@seid-online.de> On Wed, Feb 15, 2017 at 12:20:03PM -0500, Juan Reyes wrote: > > Hi, > > As pointed out back in December, ASDF system definition file for CLM > doesn't seem to work. > > On SBCL (1.3.5) if I type, > > (require :asdf) Should already be available. Check if (find-package :asdf) does return something. > (load "clm.asd") Why are you loading an asdf file? That file should be (or shpould be linked) where asdf is looking for asdf files (for example in the directories listed in asdf:*central-registry* or in ~quicklisp/local-projects/) > I get, > "There is no class named COMMON-LISP-USER::COMPILE-OP." That class should be in the asdf package: (find-class 'asdf:compile-op) > > On SBCL, besides (require :asdf), Recent sbcl should come with asdf loaded. As soon as you set up quicklisp (and you really should) you've it running. The way to load as system: (asdf:load-system :clm) > do we need to load or get other ASDF > features in order to get 'compile-op' working ?. Iff you really need to explicitly compile: (asdf:compile-system :clm) > > Of course, if I go back to Rick's previous definition I get ASDF working > on SBCL again. Where did you get your version from? Cheers, Ralf Mattes > Thanks, > > -- Juan Reyes > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > From tito.01beta at gmail.com Wed Feb 15 09:41:59 2017 From: tito.01beta at gmail.com (Tito Latini) Date: Wed, 15 Feb 2017 18:41:59 +0100 Subject: [CM] asdf and clm on sbcl In-Reply-To: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> Message-ID: <20170215174159.GA1695@rhk.homenet.telecomitalia.it> On Wed, Feb 15, 2017 at 12:20:03PM -0500, Juan Reyes wrote: > > Hi, > > As pointed out back in December, ASDF system definition file for CLM > doesn't seem to work. > > On SBCL (1.3.5) if I type, > > (require :asdf) > > (load "clm.asd") > > I get, > "There is no class named COMMON-LISP-USER::COMPILE-OP." > > On SBCL, besides (require :asdf), do we need to load or get other ASDF > features in order to get 'compile-op' working ?. > > Of course, if I go back to Rick's previous definition I get ASDF working > on SBCL again. I forgot (in-package :asdf-user) at the beginning of clm.asd. An example of ${HOME}/.sbclrc file: (require :asdf) (dolist (l (list '*default-pathname-defaults* #p"/path/to/clm/")) (pushnew l asdf:*central-registry* :test #'equal)) From juanig at ccrma.Stanford.EDU Wed Feb 15 10:09:57 2017 From: juanig at ccrma.Stanford.EDU (Juan Reyes) Date: Wed, 15 Feb 2017 13:09:57 -0500 Subject: [CM] asdf and clm on sbcl In-Reply-To: <20170215174159.GA1695@rhk.homenet.telecomitalia.it> References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> <20170215174159.GA1695@rhk.homenet.telecomitalia.it> Message-ID: <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> Thanks a lot Ralf and Tito! Looks like on plain SBCL we still need '(require :asdf)' '(find-package :asdf)' returns nil. '(in-package :asdf-user)' did the trick. For what you guys are suggesting 'clm.asd' should look like: (require :asdf) (in-package :asdf-user) (asdf:defsystem "clm" :description "Common Lisp Music" :version "5" :author "William Schottstaedt " :licence "LLGPL" :perform (compile-op (o c) (load (system-relative-pathname "clm" "all.lisp")))) > > I forgot > > (in-package :asdf-user) > > at the beginning of clm.asd. > > An example of ${HOME}/.sbclrc file: > > (require :asdf) > > (dolist (l (list '*default-pathname-defaults* #p"/path/to/clm/")) > (pushnew l asdf:*central-registry* :test #'equal)) > _______________________________________________ From tito.01beta at gmail.com Wed Feb 15 10:29:23 2017 From: tito.01beta at gmail.com (Tito Latini) Date: Wed, 15 Feb 2017 19:29:23 +0100 Subject: [CM] asdf and clm on sbcl In-Reply-To: <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> <20170215174159.GA1695@rhk.homenet.telecomitalia.it> <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> Message-ID: <20170215182923.GA1712@rhk.homenet.telecomitalia.it> On Wed, Feb 15, 2017 at 01:09:57PM -0500, Juan Reyes wrote: [...] > (require :asdf) > (in-package :asdf-user) > (asdf:defsystem "clm" [...] I think `(require :asdf)' within an asd file is not good style (imagine 'require python' within a py file). The missing line is just `(in-package :asdf-user)'. It works with the posted .sbclrc example (I use a similar init file on a sound machine without quicklisp): sh> sbcl (require :clm) From rm at seid-online.de Wed Feb 15 10:13:42 2017 From: rm at seid-online.de (Ralf Mattes) Date: Wed, 15 Feb 2017 19:13:42 +0100 Subject: [CM] asdf and clm on sbcl In-Reply-To: <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> <20170215174159.GA1695@rhk.homenet.telecomitalia.it> <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> Message-ID: <20170215181342.jfgkpoqx2hk574qz@seid-online.de> On Wed, Feb 15, 2017 at 01:09:57PM -0500, Juan Reyes wrote: > > Thanks a lot Ralf and Tito! > > Looks like on plain SBCL we still need '(require :asdf)' > '(find-package :asdf)' returns nil. Oh dear, yes. Mine pulls it in via quicklisp (did I mention that quicklisp is a livesaver ;-) > '(in-package :asdf-user)' did the trick. That's ugly. In general, *-user packages are meant for interactive REPL experimentation, not for written code. It used to be the case that one would write: (defpackage :clm-asdf (:use :cl :asdf)) (in-package :clm-asdf) ... But that seemed so wrong for a file with purely delatative syntax (hint, hint, looking atr you CM) that the gods of ASDF decided that none of that trickery is needed. Just for the fun of it create foo.asd: (defsystem :foo :components ()) (format *debug-io* "This is read in package ~A~%" *package*) Then, do a (asdf:load-system :foo) Nota bene: don't (load "foo.asd") - that would produce the error you encountered. > For what you guys are suggesting 'clm.asd' should look like: > > (require :asdf) > (in-package :asdf-user) > (asdf:defsystem "clm" > :description "Common Lisp Music" > :version "5" > :author "William Schottstaedt " > :licence "LLGPL" > :perform (compile-op (o c) > (load (system-relative-pathname "clm" "all.lisp")))) > I think this needs a bit of rework (pimp up my asd ...) > > > > I forgot > > > > (in-package :asdf-user) > > > > at the beginning of clm.asd. > > > > An example of ${HOME}/.sbclrc file: > > > > (require :asdf) > > > > (dolist (l (list '*default-pathname-defaults* #p"/path/to/clm/")) > > (pushnew l asdf:*central-registry* :test #'equal)) ... or install quicklisp and put/link your extra code/projects into ~/quicklisp/local-projects. Cheers, RalfD From bil at ccrma.Stanford.EDU Wed Feb 15 12:30:11 2017 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 15 Feb 2017 12:30:11 -0800 Subject: [CM] asdf and clm on sbcl In-Reply-To: <20170215182923.GA1712@rhk.homenet.telecomitalia.it> References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> <20170215174159.GA1695@rhk.homenet.telecomitalia.it> <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> <20170215182923.GA1712@rhk.homenet.telecomitalia.it> Message-ID: I added (in-package :asdf-user) to clm.asd, and fixed my email address. Can the license be omitted? I dislike all versions of GPL, and normally use "artistic license", or "do whatever you want". From juanig at ccrma.Stanford.EDU Wed Feb 15 12:35:37 2017 From: juanig at ccrma.Stanford.EDU (Juan Reyes) Date: Wed, 15 Feb 2017 15:35:37 -0500 Subject: [CM] asdf and clm on sbcl In-Reply-To: <20170215182923.GA1712@rhk.homenet.telecomitalia.it> References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> <20170215174159.GA1695@rhk.homenet.telecomitalia.it> <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> <20170215182923.GA1712@rhk.homenet.telecomitalia.it> Message-ID: <6e4b4567-8c39-2f5b-7b23-2f35697fe20a@ccrma.stanford.edu> Thanks again Tito and Ralf, Your suggestions are working (knocking on wood). As per Ralf suggestions '(asdf:load-system :clm)' gets things going. Best of all, -- Juan From rm at seid-online.de Wed Feb 15 13:03:49 2017 From: rm at seid-online.de (Ralf Mattes) Date: Wed, 15 Feb 2017 22:03:49 +0100 Subject: [CM] asdf and clm on sbcl In-Reply-To: References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> <20170215174159.GA1695@rhk.homenet.telecomitalia.it> <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> <20170215182923.GA1712@rhk.homenet.telecomitalia.it> Message-ID: <20170215210349.4guyfqbfu3tz2tw3@seid-online.de> On Wed, Feb 15, 2017 at 12:30:11PM -0800, bil at ccrma.Stanford.EDU wrote: > I added (in-package :asdf-user) to clm.asd, and fixed > my email address. May I ask _where_ you made these changes? The sources link on http://ccrma.stanford.edu/software/clm/ points to a tarball with files from the 1990ies and no clm.asd at all ;-) >Can the license be omitted? > I dislike all versions of GPL, and normally use > "artistic license", or "do whatever you want". It's pretty much up to you - but may I humbly ask to use one of the "common"/well-known licences? Otherwise it's pretty hard to get that code into dstributions. Thanks, Ralf Mattes > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > From bil at ccrma.Stanford.EDU Wed Feb 15 14:47:57 2017 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 15 Feb 2017 14:47:57 -0800 Subject: [CM] asdf and clm on sbcl In-Reply-To: <20170215210349.4guyfqbfu3tz2tw3@seid-online.de> References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> <20170215174159.GA1695@rhk.homenet.telecomitalia.it> <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> <20170215182923.GA1712@rhk.homenet.telecomitalia.it> <20170215210349.4guyfqbfu3tz2tw3@seid-online.de> Message-ID: that link is correct and points to today's files. From tito.01beta at gmail.com Wed Feb 15 15:16:00 2017 From: tito.01beta at gmail.com (Tito Latini) Date: Thu, 16 Feb 2017 00:16:00 +0100 Subject: [CM] asdf and clm on sbcl In-Reply-To: References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> <20170215174159.GA1695@rhk.homenet.telecomitalia.it> <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> <20170215182923.GA1712@rhk.homenet.telecomitalia.it> Message-ID: <20170215231600.GA1762@rhk.homenet.telecomitalia.it> On Wed, Feb 15, 2017 at 12:30:11PM -0800, bil at ccrma.Stanford.EDU wrote: > I added (in-package :asdf-user) to clm.asd, and fixed > my email address. Can the license be omitted? > I dislike all versions of GPL, and normally use > "artistic license", or "do whatever you want". Thanks Bill, you can replace LLGPL with the correct license (I think quicklisp doesn't check the name, therefore "artistic" or other names derived from clm-5/COPYING are ok). I'm not an expert but the recommended fields (especially in quicklisp) are :description, :version, :author and :licence. Ralf Mattes wrote: >> '(in-package :asdf-user)' did the trick. > > That's ugly. In general, *-user packages are meant for interactive > REPL experimentation, not for written code. > [...] The system definitions loaded from .asd files are implicitly loaded into the ASDF-USER package. `(in-package :asdf-user)' is redundant but it avoids an error with (load "clm.asd"). However, with sbcl + asdf (no quicklisp and no init-file), (load "/path/to/all.lisp") is simplest than (require :asdf) (load "/path/to/clm.asd") (require :clm) If sbcl + asdf + init-file (no quicklisp), an init file is some-seconds-saver [(in-package :asdf-user) is unnecessary]: ;; reduced ~/.sbclrc (require :asdf) (pushnew #p"/path/to/clm-5/" asdf:*central-registry*) sh> sbcl (require :clm) From rm at seid-online.de Wed Feb 15 14:26:40 2017 From: rm at seid-online.de (Ralf Mattes) Date: Wed, 15 Feb 2017 23:26:40 +0100 Subject: [CM] asdf and clm on sbcl In-Reply-To: References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> <20170215174159.GA1695@rhk.homenet.telecomitalia.it> <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> <20170215182923.GA1712@rhk.homenet.telecomitalia.it> <20170215210349.4guyfqbfu3tz2tw3@seid-online.de> Message-ID: <20170215222640.cqodmgmyn2slyga2@seid-online.de> On Wed, Feb 15, 2017 at 02:47:57PM -0800, bil at ccrma.Stanford.EDU wrote: > that link is correct and points to today's files. Sorry, but did you just change that? While I get what seems to be new code now, less than two hours ago I got something rather different. First fetch (with md5 sum): -rw-r--r-- 1 ralf ralf 3266680 Feb 15 22:50 clm-5.tar.gz 9eecf08fc4cd8ec2b61a08811cdfea36 clm-5.tar.gz Second fetch: -rw-r--r-- 1 ralf ralf 3267519 Feb 16 00:06 clm-5.tar.gz 0baa655fcb8cd61c9beae1b8ba44e93a clm-5.tar.gz And, according to the ftp listing: ftp> dir clm-5.tar.gz 200 PORT command successful. Consider using PASV. 150 Here comes the directory listing. -rw-r--r-- 1 610 100 3267519 Feb 15 22:33 clm-5.tar.gz 226 Directory send OK. Strange. But the sha1 sum now seems to be correct and there is an asdf file. Thanks, Ralf Mattes > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > From rm at seid-online.de Wed Feb 15 15:02:34 2017 From: rm at seid-online.de (Ralf Mattes) Date: Thu, 16 Feb 2017 00:02:34 +0100 Subject: [CM] asdf and clm on sbcl In-Reply-To: <20170215231600.GA1762@rhk.homenet.telecomitalia.it> References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> <20170215174159.GA1695@rhk.homenet.telecomitalia.it> <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> <20170215182923.GA1712@rhk.homenet.telecomitalia.it> <20170215231600.GA1762@rhk.homenet.telecomitalia.it> Message-ID: <20170215230234.4ilelifxupfoudqf@seid-online.de> On Thu, Feb 16, 2017 at 12:16:00AM +0100, Tito Latini wrote: > ... > > Ralf Mattes wrote: > >> '(in-package :asdf-user)' did the trick. > > > > That's ugly. In general, *-user packages are meant for interactive > > REPL experimentation, not for written code. > > [...] > > The system definitions loaded from .asd files are implicitly loaded > into the ASDF-USER package. `(in-package :asdf-user)' is redundant > but it avoids an error with (load "clm.asd"). i But that's exactly how you should not use an asdf file. Loading the file will unconditionally execute the code in that file while (asdf:load-system ...) will not, once the system is loaded. That makes quite a difference, esp. when asdf files contain substantial amounts of code (CM, hintm hint ;-) > However, with > sbcl + asdf (no quicklisp and no init-file), > > (load "/path/to/all.lisp") > > is simplest than > > (require :asdf) > (load "/path/to/clm.asd") > (require :clm) Yes, especially since clm.asd is nothing more than a minimal wrapper around a self made loader. Except, you loose all the benefits of asdf (conditional compilation, not sputtering fasl files all over the place, the ability to use more than one lisp wich uses the same fasl file extension, etc. etc.). > If sbcl + asdf + init-file (no quicklisp), an init file is > some-seconds-saver [(in-package :asdf-user) is unnecessary]: > > ;; reduced ~/.sbclrc > (require :asdf) > (pushnew #p"/path/to/clm-5/" asdf:*central-registry*) > > sh> sbcl > (require :clm) I wouldn't advise to use sbcl's current extension to require to load asdf systems. You're relying on the order of sb-impl::*module-provider-functions* (but I have to confess that 'require does give cozzy nostalgic feelings ...) Cheers, RalfD > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > From tito.01beta at gmail.com Thu Feb 16 03:23:35 2017 From: tito.01beta at gmail.com (Tito Latini) Date: Thu, 16 Feb 2017 12:23:35 +0100 Subject: [CM] asdf and clm on sbcl In-Reply-To: <20170215230234.4ilelifxupfoudqf@seid-online.de> References: <041d632e-9142-ec6a-97e4-fb4623516fdd@ccrma.stanford.edu> <20170215174159.GA1695@rhk.homenet.telecomitalia.it> <90d0cc39-dd8a-fdea-2834-bb58551f1096@ccrma.stanford.edu> <20170215182923.GA1712@rhk.homenet.telecomitalia.it> <20170215231600.GA1762@rhk.homenet.telecomitalia.it> <20170215230234.4ilelifxupfoudqf@seid-online.de> Message-ID: <20170216112334.GA1690@rhk.homenet.telecomitalia.it> On Thu, Feb 16, 2017 at 12:02:34AM +0100, Ralf Mattes wrote: > [...] > > but it avoids an error with (load "clm.asd"). i > > But that's exactly how you should not use an asdf file. > Loading the file will unconditionally execute the code in that file > while (asdf:load-system ...) will not, once the system is loaded. That > makes quite a difference, esp. when asdf files contain substantial > amounts of code (CM, hintm hint ;-) `(load "clm.asd")' is a simple registration of the wrapper to all.lisp: (APPLY 'ASDF/PARSE-DEFSYSTEM:REGISTER-SYSTEM-DEFINITION '"clm" '(:DESCRIPTION "Common Lisp Music" :VERSION "5" :AUTHOR ...)) therefore, if some scripts used LOAD with the old asd file, they continue to work after the recent changes (probably only with asdf-3). CLM is a fantastic tool without lisp-dependences and it works with a simple ROCK-AND-ROLL function: sh> mkdir /path/to/clm-5/build ;; ~/.sbclrc (export 'rock-and-roll "CL-USER") (defvar clm-bin-directory "/path/to/clm-5/build/") (defun cl-user:rock-and-roll () (unless (find-package "CLM") (load "/path/to/clm-5/all.lisp") (provide "CLM")) (setf *package* (find-package "CLM"))) (pushnew (lambda (name) (when (string-equal (string name) "clm") (cl-user:rock-and-roll))) *module-provider-functions*) sh> sbcl (member :asdf *features*) ; => NIL (rock-and-roll) ; with conditional compilation! ;; or the alternative `(require :clm)' # A quiet garage (no sputtering) sh> ls /path/to/clm-5/build audio.o defaults.fasl headers.o run.fasl clm-package.fasl defins.fasl initmus.fasl sndlib2clm.fasl clm.o env.fasl io.o sndplay clm1.fasl export.fasl libclm.so sound.fasl cmus.o ffi.fasl mus.fasl sound.o > I wouldn't advise to use sbcl's current extension to require to load > asdf systems. You're relying on the order of sb-impl::*module-provider-functions* > (but I have to confess that 'require does give cozzy nostalgic feelings > ...) I like REQUIRE, that's not a nostalgic utility, it works with or without the optional asdf and SB-EXT:*MODULE-PROVIDER-FUNCTIONS* is not an internal symbol. sh> sbcl *module-provider-functions* ;; => (SB-IMPL::MODULE-PROVIDE-CONTRIB) (require :asdf) *module-provider-functions* ;; => (ASDF/OPERATE:MODULE-PROVIDE-ASDF SB-IMPL::MODULE-PROVIDE-CONTRIB) where ASDF/OPERATE:MODULE-PROVIDE-ASDF uses ASDF/OPERATE:REQUIRE-SYSTEM, a version of ASDF/OPERATE:LOAD-SYSTEM that skips trying to update systems that are already loaded. From bil at ccrma.Stanford.EDU Wed Feb 22 12:50:07 2017 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 22 Feb 2017 12:50:07 -0800 Subject: [CM] Snd 17.2 Message-ID: Snd 17.2: Tito Latini greatly improved the mix saved state info, and fixed many bugs. in s7: let-set! now raises an error if the target variable doesn't exist if no result is specified, do returns the test result => works here as in cond and case, and multiple-values. in *rootlet-redefinition-hook* the first parameter is 'name, not 'symbol. #e, #i, #d removed. #i(...) is an int-vector constant, #r(...) a float-vector. checked: sbcl 1.3.14, gtk 3.89.4 Thanks!: Tito Latini. From j_hearon at hotmail.com Fri Feb 24 10:26:18 2017 From: j_hearon at hotmail.com (James Hearon) Date: Fri, 24 Feb 2017 18:26:18 +0000 Subject: [CM] s7 wrap c func with scheme In-Reply-To: References: Message-ID: Hi, I had a question about wrapping a c func with scheme, s7. I'm trying to understand how to wrap the declared function from the .h file with scheme in a .scm file (mywrapper.scm) so that it can be called from s7 and use the shared library. > (load mywrapper.scm) > (myfunction) > (exit) I have a .c file which includes a function (myfunction), and .h which declares that function. I compile the .c file using -fpic into an obj. file, then create a shared library, ex. mylib.so. I'm looking at SND files libc.scm and libgsl.scm which seem to be wrappers, but are quite complicated. I'm also looking at the S7 manual example for "Load a shared library", but there are static s7_pointer functions in the example's c code which seem to be doing the wrapping on the c side as opposed to wrapping a c function in scheme using a .scm file. I'm wondering if there's a simpler example somplace where I can get some ideas about how to go about wrapping a c function in scheme, or if the manual vers. is the preferred way to go, i.e. create a library using s7 functions from c, and then load the library into s7 to call the function? Regards, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Fri Feb 24 11:10:02 2017 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Fri, 24 Feb 2017 11:10:02 -0800 Subject: [CM] s7 wrap c func with scheme In-Reply-To: References: Message-ID: Probably the simplest way to make a C function callable from s7 is to wrap it in a function of the form s7_pointer wrapper(s7_scheme *sc, s7_pointer args) Then get the scheme-side arguments from "args", and wrap the C function's output using the s7_make* functions. It is then defined in s7 using s7_define_function. s7.html has an example under "Define a function with arguments". If you want this in a shared library, you also need to tell s7's load function how to get the wrappers. This is normally done via an environment with a field named 'init_func whose value is the (name of the) C initialization function in the library (i.e. the function that calls s7_define_function). There's an example in the section about libsndlib.so, but maybe I should add a simpler example. cload.scm sets up all these wrappers and linkages for you, but it is overkill for simple cases. From bil at ccrma.Stanford.EDU Fri Feb 24 11:35:27 2017 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Fri, 24 Feb 2017 11:35:27 -0800 Subject: [CM] s7 wrap c func with scheme In-Reply-To: References: Message-ID: <4a058ae755943b9676bf5d1aceb0d20a@ccrma.stanford.edu> I just conjured up this example (9/10 of the time was spent fussing with the compiler flags...): file add1.c: #include #include "s7.h" static s7_pointer add1(s7_scheme *sc, s7_pointer args) { if (s7_is_integer(s7_car(args))) return(s7_make_integer(sc, 1 + s7_integer(s7_car(args)))); return(s7_wrong_type_arg_error(sc, "add1", 1, s7_car(args), "an integer")); } void add1_init(s7_scheme *sc); void add1_init(s7_scheme *sc) { s7_define_function(sc, "add1", add1, 1, 0, false, "(add1 int) adds 1 to int"); } now build it as a shared object, build s7 with -fpic, and load add1 into s7 at runtime: gcc -fpic -c add1.c gcc -shared -Wl,-soname,libadd1.so -o libadd1.so add1.o -lm -lc gcc s7.c -o repl -fpic -DWITH_MAIN -I. -ldl -lm -Wl,-export-dynamic -DUSE_SND=0 repl > (load "libadd1.so" (inlet 'init_func 'add1_init)) > (add1 2)