opmo

Administrators
  • Content count

    1,012
  • Joined

  • Last visited

  • Days Won

    148

opmo last won the day on June 18

opmo had the most liked content!

2 Followers

About opmo

Contact Methods

  • Website URL
    https://opusmodus.com
  • Skype
    opusmodus

Profile Information

  • Gender
    Male

Recent Profile Visitors

2,523 profile views
  1. Congratulation a great composition beautifully structured and a great performance as well.
  2. This function will give you the correct result: (defun gen-collatz (n) (prog (value out) (setf value n) (setf out (cons value out)) loop (cond ((eql value 1) (return (nreverse out)))) (setf value (if (evenp value) (/ value 2) (+ (* 3 value) 1))) (setf out (cons value out)) (go loop))) (gen-collatz 12) => (12 6 3 10 5 16 8 4 2 1) (gen-collatz 27) => (27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1)
  3. New: BLOCK-CHORD-REDUCE The function BLOCK-CHORD-REDUCE reduces (compress) every bar of every instrument into a single chord. (setf rh '((-q. e gs3 f) (-q e a4 p stacc -) (-e q f5 f ten -e) ((acc e g6 mf) e6 p stacc -q.) (e cs4fs4c5 f marc -q e d3 p) (-e gs3 f - g6 p stacc) (-q. (acc e ds5 fff) e6 ff stacc) (-q c5 f ten) (-e (acc d6 mf) b5 p stacc - b3f5bb5 ff) (-q e a4 p stacc -) (-e cs4 f - c5 p stacc) (-q. e gs3 f))) (setf lh '((-q e bb5 f -) (-e a4 p stacc -q) (q cs4 f ten -e (acc b2 mf) d3 p stacc) (-q. e fs4c5f5 f marc) (-q e e6 p -) (-q e bb5 f -) (e b2 p stacc - (acc eb4 fff) d3 ff stacc -) (-e q fs4 f ten -e) ((acc e e3 mf) e g3 p stacc -q.) (e gs3cs4g4 ff marc -q e a4 p stacc) (-q e f5 f -) (e fs4 p stacc -q.))) In this example we use the time-signature from the sequence rh: (block-chord-reduce (list rh lh) :time rh) => ((1/2 gs3bb5) (1/2 a4) (1/2 f5cs4b2d3) (1/2 g6e6fs4c5f5) (1/2 cs4fs4c5d3e6) (1/2 gs3g6bb5) (1/2 ds5e6b2eb4d3) (1/2 c5fs4) (1/2 d6b5b3f5bb5e3g3) (1/2 gs3cs4g4a4) (1/2 cs4c5f5) (1/2 gs3fs4)) Reduce with option :row t (modus 12): (block-chord-reduce (list rh lh) :time rh :row t) Examples: Score: Howto Score/Chord Progression1.opmo (setf violin1 '(#|1|# (-t a3 f -s -t b3 -s -t b3 -s -t b3 -s -t b3 -s -t b3 -s -t b3 -s -t c4 -s) #|2|# (t c4 f c4 -s. t c4 c4 c4 c4 c4 -s. t c4 -s. t c4 -s. t d4 -s. t d4 -s. t d4 -s) #|3|# (-t d4 f -s. t d4 -s. t e4 -s. t e4 -s. t e4 -s. t e4 -s. t e4 -s. t e4 -s) #|4|# (-t e4 f -s. e e4 s s c4 c4 c4 c4 c4 c4 c4 t - - - d4 -s) #|5|# (-t e4 f -s -t e4 -s -t e4 -s -t e4 -s -t e4 -s -t e4 -s -t e4 -s -t e4 -s) #|6|# (-t a4 f -s -t a4 -s -t a4 -s -t a4 -s -t a4 -s -t a4 -s -t a4 -s -t a4 -s) #|7|# (-t b4 f -s. t b4 -s. t b4 -s. t b4 b4 b4 - b4 -s -t b4 -s -t b4 -s -t b4 -s) #|8|# (-t b4 f -s. t b4 -s. t b4 -s. t b4 b4 c5 - c5 -s -t c5 -s -t d5 -s -t d5 -s) #|9|# (e.. d5 f s s s q e5 s s s t - s e5 t) #|10|# (-t s e5 f t - s e5 t - s e5 t - s e5 t - s e5 t - s e5 t - s a5 t - a5 -s) #|11|# (-t b5 f -s. t b5 b5 c6 c6 c6 -q -s. t a3 b3 b3 b3 e -s.) #|12|# (-e -t b3 f b3 c4 c4 e -q t c4 c4 c4 c4 e s.) #|13|# (s c4 f -s. s d4 -e. t d4 d4 - d4 d4 e4 - e4 e4 e4 - e4 e4 e4 - e4 s -t) #|14|# (-e -t s c4 f -e. t c4 c4 - c4 c4 c4 - c4 c4 d4 - e4 e4 e4 - e4 -s.) #|15|# (-e -t s e4 f -e. t e4 e4 - e4 a4 a4 - a4 a4 a4 - a4 a4 a4 - b4 -s.) #|16|# (s b4 f -s. s b4 -e. t b4 b4 - b4 b4 b4 - b4 b4 b4 - b4 b4 b4 - b4 s c5 -t) #|17|# (-e -t c5 f c5 d5 d5 e -q t d5 d5 d5 e5 e s.) #|18|# (-t e5 f -s. t e5 e5 e5 e5 e5 -q -s. t e5 e5 e5 e5 e -s.) #|19|# (-t s e5 f t - s e5 t - s e5 t a5 - s a5 t - s b5 t - s b5 t c6 - s c6 t - a3 -s) #|20|# (e.. b3 f s s s q s s c4 c4 t - s c4 t) #|21|# (-t c4 f -s. t c4 -s. t c4 -s. t c4 c4 d4 - d4 -s -t d4 -s -t d4 -s -t d4 -s) #|22|# (-t e4 f -s. t e4 -s. t e4 -s. t e4 e4 e4 - e4 -s -t e4 -s -t e4 -s -t c4 -s) #|23|# (-t c4 f -s -t c4 -s -t c4 -s -t c4 -s -t c4 -s -t c4 -s -t c4 -s -t d4 -s) #|24|# (-t e4 f -s -t e4 -s -t e4 -s -t e4 -s -t e4 -s -t e4 -s -t e4 -s -t e4 -s) #|25|# (-t a4 f -s. e a4 s s s s s s s b4 b4 t - - - b4 -s) #|26|# (-t b4 f -s. t b4 -s. t b4 -s. t b4 -s. t b4 -s. t b4 -s. t b4 -s. t b4 -s) #|27|# (t b4 f b4 -s. t b4 c5 c5 c5 d5 -s. t d5 -s. t d5 -s. t d5 -s. t d5 -s. t d5 -s) #|28|# (-t e5 f -s -t e5 -s -t e5 -s -t e5 -s -t e5 -s -t e5 -s -t e5 -s -t e5 -s))) (setf violin2 '(#|1|# (-q... s e4 f fs4 fs4 t t t t t g3 -et t g3) #|2|# (t g3 f s s t t t t t -e.. t a3 a3 a3 a3 e.. -e) #|3|# (-t b3 f b3 b3 b3 e.. -s. s b3 b3 b3 t t g4 g4 g4 g4 -et t g4) #|4|# (t g4 f s s t a4 b4 b4 b4 b4 - b4 -s. t b4 -s. t b4 -s. t b4 -q) #|5|# (-t e5 f e5 e5 e5 e.. -et t e5 e5 e5 fs5 e.. -e) #|6|# (-t fs5 f fs5 fs5 fs5 e.. -ht s. fs5) #|7|# (s. fs5 f s e. s e. s e. t g5 - s g5 t) #|8|# (-t s a5 f t - s a5 t - s a5 t - b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5 b5) #|9|# (-t e6 f -s. t e6 -s. t e6 -s t fs6 fs6 fs6 g6 - g6 -s. t g6 -s. t e4 -s. t fs4 -s) #|10|# (t fs4 f fs4 -qs. t fs4 fs4 fs4 g3 g3 -qs. t g3 g3 g3) #|11|# (t g3 f g3 -qs. t g3 g3 g3 a3 a3 -qs. t a3 a3 a3) #|12|# (t b3 f b3 -qs. t b3 b3 b3 b3 b3 -qs. s. b3) #|13|# (e.. b3 f s g4 g4 g4 q s s s t - s a4 t b4) #|14|# (-t s b4 f t - s b4 t - s b4 t - s b4 t e5 - s e5 t - s e5 t - s e5 t - s. e5) #|15|# (-t s fs5 f t - s fs5 t - s fs5 t - s fs5 t - s fs5 t - s fs5 t - s fs5 t - s. fs5) #|16|# (e.. g5 f s s s a5 q s s s t - s b5 t) #|17|# (t b5 f b5 -qs. t b5 b5 b5 b5 b5 -qs. s. b5) #|18|# (t b5 f b5 -qs. t b5 b5 b5 b5 b5 -qs. t b5 b5 e6) #|19|# (t e6 f e6 -qs. t fs6 fs6 fs6 g6 g6 -qs. t g6 e4 fs4) #|20|# (-t fs4 f -s. t fs4 -s. t fs4 -s t fs4 fs4 g3 g3 - g3 -s. t g3 -s. t g3 -s. t g3 -s) #|21|# (-t s g3 f t - s g3 t - s a3 t - a3 a3 a3 b3 b3 b3 b3 b3 b3 b3 b3 b3 g4 g4 g4 g4 g4 g4 g4) #|22|# (s. g4 f s a4 e. b4 s e. s e. t - s b4 t) #|23|# (-t e5 f e5 e5 e5 e.. -ht s. e5) #|24|# (-t e5 f e5 fs5 fs5 e.. -et t fs5 fs5 fs5 fs5 e.. -e) #|25|# (t fs5 f s s t t t t t g5 - g5 -s. t g5 -s. t a5 -s. t a5 -q) #|26|# (-t a5 f a5 a5 a5 e.. b5 -s. s b5 b5 b5 t t t t t -et t b5) #|27|# (t b5 f s s t t t t t -e.. t b5 e6 e6 e6 e.. fs6 -e) #|28|# (-q... s fs6 f fs6 g6 t t t e4 -q))) (setf viola '(#|1|# (-w) #|2|# (-w) #|3|# (-w) #|4|# (-w) #|5|# (-h -e -t g5 f -s. t e4 -s. t g4 -s) #|6|# (-t c6 f -s. e d5 s g3 e5 d5 fs3 d5 fs5 g4 e3 g3 c5 -s.) #|7|# (-w) #|8|# (-w) #|9|# (-w) #|10|# (-h -e -t d5 f g5 e4 g4 e3 -s. d3) #|11|# (e.. fs3 f s g5 e6 g5 q c5 s d5 c5 d5 t g5 - s e3 t d3) #|12|# (-t s fs5 f t g5 - s e5 t g5 - s e4 t g5 - s c5 t d5 - s g5 t e6 - s d5 t fs5 - s g4 t fs3 - g5 -s) #|13|# (-t e4 f -q -s. e g5 t c3 -s. s d3 -e. t g5 e3 d6) #|14|# (t e4 f d5 fs3 g5 e4 g4 c5 d6 g4 d5 g4 e4 d3 s fs5 -e. s g3 -e. t e3 g3 c5) #|15|# (t g3 f c5 d5 g5 e3 d5 fs3 g4 e3 g5 e3 g3 c6 s d3 -e. s g5 -e. t e6 d3 fs5) #|16|# (-t d5 f -q -s. e fs5 t g5 -s. s e4 -e. t g5 c5 d6) #|17|# (-t s g3 f t e3 - s g5 t e3 - s d5 t fs4 - s g3 t e5 - s g3 t c6 - s d5 t g5 - s e4 t g4 - c6 -s) #|18|# (e.. d5 f s g3 e5 d5 q fs3 s d5 fs5 g4 t e3 - s g3 t c5) #|19|# (-h -e -t d5 f g5 e4 g4 e3 -s. d3) #|20|# (-w) #|21|# (-w) #|22|# (-w) #|23|# (-t fs3 f -s. e g5 s e6 g5 c5 d5 c5 d5 g5 e3 d3 fs5 -s.) #|24|# (-h -e -t g5 f -s. t e5 -s. t g5 -s) #|25|# (-w) #|26|# (-w) #|27|# (-w) #|28|# (-w))) (setf cello '(#|1|# (-w) #|2|# (-w) #|3|# (-w) #|4|# (-w) #|5|# (-w) #|6|# (-w) #|7|# (-w) #|8|# (-w) #|9|# (-w) #|10|# (-q -e -t e4 f c3 e3 a4 b3 -q -s. t e2 c4 b3) #|11|# (t d2 f b3 -q -s. t d4 e3 c2 e2 a3 -q -s. t b3 e4 c3) #|12|# (t e3 f c2 -q -s. t b2 d2 e4 c5 e4 -q -s. a3) #|13|# (e.. b3 f s a3 b3 e4 q c2 s b2 d4 e4 t c4 - s e4 t c3) #|14|# (-t s e4 f t a3 - s b3 t e4 - s c5 t b3 - s d4 t e3 - s d2 t e4 - s c3 t e4 - s a2 t b2 - s. e4) #|15|# (-t s c2 f t b4 - s c3 t b3 - s d2 t e4 - s c3 t e3 - s a3 t b4 - s e3 t b3 - s e3 t c3 - s. b2) #|16|# (e.. d4 f s e2 c2 e2 q a3 s e2 a3 b3 t e4 - s c2 t b3) #|17|# (t d2 f e3 -q -s. t c2 e4 c2 e2 a4 -q -s. b2) #|18|# (t e4 f c5 -q -s. t b2 d4 b3 d4 e4 -q -s. t c3 e4 a3) #|19|# (-q -e -t b4 f e2 c2 e4 c2 -q -s. t b3 d3 e2) #|20|# (-w) #|21|# (-w) #|22|# (-w) #|23|# (-w) #|24|# (-w) #|25|# (-w) #|26|# (-w) #|27|# (-w) #|28|# (-w))) (block-chord-reduce (list violin1 violin2 viola cello)) (block-chord-reduce (list violin1 violin2 viola cello) :row t) The option :time allows to change the scope of the analysis: (block-chord-reduce (list violin1 violin2 viola cello) :time 4/8) (block-chord-reduce (list violin1 violin2 viola cello) :time 1/4) The option :bar allows to view a specified bar number only: (block-chord-reduce (list violin1 violin2 viola cello) :bar '(10 11)) Best wishes, JP
  4. (guitar-down8-layout 'inst)
  5. New: POSITION-ATTRIBUTE ATTRIBUTE-MAP EVENTS-ANALYSIS OM Developer/Predicates: 12TONEP CONTAIN-ATTRIBUTEP ATTRIBUTE-SYMBOLP EVENT-RESTP POSITION-ATTRIBUTE: The function POSITION-ATTRIBUTE returns a lists of bar numbers and positions values of a given attribute in a sequence. This function is a companion to the ATTRIBUTE-MAP function. Examples: (setf mat '((h. f6 mp stacc) (-q h a4d2 p fermata e fermata) (e. a4d2 p - h e4g3 mf s fs6 p e c6 mp ten e. cs4 p tie) (e cs4 p q gs5eb6 h b2 p stacc e stacc) (q b2 p tie s q f6a4 mf -e q. d2 p ten) (h d2 p tie s q e4 mp tr2 s tr2 -q. q f4 stacc) (s f4 h. a3gs5 p fermata -e. -s))) (position-attribute 'fermata mat) => ((2 (1/4 3/4)) (7 (1/16))) (position-attribute '(fermata stacc) mat) => (((2 (1/4 3/4)) (7 (1/16))) ((1 (0)) (4 (3/8 7/8)) (6 (5/4)))) ATTRIBUTE-MAP: The function ATTRIBUTE-MAP aligns attributes of one sequence (instrument) to another sequence. It is especially useful when aligning attributes like fermatas. Examples: (setf inst1 '((5h fs6 mp stacc 5q f6 ten - fs6 fermata) (3h bb6 p stacc -3q) (5q gs6 f stacc a6 ten - gs6 fs6 fermata) (5e gs6 mf stacc fs6 stacc 5q g6 ten - gs6 fermata g6) (s bb6 mp stacc b6 ten bb6 -) (5q f6 p stacc 5h fs6 ten 5q f6 -) (5q eb6 f stacc - 5h e6 ten 5q eb6))) (setf inst2 '((3q c6 mf -3h) (-5q gs5 p 5h g5 5e gs5 g5) (-3q 3h bb5 p) (-3h 3e bb5 mf a5) (-3q 3h a5 mp) (5e bb5 p c6 -5q 5h b5 5e 5e cs6) (-s c6 f d6 e6))) Inserting fermata attribute into the inst2 sequence: (setf map (position-attribute 'fermata inst1)) => ((1 (1/5)) (3 (1/5)) (4 (3/20))) (attribute-map 'fermata map inst2) => ((3q c6 mp -3h fermata) (-5q gs5 p 5h g5 5e gs5 g5) (-3q 3h bb5 f fermata) (-3h 3e bb5 mf fermata a5) (-3q 3h a5 mp) (5e bb5 p c6 -5q 5h b5 5e 5e cs6) (-s c6 f d6 e6)) Inserting fermata and stacc attributes into the inst2 sequence: (setf map2 (position-attribute '(fermata stacc) inst1)) => (((1 (1/5)) (3 (1/5)) (4 (3/20))) ((1 (0)) (2 (0)) (3 (0)) (4 (0 1/40)) (5 (0)) (6 (0)) (7 (0)))) (attribute-map '(fermata stacc) map2 inst2) => ((3q c6 mf stacc -3h fermata) (-5q gs5 mf 5h g5 5e gs5 g5) (-3q 3h bb5 mf fermata) (-3h 3e bb5 mf stacc+fermata a5) (-3q 3h a5 mp) (5e bb5 p stacc c6 -5q 5h b5 5e 5e cs6) (-s c6 f d6 e6)) EVENTS-ANALYSIS: The function EVENTS-ANALYSIS analyses a list of events of a given bar in a sequence. Examples: (setf mat '((5h fs6 mp stacc 5q f6 ten - fs6 fermata) (3h bb6 p stacc -3q) (5q gs6 f stacc a6 ten - gs6 fs6 fermata) (5e gs6 mf stacc fs6 stacc 5q g6 ten - gs6 fermata g6) (s bb6 mp fermata-l b6 ten bb6 -) (5q f6 p stacc 5h fs6 ten 5q f6 -) (5q eb6 f stacc - 5h e6 ten 5q eb6))) (events-analysis 2 mat) => Bar: 2 Time Signature: (1 4 1) Events: ((3h bb6 p stacc) (-3q)) Span: (1/6 1/12) Pitch: (bb4) Prime Form: nil Normal Order: nil Velocity: (p) Ambitus: (bb6 bb6) Interval Ambitus: 0 (events-analysis 4 mat) => Bar: 4 Time Signature: (1 4 1) Events: ((5e gs6 mf stacc) (5e fs6 mf stacc) (5q g6 mf ten) (-5q) (5q gs6 mf fermata) (5q g6 mf)) Span: (1/40 1/40 1/20 1/20 1/20 1/20) Pitch: (gs4 fs4 g4) Prime Form: (0 1 2) Normal Order: (6 7 8) Velocity: (mf) Ambitus: (fs6 gs6) Interval Ambitus: 2 (setf mat2 '((h. f6 mp stacc) (-q h a4d2 p fermata e fermata) (e. a4d2 p - h e4g3 mf s fs6 p e c6 mp ten e. cs4 p tie) (e cs4 p q gs5eb6 h b2 p stacc e stacc) (q b2 p tie s q f6a4 mf -e q. d2 p ten) (h d2 p tie s q e4 mp tr2 s tr2 -q. q f4 stacc) (s f4 h. a3gs5 p fermata -e. -s))) (events-analysis 5 mat2) => Bar: 5 Time Signature: (17 16 1) Events: ((q b2 p tie) (s b2 p) (q f6a4 mf) (-e) (q. d2 p ten)) Span: (1/4 1/16 1/4 1/8 3/8) Pitch: (b4 f4 a4 d4) Prime Form: (0 2 5 8) Normal Order: (9 11 2 5) Velocity: (p mf) Ambitus: (d2 f6) Interval Ambitus: 51 12tonep: Returns true if list is a 12-tone scale, and NIL otherwise. Examples: (12tonep '(4 10 1 3 5 2 6 8 9 11 7 0)) => t (12tonep '(e4 as4 cs4 ds4 f4 d4 fs4 gs4 a4 b4 g4 c4)) => t (12tonep '(e4 as4 cs4 ds4 f4 d4 fs4 gs4 a4 b4 f4 c4)) => nil CONTAIN-ATTRIBUTEP: Returns true if attribute is found in the sequence, and NIL otherwise. Examples: (contain-attributep 'fermata '(-h fermata)) => t (contain-attributep 'stacc '(-e a4 fermata+stacc d4 p fermata)) => t ATTRIBUTE-SYMBOLP: Returns true if object is a attribute, and NIL otherwise. Examples: (attribute-symbolp 'tie) => t (attribute-symbolp 'ponte+ten) => t EVENT-RESTP: Returns true if event is a rest, and NIL otherwise. Examples: (event-restp '(-q)) => t (event-restp '(-q fermata)) => t Best wishes, JP
  6. In the velocity documents you find all the answers. Example All 127 velocities in floating point numbers: (vector-to-velocity 0.1 1.0 (gen-integer 1 127) :type :float) => (0.1 0.11 0.11 0.12 0.13 0.14 0.14 0.15 0.16 0.16 0.17 0.18 0.19 0.19 0.2 0.21 0.21 0.22 0.23 0.24 0.24 0.25 0.26 0.26 0.27 0.28 0.29 0.29 0.3 0.31 0.31 0.32 0.33 0.34 0.34 0.35 0.36 0.36 0.37 0.38 0.39 0.39 0.4 0.41 0.41 0.42 0.43 0.44 0.44 0.45 0.46 0.46 0.47 0.48 0.49 0.49 0.5 0.51 0.51 0.52 0.53 0.54 0.54 0.55 0.56 0.56 0.57 0.58 0.59 0.59 0.6 0.61 0.61 0.62 0.63 0.64 0.64 0.65 0.66 0.66 0.67 0.68 0.69 0.69 0.7 0.71 0.71 0.72 0.73 0.74 0.74 0.75 0.76 0.76 0.77 0.78 0.79 0.79 0.8 0.81 0.81 0.82 0.83 0.84 0.84 0.85 0.86 0.86 0.87 0.88 0.89 0.89 0.9 0.91 0.91 0.92 0.93 0.94 0.94 0.95 0.96 0.96 0.97 0.98 0.99 0.99 1.0)
  7. What about floating point numbers velocity (make-omn :length '(e = = = = = = =) :pitch '(c4 cs5 b3 c4) :velocity '(0.1 0.2 0.21 0.32)) => (e c4 0.1 cs5 0.2 b3 0.21 c4 0.32 0.1 cs5 0.2 b3 0.21 c4 0.32)
  8. Function name change: PAUSE-EVENTS now FILTER-EVENTS New: OMN-MERGE-RESTS This function merge adjacent rests values into a single rest. (omn-merge-rests '(q c4 p d4 f - - e e4g4 tie q. e4g4)) => (q c4 p d4 f -h e e4g4 tie q.) (omn-merge-rests '(q c4 p d4 f - - q e4g4 tie q e4g4 - -e fermata)) => (q c4 p d4 f -h q e4g4 tie e4g4 - -e fermata) OMN-MERGE-TIES This function merge ties (tie) in phrases of omn into a single note or chord. (omn-merge-ties '(q c4 p d4 f - - e e4g4 tie q. e4g4)) => (q c4 p d4 f - - h e4g4) (omn-merge-ties '((e g6 f stacc ab5 mp ten c4 mf ten cs5 ff) (e c3 p tie s c3 tie c3 e eb3 mf stacc s bb4 pp tie bb4))) => ((e g6 f stacc ab5 mp ten c4 mf ten cs5 ff) (q c3 p e eb3 mf stacc bb4 pp)) (omn-merge-ties '(s c4 tie s c4 tie s c4 tie s c4 s d4 tie s d4 tie s d4 tie s d4 s e4 tie s e4 tie s e4 t gs5 g5 fs5 f5 e5 -t s g4 tie s g4 tie s g4 tie s g4 tie s g4 tie s g4)) => (q c4 d4 e. e4 t gs5 g5 fs5 f5 e5 - q. g4)
  9. New: FILTER-EVENTS The function FILTER-EVENTS internally brakes-up an omn sequence into single-events (l p v a) and checks whether an event contains the given element. When an element is found the event is returned. All other events are transformed into rests. The option remain will invert the process. (filter-events 'd4 '(e c4 mp -e fermata e. d4 -h e. c4 e e4)) => (-q e. d4 mp -h.s) (filter-events 'd4 '(e c4 mp -e fermata e. d4 -h e. c4 e e4) :remain t) => (e c4 mp -e fermata -he. e. c4 e e4) These two options are useful for orchestration. Examples: (setf mat1 '(e c4 mp arco+ponte -e fermata e. d4 mp tasto -h e. c4 p pizz+ponte e e4 p arco+tasto)) (filter-events 'arco+ponte mat1) => (e c4 mp arco+ponte -we) (filter-events 'arco+ponte mat1 :remain t) => (-e -e fermata e. d4 mp tasto -h e. c4 p pizz+ponte e e4 arco+tasto) (filter-events 'fermata mat1 :remain t) => (e c4 mp arco+ponte - e. d4 tasto -h e. c4 p pizz+ponte e e4 arco+tasto) (filter-events 'fermata mat1) => (-e -e fermata -w) (filter-events 'd4 mat1 :remain t) => (e c4 mp arco+ponte -e fermata -he. e. c4 p pizz+ponte e e4 arco+tasto) (filter-events '(e d4) mat1) => (e c4 mp arco+ponte - e. d4 tasto -he. e e4 p arco+tasto) (filter-events '(e d4) mat1 :remain t) => (-e -e fermata -he. e. c4 p pizz+ponte -e) (setf mat2 '((e c4 mp arco+ponte -e fermata e. d4 mp tasto -h e. c4 p pizz+ponte e e4 p arco+tasto) (e c4 f stacc e. d4 -h e. c4 p ord -e fermata e4 stacc))) (filter-events 'e. mat2 :section 1 :remain t) => ((e c4 mp arco+ponte -e fermata e. d4 mp tasto -h e. c4 p pizz+ponte e e4 p arco+tasto) (e c4 f stacc -h.. -e fermata e4 p stacc)) (filter-events '((e.) (e4 fermata)) mat2) => ((-q e. d4 mp tasto -h e. c4 p pizz+ponte -e) (-w -e fermata e4 p stacc)) (filter-events '(e4 fermata) mat2 :remain t) => ((e c4 mp arco+ponte - e. d4 tasto -h e. c4 p pizz+ponte -e) (e c4 f stacc e. d4 -h e. c4 p ord -q)) Best wishes, JP
  10. Fix: TIE-BARS and FILTER-TIE TIE-BARS: (setf mat '((e c3 g2 fs2 cs2 c2) (e c2 stacc cs2 fs2 g2 c3) (e c3 stacc g2 fs2 cs2 c2) (e c2 ten cs2 fs2 g2 c3) (e c3 g2 fs2 cs2 c2))) (tie-bars mat) => ((e c3 g2 fs2 cs2 c2 tie+stacc) (e c2 cs2 fs2 g2 c3 tie+stacc) (e c3 g2 fs2 cs2 c2 tie+ten) (e c2 cs2 fs2 g2 c3 tie) (e c3 g2 fs2 cs2 c2)) In the following example we tie bars 2 and 3: (tie-bars mat :section '(2 3)) => ((e c3 g2 fs2 cs2 c2) (e c2 stacc cs2 fs2 g2 c3) (e c3 stacc g2 fs2 cs2 c2 tie+ten) (e c2 cs2 fs2 g2 c3) (e c3 g2 fs2 cs2 c2)) FILTER-TIE: (filter-tie '(-q c4 f c4 p gliss d4 p e4 e4 e4 fermata)) => (-q h c4 p gliss q d4 h. e4 fermata) (filter-tie '((-q c4 d4 f4 e4) (q e4 f4 g4 a4) (e a4 a4 stacc g4 f4 = = q a4) (q a4 d4 f4 e4))) => ((-q c4 mf d4 f4 e4 tie) (q e4 mf f4 g4 a4 tie+stacc) (q a4 mf e g4 q. f4 q a4 tie) (q a4 mf d4 f4 e4)) Best wishes, JP
  11. Check the RND-SEED document.
  12. Export the two data files from SPEAR app: Text - Resampled Frames Text - Partials and save them in the ~/Opusmodus/Spectral Data/Data folder. Next: Import the SPEAR frames and partials data into Opusmodus format. Frames: (import-spectral-spear :frames "tbn cs3 frames" ;<- imported file "tbn-cs3-frames") ;<- output file name Partials: (import-spectral-spear :partials "tbn cs3 partials" "tbn-cs3-partials") The last step is to create a library file for an easy access to all the partials. To do that we need to load the file with the LOAD function (the path should point to the file in the Data folder): (load "~/Opusmodus/Spectral Data/Partials/tbn-cs3-partials.opmo") (load "~/Opusmodus/Spectral Data/Partials/tbn-cs3-frames.opmo") or alternatively you can open the file in the Assistant panel and evaluate. And finally we create the library: The expression below will create a folder Partials with inside a library file tbn-cs3-frames.opmo. (create-library 'tbn-cs3-frames 'frames 'p tbn-cs3-frames :file "Partials/tbn-cs3-frames") (create-library 'tbn-cs3-partials 'partials 'p tbn-cs3-partials :file "Partials/tbn-cs3-partials") Having followed the stages as above a new library with the name tbn-cs3-frames.opmo is created in the Def-Library folder.
  13. Update to GEN-CONTROLLER function: The GEN-CONTROLLER function generates controller values in a given span (total length) with a defined time for each of the values (<value> <time>). The count of the sent messages is the sum of the time values equal to the span value. For example span 1/4 with time 1/128 will produce 32 values. (setf values (gen-sine 32 4 1.0)) (gen-controller 1/4 values) => ((64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (64 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128)) The :min and :max option allows you to control the minimum and maximum value of the sent messages: (gen-controller 1/4 values :min 20 :max 80) => ((50 1/128) (71 1/128) (80 1/128) (71 1/128) (50 1/128) (29 1/128) (20 1/128) (29 1/128) (50 1/128) (71 1/128) (80 1/128) (71 1/128) (50 1/128) (29 1/128) (20 1/128) (29 1/128) (50 1/128) (71 1/128) (80 1/128) (71 1/128) (50 1/128) (29 1/128) (20 1/128) (29 1/128) (50 1/128) (71 1/128) (80 1/128) (71 1/128) (50 1/128) (29 1/128) (20 1/128) (29 1/128)) If the values count is less than the sum of the time values equal to the span then the last value of the list is used to complete the count. (gen-controller 1/2 values) => ((64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (64 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128) (19 1/128)) The loop option will trim the values to complete the time count: (gen-controller 1/2 values :loop t) => ((64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (64 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (64 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128) (64 1/128) (108 1/128) (127 1/128) (108 1/128) (63 1/128) (19 1/128) (0 1/128) (19 1/128)) Example with user defined times: (setf length '(q = s = = = h)) (gen-controller 2 values :time length) => ((64 1/4) (108 1/4) (127 1/16) (108 1/16) (63 1/16) (19 1/16) (0 1/2) (19 1/4) (64 1/4) (108 1/16) (127 1/16) (108 1/16) (64 1/16)) GEN-CONTROLLER inside the DEF-SCORE instrument instance: :controllers (45 (gen-controller 1/2 values :loop t)) Score Example: (progn (setf vec1 (gen-sine 1024 3 1)) (setf vec2 (gen-sine 1024 4 1)) (setf vec3 (gen-sine 1024 10 0.5)) (def-score ctrl (:key-signature 'chromatic :time-signature '(8 4) :tempo 78) (ctrl :omn '((w c4 c4) (w cs5 cs5) (w d4 d4) (w eb5 eb5) (d eb5)) :sound 'gm :channel 1 :program 'String-Ensemble-1 :volume (gen-controller 10 vec1 :min 20 :max 100) :tuning '((0 0.25) (-0.5 0) (0 0.5) (0.5 0.75) (0.5)) :pan (assemble-seq (gen-controller 5 vec2) (gen-controller 5 vec1)) :controllers (1 (assemble-seq '(127 5) (gen-controller 5 vec1)))) )) Best wishes, JP
  14. Just use numbers to pitch, lengths etc... conversion. I would advise you to check the System Function documentation and play with the examples a bit :-) Example: (setf fib (interval-modus (fibonacci 0 23) :mod 12)) (setf pitch (integer-to-pitch fib)) => (c4 cs4 cs4 d4 eb4 f4 gs4 cs4 a4 bb4 g4 f4 c4 f4 f4 bb4 eb4 cs4 e4 f4 a4 d4 b4 cs4) (setf length (vector-to-length 1/16 1 2 fib)) => (1/16 1/16 1/16 1/16 1/16 1/16 1/8 1/16 1/8 1/8 1/8 1/16 1/16 1/16 1/16 1/8 1/16 1/16 1/16 1/16 1/8 1/16 1/8 1/16) (make-omn :length length :pitch pitch) => (s c4 cs4 cs4 d4 eb4 f4 e gs4 s cs4 e a4 bb4 g4 s f4 c4 f4 f4 e bb4 s eb4 cs4 e4 f4 e a4 s d4 e b4 s cs4)
  15. There are endless possibilities: Example 1 (let* ((l '(0 1 -1 0)) (r l)) (loop repeat 3 collect (x+b l (car (setf r (gen-rotate -1 r)))) into bag finally (return (append (list l) bag)))) => ((0 1 -1 0) (1 2 0 1) (-1 0 -2 -1) (0 1 -1 0)) Example 2 (gen-eval 4 '(x+b (rnd-order '(0 1 -1 0)) (rnd-pick '(0 1 -1 0)))) => ((0 0 1 -1) (-1 -2 0 -1) (1 2 0 1) (-1 0 -2 -1)) Example 3 (progn (setf l '(0 1 -1 0)) (gen-eval 4 '(setf l (x+b (rnd-order l) (rnd-pick '(0 1 -1 0)))))) => ((1 0 2 1) (2 3 2 1) (1 0 1 2) (1 0 2 1))