# HG changeset patch # User Jamie Forth # Date 1298572797 0 # Node ID bc893627f92d204a8e4cc551ed33d7647539c2d8 # Parent f1e6d10fdb119b81c27098d6bd5d617bbe80c51a make gsharp events linked-events diff -r f1e6d10fdb11 -r bc893627f92d implementations/gsharp/classes.lisp --- a/implementations/gsharp/classes.lisp Thu Feb 24 11:23:19 2011 +0000 +++ b/implementations/gsharp/classes.lisp Thu Feb 24 18:39:57 2011 +0000 @@ -12,7 +12,8 @@ :initform nil :accessor %gsharp-time-signatures))) -(defclass gsharp-pitched-event (standard-chromatic-pitched-event gsharp-object) +(defclass gsharp-pitched-event (standard-chromatic-pitched-event + linked-event gsharp-object) ((note :initarg :note :reader note) (slice-index :initarg :slice-index))) @@ -36,4 +37,4 @@ (defclass gsharp-key-signature-period (standard-key-signature-period gsharp-import-mixin) ()) (defclass gsharp-time-signature-period (standard-time-signature-period gsharp-import-mixin) - ()) \ No newline at end of file + ()) diff -r f1e6d10fdb11 -r bc893627f92d implementations/gsharp/gsharp-import.lisp --- a/implementations/gsharp/gsharp-import.lisp Thu Feb 24 11:23:19 2011 +0000 +++ b/implementations/gsharp/gsharp-import.lisp Thu Feb 24 18:39:57 2011 +0000 @@ -1,9 +1,16 @@ (in-package "AMUSE-GSHARP") (defun make-gsharp-composition (events buffer timepoint interval &key tempi key-signatures time-signatures) - (let ((comp (make-instance 'gsharp-composition :buffer buffer :time timepoint :interval interval - :tempi tempi :key-signatures key-signatures :time-signatures time-signatures))) - (sequence:adjust-sequence comp (length events) :initial-contents events))) + (let ((comp (make-instance 'gsharp-composition :buffer buffer + :time timepoint :interval interval + :tempi tempi + :key-signatures key-signatures + :time-signatures time-signatures))) + (sequence:adjust-sequence comp (length events) :initial-contents events) + (sequence:dosequence (e comp t) ;; link events to composition + (%set-composition comp e)) + comp)) + (defun last-bar-p (bar) ;; I know most of this file is cut-and-pasted, but this is a @@ -244,4 +251,4 @@ (object) (list object)) -|# \ No newline at end of file +|#