Lynn Artas | 26 Jan 20:16 2016
Picon

help with case statement

Hello list,

   I’m working on translating some old CM code and am stumbling on how to do a case statement in Grace. I’m giving a pared-down example. Currently the problems (likely all related) are:

1. I do get one note out (yay) in addition to the error:

>>> Error: attempt to apply the integer 1 to ({s7-error}-11 80 8.1 #<unspecified> 8.1 8.1 {s7-error}-11 {s7-error}-11)?

casethejoint: (ffi_cm_print args)                 ; args: ("attempt to apply ~A ~S t...

casethejoint: ((set! {v}-567 (+ {v}-567 1)) {w...

casethejoint: (call-with-exit (lambda (return)... ; thecase: 0, newdur: 8.1

                                                   ; newkeynum: 80

                                                   ; waittime: 8.1

                                                   ; thetime: 8.1

casethejoint: (sprout (casethejoint))          

No success single quoting. 

2. It seems to always pick the second case, whether “thecase” picks 0 or 1, or whether I switch the numbers (make case 1 come first and case 0 second).

3. When I use the commented line (process while (<= theme 100) to control the length of the process, it is clear that time doesn’t update. (This update method works fine when not part of the attempted case statement.)

Any leads on documentation appreciated—I’ve been through the examples that come with Grace, and of course, the online documentation, without success. 

Please pardon the formatting and many thanks for any tips. 

;;; -*- syntax: Lisp; font-size: 16; line-numbers: no; -*-

(define speeds (make-cycle '(0.2 0.3 0.4 0.2 4 3.5 1 1.2 2.4 3.9 0.3 8.2 7.8 5.2 0.2 5.4 3.4 5.8 6.1 2.2 4.8 2.4 0.3 4.7 4.4 4.4 0.1
7.2 3.7 9 1.8 10.1 4.2 4.6 4.9 4.8 1.9 4.8 0.9 5.6 3.5 3 3.6 3 4.3 2.8 5.5 5.6 5.1 1.2 1.2 7.6 5.6 5
3.5 3.1 4.6 3 4.2 4.4 4.4 5.8 3.4 4.9 3.9 0.2 9.2 12.5 5 0.5 3.6 6.2 11.9 11.3 1.2 0.3 2.3 1.9 2.5 4.7
3.6 3.9 3.6 0.4 6.9 2.3 2.6 2.5 4.3 4 4.1 1 0.7 8 3.3 2 5.8 3.4 2 4.8 0.4 8.8 1.6 0.4 6.6 5.1 2.5 6.2
6.3 0.3 7.1 8.3 10.7 13.3 3.8 6.3 0.4 2.8 5.6 1.1 10.5 4.3 0.2 4.2 2.8 1.8 6 5.5 3 7.7 1.7 8.4 11.5
5.5 1.3 2.4 0.1 8 5.2 2.8 2.1 5.4 2.8 3.9 4.9 3.2 0.4 5.8 0.4 6 4.5 4.4 1.7 4.6 3.4 1.2 6.1 7.1 0.1 2
1.3 0.8 1.6 5.1 5.9 6 0.5 3.3 0.8 3.9 2.2 5 5.4 4 1.8 4.1 5.6 2.5 4 5 2.7 0.6 8.1 2.2 3.2 3.9 4.1 3.1
1.5 0.3 0 0.1 0.4 0.4 2.3 3.3 2.3 1.5 4.3 4.4 3.9 2 4.8 4.1 3.8 1.7 5.6 4.5 2.5 1.8 7.1 2.1 2.3 1.5 0.5
1 0.9 3.2 0.3 0.1 0.2 0 )))

(define (casethejoint)
(let* (
      (currenttime 0)
       (newkeynum 0)
       (waittime 0)
       (thetime 0)
       (newdur 0)
       (thecase 0)
      )

 ;(process  while (<= thetime 100) ;-->time not currently updating, making this potentially dangerous 

(process repeat 50
         do
         (set! thecase (pick 0 1))
         (print "thecase is") (print thecase)
         (set! newdur (next speeds))
;append ;-->was necessary in the old code
         (case thecase    
           (        
               (0
                 (print "case is 0")
                 (set! newkeynum (between 40 42))
                 (set! waittime newdur)
                 (mp:midi :key  newkeynum)
                 (wait waittime)
                 (set! thetime (+ thetime waittime))
                 (print "thetime is")  (print thetime)
                 )

                (1
                 (print "case is 1")
                 (set! newkeynum  (between 80 82))
                 (set! waittime newdur)
                 (mp:midi :key  newkeynum)
                 (wait waittime)
                 (set! thetime (+ thetime waittime))
                 (print "thetime is")  (print thetime)
                 )
           )
           )
         )
)
)


(sprout (casethejoint))



_______________________________________________
Cmdist mailing list
Cmdist@...
https://cm-mail.stanford.edu/mailman/listinfo/cmdist
Arseniy Prisvirnin | 25 Jan 13:23 2016
Picon
Gravatar

How to use cm 3.9.0 with GNU Emacs?

Hello.

I installed cm 3.9.0 from sourceforge (debian stretch) and I want to use 
it inside Emacs. For oldest versions (3.8.0) was howto and separate cm 
file in /bin folder.

Can I use 3.9.0 with Emacs or how can I compile 3.8.0 with jack2 ?
bil | 10 Jan 17:16 2016
Picon

Snd 16.2

Snd 16.2:

owlet error-history field if WITH_HISTORY=1, (*s7* 'history-size) sets 
its size
added *read-error-hook*
removed s7_eval_form, changed s7_eval to take its place
s7_eval_c_string takes only one statement now (use begin to handle 
multiple statements)
added s7_load_with_environment

checked: gtk 3.19.4|5|6, ruby 2.4

Thanks!: Kjetil Matheussen, Anders Vinjar, Tito Latini, Mike Scholz.
James Hearon | 21 Dec 18:50 2015
Picon

dlocsig

Hi,

Thanks for info on dlocsig.lisp.   I managed to get the move-sound.ins working, and also the sinewave example.


I just did not understand dlocsig.lisp needed to be compiled and loaded before using it.  I thought it was loaded with all.lisp.


Regards,

Jim

_______________________________________________
Cmdist mailing list
Cmdist@...
https://cm-mail.stanford.edu/mailman/listinfo/cmdist
James Hearon | 15 Dec 18:45 2015
Picon

dlocsig example

Hi,
Thanks for the info on move-sound and move-it.  I'm trying to figure out how those work, and didn't know there
was a dlocsig ex in clm.  

For the sinewave ex. listed earlier using dlocsig, I'm using f23, sbcl, emacs, clm and slime, and the error
below is about can't handle DLOCSIG etc.  Admittedly I'm not totally proficient at understanding the
slime-repl output, so this may not be what you need.

Thank You.
Jim

Execution of a form compiled with errors.
Form:
  (DEFINSTRUMENT SINEWAVE
    (START-TIME DURATION FREQ AMP &KEY (AMP-ENV '(0 1 1 1))
     (PATH (MAKE-PATH :PATH '(-10 10 0 5 10 10))))
  (MULTIPLE-VALUE-BIND (DLOC BEG END)
      (MAKE-DLOCSIG :START-TIME START-TIME :DURATION DURATION :PATH PATH)
    (LET* ((OSC (MAKE-OSCIL :FREQUENCY FREQ))
           (AENV (MAKE-ENV :ENVELOPE AMP-ENV :SCALER AMP)))
      (RUN
       (LOOP FOR I FROM BEG BELOW
             END
             DO (DLOCSIG DLOC I (* (ENV AENV) (OSCIL OSC))))))))
Compile-time error:
  (during macroexpansion of (DEFINSTRUMENT SINEWAVE
    ...))
the run macro can't handle DLOCSIG in (DLOCSIG DLOC I
                                       (* (ENV AENV) (OSCIL OSC)))
   [Condition of type SB-INT:COMPILED-PROGRAM-ERROR]

Restarts:
 0: [*ABORT] Return to SLIME's top level.
 1: [ABORT] abort thread (#<THREAD "worker" RUNNING {1005D354F3}>)

Backtrace:
  0: (SB-FASL::LOAD-FASL-GROUP #S(SB-FASL::FASL-INPUT :STREAM #<SB-SYS:FD-STREAM for "file
/opt/clm_stuff/jsdlocsig.fasl" {10049E76E3}> :TABLE #(447 #<PACKAGE "SB-IMPL"> SB-IMPL::%DEFUN
#<PACKAGE "COMMON-L..
  1: (SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file /opt/clm_stuff/jsdlocsig.fasl"
{10049E76E3}> NIL NIL)
  2: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) #<SB-SYS:FD-STREAM for "file
/opt/clm_stuff/jsdlocsig.fasl" {10049E76E3}> T)
  3: (LOAD #P"/opt/clm_stuff/jsdlocsig.fasl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST T
:EXTERNAL-FORMAT :DEFAULT)
 --more--

(definstrument sinewave (start-time duration freq amp 
		         &key
			 (amp-env '(0 1 1 1))
			 (path (make-path :path '(-10 10 0 5 10 10))))
  (multiple-value-bind (dloc beg end)
      (make-dlocsig :start-time start-time
		    :duration duration
		    :path path)
    (let* ((osc (make-oscil :frequency freq))
	   (aenv (make-env :envelope amp-env :scaler amp)))
      (run
       (loop for i from beg below end do
	 (dlocsig dloc i (* (env aenv)(oscil osc))))))))

________________________________________
From: cmdist-bounces@...
<cmdist-bounces@...> on behalf of
cmdist-request@... <cmdist-request@...>
Sent: Monday, December 14, 2015 8:00 PM
To: cmdist@...
Subject: Cmdist Digest, Vol 92, Issue 2

Send Cmdist mailing list submissions to
        cmdist@...

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@...

You can reach the person managing the list at
        cmdist-owner@...

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Cmdist digest..."

Today's Topics:

   1. dlocsig example (James Hearon)
   2. Re: dlocsig example (bil@...)

----------------------------------------------------------------------

Message: 1
Date: Mon, 14 Dec 2015 18:03:02 +0000
From: James Hearon <j_hearon@...>
To: "cmdist@..." <cmdist@...>
Subject: [CM] dlocsig example
Message-ID:
        <BLUPR10MB0836AD6CF2C42ACE43E86969E5ED0@...>

Content-Type: text/plain; charset="iso-8859-1"

Hi,
I'm getting myself all fouled up with trying to run a simple dlocsig example in clm.  I was using this one, from
https://ccrma.stanford.edu/~nando/clm/dlocsig/

(definstrument sinewave (start-time duration freq amp
                         &key
                         (amp-env '(0 1 1 1))
                         (path (make-path :path '(-10 10 0 5 10 10))))
  (multiple-value-bind (dloc beg end)
      (make-dlocsig :start-time start-time
                    :duration duration
                    :path path)
    (let* ((osc (make-oscil :frequency freq))
           (aenv (make-env :envelope amp-env :scaler amp)))
      (run
       (loop for i from beg below end do
         (dlocsig dloc i (* (env aenv)(oscil osc))))))))

---------------------------------
I can move the samples in time using plain locsig and the run loop below, binding the variables start and end,
but dlocsig seems  to need the multiple-bind structure which I can't seem to to get to run.  I'm wondering if
there's a better simple example someplace?  Thank You.

(definstrument sinewave (start-time duration freq amp deg dis
                         &key
                         (amp-env '(0 1 1 1)) )
    (let* ((osc (make-oscil :frequency freq))
          (start (floor (* start-time *srate*)))
         (end (+ start (floor (* duration *srate*))))
           (aenv (make-env :envelope amp-env :duration duration :scaler amp))
                 (loc (make-locsig :degree deg :distance dis  :reverb .05)))
      (run
       (loop for i from start to end do
            (locsig loc i (* (env aenv)(oscil osc)))
            ))));)

------------------------------

Message: 2
Date: Mon, 14 Dec 2015 10:34:19 -0800
From: bil@...
To: James Hearon <j_hearon@...>
Cc: "cmdist@..." <cmdist@...>
Subject: Re: [CM] dlocsig example
Message-ID: <c83ae2e9e810874c77ba232653e3be04@...>
Content-Type: text/plain; charset=US-ASCII; format=flowed

Which lisp are you running, and what error did you get?
Here I am running the move-sound instrument in sbcl:

(load "all.lisp")
(compile-file "dlocsig.lisp")
(load "dlocsig.fasl")
(compile-file "move-sound.ins")
(load "move-sound.fasl")
(load "v")
(with-sound (:channels 4) (move-it (:path (make-path '((-10 10) (.1 .1)
(10 -10)))) (fm-violin 0 1 440 .1)))

and I got "test.snd".

------------------------------

_______________________________________________
Cmdist mailing list
Cmdist@...
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

End of Cmdist Digest, Vol 92, Issue 2
*************************************
James Hearon | 14 Dec 19:03 2015
Picon

dlocsig example


Hi,
I'm getting myself all fouled up with trying to run a simple dlocsig example in clm.  I was using this one, from
https://ccrma.stanford.edu/~nando/clm/dlocsig/

(definstrument sinewave (start-time duration freq amp 
		         &key
			 (amp-env '(0 1 1 1))
			 (path (make-path :path '(-10 10 0 5 10 10))))
  (multiple-value-bind (dloc beg end)
      (make-dlocsig :start-time start-time
		    :duration duration
		    :path path)
    (let* ((osc (make-oscil :frequency freq))
	   (aenv (make-env :envelope amp-env :scaler amp)))
      (run
       (loop for i from beg below end do
	 (dlocsig dloc i (* (env aenv)(oscil osc))))))))

---------------------------------
I can move the samples in time using plain locsig and the run loop below, binding the variables start and end,
but dlocsig seems  to need the multiple-bind structure which I can't seem to to get to run.  I'm wondering if
there's a better simple example someplace?  Thank You.

(definstrument sinewave (start-time duration freq amp deg dis
		         &key
			 (amp-env '(0 1 1 1)) )		 
    (let* ((osc (make-oscil :frequency freq))
	  (start (floor (* start-time *srate*)))
	 (end (+ start (floor (* duration *srate*))))
	   (aenv (make-env :envelope amp-env :duration duration :scaler amp))
                 (loc (make-locsig :degree deg :distance dis  :reverb .05)))
      (run
       (loop for i from start to end do
	    (locsig loc i (* (env aenv)(oscil osc)))
	    ))));)
anders.vinjar | 9 Dec 11:32 2015
Picon

small patch to snd-16/CM_patterns.scm

Hi Bill.

There's a small oversight near the bottom of snd-16/CM_patterns.scm.
Here's a patch to get the repeater pattern working:

Attachment (CM_patterns.scm.diff): text/x-patch, 755 bytes

Cheers,

-anders
_______________________________________________
Cmdist mailing list
Cmdist@...
https://cm-mail.stanford.edu/mailman/listinfo/cmdist
bil | 28 Nov 13:21 2015
Picon

Snd 16.1

Snd 16.1:

most of my time went into lint.scm, but the harder I work,
the longer my TODO list.

s7: :key and :optional removed.

checked: gtk 3.19.1|2|3, sbcl 1.3.0|1, GSL 2.0

Thanks!: Norman Gray
JV | 25 Nov 16:38 2015
Picon

Re: How to capture standard output of Linux command in s7

system prints the  output of the command.
I cannot save the output with:

(define sv (system ("ls"))

On Wed, Nov 25, 2015 at 8:02 AM, <bil-l0SEpsmuUtBegcJQxxnBRDe48wsgrGvP@public.gmane.org> wrote:
system is normally included in s7 in Linux -- try
(help system) or (system "ls -la s7.c" #t).  If your
version of s7 was built with the compiler flag
WITH_SYSTEM_EXTRAS set to 0, you can still get at the
c library's system function via libc.scm, but
hopefully that isn't necessary.





--
Joseph Vijay
_______________________________________________
Cmdist mailing list
Cmdist@...
https://cm-mail.stanford.edu/mailman/listinfo/cmdist
JV | 25 Nov 06:17 2015
Picon

How to capture standard output of Linux command in s7

I am not looking for the system function.
Thank you,

--
Jo
_______________________________________________
Cmdist mailing list
Cmdist@...
https://cm-mail.stanford.edu/mailman/listinfo/cmdist
Per Bloland | 21 Oct 23:00 2015
Picon

2016 ASCAP/SEAMUS Student Commission Competition

The Society for Electro-Acoustic Music in the United States (SEAMUS) is pleased to announce the 2016 ASCAP/SEAMUS Student Composer Commissioning Program.

The purpose of this program is to stimulate student participation in SEAMUS activities, and to encourage young composers to pursue creative endeavors in electro-acoustic music. The program is administered by SEAMUS and funded by the American Society of Composers, Authors and Publishers (ASCAP) <http://www.ascap.com>.

The submission deadline is November 7, 2015. Please note that this differs from the 2016 SEAMUS conference submission deadline.

For more information, please visit the ASCAP/SEAMUS Competition information page: http://www.seamusonline.org/ascapseamus/.
To submit via the online application, please visit the current submission site: http://seamusonline.org/2016-ascapseamus-submissions/.
For more information on the conference at Georgia Southern University, please visit the conference site: http://class.georgiasouthern.edu/seamus/.

Please note that you must be a current member of SEAMUS to submit to the competition. You can join or renew your membership at the SEAMUS website, http://www.seamusonline.org/. Joining takes only a few minutes. Once logged into the submission system, you must supply your seamusonline username to complete your ASCAP/SEAMUS submission. 

If you previously submitted to the 2015 SEAMUS Conference at Virginia Tech, your Start Conference submission username and password are still valid. Note that this is distinct from your seamusonline username.


RULES FOR SUBMISSION

 All submissions are to be made online, through the submission site: http://seamusonline.org/2016-ascapseamus-submissions/. Only one work of electroacoustic music may be submitted, which must adhere to the following guidelines:

• Audio Files: music submissions should include a representative audio recording of the work. If a concert work, it must be the complete composition. Installations may be represented by an excerpted recording not to exceed 10 minutes in length. Judging of music submissions for ASCAP/SEAMUS Student Competition will be from audio files in the MP3 format. Multichannel works will be judged from a stereo mix, also MP3. Please assist us by submitting in MP3 format. Audio files must be prepared as a single LastnameFirstname_audio.MP3. Be sure to anonymize your MP3 by removing any metadata (ID3 tags).
• Scores: for submissions involving a score, please submit an anonymized PDF score for review. Please do not mail in printed scores. Score submissions must be prepared as LastnameFirstname_score.PDF.
• Video Submissions: note that for works involving video, only the audio portion will be considered for judging purposes. You must be the composer of the music for the video. Please submit an MP3 of the music as specified above.
• Only one (1) entry per student. 

Other than the filename, please make sure to remove your name from all files, including MP3 metadata and PDF scores. Please limit the total size of all files to 40MB.

This same work may be submitted to the SEAMUS 2016 National Conference via the conference submission page. All finalists in the ASCAP/SEAMUS Student Commission Competition must attend the SEAMUS 2016 National Conference. Submissions by High School and Undergraduate students will automatically be considered for the Allen Strange Memorial Award as well.


AWARDS

A maximum of two prizes may be awarded. The decision of the judges will be final.

First Prize

• Commission of $1250 for a new work of electro-acoustic music
• Performance of commissioned work at the 2017 SEAMUS National Conference
• Recording of the commissioned work in the SEAMUS Compact Disc Series
• Certificate of recognition


Second Prize

• Commission of $750 for a new work of electro-acoustic music
• Performance of commissioned work at the 2017 SEAMUS National Conference
• Certificate of recognition


ELIGIBILITY

Applicants to the 2016 ASCAP/SEAMUS Student Commissioning Competition must be student members of SEAMUS and must be either currently enrolled in an academic program in the United States (high school through doctoral studies) or a United States citizen studying abroad. All completed submissions will be verified for student status against current SEAMUS membership records.


Per Bloland
SEAMUS Member-at-Large

____________________________________________
Per Bloland
Assistant Professor of Composition and Technology
Miami University of Ohio
www.perbloland.com

_______________________________________________
Cmdist mailing list
Cmdist@...
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Gmane