This repository was archived by the owner on Aug 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 1414 (mixed :end (harmony :source (voice resource)))
1515 (mixed :start (harmony :source (voice resource))))))
1616
17+ (defmethod reinitialize-instance :after ((file trial :sound-bank) &key )
18+ (when (trial :loaded-p file)
19+ (let ((resources (slot-value file ' trial::resources)))
20+ (loop for resource being the hash-values of resources
21+ do (apply #' reinitialize-instance resource (trial ::generation-arguments file))))))
22+
1723(defmethod harmony :play ((file trial :sound-bank) &rest args)
1824 (let ((chance 8f0 )
1925 (resources (slot-value file ' trial::resources)))
6066 for file = (trial :coerce-asset-input asset input)
6167 collect (list* file :name (file-namestring file) params)))))
6268
63- (defmethod harmony :transition ((asset environment) to &rest args &key &allow-other-keys )
64- (apply #' harmony:transition (or (trial :resource asset T )
65- #- elide-allocation-checks (error " Voice has not been allocated." )
66- #+ elide-allocation-checks (return-from harmony :transition voice ))
69+ (defmethod harmony :transition ((env environment) to &rest args &key &allow-other-keys )
70+ (apply #' harmony:transition (or (trial :resource env T )
71+ #- elide-allocation-checks (error " Environment has not been allocated." )
72+ #+ elide-allocation-checks (return-from harmony :transition env ))
6773 to args))
6874
75+ (defmethod harmony :state ((env environment))
76+ (harmony :state (trial :resource env T )))
77+
6978(defclass music (trial :resource harmony :environment)
7079 ())
7180
You can’t perform that action at this time.
0 commit comments