|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
pwgl-users: BPF-Score in ENP-score windowsHi there, I am wonder if there exist a way to add user-defined templates to the library of BPF-score (something equivalent to the predefined: bpf Library/basics/Ramp-up available in the menu-option of the BPF-score). When having complex BPF-scores associated to a note or a group o notes it is very hard to edit the bpf coordinates by hand (things could be easier through algorithmic generation). The scenario is worst if one try to clone a given BPF associated to another note(s). It will be great having the possibility of storing user-defined BPF templates, as it happens with the other visual-tools such a as Note-head Designer and Expression-Designer and quote them in different locations of the ENP-score window. Does anyone has tried and/or solved a similar task? Please let me know... Mauricio _________________________________________________________________ P.D. Checa las nuevas fotos de mi Space http://home.services.spaces.live.com/ |
|
|
Re: pwgl-users: BPF-Score in ENP-score windowsFor copying, use the following (for autoloading save it into PWGL-
Users/ENP/autoloads/somefilename.lisp) to copy-paste expressions (to chords at the moment). (in-package :ccl) #-copy-expressions (defmethod paste-ENP-object((copied-object CONS) (object-type expression) (target CHORD)) (dolist (obj copied-object) (insert-expression target obj))) For adding to the BPF library you can use the following code (autoloading as above). This is a quick hack for the moment... I try to polish this for the future and add it to the kernel ... all you would need to do is to create new score-bpf-prototype methods as in the example. (in-package :ccl) #-add-bpf-from-menu (defmethod add-bpf-from-menu ((score score) (bpf bpf) function) (pushr (score-bpf-prototype bpf function t (calc-BPF-start-time bpf) (calc-BPF-end-time bpf) (min-val bpf) (max-val bpf) (BPF-Type bpf) (val-type bpf)) (break-point-functions bpf)) (setf (break-point-functions-pointer bpf) (1- (length (break-point- functions bpf)))) (redraw (subview score))) #-add-bpf-from-menu (make-ENP-key-event #\l "Add bpf from a library" (let ((functions (loop for m in (generic-function-methods #'score- bpf-prototype) when (let ((item (second (clos::method- specializers m)))) (when (listp item) (second item))) collect it))) (when-let (fn (capi::prompt-with-list functions "Select")) (mapc #'(lambda(x) (when (eql (type-of x) 'bpf) (add-bpf-from- menu self x fn))) selected-objects)))) ;************************************************************************************ ; create a new proto - example ;************************************************************************************ (defmethod score-bpf-prototype ((self bpf) (name (eql :random)) (category t) start-time end-time min-val max-val BPF-Type val-type) start-time end-time min-val max-val BPF-Type val-type ;; the arguments should be quite self-explanatory - points is a list of lists as in '((0.0 0.5) (0.4 0.2) ...) ascending x-wise (make-instance 'C-break-point-function :points (loop for x from start-time to end-time by (/ (abs (- end-time start-time)) 10.0) collect (list x (random (+ min-val (- max-val min-val))))) :r 0.0 :g 0.0 :b 0.0)) ;;<- color Mika On 21.9.2008, at 0:45, mauricio rodriguez wrote: > > Hi there, > > I am wonder if there exist a way to add user-defined templates to > the library of BPF-score (something equivalent to the predefined: > bpf Library/basics/Ramp-up available in the menu-option of the BPF- > score). When having complex BPF-scores associated to a note or a > group o notes it is very hard to edit the bpf coordinates by hand > (things could be easier through algorithmic generation). The > scenario is worst if one try to clone a given BPF associated to > another note(s). It will be great having the possibility of storing > user-defined BPF templates, as it happens with the other visual- > tools such a as Note-head Designer and Expression-Designer and quote > them in different locations of the ENP-score window. > > Does anyone has tried and/or solved a similar task? Please let me > know... > > Mauricio > > > _________________________________________________________________ > P.D. Checa las nuevas fotos de mi Space > http://home.services.spaces.live.com/ Dr. Mika Kuuskankare Researcher Centre for Music & Technology Sibelius Academy Henkilökohtainen postiosoite/Personal post address PL 342 - PO Box 342 FIN-00121 Helsinki, FINLAND Tel: +358 (0)40 5415 233 Skype: mkuuskan personal home page: www.siba.fi/~mkuuskan project home page: www.siba.fi/PWGL |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |