event/make-event-tree [ Functions ]

[ Top ] [ event ] [ Functions ]

Name

 make-event-tree

File

 event-generate.lsp

Description

 make-event-tree provides a quicker way for declaring a larger
 event-structure without having to call make-event over and over
 again. It uses a simple syntax:

 - A number at the beginning of a list indicates an amount of
   events to generate, all with equal values.
 - Any following list element may either be
   (a) any keyword argument to make-event, followed by a value.
   (b) a list, structured in the same way as the first one,
       indicating a specific amount of sub-events.

Arguments

 event-tree: A list, as specified in Description and Example.

Return Value

 list of events

Synopsis

(defun make-event-tree (event-tree)
  "Evaluates an event-tree-map and returns a list of events."

Example

(make-event-tree `((8 :pitch ,(hz 100)
                      (1 :pitch ,(hz 200))
                      (2 :pitch ,(hz 300)))
                   (3 :duration 1
                      (7 :pitch ,(midinote 66))
                      (5 :start-time 0))
                   (4 :render-modes midi-mode
                      (6))))

event/make-n-events [ Functions ]

[ Top ] [ event ] [ Functions ]

Name

 make-n-events

File

 event-generate.lsp

Description

 Handy function for creating n events with same initial
 slot-values. 

Arguments

 n: an integer, the amount of events to return
 args (rest): all args as in make-event

Return Value

 list (of events)

Synopsis

(defun make-n-events (n &rest args)

Example

(make-n-events 10 :pitch 100) 
  --> 10 events in a list, all with pitch = 100.