./../../src/bar-holder.lsp

## bar-holder/change-pitches [ Methods ]

[ Top ] [ bar-holder ] [ Methods ]

FUNCTION

     new-notes is a list of lists, each sublist being the notes for each bar in
     succession.  e.g. (change-pitches bh 'vla 5 '((g3 gs4) nil (nil nil aqf5)))
     would change the notes in bars 5 and 7 (for the viola), whereas bar six,
     indicated by nil, wouldn't be changed; similarly the first two notes of bar
     7, being nil, also won't be changed, but note 3 will be.  NB tied notes are
     counted here.

     If use-last-octave, then notes can be given like '((a3 b g cs4))
     i.e. you only give the octave if it changes.

ARGUMENTS

     - the bar-holder object (e.g. piece)
     - the sc player (symbol)
     - which bar to start at (integer)
     - a list of notes in bars (see above)
     - (optional default t): whether the last note's octave will
        be used if any notes are specificed without an octave (doesn't work with
        chords).

RETURN VALUE

     always t

EXAMPLE

    ;;; (change-pitches bh 'vla 5 '((g3 gs4) nil (nil nil aqf5)))

SYNOPSIS

    (defmethod change-pitches ((bh bar-holder) player start-bar new-pitches
                               &optional (use-last-octave t) ignore)

## bar-holder/delete-all-marks [ Methods ]

[ Top ] [ bar-holder ] [ Methods ]

FUNCTION

     delete-all-marks:

ARGUMENTS

RETURN VALUE

EXAMPLE

DATE

SYNOPSIS

    (defmethod delete-all-marks ((bh bar-holder) start-bar num-bars player)

## bar-holder/get-note [ Methods ]

[ Top ] [ bar-holder ] [ Methods ]

FUNCTION

     Return an event from a bar.  bar-num and note-num are 1-based.  note-num
     can access the note of a chord like '(2 1) where 2 is the second "note" or
     non-rhythm event in the bar, and 1 is the first note in the chord counting
     from the bottom.  NB note-num counts tied notes i.e. it's not the attack
     number

ARGUMENTS

     - the bar-holder object (e.g. piece)
     - the bar number (starting from 1)
     - the note number (starting from 1) (see above).
     - the player (symbol)

OPTIONAL ARGUMENTS

     - (optional default nil) whether, when accessing a pitch in a chord,
        whether to return the written or sounding pitch.

RETURN VALUE

     An event object, or pitch if accessing a chord.

SYNOPSIS

    (defmethod get-note ((bh bar-holder) bar-num note-num player &optional written)

## bar-holder/transpose-bars [ Methods ]

[ Top ] [ bar-holder ] [ Methods ]

FUNCTION

ARGUMENTS

RETURN VALUE

EXAMPLE

DATE

SYNOPSIS

    (defmethod transpose-bars ((bh bar-holder) semitones start-bar num-bars player
                               &key
                               (destructively nil)
                               (print-bar-nums nil)
                               ;; the default functions are the class methods for
                               ;; pitch or chord.
                               (chord-function #'transpose)
                               (pitch-function #'transpose))

## linked-named-object/bar-holder [ Classes ]

[ Top ] [ linked-named-object ] [ Classes ]

NAME

     bar-holder

     File:             bar-holder.lsp

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

     Version:          1.0.0-beta1

     Project:          slippery chicken (algorithmic composition)

     Purpose:          This class is meant to be subclassed by piece, section
                       and sequence, all of which hold each other or, ultimately
                       a list of bars with relevant rhythms, timings, pitches
                       etc.

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

     Creation date:    16th February 2002

     $$ Last modified: 14:35:05 Fri Apr 20 2012 BST

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