Search the Community
Showing results for tags 'user defined function'.
-
Given: user defined function: test-foo-lib in Opusmodus/User Source/Libraries/Def-Unfold-Sets Opusmodus version: Version 3.0.28766 (3.0.28766) (defun test-foo-lib (offset pattern) (setf pattern-flat (flatten pattern)) (format t "test-foo-lib: ~% offset: ~A ~% pattern: ~A ~% pattern-flat ~A ~%" offset pattern pattern-flat) (setf pat-length (omn :length pattern)) ;just for debugging reason (setf result (pitch-transpose offset pattern-flat))) ;Test (setf my-pattern '(s bb4 p a4 h. db4 t gs4 mf fs4 c5 b4 q f5 e5)) (setf testresult-1 (test-foo-lib 12 my-pattern)) ;direct call Listener output: result: just perfect! test-foo-lib: offset: 12 pattern: (s bb4 p a4 h. db4 t gs4 mf fs4 c5 b4 q f5 e5) pattern-flat (s bb4 p a4 h. db4 t gs4 mf fs4 c5 b4 q f5 e5) omn pitch-transpose (s bb5 p a5 h. cs5 t gs5 mf fs5 c6 b5 q f6 e6) ;----------------------------------------------------------------- Problem: However if test-foo-lib is called via (def-unfold-set dw-om-methods :methods ( :group expansion p-exp-patt (:pitch (test-foo-lib 12 x)))) with the following call: (in same library file or called from my projects file) (unfold 'dw-om-methods '(p-exp-patt) my-pattern) Listener output: bad result: 1) pattern becomes a list of list. 2) only pitch information available! Therefore the logical error message: No length information OM 24 > unfold test-foo-lib: offset: 12 pattern: ((bb4 a4 db4 gs4 fs4 c5 b4 f5 e5)) pattern-flat (bb4 a4 db4 gs4 fs4 c5 b4 f5 e5) Error: No length specified before first pitch 1 (abort) Return to top loop level 0. ;----------------------------------------------------------------- What is going on here, what can I do, what is wrong? Thanks for any hints! Daniel
- 8 replies
-
- def-unfold-set
- unfold
-
(and 1 more)
Tagged with: