Jump to content
Sign in to follow this  
ShahriyarFarshid

set-assignment documentation missing

Recommended Posts

Just please the cursor on SETF function and type ⌃⇥ (ctrl/tab)

 

setf place value

 

[Macro]

 

Arguments and Values:

 

place        a place.

value        a form.

 

Description:

 

Takes pairs of arguments like SETQ. The first is a place and the second is the value that is supposed to go into that place. Returns the last value. The place argument may be any of the access forms for which SETF knows a corresponding setting form.

 

Examples:

 

(setf pitch '(c4 e4 g4 c5))

=> (c4 e4 g4 c5)

 

pitch

=> (c4 e4 g4 c5)

 

If more than one pair is supplied, the pairs are processed sequentially.

 

(setf place-1 newvalue-1

      place-2 newvalue-2

      ...

      place-N newvalue-N)

 

equivalent to

 

(progn

 (setf place-1 newvalue-1)

 (setf place-2 newvalue-2)

  ...

 (setf place-N newvalue-N))

 

Share this post


Link to post
Share on other sites

Thanks. Just to clarify, my issue is with 'set-assignment' and not setf. I doubt if there are the same functions!

 

ctrl-tab short cut does not give me the documentation for set-assignment. I also searched in utility bar.

 

Example:

(setf trans '((5/4) (-1/4 1) (-3/8 7/8) (-1/2 3/4) (-7/12 2/3)
              (-2/3 7/12) (-3/4 1/2) (-13/16 7/16) (-7/8 3/8)
              (-15/16 5/16) (-1 1/4)))
(setf mat (make-omn
           :pitch (reverse ; reverse the pitches 
                   (integer-to-pitch '(0 1 2 3 4 5 6 7 8 9 10 11)))
           :length trans))
(setf sets (set-assignment 'mat mat))
(rnd-sample 8 (list mat0 mat3 mat5 mat8 mat10))

 

Share this post


Link to post
Share on other sites

SET-ASSIGNMENT function is a private (dev) function.

You know about the function because of the Mozarteum Uni. 

The official name for the function is ASSIGN-VARIABLE, the SET-ASSIGNMENT function name will be removed from the system.

 

assign-variable index-name lists

 

[Function]

 

Arguments and Values:

 

index-name        an index name.

lists                    a lists.

 

Description:

 

The function ASSIGN-VARIABLE provides a way of labelling items as variables. It uses a similar mechanism to that found in the function CREATE-ASSIGNMENT but without the need for additional evaluation.

 

(assign-variable 'var '((c4 cs4 d4) (ds4 e4 f4)

                        (fs4 g4 gs4) (a4 bb4 b4)))

 

var0

=> (c4 cs4 d4)

 

var1

=> (ds4 e4 f4)

 

var2

=> (fs4 g4 gs4)

 

var3

(a4 bb4 b4)

 

Examples:

 

(setf perc-motifs

      (gen-divide

       5 (integer-to-pitch (rnd-number 20 -1 5))))

=> ((c4 c4 db4 db4 eb4) (eb4 e4 db4 f4 db4

    (d4 eb4 e4 db4 db4) (db4 db4 c4 db4 db4))

 

(assign-variable 'perc perc-motifs)

=> (perc0 perc1 perc2 perc3)

 

perc2

=> (cs4 d4 d4 eb4 cs4)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Topics

    • By opmo
      Please drop the file "v.aiff" into the ~/Opusmodus/Media/Audio directory.
      This file is a part of one of the CLM examples.
       
      soundfile: v.aiff
       
    • By Andy
      I'm sure it's staring me in the face but I cannot find any info on the Live Coding Instrument apart from the videos Stephane made.
      Thanks
    • By hlcny
      The "Introduction to Opusmodus"  tutorial states that the 30 part stages collection of score-scripts and text commentaries..."is available for download as a pdf file formatted as a printable A4 book". But I have not been able to find the download...where can I find it? On a related note, and partly the reason for my wanting to get a pdf, is there any way to make the fonts larger in the Assistant pane? Thanks in advance for any info!
×
×
  • Create New...