complete-set/make-complete-set [ Functions ]

[ Top ] [ complete-set ] [ Functions ]

DESCRIPTION

 Create a complete-set object, which as an extension of the tl-set class
 allows checking for full sets: ones in which every note of *standard-scale*
 is present.  

ARGUMENTS

 - A set of pitches. This can either take the form of a list of note-name
   symbols or a complete-set, tl-set or sc-set object.

OPTIONAL ARGUMENTS

 keyword arguments:
 - :id. An number, symbol or string that is to be the ID of the given
   complete-set object (see doc for sc-set).
 - :tag. A number, symbol or string that is secondary name, description, tag
   etc. for the given complete-set object. The :tag serves for
   identification but not searching purposes (see doc for named-object).
 - :subsets. An assoc-list of key/data pairs, in which the data is a list of
   note-name symbols that are a subset of the main set. One use for this
   keyword argument might be to create subsets that particular instruments
   can play; these would then be selected in the chord-function passed to
   the instrument object (see doc for sc-set).
 - :related-sets. An assoc-list of key/data pairs, similar to :subsets, only
   that the pitches given here do not have to be part of the main set. This
   can be used, for example, for pitches missing from the main set (see doc
   for sc-set).
 - :auto-sort. T or NIL to indicate whether the specified pitches (note-name
   symbols) are to be automatically sorted from lowest to highest. 
  T = sort. Default = T. (see doc for sc-set)
 - :transposition. A number that is the number of semitones by which the
   pitches of the new complete-set are to be transposed when the object is
   created. Default = 0.  (see doc for tl-set)
 - :limit-upper. A note-name symbol or a pitch object to indicate the
   highest possible pitch in the given complete-set object to be
   created. (see doc for tl-set)
 - :limit-lower.  A note-name symbol or a pitch object to indicate the
   lowest possible pitch in the complete-set object to be created. (see doc
   for tl-set)
 - :complete. T, NIL, or 'CHROMATIC. This argument can be given at init, and
   if the set is not complete in the sense of T or 'CHROMATIC (all
   chromatic, equally-tempered notes are present in the set), a warning is
   printed. If the set is neither T nor 'CHROMATIC at init, then no warning
   will be issued. In both cases the COMPLETE slot of the given complete-set
   object will be set after checking the set.
 - :midi-channel. The channel to set chromatic pitches to. Default = 1.
 - :microtones-midi-channel The channel to set microtonal pitches to.
   Default = 2.

RETURN VALUE

 A complete-set object.

EXAMPLE

;; Create a complete set using a list of note-name symbols and the default
;; values for the keyword arguments
(make-complete-set '(d2 f2 a2 c3 e3 g3 b3 d4 gf4 bf4 df5 f5 af5 c6))

=>
COMPLETE-SET: complete: NIL
... 
data: (D2 F2 A2 C3 E3 G3 B3 D4 GF4 BF4 DF5 F5 AF5 C6)

;; A new complete-set object can be created from tl-set and sc-set objects
(let ((mcs (make-complete-set 
            (make-tl-set '(d2 f2 a2 c3 e3 g3 b3 d4 gf4 bf4 df5 f5 af5)))))
  (pitch-symbols mcs))

=> (D2 F2 A2 C3 E3 G3 B3 D4 GF4 BF4 DF5 F5 AF5)

(let ((mcs (make-complete-set 
            (make-sc-set '(d2 f2 a2 c3 e3 g3 b3 d4 gf4 bf4 df5 f5 af5)))))
  (pitch-symbols mcs))

=> (D2 F2 A2 C3 E3 G3 B3 D4 GF4 BF4 DF5 F5 AF5)

;; Using the other keyword arguments
(make-complete-set '(d2 f2 a2 e3 g3 b3 d4 gf4 bf4 df5 f5 af5)
             :id 'csset
             :subsets '((low (d2 f2 a2)) 
                        (mid (b3 d4)))
             :related-sets '((not-playable (dqs2 eqf3)))
             :transposition 3
             :limit-upper 'g5
             :limit-lower 'e2)

=> 
COMPLETE-SET: complete: NIL
... 
data: (F2 AF2 C3 G3 BF3 D4 F4 A4 CS5 E5)

SYNOPSIS

(defun make-complete-set (set &rest keys
                          &key id tag subsets related-sets 
                            (transposition 0) (auto-sort t) (warn-dups t)
                            (rm-dups t) limit-upper limit-lower complete
                            ;; MDE Fri Aug 24 14:56:50 2018 
                            (midi-channel 1) (microtones-midi-channel 2))

complete-set/make-stack [ Functions ]

[ Top ] [ complete-set ] [ Functions ]

DESCRIPTION

 Make a complete-set containing stacks based on the given notes.  See
 documentation for the stack method in the sc-set class for details of
 what this algorithm does.

ARGUMENTS

 - an ID for the set to be created (symbol, string, number)
 - a list of notes as either symbols or pitch objects
 - the number of stacks to create

OPTIONAL ARGUMENTS

 keyword arguments:
 - :by-freq. Use the frequencies of the pitches to create the stack instead
   of the interval structure. Default = NIL.  
 - :up. Apply the process upwards in pitch space. Default = T.
 - :down. Apply the process downwards in pitch space. Default = T.

RETURN VALUE

 a complete-set object

SYNOPSIS

(defun make-stack (id notes num-stacks &key by-freq (up t) (down t))

tl-set/complete-set [ Classes ]

[ Top ] [ tl-set ] [ Classes ]

NAME

 complete-set

 File:             complete-set.lsp

 Class Hierarchy:  named-object -> linked-named-object -> sclist -> chord ->
                   sc-set -> tl-set -> complete-set

 Version:          1.0.12

 Project:          slippery chicken (algorithmic composition)

 Purpose:          Implementation of the complete-set class which as an
                   extension of the tl-set class allows checking for full
                   sets: ones in which every note of the current scale is
                   present. 

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

 Creation date:    10th August 2001

 $$ Last modified:  18:13:03 Fri Jan 26 2024 CET

 SVN ID: $Id$