User Extensions Source Code
Here you can share your functions source code
205 topics in this forum
-
The subject says it all... Best, Torsten LENGTH-DIVIDE2 Documentation seemingly not updated (neither reference nor examples) after function has been changed for the argument :position. For example, the following example call throws an error (length-divide2 '(1 2 2) '(1/16) '(1/4 1/4 1/4 1/4) :type 'n :position 'e) > Error: There is no POSITION named: e. > Allowed POSITION: 'f (first) 'l (last) 'c (center) and '? (at random). BTW: Unfortunately, that helpful error message is not shown if I try to directly output the above …
-
- 2 replies
- 2.4k views
-
-
Dear developers, Below I report another bug (or at least what I assume is a bug). Thank you! Best, Torsten LENGTH-ADJUST If arg value is below the overall length (duration) of the given phrase, then the result is nevertheless longer than the input, seemingly by the absolute difference. This corner case is not covered by the documentation, but for consistency it would likely be better to shorten the input sequence, if the given length value is shorter than the sequence. Examples: (length-adjust 3/4 '(q c3 e d3 e3 q f3 e g3 a3)) (length-adjust 2/4 '(q c3 e d3 e3 q f3 e g3 a3)) …
-
- 0 replies
- 1.6k views
-
-
Dear developers, Opusmodus has a nice and rather extensive documentation. Nevertheless, I wondered why you use manually written rtf files for that. As you most likely know, Common Lisp already supports facilities to add documentation to symbols (e.g., functions) themselves. Example: try (documentation 'list 'function). With such facilities some automatically generated documentation could be created (at least partly), which would at least avoids certain typos. I ran in only a few typos so far in the documentation, but they exist. Here is an example: In reference, the first argument of TONALITY-SERIES is root, but th…
-
- 0 replies
- 1.8k views
-
-
This question is answered beautifully by Rainer Joswig on 'Stack Overflow' site. Difference between `set`, `setq`, and `setf` in Common Lisp? STACKOVERFLOW.COM What is the difference between "set", "setq", and "setf" in Common Lisp? (set 'mat '(c4 d4 e4)) (setq mat '(c4 d4 e4)) (setf mat '(c4 d4 e4))
-
- 0 replies
- 6.1k views
-
-
To add a SEED to your own function and make it work you need to follow three simple rules: Add keyword SEED into the function arguments. (rnd-seed seed) should be placed at the beginning of the function. Nested functions that use seed need to use a (seed) function and not a seed argument. Example: (defun rnd-number (n low high &key seed) (do-verbose ("rnd-number") (rnd-seed seed) (if (zerop n) nil (cons (round (+ low (rnd-round 0 (- high low) :seed (seed)))) (rnd-number (decf n) low high :seed (seed)))))) Each time we evaluate the expression we get a different res…
-
- 0 replies
- 2k views
-