Jump to content

opmo

Administrators
  • Posts

    2,903
  • Joined

  • Last visited

Everything posted by opmo

  1. SET-ASSIGNMENT function is a private (dev) function. You know about the function because of the Mozarteum Uni. The official name for the function is ASSIGN-VARIABLE, the SET-ASSIGNMENT function name will be removed from the system. assign-variable index-name lists [Function] Arguments and Values: index-name an index name. lists a lists. Description: The function ASSIGN-VARIABLE provides a way of labelling items as variables. It uses a similar mechanism to that found in the function CREATE-ASSIGNMENT but without the need for additional evaluation. (assign-variable 'var '((c4 cs4 d4) (ds4 e4 f4) (fs4 g4 gs4) (a4 bb4 b4))) var0 => (c4 cs4 d4) var1 => (ds4 e4 f4) var2 => (fs4 g4 gs4) var3 (a4 bb4 b4) Examples: (setf perc-motifs (gen-divide 5 (integer-to-pitch (rnd-number 20 -1 5)))) => ((c4 c4 db4 db4 eb4) (eb4 e4 db4 f4 db4) (d4 eb4 e4 db4 db4) (db4 db4 c4 db4 db4)) (assign-variable 'perc perc-motifs) => (perc0 perc1 perc2 perc3) perc2 => (cs4 d4 d4 eb4 cs4)
  2. Just please the cursor on SETF function and type ⌃⇥ (ctrl/tab) setf place value [Macro] Arguments and Values: place a place. value a form. Description: Takes pairs of arguments like SETQ. The first is a place and the second is the value that is supposed to go into that place. Returns the last value. The place argument may be any of the access forms for which SETF knows a corresponding setting form. Examples: (setf pitch '(c4 e4 g4 c5)) => (c4 e4 g4 c5) pitch => (c4 e4 g4 c5) If more than one pair is supplied, the pairs are processed sequentially. (setf place-1 newvalue-1 place-2 newvalue-2 ... place-N newvalue-N) equivalent to (progn (setf place-1 newvalue-1) (setf place-2 newvalue-2) ... (setf place-N newvalue-N))
  3. We are in the process of streamlining function variable and keyword names. AMBITUS-SWALLOW is now AMBITUS-FILTER with additional keyword :remain (ambitus-filter '(-11 21) '((q c4ds3 e c4 c1 q d5 g9) (q c4 e d6 d6 d6 d6 c8 q d5 g9))) ((q c4ds3 e c4 - q d5 -) (q c4 -he q d5 -)) (ambitus-filter '(-11 21) '((q c4ds3 e c4 c1 q d5 g9) (q c4 e d6 d6 d6 d6 c8 q d5 g9)) :remain t) => ((-q. e c1 -q g9) (-q e d6 d6 d6 d6 c8 -q g9)) In the following functions the keyword :span is changed to :time TONALITY-MAP GET-HARMONIC-PATH HARMONIC-PATH DO-TIMELINE DO-TIMELINE2 If you use any of these functions please replace the keyword :span to :time. To make the replacement to your scores please use the 'Search Files...' tool which you will find in the Tools menu. A new keyword :exclude has been added to many functions which use :section option (the new option will be added to all functions soon).
  4. OMN-TO-TIME-SIGNATURE is the function you are looking for: (setf time-signatures '((1 4 1) (3 4 2) (4 4))) (setf omn1 '(-q q c5 p eb4 h gb4 q gb5 p a4 f c5 q c6 p eb5 gb5 q gb6 p a5 c6)) (omn-to-time-signature omn1 time-signatures) => ((-q) (q c5 p eb4 gb4 tie) (q gb4 p gb5 a4 f) (q c5 f c6 p eb5 gb5) (q gb6 p a5 c6))
  5. Emacs has M-x comment-or-uncomment-region, but that’s missing in Hemlock. If it’s Lisp expressions you’re commenting out, you can always prepend #+not #+not (defun foo (x) x)
  6. Would be great to have all VSL Instrument programs in Opusmodus Library.
  7. POSITION-FILTER works with OMN-Form (events) now: OMN events: (position-filter '(1 3 3 1 2 1 0 1 2) '(q c4 p e d4 e e4 q f4 s g4 a4 bb4 b4)) => (e d4 p q f4 f4 e d4 e4 d4 q c4 e d4 e4) (position-filter '((1 3 3 1 2 5) (1 0 1 2 7 3)) '(q c4 p e d4 e e4 q f4 s g4 a4 bb4 b4)) => ((e d4 p q f4 f4 e d4 e4 s a4) (e d4 p q c4 e d4 e4 s b4 q f4)) (position-filter '(1 0) '((q c4 p e d4 e e4) (s f4 mf s g4 e a4) (q b4 p s c5 s d5) (e e5 mp s. f5 t g5))) => ((s f4 mf s g4 e a4) (q c4 p e d4 e e4)) (position-filter '((1 0) (0 2)) '((q c4 p e d4 e e4) (s f4 mf s g4 e a4) (q b4 p s c5 s d5) (e e5 mp s. f5 t g5))) => ((e d4 p q c4) (s f4 mf e a4) (s c5 p q b4) (e e5 mp t g5)) (position-filter '((1 0) (0 2) (0 2) (0 2) (0 1) (0 2)) '((q c4 p e d4 e e4) (s f4 mf s g4 e a4) (q b4 p s c5 s d5) (e e5 mp s. f5 t g5))) => ((e d4 p q c4) (s f4 mf e a4) (q b4 p s d5) (e e5 mp t g5) (q c4 p e d4) (s f4 mf e a4))
  8. Fix to INTERGER-TO-INTERVAL: (integer-to-interval '((-12) ((2 4) 5 19 -12 (2 4) 5 19))) => ((nil) ((14 2) 1 14 -31 (14 2) 1 14)) Test (interval-to-integer '((nil) ((14 2) 1 14 -31 (14 2) 1 14)) :start -12) => ((-12) ((2 4) 5 19 -12 (2 4) 5 19)) (interval-to-pitch '((nil) ((14 2) 1 14 -31 (14 2) 1 14)) :start -12) => ((c3) (d4e4 f4 g5 c3 d4e4 f4 g5))
  9. New release: Fix to rest and ttrem positions in notation display.
  10. NEW: MODUS is working with omn-form lists now. (modus '((q c6 cs4 e a4 e3 d6 f4) (q b4 gs3 e bb4 eb4 g5 fs6))) => ((0 1 9 4 2 5) (11 8 10 3 7 6)) MOTIF-MAP function name has change to PATTERN-MAP with additional functionality. (setf omn '((s c4 d4 e4 f4 g4 a4 b4 c5) (5q c4 d4 e4 f4 g4 g4 f4 e4 d4 c4))) (pattern-map '(((c4 d4 e4) (cs4 ds4 f4)) ((f4 g4) (eb4 fs4))) omn :type :pitch) => ((s cs4 ds4 f4 eb4 fs4 a4 b4 c5) (5q cs4 ds4 f4 eb4 fs4 g4 f4 e4 d4 c4)) (pattern-map '(((c4 d4 e4) (cs4 ds4 f4)) ((f4 g4) (eb4 fs4))) omn :type :pitch :loop t) => ((s cs4 ds4 f4 f4 g4 a4 b4 c5) (5q c4 d4 e4 eb4 fs4 g4 f4 e4 d4 c4)) (setf mat '((q c6 cs4 a4 e3 d6 f4) (q b4 gs3 bb4 eb4 g5 fs6))) (modus mat) => ((0 1 9 4 2 5) (11 8 10 3 7 6)) (pattern-map '(((0 1 9 4 2 5) (0 4 2 1 9 5)) ((11 8 10 3 7 6) (10 8 11 3 7 6))) mat :type :pitch :pcs t) => ((q c6 e4 d4 cs3 a6 f4) (q bb4 gs3 b4 eb4 g5 fs6)) (pattern-map '(((0 1 9) (10 8 11)) ((11 8 10) (0 1 9))) mat :type :pitch :pcs t :loop t) => ((q bb6 gs4 b4 e3 d6 f4) (q c4 cs3 a4 eb4 g5 fs6))
  11. With time you will find a way how to control all this without the need to close/restart the app. I don't remember doing this, but I do remember to have the same problems you have describe above.
  12. (setf a 100) a => 100 (makunbound 'a) a => > Error: Unbound variable: a The simples way is to give the variable 'a new value. You can't clear and should not play with memory there are lots of variables which are part of the system. It is a good practise to give a more meaningful name to a variable then just a one character.
  13. Do you mean "Return To Top Level"? You find few commands in the Tools menu. There is never need to quit the app in order to continue.
  14. The function OMN-COMPONENT-REPLACE in a real OMN world will return errors with a complex attributes (articulations): ttrem, app, gliss etc... Anyway, bellow you will find few example how to manipulate algorithmically the OMN plists: (setf sequence '(q c4 pp e d4 mp e4 s f4 f> fs4 > g4 > gs4 pp)) (disassembling-omn ((pitch plist) sequence :pitch :flat nil :span :length) (let ((pitch (remove nil pitch))) (pitch-transpose -12 pitch))) (disassembling-omn ((length plist) sequence :length :flat nil :span :length) '(s s s s)) (disassembling-omn ((length plist) sequence :length :flat nil :span :pitch) '(s s s s)) (disassembling-omn ((velocity plist) sequence :velocity :flat nil :span :length) '(f f p p f f)) And now a complete function example with DISASSEMBLING-OMN macro: (defun length-rational-quantize (sequence &key (round 1/4) (type :extend) section exclude omn) (do-verbose ("length-rational-quantize") (labels ((length-rational-quantize-1 (length round) (let* ((sum (sum (abs! length))) (out (- (find-length-base sum round) sum))) (remove 0 (append length (list (neg! out)))))) (length-rational-quantize-l (list round &key (type :extend)) (let ((group (lists! (split-lengths list :type type)))) (flatten (loop for i in group collect (length-rational-quantize-1 i round))))) (length-rational-quantize-ls (list round &key (type :extend)) (let* ((len (length list)) (round (gen-trim* len (list! round)))) (loop for i in list for x in round collect (length-rational-quantize-l i x :type type)))) (length-rational-quantize* (list round &key (type :extend)) (if (listsp list) (length-rational-quantize-ls list round :type type) (length-rational-quantize-l list round :type type)))) (disassembling-omn ((sequence plist) sequence :length :span :length) (let ((len (length sequence))) (maybe-omn-decode omn (if exclude (maybe-section (lambda (x) (length-rational-quantize* x round :type type)) sequence (num-exclude len exclude)) (maybe-section (lambda (x) (length-rational-quantize* x round :type type)) sequence section)))))))) Note: Please don't distribute or share any of the code from the Source Code forum section.
  15. New: Improvement to tuplet brackets placement. MUSICXML-TO-EDITOR function. musicxml-to-editor file-name &key application identifier [Function] Arguments and Values: file-name a string. application a string. The default is "Sibelius". identifier a string. Description: The MUSICXML-TO-EDITOR function opens musicxml score files in any musicxml editor, like Sibelius, Finale etc... Examples: First, you need to create a musicxml file from your score: (compile-score 'file-name :output :musicxml :file "file-name") Next: (musicxml-to-editor "file-name") To open the file in Finale: (musicxml-to-editor "file-name" :application "Finale") If the application name is not working you can use the identifier keyword with the bundle-identifier. For example the Sibelius 7.5 version identifier is "com.avid.Sibelius75" (musicxml-to-editor "file-name" :identifier "com.avid.Sibelius75")
  16. Next week I will show you how to do all this in Opusmodus with build in functions especially for omn plists manipulation.
  17. The OSC library is build in version 1.2.20424, therefore there is no need to load the library with QUICKLISP anymore. About OSC library: https://github.com/zzkt/osc
  18. The ITERATE library is build in version 1.2.20405, therefore there is no need to load the library with QUICKLISP anymore. About ITERATE library: https://common-lisp.net/project/iterate/
  19. Maybe you should try to add the library to OM package and not the other way round.
  20. Fix to SPLIT-LENGTHS and LENGTH-RATIONAL-QUANTIZE.
  21. (ql:quickload "screamer") Thats all. For checking the code, tests etc... you can download the Screamer source and put anywhere you like. You could drop it to the Navigator for quick access to the example and the source.
  22. With SEED: (defun rnd-division (n &key (sum 1.0) seed) (do-verbose ("rnd-division") (rnd-seed seed) (let ((values (loop repeat (- n 1) with a = sum with b collect (setf b (random* a :seed (seed))) do (setf a (- a b))))) (append values (list (- sum (sum values))))))) (rnd-division 5 :seed 5) => (0.0052785673 0.09165209 0.06036401 0.65849 0.1842153) (rnd-division 3 :sum 9.8 :seed 87) => (3.9023237 0.8761092 5.0215673) To add seed to the function use RANDOM* OM function.
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy