Jump to content

error in tutorial 'Lesson 2 - Algorithmic


Recommended Posts

the function is missing here:

;;; Lesson 2 - Algorithmic
;;; 4. Pitches
;;;---------------------------------------------------------

(setf pitch-transp (7 -12 pitches))

 

;; Now let's transpose those pitches down an octave.

this snippet eval gives this:

> Error: Car of (7 -12 pitches) is not a function name or lambda-expression.
> While executing: ccl::cheap-eval-in-environment, in process Listener-1(8).

 

so I checked back to the Full score and it says this:

(setf pitch-transp (pitch-transpose -12 pitches))

 

which works and makes sense! the name of the setfield is quite similar to the function which can be confusing...

Just thought I would point this out for the benefit of other newbies!

julio

Link to comment
Share on other sites

ah! OK, I went by steps originally, so I assumed all had been set by the full score... hum.

just tried it again and it gives the error even if I evaluate the full score first... this snippet:

(setf pitch-transp (7 -12 pitches))

 

returns:

Error: Car of (7 -12 pitches) is not a function name or lambda-expression.
> While executing: ccl::cheap-eval-in-environment, in process Listener-2(38).

 

still think it is an error...

:)

Link to comment
Share on other sites

There is no such a expression in the score:

(setf pitch-transp (7 -12 pitches))

 

This is an errors for sure :-)

Here is the Full score:

;;;---------------------------------------------------------
;;; Lesson 2 - Algorithmic
;;; 2. Full Score
;;;---------------------------------------------------------

(setf size 120)
(setf vector
      (gen-sine
       size 1 '(0.5 0.4 0.3 0.6)
       :modulation (gen-sine size 1 0.3 :phase 180)))
(list-plot vector)
(setf pitch (vector-to-pitch '(g1 g6) vector))
(setf pitches (gen-divide 4 pitch))
(setf pitch-transp (pitch-transpose -12 pitches))
(setf section (rnd-unique 15 (gen-integer 0 27)))
(setf variants (pitch-variant
                pitch-transp :variant '? :section section))
(setf length1 (rnd-sample size '(s e s s)))
(setf span (get-span length1))
(setf length2 (length-span span (rnd-sample size '(s e s s))))
(setf dynamic1 (rnd-sample size '(p mp mf f ff)))
(setf dynamic2 (rnd-sample size '(p mp mf f ff)))

(def-score sine
           (:key-signature 'atonal
            :time-signature '((1 1 1 1) 4)
            :tempo 120
            :layout (piano-solo-layout 'rh 'lh
                                  :all-accidentals t
                                  :ignore-velocity t))
  (rh
   :length length1
   :pitch pitches
   :velocity dynamic1
   :sound 'gm :channel 1 :program 'acoustic-grand-piano)
  
  (lh
   :length length2
   :pitch variants
   :velocity dynamic2)
  )

 

Link to comment
Share on other sites

The 4. Pitch.opmo document:

;;;---------------------------------------------------------
;;; Lesson 2 - Algorithmic
;;; 4. Pitches
;;;---------------------------------------------------------

(setf pitch (vector-to-pitch '(g1 g6) vector))

;; Here we are converting the vector values to pitch
;; symbols in a range from G1 to G6. Select the
;; expression and see the pitches appear in the LISTENER.

(setf pitches (gen-divide 4 pitch))

;; In the next step of our exercise we'll divide the
;; PITCH list into groups of four pitches.

(setf pitch-transp (pitch-transpose -12 pitches))

;; Now let's transpose those pitches down an octave.

;; Try viewing / playing these expressions as SNIPPETS.
;; Select an expression and go to the TOOLS menu and
;; experiment.

 

If want to go back to the original Quick Start workspace:

1. Close the 'Quick Start' workspace if open.
2. Quit the Opusmodus app.
3. Delete the 'Quick Start' folder from your ~/Opusmodus folder which you will find in your home directory.
4. Start the Opusmodus app.
5. Go to 'Help' menu and select 'Install Quick Start Workspace'
6. Press OK
7. The new 'Quick Start' workspace will open.

Every time you wan’t to open the Quick Start workspace, simply select 'Open Quick Start Workspace' from the Help menu.

Link to comment
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.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy