Jump to content

opmo

Administrators
  • Posts

    2,924
  • Joined

  • Last visited

6 Followers

Contact Methods

Profile Information

  • Gender
    Male

Recent Profile Visitors

17,641 profile views
  1. Why you want to generate 20736 lists in catalog. Few examples and description of the process is all you need.
  2. Don't use permutations, there is no need for it. The simples way is to use rnd-order. It makes no sense to generate 20736 lists and then select few of them at random.
  3. Addition and improvements to DECHORD function: (setf chords '((w (c4 maj7)) (w (a4 m7)) (w (d4 m7)) (w (g4 7)) (w (c4 maj7)) (h (a4 m7/b5)) (h (a4 m7)) (h (d4 m7/b5)) (h (d4 m7)) (w (g4 7)) )) (dechord chords) => ((w c4 mf) (w a4 mf) (w d4 mf) (w g4 mf) (w c4 mf) (h a4 mf) (h a4 mf) (h d4 mf) (h d4 mf) (w g4 mf)) (dechord chords :type 'pcs) => ((w b4 mf) (w e5 mf) (w a4 mf) (w b4 mf) (w b4 mf) (h g5 mf) (h e5 mf) (h c5 mf) (h a4 mf) (w b4 mf)) (dechord chords :pitch 3) => ((w g4 mf) (w e5 mf) (w a4 mf) (w d5 mf) (w g4 mf) (h ds5 mf) (h e5 mf) (h gs4 mf) (h a4 mf) (w d5 mf)) See the document for more explanation (3.0.29342).
  4. Additions and improvement to DECHORD function: Extracts the root pitch from each chord by default: (dechord '(q c4 f4a4d5 e fs5)) => (q c4 mf f4 e fs5) Extracts the root pitch but returns it in normal-order (Pitch Class Set): (dechord '(q c4 f4a4d5 e fs5) :type 'pcs) => (q c4 mf d5 e fs5) Selects the 2nd pitch from each chord: (dechord '(q c4 f4a4d5 e fs5) :pitch 2) => (q c4 mf a4 e fs5) Selects the 2nd pitch and returns it in normal-order: (dechord '(q c4 f4a4d5 e fs5) :pitch 2 :type 'pcs) => (q c4 mf f4 e fs5) Applies the default pitch selection to a sequence of chords: (dechord '((q c4 f4a4d5 e fs5) (s cs4 d4 fs4 q c4e4gs4))) => ((q c4 mf f4 e fs5) (s cs4 mf d4 fs4 q c4)) Selects the highest pitch from each chord and returns it in normal-order: (dechord '((q c4 f4a4d5 e fs5) (s cs4 d4 fs4 q c4e4gs4)) :pitch 'top :type 'pcs) => ((q c4 mf a4 e fs5) (s cs4 mf d4 fs4 q gs4)) Selects the lowest pitch from each chord: (dechord '((q c4 f4a4d5 e fs5) (s cs4 d4 fs4 q c4e4gs4)) :pitch 'low) => ((q c4 mf f4 e fs5) (s cs4 mf d4 fs4 q c4)) Selects the highest pitch from each chord: (dechord '((q c4 f4a4d5 e fs5) (s cs4 d4 fs4 q c4e4gs4)) :pitch 'high) => ((q c4 mf d5 e fs5) (s cs4 mf d4 fs4 q gs4)) Each example demonstrates a specific use case of the DECHORD function, highlighting how to select various pitches from chords in a sequence. New Function: The SELECT-MEASURE function is used to extract specific bars and beats from a omn-form sequence. It allows for precise selection and transformation of musical measures based on given criteria, such as measure range and time signature. Define a Sequence: (setf seq '((q c4 db4 ab4 f4 g4 bb4) (e a4 eb4 b4 e4 d4 gb4) (q db4 ab4 f4 g4 bb4 a4) (q eb4 b4 e4 d4 gb4 c4))) The sequence is converted to a 4/4 time signature to standardise the format, which is required for the function: (setf mat (omn-to-time-signature seq '(4 4))) => ((q c4 mf db4 ab4 f4) (q g4 mf bb4 e a4 eb4 b4 e4) (e d4 mf gb4 q db4 ab4 f4) (q g4 mf bb4 a4 eb4) (q b4 mf e4 d4 gb4) (q c4 mf)) Select Specific Measures and Beats: (select-measure '((2.2 3) (4.2 5)) mat :ratio 1/4 :time-signature '(2 4)) => ((e a4 mf eb4 b4 e4) (q a4 mf eb4)) In this example, the function extracts notes from the second beat of the second measure to the end of the third measure, and from the second beat of the fourth measure to the end of the fifth measure. The result is transformed into a sequence with a 2/4 time signature.
  5. less computation: (setf perm (do-verbose ("rotation") (loop for i in (combination2 7 '(c4 d4 e4 f4 g4 a4 b4)) when (and (equal 'c4 (first i)) (equal 7 (length (find-unique i)))) collect i))) (circle-pitch-plot (rnd-pick perm) :sort nil ;:remove-duplicates t :join-first nil :point-radius 6)
  6. will stop the endless printing (do-verbose ("rotation") (loop for i in (combination2 7 '(1 2 3 4 5 6 7)) when (and (equal 1 (first i)) (equal 7 (length (find-unique i)))) collect i))
  7. If you want only lists starting with 1: (loop for i in (combination2 4 '(1 2 3 4)) when (and (equal 1 (first i)) (equal 4 (length (find-unique i)))) collect i) => ((1 2 3 4) (1 3 2 4) (1 2 4 3) (1 4 2 3) (1 3 4 2) (1 4 3 2)) or (loop for i in (combination2 4 '(1 2 3 4)) when (and (equal 1 (first i)) (contain-itemsp '(1 2 3 4) i)) collect i) => ((1 2 3 4) (1 3 2 4) (1 2 4 3) (1 4 2 3) (1 3 4 2) (1 4 3 2)) results with 1 in second position: (loop for i in (combination2 4 '(1 2 3 4)) when (and (equal 1 (second i)) (contain-itemsp '(1 2 3 4) i)) collect i) => ((2 1 3 4) (3 1 2 4) (2 1 4 3) (4 1 2 3) (3 1 4 2) (4 1 3 2))
  8. (gen-rotate :left '(1 2 3 4) :type 'list) => ((1 2 3 4) (4 1 2 3) (3 4 1 2) (2 3 4 1)) (gen-rotate :left '(1 2 3 4 5 6 7) :type 'list) => ((1 2 3 4 5 6 7) (7 1 2 3 4 5 6) (6 7 1 2 3 4 5) (5 6 7 1 2 3 4) (4 5 6 7 1 2 3) (3 4 5 6 7 1 2) (2 3 4 5 6 7 1)) You should avoid permute function etc... The best way to pick a possible set is the rnd-order function. Rotation sets without the starting list: (rest (gen-rotate :right '(1 2 3 4) :type 'list)) => ((2 3 4 1) (3 4 1 2) (4 1 2 3)) (rest (gen-rotate :right '(1 2 3 4 5 6 7) :type 'list)) => ((2 3 4 5 6 7 1) (3 4 5 6 7 1 2) (4 5 6 7 1 2 3) (5 6 7 1 2 3 4) (6 7 1 2 3 4 5) (7 1 2 3 4 5 6))
  9. (pcs-normal-order (melodize 'c4e4g4b4)) => (11 0 4 7) Yes, the :pitch 'low will return the lowest pitch in the chord.
  10. I will make the function to work on a chord name, list and lists of chord names: (expand-chord '((c4 maj7) (f4 maj7) (f4 m7) (g4 7) (c4 maj7)))) => (c4e4g4b4 f4a4c5e5 f4gs4c5ds5 g4b4d5f5 c4e4g4b4)
  11. Working with Orchestral libraries often requires sending keyswitches and CC values to your virtual instruments. Opusmodus makes this process very easy, by allowing you to create your own soundsets for all your virtual instruments as well as hardware devices.
  12. First, you don't need :quantize here, the values are not frequencies (floats) or ratios. (setf test-seq '(13 80 61 81 74 72 46 64 31 47 77 22 19 69 7 2 26 71 33 73 59 55 3 39 62 5 65 44 38 49 14 4 52 53 66 57 29 21 6 78 35 10 41 88 76 9 28 8 15 17 43 25 58 42 12 67 70 20 82 87 63 18 56 16 30 34 86 50 27 84 24 45 51 40 75 85 37 36 23 32 60 68 83 11 54 79 48 1)) As you can see many of the values in the sequence are outside the piano range: (ambitus-instrument 'piano) => (-39 48) If the integer values fall outside the specified range (default is piano), they will be transposed. If transposition cannot resolve the issue, the values will be inverted. Maybe your values are midi values: (midi-to-pitch test-seq)
  13. I will have sometime to look into it in July.
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy