From j_hearon at hotmail.com Wed Apr 16 11:34:37 2014 From: j_hearon at hotmail.com (James Hearon) Date: Wed, 16 Apr 2014 18:34:37 +0000 Subject: [CM] channels In-Reply-To: References: Message-ID: cm clm s7 Hi, I'm getting confused over :channels 2 for with-sound and stereo output. I was thinking to get stereo output I just needed to add the :channels 2 argument to with-sound if out-any is used in the instrument. Seems like I can only get one channel (one side) with :channels 2. If I use :channels 1 I get dual mono (two sides). If I try Fernando's move-osc with locsig the sound pans and I can see two channels using Snd as editor. But for examp2 below, I just get one channel. I'm wondering where I might be getting confused. Thanks, Jim (definstrument (move-osc beg dur freq amp (degree 0.0) (dist 1.0) (reverb 0.03)) (let* ((start (seconds->samples beg)) (end (seconds->samples (+ beg dur))) (car (make-oscil :frequency freq)) (loc (make-locsig :degree degree :distance dist :channels 2)) (pan-env (make-env '(0 0 1 90) :duration dur))) (do ((i start (+ i 1))) ((= i end)) (let ((ut (* amp (oscil car)))) (move-locsig loc (env pan-env) dist) (locsig loc i ut))))) (with-sound (:output "test.wav" :srate 48000 :channels 2 :data-format mus-lshort :header-type mus-riff) (move-osc 0 3 220.0 0.75 0 1.0 0.3)) ;;------------------------------------------------- (definstrument (examp2 beg dur frequency amplitude) (let* ((start (seconds->samples beg)) (end (seconds->samples (+ beg dur))) (sine-wave (make-oscil :frequency frequency))) (do ((i start (+ i 1))) ((= i end)) (outa i (* amplitude (oscil sine-wave)))))) (with-sound (:output "test2.wav" :srate 48000 :channels 2 :data-format mus-lshort :header-type mus-riff) (examp2 0 3 220.0 0.75)) -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Wed Apr 16 12:04:20 2014 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Wed, 16 Apr 2014 12:04:20 -0700 Subject: [CM] channels In-Reply-To: References: Message-ID: <20140416190215.M79706@ccrma.Stanford.EDU> I get a stereo file in both cases, but in the second, you're only calling outa, so you get a sine wave in the first channel, and zeros in the second. outa just writes to the first channel. Use outb to write to the second. From alex at slab.org Mon Apr 21 08:30:38 2014 From: alex at slab.org (alex) Date: Mon, 21 Apr 2014 16:30:38 +0100 Subject: [CM] CFP FARM - ACM SIGPLAN International Workshop on Functional Art, Music, Modelling and Design Message-ID: 2nd ACM SIGPLAN International Workshop on Functional Art, Music, Modelling and Design Gothenburg, Sweden; 6 September, 2014 http://functional-art.org The ACM SIGPLAN International Workshop on Functional Art, Music, Modelling and Design (FARM) gathers together people who are harnessing functional techniques in the pursuit of creativity and expression. Functional Programming has emerged as a mainstream software development paradigm, and its artistic and creative use is booming. A growing number of software toolkits, frameworks and environments for art, music and design now employ functional programming languages and techniques. FARM is a forum for exploration and critical evaluation of these developments, for example to consider potential benefits of greater consistency, tersity, and closer mapping to a problem domain. FARM encourages submissions from across art, craft and design, including textiles, visual art, music, 3D sculpture, animation, GUIs, video games, 3D printing and architectural models, choreography, poetry, and even VLSI layouts, GPU configurations, or mechanical engineering designs. The language used need not be purely functional (?mostly functional? is fine), and may be manifested as a domain specific language or tool. Theoretical foundations, language design, implementation issues, and applications in industry or the arts are all within the scope of the workshop. Submissions are invited in two categories: * Full papers 5 to 12 pages using the ACM SIGPLAN template. FARM 2014 is an interdisciplinary conference, so a wide range of approaches are encouraged and we recognize that the appropriate length of a paper may vary considerably depending on the approach. However, all submissions must propose an original contribution to the FARM theme, cite relevant previous work, and apply appropriate research methods. * Demo abstracts Demo abstracts should describe the demonstration and its context, connecting it with the themes of FARM. A demo could be in the form of a short (10-20 minute) tutorial, presentation of work-in-progress, an exhibition of some work, or even a performance. Abstracts should be no longer than 2 pages, using the ACM SIGPLAN template and will be subject to a light-touch peer review. If you have any questions about what type of contributions that might be suitable, or anything else regarding submission or the workshop itself, please contact the organisers at: workshop2014 at functional-art.org KEY DATES: Abstract (for Full Papers) submission deadline: 7 May Full Paper and Demo Abstract submission Deadline: 11 May Author Notification: 30 May Camera Ready: 18 June Workshop: 6 September SUBMISSION All papers and demo abstracts must be in portable document format (PDF), using the ACM SIGPLAN style guidelines. The text should be in a 9-point font in two columns. The submission itself will be via EasyChair. See the FARM website for further details: http://functional-art.org -- http://yaxu.org/ From taube at illinois.edu Wed Apr 23 08:33:47 2014 From: taube at illinois.edu (Heinrich Taube) Date: Wed, 23 Apr 2014 10:33:47 -0500 Subject: [CM] building grace on mac Message-ID: <97F5ADFA-870F-4002-99DA-B3F21ED7D493@illinois.edu> If you don't build Grace from sources on the mac just delete this message. If you do, then read on... With the upgrade to Xcode 5.1I'm finding that its becoming harder and harder to build apps and libs outside of the Xcode development environment, even if the Xcode terminal development tools are installed and you are doing nothing 'wrong'. At this point, building Grace in the console will work for debug builds but not for release builds. In the release build an internal architecture error happens at link time so the app won't build. Ive tested using two different apps and across two different computers and both apps give me the errors. However, if I build everything inside Xcode then I can get debug and release builds without problems. So the safest and most sustainable thing to do at this point is probably to just move to Xcode on the mac as only way to compile from sources. Now, if you're younger than 30 or if you play video games then using Xcode's IDE is probably no big deal, but an old dog like me wants nothing more than a console to type bash commands into, a Makefile, Emacs and a bone. But it seems I don't get a vote in this, and for me personally the huge mac App Store and the potential to run on mobile devices like the iPad makes the mac a really attractive target... Right now to build Mac from a virgin cm source tree you should do res/bin/juce.sh res/bin/oscpack.sh res/bin/sndlib.sh premake4 --file=appstore.lua open Grace.xcodeworkspace Hit the run button. That'll work for the time being (without fomus), but moving forward I'm wondering if at this point i shouldn't remove premake4 from the toolchain altogether and provide a cm/build directory with projects set up for SndLib and Grace on linux (Makefile), mac (Xcode) and windows (vs2010). This would be a ton of work for me but might be the easiest solution moving forward. From j_hearon at hotmail.com Wed Apr 23 12:45:56 2014 From: j_hearon at hotmail.com (James Hearon) Date: Wed, 23 Apr 2014 19:45:56 +0000 Subject: [CM] slime printing In-Reply-To: References: Message-ID: re: clm emacs-slime ...might be a bit OT I was hoping to get some advice on printing from emacs-slime. I'm trying to print output to a visible area of the emacs editor when the code is compiled and runs, such as in with-sound below. I'm using f20, sbcl, emacs-slime, and clm but having a devil of a time getting any contrib to load and run with my .emacs file which might support more repl such as to the echo area etc. I'm wondering what approach you folks might use to print to std out? Are you using a contrib package or other editor and print .el utility files? I've tried things like (print ), and (format t ...) and (message ...), and those evaluate the expression to the echo area but they don't work when I compile and run and it is beeping. Or am I totally off base, and lisp doesn't do that very well at all? Thank You, Jim (definstrument simp (start-time duration frequency amplitude &optional (amp-env '(0 0 .5 1.0 1.0 0))) (multiple-value-bind (beg end) (times->samples start-time duration) (let ((osc (make-oscil :frequency frequency)) (amp-env (make-env amp-env :scaler amplitude :duration duration))) (run (loop for i from beg below end do (outa i (* (env amp-env) (oscil osc) )) (outb i (* (env amp-env) (oscil osc) )) ))))) (with-sound (:channels 2) (loop for tt from 1 to 10 by 2 do ****** (print tt) ******* (simp tt .25 220 .75) )) -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Wed Apr 23 13:30:09 2014 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Wed, 23 Apr 2014 13:30:09 -0700 Subject: [CM] Snd 14.6 Message-ID: <20140423202825.M89928@ccrma.Stanford.EDU> Snd 14.6 s7: gensym? environment* clm: even|odd-weight|multiple (new built-in functions). moving-norm (new generator). deprecate frame and mixer generators -- use float vectors instead. finally deprecate sound-data objects -- this includes a bunch of functions such as dac-hook, mus-sound-read, etc. "frample" replaces "frame" wherever "frame" refers to a set of samples that represent a single sampling instant (also known as a "sample frame"). So, the generator once known as "file->frame" is now "file->frample". mus-mix -> mus-file-mix, mus-mix-with-envs -> mus-file-mix-with-envs. CL clm: bumped version number to 5 (I'll leave clm-4.tar.gz for future generations to marvel at). The new CL clm does not have frames or mixers, and has file->frample and frample->file in place of file->frame and frame->file. Also sound-frames -> sound-framples and so on. cast into outer darkness: continue-float-vector->file continue-frame->file dac-hook file->float-vector file->float-vector? file->frame file->frame? float-vector->file float-vector->file? float-vector-mix frame frame* frame+ frame->file frame->file? frame->frame frame->list frame->sample frame-ref frame-set! frame? frames make-file->float-vector make-file->frame make-float-vector->file make-frame make-frame! make-frame->file make-level-meter make-mixer make-mixer! make-scalar-mixer make-sound-data mixer mixer* mixer+ mixer-ref mixer-set! mixer? mus-sound-frames mus-sound-close-input mus-sound-close-output mus-sound-open-input mus-sound-open-output mus-sound-read mus-sound-reopen-output mus-sound-seek-frame mus-sound-write region-frames sample->frame save-mixes selection-frames sound-data* sound-data+ sound-data-add! sound-data-chans sound-data-copy sound-data-fill! sound-data-length sound-data-maxamp sound-data-multiply! sound-data-offset! sound-data-peak sound-data-ref sound-data-reverse! sound-data-scale! sound-data-set! sound-data? stop-dac-hook transform-frames with-level-meters (some backwards compatible replacements are in snd14.scm) Some notes on updating: the main instruments that changed are expandn, freeverb, and fullmix mixer -> 1-dim array of floats, size: chans * chans frame -> same, size: chans sound-data -> 2 dim array of floats, size: '(chans samples-per-chan) array of floats = float-vector in scheme, double-array in CL, vct elsewhere "frame" -> "frample" in most cases, including mus-file-mix arg names envs arg to mus-file-mix-with-envs has same layout as matrix arg frample->frample arg order is '(matrix in-vector out-vector) most mus-sound-read|write cases can be replaced by array->file and file->array checked: gtk 3.11.9|12.0|1, sbcl 1.1.17 Thanks!: Mike Scholz. From bil at ccrma.Stanford.EDU Wed Apr 23 13:33:37 2014 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Wed, 23 Apr 2014 13:33:37 -0700 Subject: [CM] Snd 14.6 Message-ID: <20140423203046.M62043@ccrma.Stanford.EDU> I forgot to say that the sourceforge CVS area is not up to date -- the sourceforge side was timing out yesterday, today it is "resetting" the connection, whatever that means. From anders.vinjar at bek.no Thu Apr 24 01:36:23 2014 From: anders.vinjar at bek.no (anders.vinjar at bek.no) Date: Thu, 24 Apr 2014 10:36:23 +0200 Subject: [CM] slime printing References: Message-ID: <87ha5j3z08.fsf@bek.no> J> I've tried things like (print ), and (format t ...) and (message J> ...), and those evaluate the expression to the echo area but they J> don't work when I compile and run and it is beeping. Or am I J> totally off base, and lisp doesn't do that very well at all? Hi James. Doesn't printing to stdout - ie. (format t "time: ~A" tt) - in the loop print to your *slime-repl*-buffer? Im not sure from your question whether this is obvious or not, but when calling with-sound, CLM/Lisp will evaluate the intermingled print-statements in your loop as soon as they are encountered ('REPL'), ie. lisp won't sit and wait for the beeps in the resulting soundfile being played out of your speakers. Its possible to set up a separate thread to start playing and print things at the right times, but afaik with-sound isn't setup to do any rt-scheduling now. Btw. if you're using slime theres a very handy shortcut "C-c,C-p" in lisp-mode buffers which will call 'slime-pprint-eval-last-expression and present the output pretty-printed in a separate, temporary buffer. -anders From rm at seid-online.de Thu Apr 24 02:03:48 2014 From: rm at seid-online.de (Ralf Mattes) Date: Thu, 24 Apr 2014 11:03:48 +0200 Subject: [CM] slime printing In-Reply-To: References: Message-ID: <20140424090348.GA13905@seid-online.de> On Wed, Apr 23, 2014 at 07:45:56PM +0000, James Hearon wrote: > re: clm emacs-slime > > ...might be a bit OT Hello James, > I was hoping to get some advice on printing from emacs-slime. I'm trying to print output to a visible area of the emacs editor when the code is compiled and runs, such as in with-sound below. > > I'm using f20, sbcl, emacs-slime, and clm but having a devil of a time getting any contrib to load and run with my .emacs file which might support more repl such as to the echo area etc. I'm wondering what approach you folks might use to print to std out? Are you using a contrib package or other editor and print .el utility files? I think it might help us all answering your question if you could explain your teminology. Whta do you mean by "std out"? Common Lisp has *standard-output* and *error-output* which both are modified by slime to send their stream data back to emacs. Evaluating (format t "Blah") from the slime repl (you are using the slime repl, aren'gt you) should print to the slime repl buffer. This redirection does _not_ work from other lisp buffers (like the slime scratch buffer et al.) If you just want to eval an expression in the slime repl there's slime-eval-last-expression-in-repl which can be bound to a keyboard shortcut. If that's not enough you probably need to write your own helper code - something like this: ;; -- this is the emacs side: elisp' --- (defun clm-message (message) (switch-to-buffer "*CLM Results*") (goto-char (point-max)) (insert message)) ;; -- this is the lisp side: common lisp --- (defun clm-message (message) (swank:eval-in-emacs `(clm-message ,message))) This is only a proof-of-concept. IIRC you also need to configure slime to allow evaluation of expressions from swank. > I've tried things like (print ), and (format t ...) and (message ...), and those evaluate the expression to the echo area but they don't work when I compile and run and it is beeping. Or am I totally off base, and lisp doesn't do that very well at all? Hmm, in what language are you now? At least 'message' is emacs lisp ... And what is the "echo area" - the minibuffer? HTH Ralf Mattes > > Thank You, > Jim > > > (definstrument simp (start-time duration frequency amplitude &optional (amp-env '(0 0 .5 1.0 1.0 0))) > (multiple-value-bind (beg end) (times->samples start-time duration) > (let ((osc (make-oscil :frequency frequency)) > (amp-env (make-env amp-env :scaler amplitude :duration duration))) > (run > (loop for i from beg below end do > (outa i (* (env amp-env) (oscil osc) )) > (outb i (* (env amp-env) (oscil osc) )) > ))))) > > (with-sound (:channels 2) > (loop > for tt from 1 to 10 by 2 > do > ****** (print tt) ******* > (simp tt .25 220 .75) > )) > > _______________________________________________ > Cmdist mailing list > Cmdist at ccrma.stanford.edu > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist From rm at seid-online.de Thu Apr 24 06:37:17 2014 From: rm at seid-online.de (Ralf Mattes) Date: Thu, 24 Apr 2014 15:37:17 +0200 Subject: [CM] slime printing In-Reply-To: References: Message-ID: <20140424133717.GB13905@seid-online.de> On Wed, Apr 23, 2014 at 07:45:56PM +0000, James Hearon wrote: > re: clm emacs-slime BTW, I forgot to mention > I'm using f20, sbcl, emacs-slime, and clm but having a devil of a time getting any contrib to load and run with my .emacs file which might support more repl such as to the echo area etc. I'm wondering what approach you folks might use to print to std out? Are you using a contrib package or other editor and print .el utility files? I'd strongly suggest to everyone who uses Common Lisp to take advantage of quicklisp and especially use the quicklisp distributed version of slime. You get a rather fresh slime (new quicklisp reslease app. once a month) and save yourself quite some time setting up slime. After switching to quicklisp slime my setup shrank to: (load (expand-file-name "~/quicklisp/slime-helper.el")) (require 'slime) (ok. That's a lie :-) There's still some tweaking in my init file, but the two lines are more than enough to get you going with cm and clm. Cheers, RalfD From tito.01beta at gmail.com Thu Apr 24 07:17:31 2014 From: tito.01beta at gmail.com (Tito Latini) Date: Thu, 24 Apr 2014 16:17:31 +0200 Subject: [CM] slime printing In-Reply-To: References: Message-ID: <20140424141731.GA1744@rhk.homenet.telecomitalia.it> Saluton, On Wed, Apr 23, 2014 at 07:45:56PM +0000, James Hearon wrote: > I was hoping to get some advice on printing from emacs-slime. I'm trying to print output to a visible area of the emacs editor when the code is compiled and runs, such as in with-sound below. > > I'm using f20, sbcl, emacs-slime, and clm but having a devil of a time getting any contrib to load and run with my .emacs file which might support more repl such as to the echo area etc. I'm wondering what approach you folks might use to print to std out? Are you using a contrib package or other editor and print .el utility files? > > I've tried things like (print ), and (format t ...) and (message ...), and those evaluate the expression to the echo area but they don't work when I compile and run and it is beeping. Or am I totally off base, and lisp doesn't do that very well at all? hopefully I am not misunderstanding your intention, you could use the *inferior-lisp* buffer associated with the lisp process: (format swank:*log-output* "After all the jacks are in their boxes~%") ;; idem but sbcl specific (format sb-sys:*stderr* "and the clowns have all gone to bed~%") (format sb-sys:*stdout* "~Ahe traffic lights, they turn blue tomorrow~%" (eq swank:*log-output* sb-sys:*stderr*)) (let ((*standard-output* swank:*log-output*)) (with-sound ...)) etc.. Perhaps it is enough, otherwise it is also possible to change the process-filter (from emacs), for example ;; current process-filter (process-filter (get-buffer-process "*inferior-lisp*")) ; => comint-output-filter ;; And the wind screams Mary (set-process-filter (get-buffer-process "*inferior-lisp*") (lambda (process string) ... ... something with the string ... ... (comint-output-filter process string))) ;; Uh will the wind ever remember the names it has blow in the past? (set-process-filter (get-buffer-process "*inferior-lisp*") #'comint-output-filter) Tito Latini From anders.vinjar at bek.no Thu Apr 24 11:50:13 2014 From: anders.vinjar at bek.no (anders.vinjar at bek.no) Date: Thu, 24 Apr 2014 20:50:13 +0200 Subject: [CM] slime printing References: <20140424141731.GA1744@rhk.homenet.telecomitalia.it> Message-ID: <87y4yupnoa.fsf@bek.no> Isn't this unnecessary complicated? To make all the expected output go to slime's *repl* buffer, put (setq swank:*globally-redirect-io* t) in ~/.swank.lisp (or somewhere else you look it up). -anders