bar-holder/section [ Classes ]

[ Top ] [ bar-holder ] [ Classes ]

NAME

 section

 File:             section.lsp

 Class Hierarchy:  named-object -> linked-named-object -> bar-holder 
                   -> section

 Version:          1.0.0-beta1

 Project:          slippery chicken (algorithmic composition)

 Purpose:          Implementation of section class which is simply a bar
                   holder and recursive-assoc-list that contains (possibly
                   subsections which contain) player-sections. 

 Author:           Michael Edwards: m@michael-edwards.org

 Creation date:    23rd March 2002

 $$ Last modified: 21:47:20 Sun May  6 2012 BST

 SVN ID: $Id: section.lsp 1764 2012-05-17 11:49:59Z medward2 $

section/get-all-players [ Methods ]

[ Top ] [ section ] [ Methods ]

FUNCTION

ARGUMENTS

OPTIONAL ARGUMENTS

RETURN VALUE

EXAMPLE

SYNOPSIS

(defmethod get-all-players ((s section))

section/get-bar [ Methods ]

[ Top ] [ section ] [ Methods ]

FUNCTION

ARGUMENTS

OPTIONAL ARGUMENTS

RETURN VALUE

EXAMPLE

SYNOPSIS

(defmethod get-bar ((s section) bar-num &optional player)

section/get-sequenz [ Methods ]

[ Top ] [ section ] [ Methods ]

FUNCTION

 Get the specified sequenz object from a given section object.

ARGUMENTS

 - A section object.
 - The ID of the player from whose part the sequenz object is to be
   returned. 
 - An integer that is the number of the sequence object to be returned from
   within the given section object. This number is 1-based.

RETURN VALUE

 A sequenz object.

EXAMPLE

(let ((mini
       (make-slippery-chicken
        '+mini+
        :ensemble '(((cl (b-flat-clarinet :midi-channel 1))
                     (vc (cello :midi-channel 2))))
        :set-palette '((1 ((f3 g3 a3 b3 c4))))
        :set-map '((1 (1 1 1 1 1))
                   (2 (1 1 1 1 1))
                   (3 (1 1 1 1 1)))
        :rthm-seq-palette '((1 ((((4 4) h q e s s))
                                :pitch-seq-palette ((1 2 3 4 5))))
                            (2 ((((4 4) q e s s h))
                                :pitch-seq-palette ((1 2 3 4 5))))
                            (3 ((((4 4) e s s h q))
                                :pitch-seq-palette ((1 2 3 4 5)))))
        :rthm-seq-map '((1 ((cl (1 1 1 1 1))
                            (vc (1 1 1 1 1))))
                        (2 ((cl (2 2 2 2 2))
                            (vc (2 2 2 2 2))))
                        (3 ((cl (3 3 3 3 3))
                            (vc (3 3 3 3 3))))))))
  (get-sequenz (get-section mini 2) 'vc 2))

=>
SEQUENZ: pitch-curve: (1 2 3 4 5)
RTHM-SEQ: num-bars: 1
          num-rhythms: 5
          num-notes: 5
          num-score-notes: 5
          num-rests: 0
          duration: 4.0
          psp-inversions: NIL
          marks: NIL
          time-sigs-tag: NIL
          handled-first-note-tie: NIL
         (for brevity's sake, slots pitch-seq-palette and bars are not printed)
SCLIST: sclist-length: 3, bounds-alert: T, copy: T
LINKED-NAMED-OBJECT: previous: (1), this: (2), next: (3)
BAR-HOLDER: 
            start-bar: 7
            end-bar: 7
            num-bars: 1
            start-time: 24.0
            end-time: 28.0
            start-time-qtrs: 24.0
            end-time-qtrs: 28.0
            num-notes (attacked notes, not tied): 5
            num-score-notes (tied notes counted separately): 5 
            num-rests: 0
            duration-qtrs: 4.0 
            duration: 4.0 (4.000)

SYNOPSIS

(defmethod get-sequenz ((s section) player seq-num) ; 1-based

section/has-subsections [ Methods ]

[ Top ] [ section ] [ Methods ]

FUNCTION

ARGUMENTS

OPTIONAL ARGUMENTS

RETURN VALUE

EXAMPLE

SYNOPSIS

(defmethod has-subsections ((s section))

section/num-sequenzes [ Methods ]

[ Top ] [ section ] [ Methods ]

FUNCTION

 Get the number of sequenz objects in a given section object.

ARGUMENTS

 - A section object.

RETURN VALUE

 An integer that is the number of sequenz objects in the specified section
 object. 

EXAMPLE

(let ((mini
       (make-slippery-chicken
        '+mini+
        :ensemble '(((vc (cello :midi-channel 1))))
        :set-palette '((1 ((f3 g3 a3 b3 c4))))
        :set-map '((1 (1 1 1 1 1))
                   (2 (1 1 1 1 1))
                   (3 (1 1 1 1 1)))
        :rthm-seq-palette '((1 ((((4 4) h q e s s))
                                :pitch-seq-palette ((1 2 3 4 5)))))
        :rthm-seq-map '((1 ((vc (1 1 1 1 1))))
                        (2 ((vc (1 1 1 1 1))))
                        (3 ((vc (1 1 1 1 1))))))))
  (num-sequenzes (get-section mini 2)))

=> 5

SYNOPSIS

(defmethod num-sequenzes ((s section))

section/re-bar [ Methods ]

[ Top ] [ section ] [ Methods ]

FUNCTION

ARGUMENTS

OPTIONAL ARGUMENTS

RETURN VALUE

EXAMPLE

SYNOPSIS

(defmethod re-bar ((s section)
                   &key start-bar 
                   end-bar
                   (min-time-sig '(2 4))
                   verbose
                   ;; could also be a beat rhythmic unit
                   (auto-beam t))