From j_hearon at hotmail.com Tue Mar 1 09:55:49 2016 From: j_hearon at hotmail.com (James Hearon) Date: Tue, 1 Mar 2016 17:55:49 +0000 Subject: [CM] snd inf-snd.el In-Reply-To: References: Message-ID: Hi, I trying to get inf-snd.el going for more REPL with .scm files. I'm just trying to load , edit, and evaluate a .scm file, and couldn't seem to figure out how to do that using the snd listener. I have clm working with fedora, quicklisp, emacs, and slime, but not sure how to get inf-snd.el working for more REPL with .scm in snd. I tried this from .emacs, but it doesn't find any inf-snd key bindings such as C-c C-l snd-load-file, for ex. (load (expand-file-name "/opt/quicklisp/slime-helper.el")) (load (expand-file-name "/opt/snd-16/inf-snd.el")) (setq inferior-lisp-program "/usr/bin/sbcl") I'm wondering if anyone has experience with this similar environment and knows how to get it to run? Thanks, Jim From bil at ccrma.Stanford.EDU Tue Mar 1 10:36:06 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Tue, 01 Mar 2016 10:36:06 -0800 Subject: [CM] snd inf-snd.el In-Reply-To: References: Message-ID: s7 doesn't know how to communicate with slime (or geiser), and it's not Common Lisp, so loading quicklisp code, or running sbcl has no effect. Snd can communicate with emacs through s7, forth, or ruby, and inf-snd.el has instructions. I use the built-in repls (and a separate emacs); in that case you load a file with (load "a-file.scm"), and evaluate s7 code by typing it at the prompt, just as in any other repl. From j_hearon at hotmail.com Wed Mar 2 10:00:47 2016 From: j_hearon at hotmail.com (James Hearon) Date: Wed, 2 Mar 2016 18:00:47 +0000 Subject: [CM] inf-snd.el In-Reply-To: References: Message-ID: Message: 2 Date: Tue, 01 Mar 2016 10:36:06 -0800 From: bil at ccrma.Stanford.EDU To: James Hearon Cc: "cmdist at ccrma.Stanford.EDU" Subject: Re: [CM] snd inf-snd.el Message-ID: Content-Type: text/plain; charset=US-ASCII; format=flowed s7 doesn't know how to communicate with slime (or geiser), and it's not Common Lisp, so loading quicklisp code, or running sbcl has no effect. Snd can communicate with emacs through s7, forth, or ruby, and inf-snd.el has instructions. I use the built-in repls (and a separate emacs); in that case you load a file with (load "a-file.scm"), and evaluate s7 code by typing it at the prompt, just as in any other repl. Hi, Thank you. This is a bit clearer now. Since I don't need slime, quicklisp or sbcl, then maybe just a separate .emacs file is best approach than trying to combine everything into one .emacs startup file? Or maybe I'm getting confused about .emacs vs. .el files somehow? I've read inf-snd.el , but not sure I understand it all yet. For my .emacs, and just the scheme part, I tried below using the snd customization and extension example from Bill's ~/.xemacs/init.el shown in the snd html manual for the inf-snd.el part, and then tried loading a .scm file from emacs but nothing is happening so I don't think I'm there yet. (setq load-path (append (list "/opt/snd-16" ) load-path)) (autoload 'run-snd-scheme "inf-snd" "Start inferior Snd-Scheme process" t) (autoload 'snd-scheme-mode "inf-snd" "Load snd-scheme-mode." t) (setq inf-snd-scheme-program-name "/opt/snd-16/snd") (setq inf-snd-working-directory "/opt/snd-16/") (setq inf-snd-index-path "/opt/snd-16/") Regards, Jim From bil at ccrma.Stanford.EDU Wed Mar 2 13:19:33 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Wed, 02 Mar 2016 13:19:33 -0800 Subject: [CM] inf-snd.el In-Reply-To: References: Message-ID: <4453442bd0bd19df49e2a49f70b9f2be@ccrma.stanford.edu> "Fedora Core 5"! Wow, that documentation is archaic. I can't find the files it talks about, xemacs is long dead, buried, forgotten, and 2006 precedes s7. That must have been Guile-related. From rhowiler at presby.edu Thu Mar 3 08:57:21 2016 From: rhowiler at presby.edu (Rob Howiler) Date: Thu, 3 Mar 2016 11:57:21 -0500 Subject: [CM] new syntax for (list (new midi) Message-ID: Hi I am trying to make something work, but I am using old syntax I am sure. Below is what I am trying to do. Can anyone help me with the proper syntax? Thanks Rob (define (thump knum at) ;;make two percussive events below knum) (list (new midi :time at :key (- knum 18) :dur .05 :amp .5) (new midi :time at :key (- knum 23) :dur .05 :amp .4))) I?m getting an ?unbound variable? error message for ?new" ------------------------------------------------------ Dr. Rob Howiler Academic Computing Services Coordinator Assistant Professor of Music rhowiler at presby.edu (864) 833-8324 ------------------------------------------------------ -- ------------------------------ From johannes.quint at web.de Thu Mar 3 09:02:38 2016 From: johannes.quint at web.de (Johannes Quint) Date: Thu, 3 Mar 2016 18:02:38 +0100 Subject: [CM] new syntax for (list (new midi) In-Reply-To: References: Message-ID: <533A6743-A3EC-4521-A21A-FE31AE519E9F@web.de> maybe this way: (define (thump knum at) ;;make two percussive events below knum) (list (mp:midi :time at :key (- knum 18) :dur .05 :amp .5) (mp:midi :time at :key (- knum 23) :dur .05 :amp .4))) best Am 03.03.2016 um 17:57 schrieb Rob Howiler: > Hi > I am trying to make something work, but I am using old syntax I am sure. Below is what I am trying to do. Can anyone help me with the proper syntax? > Thanks > Rob > > (define (thump knum at) > ;;make two percussive events below knum) > (list (new midi :time at > :key (- knum 18) > :dur .05 :amp .5) > (new midi :time at > :key (- knum 23) > :dur .05 :amp .4))) > > I?m getting an ?unbound variable? error message for ?new" > > > ------------------------------------------------------ > Dr. Rob Howiler > Academic Computing Services Coordinator > Assistant Professor of Music > rhowiler at presby.edu > (864) 833-8324 > ------------------------------------------------------ > > > -- > > ------------------------------ > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist Johannes Quint www.johannes-quint.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From rhowiler at presby.edu Thu Mar 3 09:08:22 2016 From: rhowiler at presby.edu (Rob Howiler) Date: Thu, 3 Mar 2016 12:08:22 -0500 Subject: [CM] new syntax for (list (new midi) In-Reply-To: <533A6743-A3EC-4521-A21A-FE31AE519E9F@web.de> References: <533A6743-A3EC-4521-A21A-FE31AE519E9F@web.de> Message-ID: <3627C005-E760-4897-BBA2-36778BD63E6E@presby.edu> Closer. The mp:midi got me away from the unbound variable problem. I?m getting sound now, but a beep at the console listener window alerts me to this: >>> Error: (# #) is not a process sprout: (error "~S is not a process" proc) ; proc: (# # On Mar 3, 2016, at 12:02 PM, Johannes Quint wrote: > > maybe this way: > > (define (thump knum at) > ;;make two percussive events below knum) > (list (mp:midi :time at > :key (- knum 18) > :dur .05 :amp .5) > (mp:midi :time at > :key (- knum 23) > :dur .05 :amp .4))) > > best > > Am 03.03.2016 um 17:57 schrieb Rob Howiler: > >> Hi >> I am trying to make something work, but I am using old syntax I am sure. Below is what I am trying to do. Can anyone help me with the proper syntax? >> Thanks >> Rob >> >> (define (thump knum at) >> ;;make two percussive events below knum) >> (list (new midi :time at >> :key (- knum 18) >> :dur .05 :amp .5) >> (new midi :time at >> :key (- knum 23) >> :dur .05 :amp .4))) >> >> I?m getting an ?unbound variable? error message for ?new" >> >> >> ------------------------------------------------------ >> Dr. Rob Howiler >> Academic Computing Services Coordinator >> Assistant Professor of Music >> rhowiler at presby.edu >> (864) 833-8324 >> ------------------------------------------------------ >> >> >> -- >> >> ------------------------------ >> >> >> _______________________________________________ >> Cmdist mailing list >> Cmdist at ccrma.stanford.edu >> https://cm-mail.stanford.edu/mailman/listinfo/cmdist > > > > Johannes Quint > www.johannes-quint.de > ------------------------------------------------------ Dr. Rob Howiler Academic Computing Services Coordinator Assistant Professor of Music rhowiler at presby.edu (864) 833-8324 ------------------------------------------------------ -- ------------------------------ From johannes.quint at web.de Thu Mar 3 09:53:30 2016 From: johannes.quint at web.de (Johannes Quint) Date: Thu, 3 Mar 2016 18:53:30 +0100 Subject: [CM] new syntax for (list (new midi) In-Reply-To: <3627C005-E760-4897-BBA2-36778BD63E6E@presby.edu> References: <533A6743-A3EC-4521-A21A-FE31AE519E9F@web.de> <3627C005-E760-4897-BBA2-36778BD63E6E@presby.edu> Message-ID: <6433EF64-724F-4FD8-A428-89493EE22F64@web.de> what about this: (define (thump knum at) (mp:midi :time at :key (- knum 18) :dur .05 :amp .5) (mp:midi :time at :key (- knum 23) :dur .05 :amp .4)) (thump 72 0.5) Am 03.03.2016 um 18:08 schrieb Rob Howiler: > Closer. The mp:midi got me away from the unbound variable problem. I?m getting sound now, but a beep at the console listener window alerts me to this: > >>>> Error: (# #) is not a process > sprout: (error "~S is not a process" proc) ; proc: (# # sprout: (((tail proc (cdr tail))) ((null? tail... > sprout: ((error "~S is not a process" proc)) > sprout: ((do ((tail args (cdr tail)) (keyw #f)... ; args: (), file: #f, start: 0 > ; id: 0 > ; startBeat: 0 > (sprout (thump 60 2)) > > Thanks again for the help. > Rob >> On Mar 3, 2016, at 12:02 PM, Johannes Quint wrote: >> >> maybe this way: >> >> (define (thump knum at) >> ;;make two percussive events below knum) >> (list (mp:midi :time at >> :key (- knum 18) >> :dur .05 :amp .5) >> (mp:midi :time at >> :key (- knum 23) >> :dur .05 :amp .4))) >> >> best >> >> Am 03.03.2016 um 17:57 schrieb Rob Howiler: >> >>> Hi >>> I am trying to make something work, but I am using old syntax I am sure. Below is what I am trying to do. Can anyone help me with the proper syntax? >>> Thanks >>> Rob >>> >>> (define (thump knum at) >>> ;;make two percussive events below knum) >>> (list (new midi :time at >>> :key (- knum 18) >>> :dur .05 :amp .5) >>> (new midi :time at >>> :key (- knum 23) >>> :dur .05 :amp .4))) >>> >>> I?m getting an ?unbound variable? error message for ?new" >>> >>> >>> ------------------------------------------------------ >>> Dr. Rob Howiler >>> Academic Computing Services Coordinator >>> Assistant Professor of Music >>> rhowiler at presby.edu >>> (864) 833-8324 >>> ------------------------------------------------------ >>> >>> >>> -- >>> >>> ------------------------------ >>> >>> >>> _______________________________________________ >>> Cmdist mailing list >>> Cmdist at ccrma.stanford.edu >>> https://cm-mail.stanford.edu/mailman/listinfo/cmdist >> >> >> >> Johannes Quint >> www.johannes-quint.de >> > > ------------------------------------------------------ > Dr. Rob Howiler > Academic Computing Services Coordinator > Assistant Professor of Music > rhowiler at presby.edu > (864) 833-8324 > ------------------------------------------------------ > > > -- > > ------------------------------ > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > Johannes Quint www.johannes-quint.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From rhowiler at presby.edu Thu Mar 3 09:59:51 2016 From: rhowiler at presby.edu (Rob Howiler) Date: Thu, 3 Mar 2016 12:59:51 -0500 Subject: [CM] new syntax for (list (new midi) In-Reply-To: <6433EF64-724F-4FD8-A428-89493EE22F64@web.de> References: <533A6743-A3EC-4521-A21A-FE31AE519E9F@web.de> <3627C005-E760-4897-BBA2-36778BD63E6E@presby.edu> <6433EF64-724F-4FD8-A428-89493EE22F64@web.de> Message-ID: <182C8F3F-DF18-4048-A88D-3CBD78019BDD@presby.edu> Thank you. That did the trick. I don?t really need the ?sprout? in there just to run a function I?ve defined, I guess. > On Mar 3, 2016, at 12:53 PM, Johannes Quint wrote: > > what about this: > > (define (thump knum at) > (mp:midi :time at > :key (- knum 18) > :dur .05 :amp .5) > (mp:midi :time at > :key (- knum 23) > :dur .05 :amp .4)) > > (thump 72 0.5) > > > > > Am 03.03.2016 um 18:08 schrieb Rob Howiler: > >> Closer. The mp:midi got me away from the unbound variable problem. I?m getting sound now, but a beep at the console listener window alerts me to this: >> >>>>> Error: (# #) is not a process >> sprout: (error "~S is not a process" proc) ; proc: (# #> sprout: (((tail proc (cdr tail))) ((null? tail... >> sprout: ((error "~S is not a process" proc)) >> sprout: ((do ((tail args (cdr tail)) (keyw #f)... ; args: (), file: #f, start: 0 >> ; id: 0 >> ; startBeat: 0 >> (sprout (thump 60 2)) >> >> Thanks again for the help. >> Rob >>> On Mar 3, 2016, at 12:02 PM, Johannes Quint wrote: >>> >>> maybe this way: >>> >>> (define (thump knum at) >>> ;;make two percussive events below knum) >>> (list (mp:midi :time at >>> :key (- knum 18) >>> :dur .05 :amp .5) >>> (mp:midi :time at >>> :key (- knum 23) >>> :dur .05 :amp .4))) >>> >>> best >>> >>> Am 03.03.2016 um 17:57 schrieb Rob Howiler: >>> >>>> Hi >>>> I am trying to make something work, but I am using old syntax I am sure. Below is what I am trying to do. Can anyone help me with the proper syntax? >>>> Thanks >>>> Rob >>>> >>>> (define (thump knum at) >>>> ;;make two percussive events below knum) >>>> (list (new midi :time at >>>> :key (- knum 18) >>>> :dur .05 :amp .5) >>>> (new midi :time at >>>> :key (- knum 23) >>>> :dur .05 :amp .4))) >>>> >>>> I?m getting an ?unbound variable? error message for ?new" >>>> >>>> >>>> ------------------------------------------------------ >>>> Dr. Rob Howiler >>>> Academic Computing Services Coordinator >>>> Assistant Professor of Music >>>> rhowiler at presby.edu >>>> (864) 833-8324 >>>> ------------------------------------------------------ >>>> >>>> >>>> -- >>>> >>>> ------------------------------ >>>> >>>> >>>> _______________________________________________ >>>> Cmdist mailing list >>>> Cmdist at ccrma.stanford.edu >>>> https://cm-mail.stanford.edu/mailman/listinfo/cmdist >>> >>> >>> >>> Johannes Quint >>> www.johannes-quint.de >>> >> >> ------------------------------------------------------ >> Dr. Rob Howiler >> Academic Computing Services Coordinator >> Assistant Professor of Music >> rhowiler at presby.edu >> (864) 833-8324 >> ------------------------------------------------------ >> >> >> -- >> >> ------------------------------ >> >> >> _______________________________________________ >> Cmdist mailing list >> Cmdist at ccrma.stanford.edu >> https://cm-mail.stanford.edu/mailman/listinfo/cmdist >> > > > > Johannes Quint > www.johannes-quint.de > ------------------------------------------------------ Dr. Rob Howiler Academic Computing Services Coordinator Assistant Professor of Music rhowiler at presby.edu (864) 833-8324 ------------------------------------------------------ -- ------------------------------ From rhowiler at presby.edu Thu Mar 3 10:10:22 2016 From: rhowiler at presby.edu (Rob Howiler) Date: Thu, 3 Mar 2016 13:10:22 -0500 Subject: [CM] :time (now) wait rate Message-ID: <5B54726B-6B13-4F7A-B928-6E3A6DE34E5A@presby.edu> Hi Thanks in advance for helping me with my questions. I know I am becoming a bore with these newbie questions?. Anytime I try to use :time (now) in a :mp:midi statement (or perhaps it?s the ?rate? part), I get all sound at once when it should sound sequentially. I?m defining a couple of helper apps (as per Notes from the Metalevel which I understand is outdated in some ways, language-wise. (define (bpm->seconds bpm) (/ 60.0 bpm)) (define (rhythm->seconds rhy tempo) (* rhy 4.0 (bpm->seconds tempo))) (define (riff knum rhy) ;;generate an upward strum of notes (let ((rate (rhythm->seconds (/ rhy 4) 60))) (process repeat 5 for k from (+ 39 (mod knum 13)) by 13 do (mp:midi :key k :amp .3 :chan 0) wait rate))) (sprout (riff 48 0.5)) ?.gives all sound as a chord. using (riff 48 0.5) just gives # in the listener window (the number increases sequentially each time I try to evaluate the (riff 48 0.5) expression). Also, if I use (define (riff knum rhy) ;;generate an upward strum of notes (let ((rate (rhythm->seconds (/ rhy 4) 60))) (process repeat 5 for k from (+ 39 (mod knum 13)) by 13 do (mp:midi :key k :time (now) :amp .3 :chan 0) wait rate))) (riff 48 0.5) - or (sprout (riff 48 0.5)) give me no sound with # in the listener window. The :time (now) is the only thing that?s different. Thanks again for your help and patience. Rob ------------------------------------------------------ Dr. Rob Howiler Academic Computing Services Coordinator Assistant Professor of Music rhowiler at presby.edu (864) 833-8324 ------------------------------------------------------ -- ------------------------------ From rhowiler at presby.edu Thu Mar 3 11:37:25 2016 From: rhowiler at presby.edu (Rob Howiler) Date: Thu, 3 Mar 2016 14:37:25 -0500 Subject: [CM] help with "ghosts" example from Metalevel book Message-ID: <1F5BBCFA-547C-482C-9035-22E4A65B9DB7@presby.edu> Hi again everybody. This: (define (ghosts) (process repeat 12 for here = (now) for ahead = (* (+ here .5) 2) for main = (pick-range 53 77) for high? = (>= main 65) for amp = (if high? .6 .4) for rhy = (pick-list '(1/16 1/8 3/16)) do (mp:midi :time here :key main :dur (rhythm->seconds rhy 60) :amp amp) (when high? sprout (hitone main ahead) and sprout (riff main rhy) at (* ahead 2)) (when (= rhy 3/16) sprout (thump main (+ here .5))) (wait (rhythm->seconds rhy 60)))) (sprout (ghosts)) This works fine to define (ghosts). (ghosts) produces no sound just # in the listener window. Running (sprout (ghosts)) gives me the hitone sound, but no advancement to the next pitch and it generates this in the listener window (I see that ?at? is the unbound variable, but I can?t figure out how to fix it): # >>> Error: at: unbound variable ghosts: (lambda ({time}-1860) (let* (({wait}-1... ; args: ("~A: unbound variable" at) ghosts: ((* ahead 2)) ; ahead: 1275579.145172206 ghosts: ((when (= rhy 3/16) sprout (thump main... ; rhy: 3/16, main: 75 ; here: 637789.072586103 ghosts: (call-with-exit (lambda (return) (if (... ; high?: #t ; amp: 0.6000000000000001 ghosts: (sprout (ghosts)) Thanks again for your help and your patience. Rob ------------------------------------------------------ Dr. Rob Howiler Academic Computing Services Coordinator Assistant Professor of Music rhowiler at presby.edu (864) 833-8324 ------------------------------------------------------ -- ------------------------------ From johannes.quint at web.de Thu Mar 3 11:45:27 2016 From: johannes.quint at web.de (Johannes Quint) Date: Thu, 3 Mar 2016 20:45:27 +0100 Subject: [CM] help with "ghosts" example from Metalevel book In-Reply-To: <1F5BBCFA-547C-482C-9035-22E4A65B9DB7@presby.edu> References: <1F5BBCFA-547C-482C-9035-22E4A65B9DB7@presby.edu> Message-ID: have a look to 'ghosts' in the help-menu: help/examples/ghosts.scm Am 03.03.2016 um 20:37 schrieb Rob Howiler: > Hi again everybody. This: > (define (ghosts) > (process repeat 12 > for here = (now) > for ahead = (* (+ here .5) 2) > for main = (pick-range 53 77) > for high? = (>= main 65) > for amp = (if high? .6 .4) > for rhy = (pick-list '(1/16 1/8 3/16)) > do > (mp:midi :time here :key main :dur (rhythm->seconds rhy 60) > :amp amp) > (when high? > sprout (hitone main ahead) > and sprout (riff main rhy) at (* ahead 2)) > (when (= rhy 3/16) > sprout (thump main (+ here .5))) > (wait (rhythm->seconds rhy 60)))) > (sprout (ghosts)) > > This works fine to define (ghosts). (ghosts) produces no sound just # in the listener window. Running (sprout (ghosts)) gives me the hitone sound, but no advancement to the next pitch and it generates this in the listener window (I see that ?at? is the unbound variable, but I can?t figure out how to fix it): > > # >>>> Error: at: unbound variable > ghosts: (lambda ({time}-1860) (let* (({wait}-1... ; args: ("~A: unbound variable" at) > ghosts: ((* ahead 2)) ; ahead: 1275579.145172206 > ghosts: ((when (= rhy 3/16) sprout (thump main... ; rhy: 3/16, main: 75 > ; here: 637789.072586103 > ghosts: (call-with-exit (lambda (return) (if (... ; high?: #t > ; amp: 0.6000000000000001 > ghosts: (sprout (ghosts)) > > Thanks again for your help and your patience. > Rob > > ------------------------------------------------------ > Dr. Rob Howiler > Academic Computing Services Coordinator > Assistant Professor of Music > rhowiler at presby.edu > (864) 833-8324 > ------------------------------------------------------ > > > -- > > ------------------------------ > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist Johannes Quint www.johannes-quint.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From rhowiler at presby.edu Thu Mar 3 11:48:15 2016 From: rhowiler at presby.edu (Rob Howiler) Date: Thu, 3 Mar 2016 14:48:15 -0500 Subject: [CM] help with "ghosts" example from Metalevel book In-Reply-To: References: <1F5BBCFA-547C-482C-9035-22E4A65B9DB7@presby.edu> Message-ID: I didn?t see that example in there. Sorry & thanks for pointing that out. > On Mar 3, 2016, at 2:45 PM, Johannes Quint wrote: > > have a look to 'ghosts' in the help-menu: > > help/examples/ghosts.scm > > Am 03.03.2016 um 20:37 schrieb Rob Howiler: > >> Hi again everybody. This: >> (define (ghosts) >> (process repeat 12 >> for here = (now) >> for ahead = (* (+ here .5) 2) >> for main = (pick-range 53 77) >> for high? = (>= main 65) >> for amp = (if high? .6 .4) >> for rhy = (pick-list '(1/16 1/8 3/16)) >> do >> (mp:midi :time here :key main :dur (rhythm->seconds rhy 60) >> :amp amp) >> (when high? >> sprout (hitone main ahead) >> and sprout (riff main rhy) at (* ahead 2)) >> (when (= rhy 3/16) >> sprout (thump main (+ here .5))) >> (wait (rhythm->seconds rhy 60)))) >> (sprout (ghosts)) >> >> This works fine to define (ghosts). (ghosts) produces no sound just # in the listener window. Running (sprout (ghosts)) gives me the hitone sound, but no advancement to the next pitch and it generates this in the listener window (I see that ?at? is the unbound variable, but I can?t figure out how to fix it): >> >> # >>>>> Error: at: unbound variable >> ghosts: (lambda ({time}-1860) (let* (({wait}-1... ; args: ("~A: unbound variable" at) >> ghosts: ((* ahead 2)) ; ahead: 1275579.145172206 >> ghosts: ((when (= rhy 3/16) sprout (thump main... ; rhy: 3/16, main: 75 >> ; here: 637789.072586103 >> ghosts: (call-with-exit (lambda (return) (if (... ; high?: #t >> ; amp: 0.6000000000000001 >> ghosts: (sprout (ghosts)) >> >> Thanks again for your help and your patience. >> Rob >> >> ------------------------------------------------------ >> Dr. Rob Howiler >> Academic Computing Services Coordinator >> Assistant Professor of Music >> rhowiler at presby.edu >> (864) 833-8324 >> ------------------------------------------------------ >> >> >> -- >> >> ------------------------------ >> >> >> _______________________________________________ >> Cmdist mailing list >> Cmdist at ccrma.stanford.edu >> https://cm-mail.stanford.edu/mailman/listinfo/cmdist > > > > Johannes Quint > www.johannes-quint.de ------------------------------------------------------ Dr. Rob Howiler Academic Computing Services Coordinator Assistant Professor of Music rhowiler at presby.edu (864) 833-8324 ------------------------------------------------------- -- ------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From benmca at gmail.com Sun Mar 6 16:37:28 2016 From: benmca at gmail.com (Ben McAllister) Date: Sun, 6 Mar 2016 16:37:28 -0800 Subject: [CM] Cmdist Digest, Vol 94, Issue 8 In-Reply-To: References: Message-ID: Thanks Lynn ;) good to 'see' you. And thanks for the Scheme tip! On Wed, Feb 24, 2016 at 7:44 AM, Lynn Artas wrote: > Hey there, Ben?I'm an old schoolmate of yours from that time and place. I > use a pseudonym on discussion lists so as not to embarrass myself or our > beloved teacher with my silly questions. ; ) > > I'm in the same situation?starting up Grace/CM after well over a decade of > doing little to nothing with it. Bill Schottstaedt just gave me the names of > the following handy resources a few weeks ago on the list. Here are some > links: > > "The Scheme Programming Language" by Dybvig > > http://www.scheme.com/tspl2d/ > > > Peter Seibel's Practical Common Lisp > > http://www.gigamonkeys.com/book/ > > > I think you're right about "Scheme is a 'dialect' of Lisp...and S7 is an > extension of Scheme." but I'll let an expert confirm or correct. > > Yes, there's an (nth x y) function in Scheme. I banged my head on this one > too?It's backwards from what we remember: > > (nth listname index) instead of (nth index listname) > > > Cheers to middle aged dogs re-learning old tricks! > > > > > On Sun, Feb 21, 2016 at 1:00 PM, wrote: >> >> Send Cmdist mailing list submissions to >> cmdist at ccrma.stanford.edu >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://cm-mail.stanford.edu/mailman/listinfo/cmdist >> or, via email, send a message with subject or body 'help' to >> cmdist-request at ccrma.stanford.edu >> >> You can reach the person managing the list at >> cmdist-owner at ccrma.stanford.edu >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Cmdist digest..." >> >> >> Today's Topics: >> >> 1. Community of Grace/CM users? (Ben McAllister) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Sun, 21 Feb 2016 10:48:13 -0800 >> From: Ben McAllister >> To: cm list >> Subject: [CM] Community of Grace/CM users? >> Message-ID: >> >> >> Content-Type: text/plain; charset=UTF-8 >> >> Hi All, >> >> I studied Computer Music with Richard Karpen in the 90s at University >> of Washington, where CM 1.4 and Csound were the tools of the day. I've >> been having a blast these past few weeks re-writing my CM 1.x pieces >> in Grace / CM3! Really great job on Grace - thanks so much for the >> documentation and examples in Grace. I found the tutorials and >> examples very easy to follow. I'd like to find a way to contribute >> more examples as I work through resuscitating my old work :) >> >> I build software for a living, but haven't used Lisp for anything >> except music. It would be helpful for me to have a better view of >> where Common Music sits alongside Lisp, Scheme, and S7. If I >> understand correctly, Scheme is a 'dialect' of Lisp with a rich >> community of users, and S7 is an extension of Scheme. Have I got that >> right? >> >> So, specifically to Grace, does this mean any Scheme code should run >> from a Grace editor window? >> >> As I refresh my memory on how to do relatively simple things in >> Scheme, I'm not sure if they're intended to be supported in Scheme. To >> take one random example, I assume I can consult the latest Scheme docs >> online to figure out whether or not there's an (nth x y) function in >> Scheme like there is in CL - there isn't, but it's straightforward to >> code up: >> >> (define (nth n l) >> (if (or (> n (length l)) (< n 0)) >> (error "Index out of bounds.") >> (if (eq? n 0) >> (car l) >> (nth (- n 1) (cdr l))))) >> >> >> Lastly, besides maybe Stack Overflow, it doesn't look like there is a >> place online where users can convene and share experiences and code >> except this mailing list. True? >> >> Thanks for reading and once again, great work! >> -- >> Ben McAllister | listenfaster.com | @listenfaster >> >> >> ------------------------------ >> >> _______________________________________________ >> Cmdist mailing list >> Cmdist at ccrma.stanford.edu >> https://cm-mail.stanford.edu/mailman/listinfo/cmdist >> >> >> End of Cmdist Digest, Vol 94, Issue 8 >> ************************************* >> > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > -- Ben McAllister | listenfaster.com | @listenfaster | tuktuband.com | c: 206.849.3183 From benmca at gmail.com Sun Mar 6 16:48:33 2016 From: benmca at gmail.com (Ben McAllister) Date: Sun, 6 Mar 2016 16:48:33 -0800 Subject: [CM] sprout + csound question In-Reply-To: References: Message-ID: TO answer my own question, I wasn't clear on my sprout syntax. This bit does the trick: (sprout (list (remix 10 90) (remix 10 90) ) "remix.sco" :play #t :orchestra "sndwarp.orc" :header "f1 0 262144 1 \"jam.aif\" 0 0 0\nf2 0 16384 9 .5 1 0 \n" ) On Mon, Feb 22, 2016 at 11:23 PM, Ben McAllister wrote: > I have a process which works fine when I sprout a single time like so: > > (define (remix len tem) > (process repeat len > ... > )) > > (sprout (remix 20 180) "remix.sco" :play #t :orchestra "sndwarp.orc" > :header "my header string") > > Is there a way to sprout multiple processes to be played back in > csound - something like: > > (sprout > (list > (remix 10 180) > (remix 10 90) > )) > > or > > (sprout > (list > (remix 10 90) "remix.sco" :play #t :orchestra "sndwarp.orc" :header > "f1 0 262144 1 \"jam.aif\" 0 0 0\nf2 0 16384 9 .5 1 0 > \n" > (remix 10 90) "remix.sco" :play #t :orchestra "sndwarp.orc" :header > "f1 0 262144 1 \"jam.aif\" 0 0 0\nf2 0 16384 9 .5 1 0 > \n" > )) > > ? > > I'm on Mac OS 10.11, I see my csound orc and header correctly > initialized in the Audio Settings dialog, and I'm getting csound audio > just fine when calling sprout with a single process - just unsure if > this is supported syntax for sprout. > > Thanks in advance! > b -- Ben McAllister | listenfaster.com | @listenfaster | tuktuband.com | c: 206.849.3183 From benmca at gmail.com Sun Mar 6 17:02:08 2016 From: benmca at gmail.com (Ben McAllister) Date: Sun, 6 Mar 2016 17:02:08 -0800 Subject: [CM] :time (now) wait rate In-Reply-To: <5B54726B-6B13-4F7A-B928-6E3A6DE34E5A@presby.edu> References: <5B54726B-6B13-4F7A-B928-6E3A6DE34E5A@presby.edu> Message-ID: Looks like you're missing some parens around your call to wait - this does the trick for me: (define (riff knum rhy) ;;generate an upward strum of notes (let ((rate (rhythm->seconds (/ rhy 4) 60))) (process repeat 5 for k from (+ 39 (mod knum 13)) by 13 do (mp:midi :key k :dur rate :amp .3 :chan 0) (wait rate)) )) On Thu, Mar 3, 2016 at 10:10 AM, Rob Howiler wrote: > Hi > Thanks in advance for helping me with my questions. I know I am becoming a bore with these newbie questions?. > > Anytime I try to use :time (now) in a :mp:midi statement (or perhaps it?s the ?rate? part), I get all sound at once when it should sound sequentially. I?m defining a couple of helper apps (as per Notes from the Metalevel which I understand is outdated in some ways, language-wise. > > (define (bpm->seconds bpm) > (/ 60.0 bpm)) > > (define (rhythm->seconds rhy tempo) > (* rhy 4.0 (bpm->seconds tempo))) > > (define (riff knum rhy) > ;;generate an upward strum of notes > (let ((rate (rhythm->seconds (/ rhy 4) 60))) > (process repeat 5 > for k from (+ 39 (mod knum 13)) by 13 > do > (mp:midi :key k :amp .3 :chan 0) > wait rate))) > (sprout (riff 48 0.5)) > > ?.gives all sound as a chord. > > using (riff 48 0.5) just gives # in the listener window (the number increases sequentially each time I try to evaluate the (riff 48 0.5) expression). > > Also, if I use > (define (riff knum rhy) > ;;generate an upward strum of notes > (let ((rate (rhythm->seconds (/ rhy 4) 60))) > (process repeat 5 > for k from (+ 39 (mod knum 13)) by 13 > do > (mp:midi :key k :time (now) :amp .3 :chan 0) > wait rate))) > (riff 48 0.5) - or (sprout (riff 48 0.5)) > give me no sound with # in the listener window. The :time (now) is the only thing that?s different. > > Thanks again for your help and patience. > Rob > > ------------------------------------------------------ > Dr. Rob Howiler > Academic Computing Services Coordinator > Assistant Professor of Music > rhowiler at presby.edu > (864) 833-8324 > ------------------------------------------------------ > > > -- > > ------------------------------ > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist -- Ben McAllister | listenfaster.com | @listenfaster | tuktuband.com | c: 206.849.3183 From rhowiler at presby.edu Mon Mar 7 05:12:09 2016 From: rhowiler at presby.edu (Rob Howiler) Date: Mon, 7 Mar 2016 08:12:09 -0500 Subject: [CM] :time (now) wait rate In-Reply-To: References: <5B54726B-6B13-4F7A-B928-6E3A6DE34E5A@presby.edu> Message-ID: Hi Ben - Thanks for the heads up. Johannes helped me figure out that I needed to call ?wait? as a function. It?s kinda tricky using the Metalevel book with all the changes to the language since it was written, but I?m getting there. I appreciate everyone?s help & everyone?s patience. > On Mar 6, 2016, at 8:02 PM, Ben McAllister wrote: > > Looks like you're missing some parens around your call to wait - this > does the trick for me: > > (define (riff knum rhy) > ;;generate an upward strum of notes > (let ((rate (rhythm->seconds (/ rhy 4) 60))) > (process repeat 5 > for k from (+ 39 (mod knum 13)) by 13 > do > (mp:midi :key k :dur rate :amp .3 :chan 0) > (wait rate)) > )) > > On Thu, Mar 3, 2016 at 10:10 AM, Rob Howiler wrote: >> Hi >> Thanks in advance for helping me with my questions. I know I am becoming a bore with these newbie questions?. >> >> Anytime I try to use :time (now) in a :mp:midi statement (or perhaps it?s the ?rate? part), I get all sound at once when it should sound sequentially. I?m defining a couple of helper apps (as per Notes from the Metalevel which I understand is outdated in some ways, language-wise. >> >> (define (bpm->seconds bpm) >> (/ 60.0 bpm)) >> >> (define (rhythm->seconds rhy tempo) >> (* rhy 4.0 (bpm->seconds tempo))) >> >> (define (riff knum rhy) >> ;;generate an upward strum of notes >> (let ((rate (rhythm->seconds (/ rhy 4) 60))) >> (process repeat 5 >> for k from (+ 39 (mod knum 13)) by 13 >> do >> (mp:midi :key k :amp .3 :chan 0) >> wait rate))) >> (sprout (riff 48 0.5)) >> >> ?.gives all sound as a chord. >> >> using (riff 48 0.5) just gives # in the listener window (the number increases sequentially each time I try to evaluate the (riff 48 0.5) expression). >> >> Also, if I use >> (define (riff knum rhy) >> ;;generate an upward strum of notes >> (let ((rate (rhythm->seconds (/ rhy 4) 60))) >> (process repeat 5 >> for k from (+ 39 (mod knum 13)) by 13 >> do >> (mp:midi :key k :time (now) :amp .3 :chan 0) >> wait rate))) >> (riff 48 0.5) - or (sprout (riff 48 0.5)) >> give me no sound with # in the listener window. The :time (now) is the only thing that?s different. >> >> Thanks again for your help and patience. >> Rob >> >> ------------------------------------------------------ >> Dr. Rob Howiler >> Academic Computing Services Coordinator >> Assistant Professor of Music >> rhowiler at presby.edu >> (864) 833-8324 >> ------------------------------------------------------ >> >> >> -- >> >> ------------------------------ >> >> >> _______________________________________________ >> Cmdist mailing list >> Cmdist at ccrma.stanford.edu >> https://cm-mail.stanford.edu/mailman/listinfo/cmdist > > > > -- > Ben McAllister | listenfaster.com | @listenfaster | tuktuband.com | > c: 206.849.3183 ------------------------------------------------------ Dr. Rob Howiler Academic Computing Services Coordinator Assistant Professor of Music rhowiler at presby.edu (864) 833-8324 ------------------------------------------------------- -- ------------------------------ From taube at illinois.edu Mon Mar 7 05:41:25 2016 From: taube at illinois.edu (Taube, Heinrich K) Date: Mon, 7 Mar 2016 13:41:25 +0000 Subject: [CM] :time (now) wait rate In-Reply-To: References: <5B54726B-6B13-4F7A-B928-6E3A6DE34E5A@presby.edu> Message-ID: <31910F5E-F86A-4AF2-8281-E89554579AF8@illinois.edu> If you would note the changes I would be happy this summer to provide an (unpublshed) update of the code. I simply dont have the time these days to spend with CM, I hope to have a new release in the fall but at this point I can?t even be certain Ill have time for that! > On Mar 7, 2016, at 7:12 AM, Rob Howiler wrote: > > Hi Ben - Thanks for the heads up. Johannes helped me figure out that I needed to call ?wait? as a function. It?s kinda tricky using the Metalevel book with all the changes to the language since it was written, but I?m getting there. I appreciate everyone?s help & everyone?s patience. >> On Mar 6, 2016, at 8:02 PM, Ben McAllister wrote: >> >> Looks like you're missing some parens around your call to wait - this >> does the trick for me: >> >> (define (riff knum rhy) >> ;;generate an upward strum of notes >> (let ((rate (rhythm->seconds (/ rhy 4) 60))) >> (process repeat 5 >> for k from (+ 39 (mod knum 13)) by 13 >> do >> (mp:midi :key k :dur rate :amp .3 :chan 0) >> (wait rate)) >> )) >> >> On Thu, Mar 3, 2016 at 10:10 AM, Rob Howiler wrote: >>> Hi >>> Thanks in advance for helping me with my questions. I know I am becoming a bore with these newbie questions?. >>> >>> Anytime I try to use :time (now) in a :mp:midi statement (or perhaps it?s the ?rate? part), I get all sound at once when it should sound sequentially. I?m defining a couple of helper apps (as per Notes from the Metalevel which I understand is outdated in some ways, language-wise. >>> >>> (define (bpm->seconds bpm) >>> (/ 60.0 bpm)) >>> >>> (define (rhythm->seconds rhy tempo) >>> (* rhy 4.0 (bpm->seconds tempo))) >>> >>> (define (riff knum rhy) >>> ;;generate an upward strum of notes >>> (let ((rate (rhythm->seconds (/ rhy 4) 60))) >>> (process repeat 5 >>> for k from (+ 39 (mod knum 13)) by 13 >>> do >>> (mp:midi :key k :amp .3 :chan 0) >>> wait rate))) >>> (sprout (riff 48 0.5)) >>> >>> ?.gives all sound as a chord. >>> >>> using (riff 48 0.5) just gives # in the listener window (the number increases sequentially each time I try to evaluate the (riff 48 0.5) expression). >>> >>> Also, if I use >>> (define (riff knum rhy) >>> ;;generate an upward strum of notes >>> (let ((rate (rhythm->seconds (/ rhy 4) 60))) >>> (process repeat 5 >>> for k from (+ 39 (mod knum 13)) by 13 >>> do >>> (mp:midi :key k :time (now) :amp .3 :chan 0) >>> wait rate))) >>> (riff 48 0.5) - or (sprout (riff 48 0.5)) >>> give me no sound with # in the listener window. The :time (now) is the only thing that?s different. >>> >>> Thanks again for your help and patience. >>> Rob >>> >>> ------------------------------------------------------ >>> Dr. Rob Howiler >>> Academic Computing Services Coordinator >>> Assistant Professor of Music >>> rhowiler at presby.edu >>> (864) 833-8324 >>> ------------------------------------------------------ >>> >>> >>> -- >>> >>> ------------------------------ >>> >>> >>> _______________________________________________ >>> Cmdist mailing list >>> Cmdist at ccrma.stanford.edu >>> https://cm-mail.stanford.edu/mailman/listinfo/cmdist >> >> >> >> -- >> Ben McAllister | listenfaster.com | @listenfaster | tuktuband.com | >> c: 206.849.3183 > > > ------------------------------------------------------ > Dr. Rob Howiler > Academic Computing Services Coordinator > Assistant Professor of Music > rhowiler at presby.edu > (864) 833-8324 > ------------------------------------------------------- > > > -- > > ------------------------------ > > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist From j_hearon at hotmail.com Fri Mar 11 09:52:34 2016 From: j_hearon at hotmail.com (James Hearon) Date: Fri, 11 Mar 2016 17:52:34 +0000 Subject: [CM] Snd inf-snd.el In-Reply-To: References: Message-ID: Hi, I finally got Snd working as an emacs subjob with help from Micahel Scholz. Some of it had to do with the way the .emacs file was being called, which meant the load-path variable was not being completed properly. It's neat to be able to load a .scm script, edit it, and hear and see the results in the Snd motif gui by controlling the code from emacs. I've tried reading all the Snd documentation to figure out how you might load a .scm file in the lisp listener, edit it in the lisp listener, and evaluate it in the lisp listener, but I haven't yet found how you would do something like the inf-snd.el snd-scheme-mode to bind the usual key commands for use within the Snd lisp listener without writing your own listener. I must be missing something important, someplace. Regards, Jim From bil at ccrma.Stanford.EDU Fri Mar 11 10:50:26 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Fri, 11 Mar 2016 10:50:26 -0800 Subject: [CM] Snd inf-snd.el In-Reply-To: References: Message-ID: I'm glad you got it working. If you or Mike have any instructions or clarifications about this that might help others, I'll include them in README.Snd. From benmca at gmail.com Wed Mar 16 21:28:53 2016 From: benmca at gmail.com (Ben McAllister) Date: Wed, 16 Mar 2016 21:28:53 -0700 Subject: [CM] Csound sprout question Message-ID: Hi all, I'm stuck with a problem trying to sprout process with Csound. I'm trying to do something more complex with a piece I'm working on, but managed to boil down the problem I'm having by using the Csound Scheme example. If you take a look at that example, you'll see a function called ransco: (define (ransco len rhy lb ub amp) (let ((dur (* rhy 2))) (process repeat len for t = (elapsed #t) ; get true score time for k = lb then (between lb ub) do (cs:i 1 t dur k amp) (wait rhy)))) A bit further down in the example, there's some instruction on sprout this bit multiple time, using :write #f to 'collect' the events generated into one score: ; This will generate a score without writing an audio file. execute ; the expression several times and use the Audio>Csound>Export... item ; to export all the score data in various formats (sprout (ransco 10 .2 60 72 1000) "test.sco" :write #f) I was assuming I'd be able to do this same thing from a process, but I'm getting an error that Grace is unable to get a file handle to "test.sco". Here's the function: (define (f1) (process repeat 3 do (sprout (ransco 10 .2 60 72 1000) "test.sco" :write #f) (wait 1))) ...and I try to execute it like so: (sprout (f1)) Is this one of those 'not yet implemented' features, or am I missing something? Any help is very much appreciated - thanks! Complete listing below: ;------------------------------------------------ ; ;; Csound output ; ; To evaluate code put the cursor after each expression and press ; Command-Return, then check the console window for any output. ; A process that sends csound data (define (ransco len rhy lb ub amp) (let ((dur (* rhy 2))) (process repeat len for t = (elapsed #t) ; get true score time for k = lb then (between lb ub) do (cs:i 1 t dur k amp) (wait rhy)))) ; Write a score file (sprout (ransco 10 .2 60 72 1000) "test.sco") ; Options for csound scorefiles are: ; play: if #t call csound after writing file ; header: header string for scorefile ; orchestra: path to .orc file ; write: if #t write the scorefile (default #t) ; These options are all 'sticky' and except for write: are saved in ; your preferences file. ; This next command will call csound after generating the ; file. Before executing it copy the simp.orc code below into your ; home directory and use Audio>Csound>Settings... to assign your ; Csound app. (sprout (ransco 10 .2 60 72 1000) "test.sco" :play #t :orchestra "simp.orc") ; This will generate a score without writing an audio file. execute ; the expression several times and use the Audio>Csound>Export... item ; to export all the score data in various formats (sprout (ransco 10 .2 60 72 1000) "test.sco" :write #f) (define (f1) (process repeat 3 do (sprout (ransco 10 .2 60 72 1000) "test.sco" :write #f) (wait 1))) (sprout (f1)) Ben From daniel.lopez999 at gmail.com Wed Mar 16 21:42:52 2016 From: daniel.lopez999 at gmail.com (Daniel Lopez) Date: Thu, 17 Mar 2016 04:42:52 +0000 Subject: [CM] Snd: getting a prompt on stdout Message-ID: <56EA35CC.7080809@gmail.com> Hi, Is there a way to get a ready prompt on the stdin/stdout interface? The (set! (listener-prompt) ...) customization only seems to affect the prompt in the listener, inside the actual graphical window. At the console though, while I can indeed enter things and see the results printed back out, the cursor always finally goes back to the start of a new line. I'm trying to improve the Emacs mode and it would help to see a prompt for the next command to be able to detect the end of multi-line output. (I'm using the Gtk version. I guess this might work with the no GUI version but I would like to have the GUI around at the same time to visualize waves etc.) (I briefly wondered about using maybe: (hook-push read-hook (lambda (hook) (snd-print '>))) to manually print the arrow after each command, but then that doesn't seem to be working to print anything extra out in either the listener or console, and I suspect it wouldn't be quite right in other ways, even if it did.) Thanks, Daniel From bil at ccrma.Stanford.EDU Thu Mar 17 04:47:10 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Thu, 17 Mar 2016 04:47:10 -0700 Subject: [CM] Snd: getting a prompt on stdout In-Reply-To: <56EA35CC.7080809@gmail.com> References: <56EA35CC.7080809@gmail.com> Message-ID: <25c8a87f1400179934e5ba6fa5eb088e@ccrma.stanford.edu> That output goes through string_to_stdout in snd-xen.c, I think (it's watched for via g_io_channel_unix_get_fd in snd-gmain.c). Snd used to have a print-hook for stuff like this, but it didn't get used for years, so I removed it. I could add a hook to string_to_stdout to add a prompt, if you like. I think you could change string_to_stdout to fprintf(stdout, "%s\n> ", msg); or something like that to get a prompt, but I haven't tried it. From daniel.lopez999 at gmail.com Thu Mar 17 17:35:18 2016 From: daniel.lopez999 at gmail.com (Daniel Lopez) Date: Fri, 18 Mar 2016 00:35:18 +0000 Subject: [CM] Snd: getting a prompt on stdout In-Reply-To: <25c8a87f1400179934e5ba6fa5eb088e@ccrma.stanford.edu> References: <56EA35CC.7080809@gmail.com> <25c8a87f1400179934e5ba6fa5eb088e@ccrma.stanford.edu> Message-ID: <56EB4D46.2090308@gmail.com> On 17/03/16 11:47, bil at ccrma.Stanford.EDU wrote: > That output goes through string_to_stdout in > snd-xen.c, I think (it's watched for via > g_io_channel_unix_get_fd in snd-gmain.c). > Snd used to have a print-hook for stuff like > this, but it didn't get used for years, so > I removed it. I could add a hook to > string_to_stdout to add a prompt, if you like. > I think you could change string_to_stdout > to > > fprintf(stdout, "%s\n> ", msg); > > or something like that to get a prompt, > but I haven't tried it. > > > Thanks Bill - I got the desired effect by editing snd_eval_stdin_str: void snd_eval_stdin_str(const char *buf) { /* we may get incomplete expressions here */ /* (Ilisp always sends a complete expression, but it may be broken into two or more pieces from read's point of view) */ char *str = NULL; if (mus_strlen(buf) == 0) return; str = stdin_check_for_full_expression(buf); if (str) { Xen result; int loc; redirect_everything_to(string_to_stdout, NULL); result = snd_catch_any(eval_str_wrapper, (void *)str, str); redirect_everything_to(NULL, NULL); loc = snd_protect(result); stdin_free_str(); str = gl_print(result); string_to_stdout(str, NULL); /***** DANIEL: Next two lines added *****/ fprintf(stdout, ">>> "); fflush(stdout); if (str) free(str); snd_unprotect_at(loc); } } Putting it here makes the new prompt appear only once, after the result and after any errors/warnings/snd-print statements that got printed out via the redirect_everything_to/snd_catch_any calls. The fflush() was necessary otherwise the new prompt it doesn't appear until after the next console read (that confused me for a while, I can tell you). Also, to make the prompt appear once at program start, I added the same two lines (fprintf and fflush) to g_xen_initialize(), right after where it calls g_init_listener(). I suppose a more uniform solution would be to make a new 'g_init_stdin()' function consisting of the new lines and call that instead. I was going to make a patch file of these changes to proudly present to you but there are some other things to round out which I don't quite have the tenacity to fully do right now - when starting up with -nostdin, my hacked-in prompt spills onto stdout twice (once from g_xen_initialize() and once from snd_eval_stdin_str() being called once for some reason). And, it would also make sense if there was a built-in 'stdin-prompt' variable, similar to 'listener-prompt', for customizing this. It would default to an empty string, not to disrupt the existing default behaviour. I attempted this but my naive copy-pasting didn't quite take me 100% of the way there, and to be honest my Scheme aptitude is still a bit weak for this kind of thing. I might have another go at a later date, unless you reckon these are jolly good ideas and get in there first! Daniel From bil at ccrma.Stanford.EDU Fri Mar 18 06:11:58 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Fri, 18 Mar 2016 06:11:58 -0700 Subject: [CM] Snd: getting a prompt on stdout In-Reply-To: <56EB4D46.2090308@gmail.com> References: <56EA35CC.7080809@gmail.com> <25c8a87f1400179934e5ba6fa5eb088e@ccrma.stanford.edu> <56EB4D46.2090308@gmail.com> Message-ID: <5aa5635dcd28dc9cdca6669f46dd968b@ccrma.stanford.edu> I added stdin-prompt to Snd, and tried it out briefly in the gtk version: /home/bil/cl/ ./snd (+ 1 2) 3 (set! (stdin-prompt) ">>>") ">>>" >>> (+ 1 2) 3 >>> (exit) I haven't yet tried it in emacs -- please let me know of any problems. (The sourceforge cvs version may be messed up -- I'm getting "transport endpoint" errors which I'll need to track down). From k.s.matheussen at gmail.com Fri Mar 18 06:34:08 2016 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Fri, 18 Mar 2016 14:34:08 +0100 Subject: [CM] Snd: getting a prompt on stdout In-Reply-To: <5aa5635dcd28dc9cdca6669f46dd968b@ccrma.stanford.edu> References: <56EA35CC.7080809@gmail.com> <25c8a87f1400179934e5ba6fa5eb088e@ccrma.stanford.edu> <56EB4D46.2090308@gmail.com> <5aa5635dcd28dc9cdca6669f46dd968b@ccrma.stanford.edu> Message-ID: I think it would be a good idea to add "s7webserver", which is found in s7, to snd. (or something similar) Using s7webserver, you have two programs, snd and, s7repl. These two programs communicate via web sockets. It has the following advantages when using a(n) snd repl: * You don't have to start snd inside emacs, and you don't have to restart the repl when you restart snd. You can start and stop the repl at any time, and you can start and stop snd at any time. * Simple to set prompt * You can control snd from another machine or from a web browser. In the s7webserver directory there is also a javascript program (in addition to the repl program), which is started by loading "s7webserver_repl.html" in a web browser, and then you have a(n) snd repl in a web browser. Radium has used s7webserver for a long time like this, so it should be stable. I just made a couple of quick changes to snd to support this: http://folk.uio.no/~ksvalast/xen.c.diff http://folk.uio.no/ksvalast/makefile.diff Recipe (untested): cd snd ./configure wget http://folk.uio.no/~ksvalast/xen.c.diff wget http://folk.uio.no/ksvalast/makefile.diff patch -p1 make cd .. make -j8 On Fri, Mar 18, 2016 at 2:11 PM, wrote: > I added stdin-prompt to Snd, and tried it out briefly in the gtk version: > > /home/bil/cl/ ./snd > (+ 1 2) > 3 > (set! (stdin-prompt) ">>>") > ">>>" > >> (+ 1 2) >>>> >>> 3 > >> (exit) >>>> >>> > I haven't yet tried it in emacs -- please let me know > of any problems. > > > (The sourceforge cvs version may be messed up -- > I'm getting "transport endpoint" errors which I'll > need to track down). > > > _______________________________________________ > 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 k.s.matheussen at gmail.com Fri Mar 18 07:09:22 2016 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Fri, 18 Mar 2016 15:09:22 +0100 Subject: [CM] Snd: getting a prompt on stdout In-Reply-To: References: <56EA35CC.7080809@gmail.com> <25c8a87f1400179934e5ba6fa5eb088e@ccrma.stanford.edu> <56EB4D46.2090308@gmail.com> <5aa5635dcd28dc9cdca6669f46dd968b@ccrma.stanford.edu> Message-ID: On Fri, Mar 18, 2016 at 2:34 PM, Kjetil Matheussen wrote: > I just made a couple of quick changes to snd to support this: > http://folk.uio.no/~ksvalast/xen.c.diff > http://folk.uio.no/ksvalast/makefile.diff > > Recipe (untested): > > cd snd > ./configure > wget http://folk.uio.no/~ksvalast/xen.c.diff > wget http://folk.uio.no/ksvalast/makefile.diff > patch -p1 patch -p1 cp -a ../s7/s7webserver . > cd s7webserver > > make > cd .. > make -j8 > > Forgot one modified file: wget http://folk.uio.no/ksvalast/s7webserver.cpp.diff cd s7webserver patch -p1 From bil at ccrma.Stanford.EDU Fri Mar 18 09:42:51 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Fri, 18 Mar 2016 09:42:51 -0700 Subject: [CM] Snd: getting a prompt on stdout In-Reply-To: References: <56EA35CC.7080809@gmail.com> <25c8a87f1400179934e5ba6fa5eb088e@ccrma.stanford.edu> <56EB4D46.2090308@gmail.com> <5aa5635dcd28dc9cdca6669f46dd968b@ccrma.stanford.edu> Message-ID: I'll add the s7webserver directory to Snd. I'm still stuck at sourceforge, so this may take a day or two (the docs say if the cvs unlock command fails, "wait and try again later"...) From k.s.matheussen at gmail.com Fri Mar 18 10:16:45 2016 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Fri, 18 Mar 2016 18:16:45 +0100 Subject: [CM] Snd: getting a prompt on stdout In-Reply-To: References: <56EA35CC.7080809@gmail.com> <25c8a87f1400179934e5ba6fa5eb088e@ccrma.stanford.edu> <56EB4D46.2090308@gmail.com> <5aa5635dcd28dc9cdca6669f46dd968b@ccrma.stanford.edu> Message-ID: Great. The code I posted will only work with gtk though. In non-glib programs I think one has to call QCoreApplication::processEvents() at regular intervals for it to work. (At least I think it is enough to call processEvents(), I haven't tried) On Fri, Mar 18, 2016 at 5:42 PM, wrote: > I'll add the s7webserver directory to Snd. > I'm still stuck at sourceforge, so this may > take a day or two (the docs say if the cvs unlock > command fails, "wait and try again later"...) > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel.lopez999 at gmail.com Fri Mar 18 17:34:38 2016 From: daniel.lopez999 at gmail.com (Daniel Lopez) Date: Sat, 19 Mar 2016 00:34:38 +0000 Subject: [CM] Snd: getting a prompt on stdout In-Reply-To: <5aa5635dcd28dc9cdca6669f46dd968b@ccrma.stanford.edu> References: <56EA35CC.7080809@gmail.com> <25c8a87f1400179934e5ba6fa5eb088e@ccrma.stanford.edu> <56EB4D46.2090308@gmail.com> <5aa5635dcd28dc9cdca6669f46dd968b@ccrma.stanford.edu> Message-ID: <56EC9E9E.1060305@gmail.com> On 18/03/16 13:11, bil at ccrma.Stanford.EDU wrote: > I added stdin-prompt to Snd, and tried it out briefly in the gtk version: > > /home/bil/cl/ ./snd > (+ 1 2) > 3 > (set! (stdin-prompt) ">>>") > ">>>" >>>> (+ 1 2) > 3 >>>> (exit) > > I haven't yet tried it in emacs -- please let me know > of any problems. > > > (The sourceforge cvs version may be messed up -- > I'm getting "transport endpoint" errors which I'll > need to track down). > > > Works great. Thanks very much, also for doing it so fast! Daniel From daniel.lopez999 at gmail.com Sun Mar 27 19:55:30 2016 From: daniel.lopez999 at gmail.com (Daniel Lopez) Date: Mon, 28 Mar 2016 03:55:30 +0100 Subject: [CM] Snd: imprecision when playing selections Message-ID: <56F89D22.10107@gmail.com> Hi, I'm finding that when playing a selection, Snd usually doesn't stop (or loop) exactly at the end of the selection, but goes further up to a number of samples that is a multiple of the audio backend's buffer size. For example, I've been using ALSA and my mus-alsa-buffer-size is 1024. If I have a drum loop loaded in and put the selection end just before a clearly visible attack in the waveform, then experiment with moving the selection start back and forth and playing the sound with the arrowhead at the bottom-left, sometimes I will hear a bit of that attack at the end even though it's outside the selection - and more of it if the size of the whole selection is just a little over a 1024 length boundary. If the end of the sound is reached while the playback is overshooting to fill its buffer, zeroes are played instead. To test this - hear how this plays a smooth loop of 8*1024 buffers of white noise: (with-sound () (let ((r (make-rand 44100))) (do ((i 0 (+ i 1))) ((= i 16383)) ; use your own mus-alsa-buffer-size * 8 - 1 (outa i (rand r))))) (play-region-forever (select-all)) But if you increase the number in there by 1 to 16384, there's a big audible gap in the loop. I can reduce my ALSA buffer size to some extent by configuration, but it's never going to get down to 1 and I reckon Snd should be streaming the samples to ALSA in such a way that it's always exact. Tweaking the ALSA buffer size is normally only supposed to be about finding out a trade off between latency and choppiness depending on the speed of your computer (right?). I tried it with OSS also (well, still ALSA actually but using the OSS wrapper) and still have the same type of problem (except here my default buffer size is 16384 so it's a lot worse). I was looking into the source code and to my dismay it seems like this might be caused by the core of the sound playback code in snd-dac.c rather than any one backend in audio.c. I hope I'm missing something, because I imagine it might be quite an upheaval to fix this otherwise. Please (if you can) say it ain't so! Daniel From bil at ccrma.Stanford.EDU Mon Mar 28 05:25:31 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 28 Mar 2016 05:25:31 -0700 Subject: [CM] Snd 16.4 Message-ID: Snd 16.4: added stdin-prompt added s7/s7webserver directory to Snd checked: gtk 3.19.10|11, gtk 3.20.0|1, sbcl 1.3.3 Thanks!: Kjetil Matheussen, Mike Scholz, James Hearon, Arthur Green, pbatch, Daniel Lopez, Greg Santucci. From bil at ccrma.Stanford.EDU Mon Mar 28 10:33:54 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 28 Mar 2016 10:33:54 -0700 Subject: [CM] Snd: imprecision when playing selections In-Reply-To: <56F89D22.10107@gmail.com> References: <56F89D22.10107@gmail.com> Message-ID: <224eae3663d58f26fd4d0dab51b51149@ccrma.stanford.edu> I think all you need is a dac_loop_sample where it now calls dac_read_sample (to get the next input sample), and slightly smarter handling of the actual loop. I'll add it to my TODO list. (Grumble -- I think of Snd as an editor -- aren't there programs dedicated to looping?) From daniel.lopez999 at gmail.com Mon Mar 28 12:28:27 2016 From: daniel.lopez999 at gmail.com (Daniel Lopez) Date: Mon, 28 Mar 2016 20:28:27 +0100 Subject: [CM] Snd: imprecision when playing selections In-Reply-To: <224eae3663d58f26fd4d0dab51b51149@ccrma.stanford.edu> References: <56F89D22.10107@gmail.com> <224eae3663d58f26fd4d0dab51b51149@ccrma.stanford.edu> Message-ID: <56F985DB.7090001@gmail.com> On 28/03/16 18:33, bil at ccrma.Stanford.EDU wrote: > I think all you need is a dac_loop_sample where > it now calls dac_read_sample (to get the next input > sample), and slightly smarter handling of the > actual loop. I'll add it to my TODO list. > (Grumble -- I think of Snd as an editor -- > aren't there programs dedicated to looping?) > > > > I'd be surprised if no-one had run into this before, it seems like the kind of thing that might crop up in a number of use cases. I actually noticed it while following along with the "How to paint a bird song" part of the manual (the whole of the animals.scm file is awesome, by the way), trying to select a section of the "steady state" of the tweet to do a frequency analysis on, and I got confused when what looked steady didn't sound steady and consequently I wasn't sure whether to trust the output of the FFT. Thanks for considering it for a future version, though. Daniel From bil at ccrma.Stanford.EDU Mon Mar 28 14:28:24 2016 From: bil at ccrma.Stanford.EDU (bil at ccrma.Stanford.EDU) Date: Mon, 28 Mar 2016 14:28:24 -0700 Subject: [CM] Snd: imprecision when playing selections In-Reply-To: <56F985DB.7090001@gmail.com> References: <56F89D22.10107@gmail.com> <224eae3663d58f26fd4d0dab51b51149@ccrma.stanford.edu> <56F985DB.7090001@gmail.com> Message-ID: > "How to paint a bird song" hey, no fair! Now you know how to bump something to the top of my TODO list. From andersvi at notam02.no Tue Mar 29 01:16:39 2016 From: andersvi at notam02.no (andersvi at notam02.no) Date: Tue, 29 Mar 2016 10:16:39 +0200 Subject: [CM] cm2/cm.asd -> ASDF-3 ? Message-ID: <877fglpul4.fsf@bek.no> In a thread some years ago about CM2's build-system - http://thread.gmane.org/gmane.lisp.ccrma.general/4120/focus=4148 - some woes about cm2/cm.asd lagging behind, not being compatible with ASDF-3 came across. Has anyone seen a ASDF-3 compatible cm2/cm.asd? -anders From tito.01beta at gmail.com Tue Mar 29 05:39:52 2016 From: tito.01beta at gmail.com (Tito Latini) Date: Tue, 29 Mar 2016 14:39:52 +0200 Subject: [CM] cm2/cm.asd -> ASDF-3 ? In-Reply-To: <877fglpul4.fsf@bek.no> References: <877fglpul4.fsf@bek.no> Message-ID: <20160329123952.GA1767@rhk.homenet.telecomitalia.it> On Tue, Mar 29, 2016 at 10:16:39AM +0200, anders wrote: > In a thread some years ago about CM2's build-system - > http://thread.gmane.org/gmane.lisp.ccrma.general/4120/focus=4148 - some > woes about cm2/cm.asd lagging behind, not being compatible with ASDF-3 > came across. > > Has anyone seen a ASDF-3 compatible cm2/cm.asd? Sometimes I use the attached simplified cm.asd (without "pm" and "rt" to work with my cl tool). -------------- next part -------------- ;;; ********************************************************************** ;;; Copyright (C) 2005 Heinrich Taube, ;;; ;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the Lisp Lesser Gnu Public License. ;;; See http://www.cliki.net/LLGPL for the text of this agreement. ;;; ********************************************************************** (in-package :cl-user) (defvar *cm-directory* (namestring (truename (make-pathname :name nil :type nil :defaults *load-truename*)))) #-(or allegro clisp cmu lispworks openmcl sbcl ecl) (error "Sorry, Common Music does not run in this Lisp.") (defpackage :common-music-system (:use :cl :asdf)) (in-package :common-music-system) (defun cm-directory (&rest subs) (namestring (make-pathname :name nil :type nil :directory (append (pathname-directory cl-user::*cm-directory*) subs) :defaults cl-user::*cm-directory*))) (defmethod perform :after ((op load-op) cm) ;; add cm feature before loading other systems... (pushnew :cm *features*) ;; load site init file if it exists (load (merge-pathnames "cminit.lisp" (cm-directory "etc")) :if-does-not-exist nil) ;; load user init file if it exists (load (merge-pathnames ".cminit.lisp" (user-homedir-pathname)) :if-does-not-exist nil)) ;;; ;;; system definition ;;; (defsystem :cm :description "Common Music" :version "2.12.0" :author "Rick Taube " :licence "LLGPL" :components ((:module "src" :serial t :components ((:file "pkg") (:file #+allegro "acl" #+clisp "clisp" #+cmu "cmu" #+ecl "ecl" #+lispworks "lispworks" #+(and mcl (not openmcl)) "mcl" #+openmcl "openmcl" #+sbcl "sbcl") (:file "iter") (:file "level1") (:file "clos") (:file "scheme") (:file "utils") (:file "mop") (:file "objects") (:file "data") (:file "scales") (:file "spectral") (:file "patterns") (:file "io") (:file "scheduler") (:file "gnuplot") (:file "plt") (:file "sco") (:file "clm") (:file "midi1") (:file "midi2") (:file "midi3") (:file "cmn") (:file "fomus") (:file "sc") (:file "pm") (:file "rt") (:file "parse"))))) ;;; ;;; main functions ;;; (in-package :cl-user) (defun use-system (sys &key directory bin-directory (verbose t) warnings symbols) (declare (ignore directory bin-directory warnings symbols)) (asdf:load-system sys :verbose verbose)) (defun cm (&rest systems) (flet ((cmcall (fn &rest args) (apply (find-symbol (string fn) :cm) args)) (cmvar (var) (symbol-value (find-symbol (string var) :cm)))) (setf *package* (find-package :cm)) (setf *readtable* (cmvar :*cm-readtable*)) ;; add slime readtable mapping... (let ((swank-pkg (find-package :swank))) (when swank-pkg (let ((sym (intern (symbol-name :*readtable-alist*) swank-pkg))) (setf (symbol-value sym) (cons (cons (symbol-name :cm) (cmvar :*cm-readtable*)) (symbol-value sym)))))) (let (#-sbcl (*trace-output* nil)) (dolist (s systems) (use-system s :verbose nil))) (cmcall :cm-logo))) (export '(cm use-system) :cl-user) From andersvi at notam02.no Tue Mar 29 06:32:42 2016 From: andersvi at notam02.no (andersvi at notam02.no) Date: Tue, 29 Mar 2016 15:32:42 +0200 Subject: [CM] cm2/cm.asd -> ASDF-3 ? References: <877fglpul4.fsf@bek.no> <20160329123952.GA1767@rhk.homenet.telecomitalia.it> Message-ID: <8737r9pfyd.fsf@bek.no> >>>>> "T" == Tito Latini writes: T> On Tue, Mar 29, 2016 at 10:16:39AM +0200, anders wrote: >> In a thread some years ago about CM2's build-system - >> http://thread.gmane.org/gmane.lisp.ccrma.general/4120/focus=4148 >> - some woes about cm2/cm.asd lagging behind, not being compatible >> with ASDF-3 came across. >> >> Has anyone seen a ASDF-3 compatible cm2/cm.asd? T> Sometimes I use the attached simplified cm.asd (without "pm" and T> "rt" to work with my cl tool). Thanks Tito. The aim is getting the scm->lisp conversion done transparently within this make system, something the current cm2/cm2.asd does fine if allowed to load the (old) src/asdf.lisp included in the sources, but this again clobbers any recent asdf-3 already in the heap. If nothing comes up i'll set up a simple load-cm.lisp for the basics, and check it with sbcl and lw. -anders From daniel.lopez999 at gmail.com Tue Mar 29 13:09:41 2016 From: daniel.lopez999 at gmail.com (Daniel Lopez) Date: Tue, 29 Mar 2016 21:09:41 +0100 Subject: [CM] Snd: imprecision when playing selections In-Reply-To: References: <56F89D22.10107@gmail.com> <224eae3663d58f26fd4d0dab51b51149@ccrma.stanford.edu> <56F985DB.7090001@gmail.com> Message-ID: <56FAE105.5020401@gmail.com> On 28/03/16 22:28, bil at ccrma.Stanford.EDU wrote: >> "How to paint a bird song" > > hey, no fair! Now you know how to bump something > to the top of my TODO list. > > Hee hee :) - I have an interest in synthesizing bird song since making a wacky musical 'instrument' (one small part of this: http://caveofsounds.com/) that makes bird sounds by throwing together some AM and FM, techniques I got at the time from Andy Farnell's website (https://web.archive.org/web/20150303020554/http://www.obiwannabe.co.uk/tutorials/html/tutorial_birds.html). Just now I was having another look through his book "Designing Sound" and he mentions Snd in it (and uses it for diagrams). I was shocked to find that this program has flown under my radar for so long - it's more or less the audio editor I've always wanted (as a long time Emacs user and lover of programmable tools). And that it comes with a goldmine of synthesis code and information - including those wonderfully realistic bird sounds - there's a lot for me to explore here. Daniel From juanig at ccrma.Stanford.EDU Tue Mar 29 13:26:42 2016 From: juanig at ccrma.Stanford.EDU (Juan Reyes) Date: Tue, 29 Mar 2016 13:26:42 -0700 Subject: [CM] cm2/cm.asd -> ASDF-3 ? In-Reply-To: <8737r9pfyd.fsf@bek.no> References: <877fglpul4.fsf@bek.no> <20160329123952.GA1767@rhk.homenet.telecomitalia.it> <8737r9pfyd.fsf@bek.no> Message-ID: <56FAE502.1050707@ccrma.stanford.edu> Hi Anders, Am I reading well between the lines or are your trying to get cm2 working again on a current sbcl?. I recall last year you guys did some experimenting on patterns.scm [1]. Is this still working?. I don't want to sound too optimistic but bringing back cm2 -even if only works with midinotes-, would really be a plus. -- Juan [1] https://www.mail-archive.com/cmdist at ccrma.stanford.edu/msg04537.html > > The aim is getting the scm->lisp conversion done transparently within > this make system, something the current cm2/cm2.asd does fine if allowed > to load the (old) src/asdf.lisp included in the sources, but this again > clobbers any recent asdf-3 already in the heap. > > If nothing comes up i'll set up a simple load-cm.lisp for the basics, > and check it with sbcl and lw. > > -anders From Torsten.Anders at beds.ac.uk Tue Mar 29 15:48:58 2016 From: Torsten.Anders at beds.ac.uk (Torsten Anders) Date: Tue, 29 Mar 2016 22:48:58 +0000 Subject: [CM] cm2/cm.asd -> ASDF-3 ? In-Reply-To: <20160329123952.GA1767@rhk.homenet.telecomitalia.it> References: <877fglpul4.fsf@bek.no> <20160329123952.GA1767@rhk.homenet.telecomitalia.it> Message-ID: <19F6C33E-1CFA-4842-A6DD-E915CF5AFFA7@beds.ac.uk> >> Has anyone seen a ASDF-3 compatible cm2/cm.asd? > Sometimes I use the attached simplified cm.asd (without "pm" and "rt" > to work with my cl tool). Thanks for sharing that. It would be nice to be able to combine Common Music and PWGL... Unfortunately, I immediately run into an error when loading this. An error occured: Symbol "LOAD-SYSTEM" not found at all in the ASDF package. Note that asdf:load-system is used in the function definition of use-system. I tried it using the LispWorks compiler that comes with PWGL, which seemingly includes ASDF version 1.130. The keyword :ASDF is part of *features*, but not :asdf2 nor :asdf3 (I used a tip at the following link to find out the exact version, https://common-lisp.net/project/asdf/asdf/How-do-I-detect-the-ASDF-version_003f.html#How-do-I-detect-the-ASDF-version_003f). Mika: The ASDF doc recommends > If it returns anything older than "3.0.1", you really need to upgrade your implementation or at least upgrade its ASDF Any plans to update at some stage? https://common-lisp.net/project/asdf/asdf/Replacing-your-implementation_0027s-ASDF.html#Replacing-your-implementation_0027s-ASDF Thanks! Best wishes, Torsten On 29 Mar 2016, at 13:39, Tito Latini wrote: > On Tue, Mar 29, 2016 at 10:16:39AM +0200, anders wrote: >> In a thread some years ago about CM2's build-system - >> http://thread.gmane.org/gmane.lisp.ccrma.general/4120/focus=4148 - some >> woes about cm2/cm.asd lagging behind, not being compatible with ASDF-3 >> came across. >> >> Has anyone seen a ASDF-3 compatible cm2/cm.asd? > > Sometimes I use the attached simplified cm.asd (without "pm" and "rt" > to work with my cl tool). > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist -------------- next part -------------- A non-text attachment was scrubbed... Name: cm.asd Type: application/octet-stream Size: 4101 bytes Desc: cm.asd URL: From andersvi at notam02.no Tue Mar 29 23:15:16 2016 From: andersvi at notam02.no (andersvi at notam02.no) Date: Wed, 30 Mar 2016 08:15:16 +0200 Subject: [CM] cm2/cm.asd -> ASDF-3 ? References: <877fglpul4.fsf@bek.no> <20160329123952.GA1767@rhk.homenet.telecomitalia.it> <8737r9pfyd.fsf@bek.no> <56FAE502.1050707@ccrma.stanford.edu> Message-ID: <87bn5wo5jf.fsf@bek.no> Hi Juan. J> Am I reading well between the lines or are your trying to get cm2 J> working again on a current sbcl?. I don't think it ever stopped working, did it? I've been using cm2 with sbcl (and recently with lw) 'always'. cm2.asd is just the 'makefile', the sources (compiled from .scm sources by calling (gencm) after loading pkg.lisp and stocl.lisp) compile and load great. J> I recall last year you guys did some experimenting on J> patterns.scm [1]. Is this still working?. Yes. It's in the snd tarball. Cheers, -anders From juanig at ccrma.Stanford.EDU Wed Mar 30 12:30:12 2016 From: juanig at ccrma.Stanford.EDU (Juan Reyes) Date: Wed, 30 Mar 2016 14:30:12 -0500 Subject: [CM] cm2/cm.asd -> ASDF-3 ? In-Reply-To: <87bn5wo5jf.fsf@bek.no> References: <877fglpul4.fsf@bek.no> <20160329123952.GA1767@rhk.homenet.telecomitalia.it> <8737r9pfyd.fsf@bek.no> <56FAE502.1050707@ccrma.stanford.edu> <87bn5wo5jf.fsf@bek.no> Message-ID: <56FC2944.8020707@ccrma.stanford.edu> Thanks Anders, > > I don't think it ever stopped working, did it? > Used to have a CM version, perhaps 2.3, working in tandem with CLM on SBCL. Couple of years ago I tried to get this setup again and didn't work. For a while I gave up in favor of Grace but as you guys are pointing out, Slime and Emacs interaction is much better, in addition to some goodies, mostly from legacy CM dictionary. Willing to give it a try using cm.asd. -- Juan From andersvi at notam02.no Wed Mar 30 14:15:06 2016 From: andersvi at notam02.no (andersvi at notam02.no) Date: Wed, 30 Mar 2016 23:15:06 +0200 Subject: [CM] cm2/cm.asd -> ASDF-3 ? References: <877fglpul4.fsf@bek.no> <20160329123952.GA1767@rhk.homenet.telecomitalia.it> <8737r9pfyd.fsf@bek.no> <56FAE502.1050707@ccrma.stanford.edu> <87bn5wo5jf.fsf@bek.no> <56FC2944.8020707@ccrma.stanford.edu> Message-ID: <87d1qbmzvp.fsf@bek.no> J> Couple of years ago I tried to get this setup again and didn't J> work. Just checked with a fresh checkout from svn, where these steps get things up and running: $ svn co svn://svn.code.sf.net/p/commonmusic/code/branches/cm2 $ cd cm2 $ mv cm.asd cm2.asd $ sbcl * (load "src/asdf.lisp") * (load "cm2.asd") * (use-system :cm2) * (cm::next (cm::new cm::heap :of '(does this work?)) t) (DOES WORK? THIS) I'll update the name of the current cm.asd file to reflect the name inside its call to defsystem. -anders From andersvi at notam02.no Thu Mar 31 06:19:51 2016 From: andersvi at notam02.no (andersvi at notam02.no) Date: Thu, 31 Mar 2016 15:19:51 +0200 Subject: [CM] cm2/cm.asd -> ASDF-3 ? References: <877fglpul4.fsf@bek.no> Message-ID: <87vb42lr7s.fsf@bek.no> Hi. I've updated cm2 on sourceforge with a new cm2.asd which is ASDF-3.1 compliant. This version is very much simpler inside then the previous one (for asdf-1?), and seems to be very much easier to maintain. To use: (load "cm2.asd") (asdf:load-system :cm2) This will compile and load cm2 sources, translating the necessary .scm files to .lisp along the way. Atm. all compiled sources (also the rewritten .lisp files) go inside the default asdf ~/.cache/common-lisp/implementation/** directory. Checked with SBCL (1.2.11) and LispWorks (7.0). Both have updated ASDF included. Support for other lisps is intentionally left out atm. If you need one, either include the relevant pre-existing *.lisp file (from src/) in cm2.asd, or drop me a line. -anders From juanig at ccrma.Stanford.EDU Thu Mar 31 10:30:36 2016 From: juanig at ccrma.Stanford.EDU (Juan Reyes) Date: Thu, 31 Mar 2016 12:30:36 -0500 Subject: [CM] cm2/cm.asd -> ASDF-3 ? In-Reply-To: <87d1qbmzvp.fsf@bek.no> References: <877fglpul4.fsf@bek.no> <20160329123952.GA1767@rhk.homenet.telecomitalia.it> <8737r9pfyd.fsf@bek.no> <56FAE502.1050707@ccrma.stanford.edu> <87bn5wo5jf.fsf@bek.no> <56FC2944.8020707@ccrma.stanford.edu> <87d1qbmzvp.fsf@bek.no> Message-ID: <56FD5EBC.2090705@ccrma.stanford.edu> Thanks again Anders!. Now I understand better what you guys were talking about in relation to ASDF and asd. But still not proficient enough to debug asdf. Followed your steps on getting cm2 from svn. BTW, cm2.asd was already there so I skipped the 'mv' step. Checked on cm2.asd and its time stamped as of today. On a Fedora 23, SBCL 1.2.15-1 and asdf-version 3.1.5, "src/asdf.lisp" loads with several warnings related to component functions in ASDF. "cm2.asd" doesn't load and complains about (in-package :asdf-user) ;; The name "ASDF-USER" does not designate any package. Perhaps there is something wrong in "src/asdf.lisp" from svn but not sure. -- Juan > Just checked with a fresh checkout from svn, where these steps get > things up and running: > > $ svn co svn://svn.code.sf.net/p/commonmusic/code/branches/cm2 > $ cd cm2 > $ mv cm.asd cm2.asd > $ sbcl > * (load "src/asdf.lisp") > * (load "cm2.asd") > * (use-system :cm2) > * (cm::next (cm::new cm::heap :of '(does this work?)) t) > (DOES WORK? THIS) From juanig at ccrma.Stanford.EDU Thu Mar 31 11:04:39 2016 From: juanig at ccrma.Stanford.EDU (Juan Reyes) Date: Thu, 31 Mar 2016 13:04:39 -0500 Subject: [CM] cm2/cm.asd -> ASDF-3 ? In-Reply-To: <87vb42lr7s.fsf@bek.no> References: <877fglpul4.fsf@bek.no> <87vb42lr7s.fsf@bek.no> Message-ID: <56FD66B7.5080603@ccrma.stanford.edu> Hi Anders, Got cm2 compiled with your new instructions out of svn!. Had to add (require :sb-posix) before loading "cm2.asd in order for sbcl to be happy. This with SBCL 1.2.15-1 and asdf-version 3.1.5. compiled sources are in: ~/.cache/common-lisp/sbcl-1.2.15-1.fc23-linux-x64/zap/cm2/src Thanks a lot for all your efforts!. -- Juan > > I've updated cm2 on sourceforge with a new cm2.asd which is ASDF-3.1 > compliant. This version is very much simpler inside then the previous > one (for asdf-1?), and seems to be very much easier to maintain. > > To use: > > (load "cm2.asd") > (asdf:load-system :cm2) > > This will compile and load cm2 sources, translating the necessary .scm > files to .lisp along the way. > > Atm. all compiled sources (also the rewritten .lisp files) go inside the > default asdf ~/.cache/common-lisp/implementation/** directory. > From Torsten.Anders at beds.ac.uk Thu Mar 31 18:54:45 2016 From: Torsten.Anders at beds.ac.uk (Torsten Anders) Date: Fri, 1 Apr 2016 01:54:45 +0000 Subject: [CM] Got Common Music 2 largely working inside PWGL -- thanks, Anders Vinjar! In-Reply-To: <87vb42lr7s.fsf@bek.no> References: <877fglpul4.fsf@bek.no> <87vb42lr7s.fsf@bek.no> Message-ID: Dear all, Anders, thanks a lot for all your efforts simplifying the load file of Common Music 2 (website for version 3: http://commonmusic.sourceforge.net/). After some minor further modifications I got CM working within the same Lisp image as PWGL. For example, I got the piano phase example running. What is most interesting from a PWGL perspective, however, is that all CM patters are available (though only for direct Lisp code hacking, no boxes, at least yet). It could be interesting to use these in other PWGL patches to generate musical data for whatever purpose. There are some minor hiccups. I did not play long with this setup, but ran into the following limitations. The Scheme macro define is not recognised, it has to be replaced with defun or setf. Also, relative paths for MIDI files do not work (they are somehow clashing with some PWGL path), but absolute paths work fine. If anyone else is interested, you can get Common Music 2 from SourceForge. $ svn co svn://svn.code.sf.net/p/commonmusic/code/branches/cm2 Replace the file cm2.asd in the top-level cm2 directory with the attached cm2.asd (Anders, I had to simplify a bit further). Then move that whole cm2 directory into your PWGL user library (e.g., into ~/PWGL-User/User-library/cm2). You are then ready to load this library and start using Common Music within PWGL. Attached is also a simple PWGL patch demonstrating simple CM functionality. You first need to load the Common Music library, before you can open this patch. Best wishes, Torsten -- Dr Torsten Anders Course Leader, Music Technology University of Bedfordshire Park Square, Room A315 http://www.torsten-anders.de On 31 Mar 2016, at 14:19, andersvi at notam02.no wrote: > Hi. > > I've updated cm2 on sourceforge with a new cm2.asd which is ASDF-3.1 > compliant. This version is very much simpler inside then the previous > one (for asdf-1?), and seems to be very much easier to maintain. > > To use: > > (load "cm2.asd") > (asdf:load-system :cm2) > > This will compile and load cm2 sources, translating the necessary .scm > files to .lisp along the way. > > Atm. all compiled sources (also the rewritten .lisp files) go inside the > default asdf ~/.cache/common-lisp/implementation/** directory. > > Checked with SBCL (1.2.11) and LispWorks (7.0). Both have updated ASDF > included. > > Support for other lisps is intentionally left out atm. If you need one, > either include the relevant pre-existing *.lisp file (from src/) in > cm2.asd, or drop me a line. > > -anders > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > https://cm-mail.stanford.edu/mailman/listinfo/cmdist > -------------- next part -------------- A non-text attachment was scrubbed... Name: cm2.asd Type: application/octet-stream Size: 5485 bytes Desc: cm2.asd URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cm2-test.pwgl Type: application/octet-stream Size: 6823 bytes Desc: cm2-test.pwgl URL: