Jump to content

opmo

Administrators
  • Posts

    2,889
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    opmo reacted to torstenanders in Providing code examples to students   
    >> While I can create a canon, counterpoint and a fugue myself with a bit of time, it would be much less time-consuming for me if I were able to use existing examples. Is there an existing library of OMN examples of these types of compositions?
    > I cannot offer ready-made examples, but a constraint-based library with various counterpoint (and also harmony) rules ready-made.  
     
    Following up my own comments, some entry level introduction to the libraries Cluster Engine and Cluster rules is offered by a video I prepared for my students last autumn.
     
    https://www.youtube.com/watch?v=xPXIRmH9rZc&list=PLmbpscTxjn_DrdDXD5v7z0GzQRNKM5VyQ&index=9
     
    This video uses PWGL instead of Openmusic, but you only need to mentally replace PWGL boxes with Lisp functions of the same name to get pretty much the equivalent Opusmusic code. Also, this tutorial only scratches the surface of what can be done with these libraries, but I hope it can give an initial idea how things are approached in these libraries and for going beyond that a relatively easy approach is simply to study the pre-programmed rules in the Cluster Rules library and trying to combine rules for your own purposes. Once you miss a specific rule you would like to have, the library Cluster Engine provides the tools for defining your own rules on a high level of abstraction (specifically, it provides many abstractions that help to easily apply your rule to a specific score context, like the pitches of simultaneous notes of certain parts). 
     
    This video is the last of a series of introduction-level videos on algorithmic composition with PWGL... 
     
    https://www.youtube.com/playlist?list=PLmbpscTxjn_DrdDXD5v7z0GzQRNKM5VyQ
     
  2. Like
    opmo got a reaction from torstenanders in Lisp function for stopping playback?   
    Here it is:
    (sequencer:sequencer-stop *audition-sequencer*) JP
  3. Like
    opmo got a reaction from ydepps in Opmo 1.3: Loading Common Music -- dependency on CLM broken (FIXED)   
    It looks like you don't know how to use CLM in Opusmodus. You can create new instruments and use them on the spot. Soon I will write a tutorial which demonstrate how to use CLM with OMN and how to create new instruments. It can't be easier 🙂
  4. Like
    opmo got a reaction from lviklund in Music xml import, convert to Score?   
    At the moment you can't convert musicxml file into omn score.
    But it is in our TODO list.
  5. Like
    opmo got a reaction from Stephane Boussuge in Opposite of gen-swallow for functions that add notes like length-divide?   
    Possible solution to 'fill' the added values:
    :repeat and :ornament
     
    This shouldn't be difficult to implement.
  6. Like
    opmo reacted to torstenanders in Opposite of gen-swallow for functions that add notes like length-divide?   
    The function LENGTH-DIVIDE and friends are a useful device for introducing some rhythmic variation to some material. However, when the processed sequence is a full OMN expression (see example below), then the added notes cause all other parameters to shift forward (additional parameters are added at the end by looping). For introducing only a slight variation to some existing material (e.g., motif) these functions are therefore not so useful, because this shift of all parameters to basically "fill" the new added notes with pitches etc. greatly change the varied material for a listener.
    (length-divide 1 2 '(q f3 leg+m1 q ab3 leg e c4 leg bb3 leg ab3 leg g3))  
    Basically, this is the opposite situation of the situation addressed by swallowing. Swallowing (e.g., with GEN-SWALLOW and the swallow argument of many other functions) avoids the shift of parameters like pitch etc. that would result from removing notes and turning them into rests. For addressing the situation above properly we would need something like the opposite of swallowing, some way to fill in parameters like pitch etc. for new notes to avoid shifting existing notes. I hope my explanation makes sense and you can see why something like the opposite of swallowing would be useful for functions that add notes to some input material.
     
    Now, the tricky question is of course, what parameters (pitch etc.) should be added in such cases. Musically useful and common in the classical literature would be, e.g., repeating the parameters (pitch etc.) of the predecessor note (though that might be a bit too simplistic and annoying at times) or somehow interpolating some pitch gap between the previous and next note with a little scale or arpeggio and only repeating the other parameters like articulations (resulting in some variation that is likely most similar to the input material, so it would be good to have that as an option).  If the pitch interval between the two original notes is too small to add some pitch in between for the new now (or as an option in general for variety), it would also be good  to add some ornamentation (e.g., using PITCH-ORNAMENT), but for a close similarity between the original material and the variation it would be best as an option to apply such ornamentation only to the newly added notes, not all notes. Of course, other options could also be useful for variations that vary the input material a bit more strongly, e.g., some random pitch for the new notes within certain interval bounds.
     
    Does some function that kind of is the opposite of GEN-SWALLOW in that it adds parameters like pitches for subdivided rhythmic values (to avoid the shifting) sound like a good idea?
     
    The idea with the interpolation of gaps could be implemented by turning the original duration values and pitches into some envelope and then reading that envelope with the new rhythmic values. So, that is rather strait forward. However, that would not allow for some ornamentation, because such algorithm would not recognise which notes are new that should be ornamented.
     
    Any other idea perhaps? Thanks! 
  7. Thanks
    opmo got a reaction from torstenanders in Opusmodus 1.3.24912   
    – Additions:
    ADD-TEXT-ATTRIBUTS – Optional attribute type: :sticky and :non-sticky

    – Fixed:
    Typo error in 'GM Instrument Set.lisp' file.
     
    Best wishes,
    Janusz
  8. Thanks
    opmo reacted to Stephane Boussuge in Polygon1 for Flute, clarinet, bass clarinet and Piano   
    18/07/19 => Small update, missing function added, see above.
    S.B
     
  9. Like
    opmo reacted to Stephane Boussuge in Polygon1 for Flute, clarinet, bass clarinet and Piano   
    Hi, here's a new piece with score.
     
       
     
    All the best to all of the Opusmodus users !
    S.B.
     
    18/07/19 => Small update, missing function added.
     
    PolygonsV1-05-Forum.opmo
    Polygons1-05.mp3
  10. Thanks
    opmo reacted to torstenanders in Getting precompiled code (e.g., quicklisp, quicklisp libraries, swank, own libraries) running again on recent Opusmodus versions   
    Dear all,
     
    After updating to a recent Opusmodus version 1.3, I ran into some errors when loading code that had been loaded and compiled before, e.g., quicklisp, quicklisp libraries, swank (the interface that allows using Emacs Slime with Opusmodus), and my own Lisp libraries. The errors I saw were rather cryptic, like the following:
     
    Error: The value "CL" is not of the expected type list.
    While executing: (:internal ccl::operation-on-all-specs ccl::%define-package), in process Listener-1(7).
     
    After exchanges with Janusz (thanks a lot for your help!) I learnt that the underlying Common Lisp version of Opusmodus had been upgraded to CCL version 1.12, and the format of compiled files (fasl files or dx64fsl files) of this version had changed.
     
    So, in case you run into similar problems, these can be fixed simply by deleting all previously compiled files (which Lisp stores if they do not change to speed up the load process), so that the Lisp compiler has to compile them again. In the folder  ~/.cache/common-lisp just delete any folders starting with ccl-, so that all compiled files in this directory are compiled again.
     
    Best,
    Torsten
  11. Like
    opmo got a reaction from torstenanders in Opusmodus 1.3.24805   
    1.3.24805 
     
    – New functions:
     closest-path  comparative-closest-path  relative-closest-path  
    – Changes:
     CHORD-CLOSEST-PATH renamed to COMPARATIVE-CLOSEST-PATH.
     CHORD-RELATIVE-PATH renamed to RELATIVE-CLOSEST-PATH.
     A new keyword :lc (live coding) added to PS function.
     The default DEF-UNFOLD-SET set name renamed to om.
    :variant and :relative keywords removed from HARMONIC-PROGRESSION function.
     
    – Fixed:
     HARMONIC-PROGRESSION
     HARMONIC-PATH
     PITCH-VARIANT
     PITCH-ROW 
     
    – Documentation updates.
    – 'Quick Start' workspace update.
     
     
    VOICE LEADING FUNCTIONS
     
    CLOSEST-PATH
     
    The function CLOSEST-PATH returns a series of chords taking the closest path to the previous chord.
     
    (closest-path '(b4g4e4c4 c5a4e4f4 b4a4f4d4 b4g4e4d4))
    (closest-path '(c4e4g4 c5e5a5 e5fs5a5b5 d5f5bb5d6 g4c5d5f5))  

     
    (closest-path '(c4e4g4 c5e5a5 e5fs5a5b5 d5f5bb5d6 g4c5d5f5)               :start 'c3eb4f5d5)  
     

     
    (closest-path '(g5 cs3f3bb3gs4c5d5 fs5 a5b5eb6e6g2 cs3f3bb3gs4                 c5 d5fs5a5b5 eb6e6g2cs3 f3 bb3gs4c5 d5fs5a5                 b5eb6e6g2cs3f3 bb3 gs4c5d5fs5 a5b5 eb6e6g2cs3f3                 bb3gs4c5d5 fs5 a5b5eb6e6g2cs3 f3bb3gs4 c5                 d5fs5a5b5 eb6 e6g2cs3f3))  

     
    (closest-path '(g5 cs3f3bb3gs4c5d5 fs5 a5b5eb6e6g2 cs3f3bb3gs4                 c5 d5fs5a5b5 eb6e6g2cs3 f3 bb3gs4c5 d5fs5a5                 b5eb6e6g2cs3f3 bb3 gs4c5d5fs5 a5b5 eb6e6g2cs3f3                 bb3gs4c5d5 fs5 a5b5eb6e6g2cs3 f3bb3gs4 c5                 d5fs5a5b5 eb6 e6g2cs3f3)               :start 'c3eb4f5d6)  

     
    (closest-path '((eb3f3a3 f3a3b3 g3bb3cs4 e3g3bb3)                 (g4bb4cs5 bb4cs5e5 b4eb5f5 a4b4eb5)                 (b3eb4f4 eb4f4a4 e4fs4bb4 c4e4fs4)))  

    (closest-path '((eb3f3a3 f3a3b3 g3bb3cs4 e3g3bb3)                 (g4bb4cs5 bb4cs5e5 b4eb5f5 a4b4eb5)                 (b3eb4f4 eb4f4a4 e4fs4bb4 c4e4fs4)))               :start '(c3eb4 f5d5 eb4f5))  

     
     
     
     
    COMPARATIVE-CLOSEST-PATH
     
    The function COMPARATIVE-CLOSEST-PATH returns a series of chords taking the comparatively closest path to the previous chord, derived from randomising the pitch order of a given chord before the ‘find closest interval’ process.
     
    (comparative-closest-path '(b4g4e4c4 c5a4e4f4 b4a4f4d4 b4g4e4d4))
     
     
    Etc…
     
    (comparative-closest-path '(c4e4g4 c5e5a5 e5fs5a5b5 d5f5bb5d6 g4c5d5f5))  

     
    Etc…
     
     
    (comparative-closest-path '(c4e4g4 c5e5a5 e5fs5a5b5 d5f5bb5d6 g4c5d5f5)                           :start 'c3eb4f5d5)  

     
    Etc…
     
    (comparative-closest-path '(g5 cs3f3bb3gs4c5d5 fs5 a5b5eb6e6g2 cs3f3bb3gs4                             c5 d5fs5a5b5 eb6e6g2cs3 f3 bb3gs4c5 d5fs5a5                             b5eb6e6g2cs3f3 bb3 gs4c5d5fs5 a5b5 eb6e6g2cs3f3                             bb3gs4c5d5 fs5 a5b5eb6e6g2cs3 f3bb3gs4 c5                             d5fs5a5b5 eb6 e6g2cs3f3))  

     
    Etc…
     
    (comparative-closest-path '(g5 cs3f3bb3gs4c5d5 fs5 a5b5eb6e6g2 cs3f3bb3gs4                             c5 d5fs5a5b5 eb6e6g2cs3 f3 bb3gs4c5 d5fs5a5                             b5eb6e6g2cs3f3 bb3 gs4c5d5fs5 a5b5 eb6e6g2cs3f3                             bb3gs4c5d5 fs5 a5b5eb6e6g2cs3 f3bb3gs4 c5                             d5fs5a5b5 eb6 e6g2cs3f3)                           :start 'c3eb4f5d6)  

     
    Etc...
     
    (comparative-closest-path '((eb3f3a3 f3a3b3 g3bb3cs4 e3g3bb3)                             (g4bb4cs5 bb4cs5e5 b4eb5f5 a4b4eb5)                             (b3eb4f4 eb4f4a4 e4fs4bb4 c4e4fs4)))  

     
    Etc…
     
    (comparative-closest-path '((eb3f3a3 f3a3b3 g3bb3cs4 e3g3bb3)                             (g4bb4cs5 bb4cs5e5 b4eb5f5 a4b4eb5)                             (b3eb4f4 eb4f4a4 e4fs4bb4 c4e4fs4))                           :start '(c3eb4 f5d5 eb4f5))  

     
     
    Etc…
     
    With seed and 4 results:
    (gen-eval 4 '(comparative-closest-path               '(b4g4e4c4 c5a4e4f4 b4a4f4d4 b4g4e4d4)               :start '(c3c4c5c5)) :seed 23)  

     
     
     
     
     
    RELATIVE-CLOSEST-PATH
     
    The function RELATIVE-CLOSEST-PATH generates cartesian series of intervals form a given chord. It then selects randomly the relative closest path (transition) to the previous chord.
     
    (relative-closest-path '(b4g4e4c4 c5a4e4f4 b4a4f4d4 b4g4e4d4))  


     
    Etc…
     
    (relative-closest-path '(c4e4g4 c5e5a5 e5fs5a5b5 d5f5bb5d6 g4c5d5f5))  

     
    Etc…
     
    (relative-closest-path '(c4e4g4 c5e5a5 e5fs5a5b5 d5f5bb5d6 g4c5d5f5)                        :start 'c3eb4f5d5)  

     
    Etc…
     
    (relative-closest-path '(g5 cs3f3bb3gs4c5d5 fs5 a5b5eb6e6g2 cs3f3bb3gs4                          c5 d5fs5a5b5 eb6e6g2cs3 f3 bb3gs4c5 d5fs5a5                          b5eb6e6g2cs3f3 bb3 gs4c5d5fs5 a5b5 eb6e6g2cs3f3                          bb3gs4c5d5 fs5 a5b5eb6e6g2cs3 f3bb3gs4 c5                          d5fs5a5b5 eb6 e6g2cs3f3))  

     
    Etc…
     
    (relative-closest-path '(g5 cs3f3bb3gs4c5d5 fs5 a5b5eb6e6g2 cs3f3bb3gs4                          c5 d5fs5a5b5 eb6e6g2cs3 f3 bb3gs4c5 d5fs5a5                          b5eb6e6g2cs3f3 bb3 gs4c5d5fs5 a5b5 eb6e6g2cs3f3                          bb3gs4c5d5 fs5 a5b5eb6e6g2cs3 f3bb3gs4 c5                          d5fs5a5b5 eb6 e6g2cs3f3)                        :start 'c3eb4f5d6)  

     
    Etc…
     
    (relative-closest-path '((eb3f3a3 f3a3b3 g3bb3cs4 e3g3bb3)                          (g4bb4cs5 bb4cs5e5 b4eb5f5 a4b4eb5)                          (b3eb4f4 eb4f4a4 e4fs4bb4 c4e4fs4)))  

     
    Etc…
     
    (relative-closest-path '((eb3f3a3 f3a3b3 g3bb3cs4 e3g3bb3)                          (g4bb4cs5 bb4cs5e5 b4eb5f5 a4b4eb5)                          (b3eb4f4 eb4f4a4 e4fs4bb4 c4e4fs4))                        :start '(c3eb4 f5d5 eb4f5))  

     
    Etc…
     
    (gen-eval 4 '(relative-closest-path               '(b4g4e4c4 c5a4e4f4 b4a4f4d4 b4g4e4d4)) :seed 542) => ((c4e4g4b4 c4e4f4a4 a3b3d4f4 d4e4g4b4)     (c4e4g4b4 e4f4a4c5 d4f4a4b4 b3e4g4d5)     (g3e4b4c5 e3f4a4c5 d3a4b4f5 d3g4b4e5)     (g3e4b4c5 a3f4c5e5 f3a4b4d5 d3e4g4b4))  

     
     
     
     
    Live Coding option in PS function

    The :play :lc (live coding) option allows you to send the result of a PS function to ‘Live Coding Instrument’ in a live coding performance.
     
    (progn   (setf    mat '((-w.)          (h. eb4 pp q g3 -e q gs4 mf -s a5 p tie)          (e. a5 -e q bb4 mf -s q cs5 p -s q. e5 mf -e.)          (q cs5 p h. d5 mf -q c5 pp tie)          (h c5 pp h. gs3 -e a4 p<)          (h. fs5 mp q bb3 c5 p e4 mf tie)          (h e4 -e q cs4 mp h d5 p e f4)          (q d4 pp s eb4 < leg g4 < leg bb4 < leg a4 q. cs5 mf -e             3q gs5 > leg fs5 > leg c5 > b4 > leg f4 leg e4)          (t d4 p< leg eb4 < leg g4 f leg bb4 q. a4 marc             t fs4 mf leg gs4 leg e. c5 e b4 t f5 leg e5 leg d5 leg eb5             3q bb5 > a4 > bb5 > e a4 pp stacc -e)))      (setf    v1 (filter-density '(0.7 0.1 0.2 0.0 0.2 0.3 0.3) mat :type :length)    v2 (filter-density '(0.0 0.2 0.0 0.2 0.2 0.4 0.3) mat :type :length)    v3 (filter-density '(0.2 0.7 0.2 0.2 0.2 0.3 0.2) mat :type :length)    v4 (filter-density '(0.0 0.2 0.2 0.7 0.2 0.2 0.7) mat :type :length))      (setf    vn1 (unfold 'om '(t7 dyn bti vn) v1)    vn2 (unfold 'om '(t7 v? dyn bti vn) v2)    vla (unfold 'om '(v? ra dyn bti va) v3)    vlc (unfold 'om '(t-12 t-5 v? a-12-12 dyn bti vc) v4))      (ps 'gm :sq (list vn1 vn2 vla vlc) :tempo 68 :play :lc)   )  
     
     
    QUICK START WORKSPACE

    To update your 'Quick Start' workspace to the latest version you need to delete the 'Quick Start' folder from the Opusmodus directory first.
    After the deletion go to the Opusmodus menu 'Help' and select 'Install Quick Start Workspace'.
    To open the new 'Quick Start' workspace file simply select 'Open Quick Start Workspace' form the 'Help' menu.
     
    That's all for now,
    best wishes,
    Janusz
  12. Thanks
    opmo got a reaction from torstenanders in Opusmodus - second monitor   
    The upcoming release will allow you to open display-midi, display-musicxml, graphs and snippets in a separate window. For any of you using second monitor this will be great addition to your work flow.
     
    Examples:
    (display-midi 'score :display :window) (display-musicxml 'score :display :window)  
    Best,
    Janusz
  13. Thanks
    opmo reacted to Stephane Boussuge in Logic X 16midiInstrument Template   
    Here is one of my Logic X template for working with Opusmodus.
    16MidiInInstrTemplate.zip
  14. Like
    opmo reacted to AM in brownian bridges - algorithmic study   
    too much code and too complicated to post - I do not have the time to write a manual.
     
    it's a "machine" that creates multiple "brownian bridges" combined with "pitch-contour" and "add-rnd-dust".  it's an all-in-ONE tool/machine/bot...
     
    I'm interested in repetition/difference in other contexts than traditional ones; but "brownian bridges" then resemble ornaments. when the sequences are short - brownian bridges are "rnd-processes" between 2 fixed points - then you will keep ornamental sequences between this 2 points/pitches...
     
    (I did not work with a score, just coding and listening - it's only sketching/testing, not composing. and all the examples are "rnd-generated"/not-composed by the machine, you could produce more and more...)
     
    some links:
     
    Brownian bridge - Wikipedia
    EN.WIKIPEDIA.ORG  
     
    -> in OPMO
     
  15. Like
    opmo reacted to AM in brownian bridges - algorithmic study   
    another example/experiment  - you hear 4 times the same "brownian-phrase"  but mapped on different tonalities...
     
       
     
    untitled.aiff
     
    a) diatonic/major
    b) blues-heptatonic
    c) chromatic
    d) messiaen-modus
     
    greetings
    andré
     
     
     
  16. Like
    opmo got a reaction from AM in Opusmodus 1.3.24902   
    – New function:
    POLYGON-RHYTHM – Generates a symmetrical polygon to a given n-gon.
    – Update:
    LENGTH-WEIGHT – :swallow keyword added.
    LENGTH-REST-SERIES – omn-form and :swallow keyword added.
    LENGTH-TO-REST – omn-form and :swallow keyword added.

    – Documents:
    Howto Score/Rhythm/Polygon Rhythm.opmo 
     
    Note: 
    Select 'Check for Updates...' from Opusmodus app menu to get the latest version.
     
     
    POLYGON-RHYTHM

    This function returns a symmetrical polygon to a given n-gon (sides number) with circle points (denominator) and a given staring point.
    In this example we use 3-gon in a 16 point circle with the starting point 0:
    (polygon-rhythm 3 16 0) => (1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16     -1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16)  
    Same as above with :legato t added:
    (polygon-rhythm 3 16 0 :legato t) => (1/4 1/2 1/4)  
    The 3-gon in a 16 point circle with the starting point 0 will produce 7 symmetrical 3-gon’s:
     



     
    Example with start point 5:
    (polygon-rhythm 3 16 5) => (-1/16 -1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16     -1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16 1/16) (circle-rhythm-plot (polygon-rhythm 3 16 5) :points 16)
     
     
    Examples:
     
    In the following example we create 8 bars of a ‘Drum Set’ rhythm.
    First we assign the ‘GM Percussion’ names to variables:
    (setf bd (read-map *gm-percussion* 'acoustic-bass-drum)) (setf sd (read-map *gm-percussion* 'Acoustic-Snare)) (setf ht (read-map *gm-percussion* 'High-Tom)) (setf hh (read-map *gm-percussion* 'Open-Hi-hat))  
    Next we create 4 polygon rhythms:
    (setf bd-gon (polygon-rhythm 3 16 0 :pitch bd :seed 5)) (setf sd-gon (polygon-rhythm 2 16 1 :pitch sd :seed 45)) (setf ht-gon (polygon-rhythm 2 16 5 :pitch ht :seed 45)) (setf hh-gon (polygon-rhythm 5 16 2 :pitch hh :seed 5))  
    With the CIRCLE-RHYTHM-PLOT function you can visualise how the rhythms are working together:
    (circle-rhythm-plot (list bd-gon sd-gon ht-gon hh-gon) :points 16)
     
    Let’s hear the result above, using PS function and ‘GM Instrument Set’ with a 8 times loop:
    (ps 'gm     :ds-bd (list (gen-eval 8 'bd-gon))     :ds-sd (list (gen-eval 8 'sd-gon))     :ds-ht (list (gen-eval 8 'ht-gon))     :ds-hh (list (gen-eval 8 'hh-gon))     :tempo 120)  
    Same as above but without a seed value:
    (ps 'gm     :ds-bd (list (gen-eval 8 '(polygon-rhythm 3 16 0 :pitch bd)))     :ds-sd (list (gen-eval 8 '(polygon-rhythm 2 16 1 :pitch sd)))     :ds-ht (list (gen-eval 8 '(polygon-rhythm 2 16 5 :pitch ht)))     :ds-hh (list (gen-eval 8 '(polygon-rhythm 5 16 2 :pitch hh)))     :tempo 120)  
    In the next example we add a few more percussion instruments.
    The '? start symbol means the start point is selected at random: 0 to 15.
    (progn   (setf bd (read-map *gm-percussion* 'Acoustic-Bass-Drum))   (setf sd (read-map *gm-percussion* 'Acoustic-Snare))   (setf ht (read-map *gm-percussion* 'High-Tom))   (setf hh (read-map *gm-percussion* 'Open-Hi-hat))   (setf lb (read-map *gm-percussion* 'Low-Bongo))   (setf hb (read-map *gm-percussion* 'High-Bongo))   (setf mhc (read-map *gm-percussion* 'Mute-Hi-Conga))   (setf lc (read-map *gm-percussion* 'Low-Conga))      (ps 'gm       :ds-bd (list (gen-eval 16 '(polygon-rhythm 3 16 0 :pitch bd)))       :ds-sd (list (gen-eval 16 '(polygon-rhythm 2 16 1 :pitch sd)))       :ds-ht (list (gen-eval 16 '(polygon-rhythm 2 16 5 :pitch ht)))       :ds-hh (list (gen-eval 16 '(polygon-rhythm 5 16 2 :pitch hh)))       :rhy (list (gen-eval 16 '(polygon-rhythm 5 16 '? :pitch lb))                  (gen-eval 16 '(polygon-rhythm 4 16 '? :pitch hb))                  (gen-eval 16 '(polygon-rhythm 7 16 '? :pitch mhc))                  (gen-eval 16 '(polygon-rhythm 7 16 '? :pitch lc)))       :tempo 120)   )  
  17. Like
    opmo got a reaction from Stephane Boussuge in polygon-rhythm   
  18. Like
    opmo got a reaction from loopyc in polygon-rhythm   
  19. Thanks
    opmo got a reaction from lviklund in Opusmodus 1.3.24902   
    – New function:
    POLYGON-RHYTHM – Generates a symmetrical polygon to a given n-gon.
    – Update:
    LENGTH-WEIGHT – :swallow keyword added.
    LENGTH-REST-SERIES – omn-form and :swallow keyword added.
    LENGTH-TO-REST – omn-form and :swallow keyword added.

    – Documents:
    Howto Score/Rhythm/Polygon Rhythm.opmo 
     
    Note: 
    Select 'Check for Updates...' from Opusmodus app menu to get the latest version.
     
     
    POLYGON-RHYTHM

    This function returns a symmetrical polygon to a given n-gon (sides number) with circle points (denominator) and a given staring point.
    In this example we use 3-gon in a 16 point circle with the starting point 0:
    (polygon-rhythm 3 16 0) => (1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16     -1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16)  
    Same as above with :legato t added:
    (polygon-rhythm 3 16 0 :legato t) => (1/4 1/2 1/4)  
    The 3-gon in a 16 point circle with the starting point 0 will produce 7 symmetrical 3-gon’s:
     



     
    Example with start point 5:
    (polygon-rhythm 3 16 5) => (-1/16 -1/16 -1/16 -1/16 -1/16 1/16 -1/16 -1/16     -1/16 -1/16 -1/16 1/16 -1/16 -1/16 -1/16 1/16) (circle-rhythm-plot (polygon-rhythm 3 16 5) :points 16)
     
     
    Examples:
     
    In the following example we create 8 bars of a ‘Drum Set’ rhythm.
    First we assign the ‘GM Percussion’ names to variables:
    (setf bd (read-map *gm-percussion* 'acoustic-bass-drum)) (setf sd (read-map *gm-percussion* 'Acoustic-Snare)) (setf ht (read-map *gm-percussion* 'High-Tom)) (setf hh (read-map *gm-percussion* 'Open-Hi-hat))  
    Next we create 4 polygon rhythms:
    (setf bd-gon (polygon-rhythm 3 16 0 :pitch bd :seed 5)) (setf sd-gon (polygon-rhythm 2 16 1 :pitch sd :seed 45)) (setf ht-gon (polygon-rhythm 2 16 5 :pitch ht :seed 45)) (setf hh-gon (polygon-rhythm 5 16 2 :pitch hh :seed 5))  
    With the CIRCLE-RHYTHM-PLOT function you can visualise how the rhythms are working together:
    (circle-rhythm-plot (list bd-gon sd-gon ht-gon hh-gon) :points 16)
     
    Let’s hear the result above, using PS function and ‘GM Instrument Set’ with a 8 times loop:
    (ps 'gm     :ds-bd (list (gen-eval 8 'bd-gon))     :ds-sd (list (gen-eval 8 'sd-gon))     :ds-ht (list (gen-eval 8 'ht-gon))     :ds-hh (list (gen-eval 8 'hh-gon))     :tempo 120)  
    Same as above but without a seed value:
    (ps 'gm     :ds-bd (list (gen-eval 8 '(polygon-rhythm 3 16 0 :pitch bd)))     :ds-sd (list (gen-eval 8 '(polygon-rhythm 2 16 1 :pitch sd)))     :ds-ht (list (gen-eval 8 '(polygon-rhythm 2 16 5 :pitch ht)))     :ds-hh (list (gen-eval 8 '(polygon-rhythm 5 16 2 :pitch hh)))     :tempo 120)  
    In the next example we add a few more percussion instruments.
    The '? start symbol means the start point is selected at random: 0 to 15.
    (progn   (setf bd (read-map *gm-percussion* 'Acoustic-Bass-Drum))   (setf sd (read-map *gm-percussion* 'Acoustic-Snare))   (setf ht (read-map *gm-percussion* 'High-Tom))   (setf hh (read-map *gm-percussion* 'Open-Hi-hat))   (setf lb (read-map *gm-percussion* 'Low-Bongo))   (setf hb (read-map *gm-percussion* 'High-Bongo))   (setf mhc (read-map *gm-percussion* 'Mute-Hi-Conga))   (setf lc (read-map *gm-percussion* 'Low-Conga))      (ps 'gm       :ds-bd (list (gen-eval 16 '(polygon-rhythm 3 16 0 :pitch bd)))       :ds-sd (list (gen-eval 16 '(polygon-rhythm 2 16 1 :pitch sd)))       :ds-ht (list (gen-eval 16 '(polygon-rhythm 2 16 5 :pitch ht)))       :ds-hh (list (gen-eval 16 '(polygon-rhythm 5 16 2 :pitch hh)))       :rhy (list (gen-eval 16 '(polygon-rhythm 5 16 '? :pitch lb))                  (gen-eval 16 '(polygon-rhythm 4 16 '? :pitch hb))                  (gen-eval 16 '(polygon-rhythm 7 16 '? :pitch mhc))                  (gen-eval 16 '(polygon-rhythm 7 16 '? :pitch lc)))       :tempo 120)   )  
  20. Like
    opmo reacted to AM in brownian bridges - algorithmic study   
  21. Like
    opmo reacted to Stephane Boussuge in Mapcar Study 1 for small ensemble   
    Here's a short study for a small ensemble.
     
       
     
    All the best !
    SB.
     
    Mapcar1.opmo
     
  22. Like
    opmo got a reaction from Stephane Boussuge in length-weight   
    The additional swallow keyword (default t) will be part of the next release. 🙂
    (length-weight '((q c4 d4 e4 f4 g4 a4 b4)                  (q c4 d4 e4 f4 g4 a4 b4))                :weight '((3 1) (5 2)) :swallow nil                :seed 875) => ((q c4 d4 e4 f4 g4 - a4) (q c4 d4 - e4 f4 g4 -)) ;; With :swallow T (default) (length-weight '((q c4 d4 e4 f4 g4 a4 b4)                  (q c4 d4 e4 f4 g4 a4 b4))                :weight '((3 1) (5 2))                :seed 875) => ((q c4 d4 e4 f4 g4 - b4) (q c4 d4 - f4 g4 a4 -))
  23. Like
    opmo got a reaction from Stephane Boussuge in polygon-rhythm   
    Second example, this time with code.
    VSL: Soprano Sax, Steinway D, Upright Bass and Jazz DrumSet.
     
       
     
    (progn (init-seed 3578) (setf bd '(c2 cs2)) (setf sd '(d2 ds2 e2 f2 fs2 g2 gs2 a2 bb2 b2)) (setf lt '(c5 cs5 d5 ds5 e5 f5 fs5 g5 gs5 a5 bb5 b5)) (setf cc '(g7 c7)) (setf rc '(c4 cs7 d7 ds7 e7 f7)) (setf hh '(c4 cs4 d4 ds4 e4)) (setf ds-vel '(ff f fff)) (setf bd-gon (gen-eval 33 '(polygon-rhythm 3 16 0 :pitch (rnd-sample 32 bd) :velocity (rnd-sample 32 ds-vel)))) (setf sd-gon (gen-eval 32 '(polygon-rhythm 2 16 '? :pitch (rnd-sample 32 sd) :velocity (rnd-sample 32 ds-vel)))) (setf lt-gon (gen-eval 32 '(polygon-rhythm 2 16 '? :pitch (rnd-sample 32 lt) :velocity (rnd-sample 32 ds-vel)))) (setf cc-gon (gen-eval 32 '(polygon-rhythm 5 24 '? :pitch (rnd-sample 32 cc) :velocity (rnd-sample 32 ds-vel)))) (setf rc-gon (gen-eval 32 '(polygon-rhythm 5 24 '? :pitch (rnd-sample 32 rc) :velocity (rnd-sample 32 ds-vel)))) (setf hh-gon (gen-eval 33 '(polygon-rhythm 5 16 '? :pitch (rnd-sample 32 hh) :velocity (rnd-sample 32 ds-vel)))) (setf hexachord '(d4 eb4 fs4 g4 a4 bb4)) (setf chords (assemble-seq (gen-eval 16 '(polygon-rhythm 3 16 '? :pitch (gen-chord-series hexachord hexachord :type '? :width '(30 24 36 12) :segment t))) (gen-eval 4 '(polygon-rhythm 5 16 '? :pitch (gen-chord-series hexachord hexachord :type '? :width '(30 24 36 12) :segment t))) (gen-eval 7 '(polygon-rhythm 4 16 '? :pitch (gen-chord-series hexachord hexachord :type '? :width '(30 24 36 12) :segment nil) :legato t)) (gen-eval 5 '(polygon-rhythm 3 16 '? :pitch (gen-chord-series hexachord hexachord :type '? :width '(30 24 36 12) :segment t))))) (setf piano (assemble-seq '((-1) (-1) (-1) (-1)) (rnd-octaves '(c2 b6) (subseq chords 4 31)) '(-1))) (setf ssax (make-omn :length (assemble-seq '((-1) (-1) (-1) (-1) (-1) (-1) (-1)) (polygon-rhythm 6 16 '?) (polygon-rhythm 7 16 '?) (polygon-rhythm 9 16 '?) (polygon-rhythm 3 8 '?) (polygon-rhythm 16 16 '?) (polygon-rhythm 24 24 '?) (polygon-rhythm 8 16 '?) (polygon-rhythm 11 16 '?) (polygon-rhythm 5 16 '?) (polygon-rhythm 16 24 '?) (polygon-rhythm 6 8 '?) (polygon-rhythm 4 16 2) (polygon-rhythm 5 16 2) (polygon-rhythm 7 16 2) (polygon-rhythm 9 16 0) (polygon-rhythm 13 16 0) (polygon-rhythm 16 16 0) (polygon-rhythm 21 24 0) (polygon-rhythm 22 24 0) (polygon-rhythm 20 24 0) (polygon-rhythm 20 24 0) (polygon-rhythm 16 24 0) (polygon-rhythm 4 16 2) '((-1) (-1)) ) :pitch (ambitus 'soprano-sax (pitch-transpose (vector-to-pitch '(fs3 fs4) (mod-sine-waves 5 36 4 0.3 :modulation (gen-sine 120 5 0.4))) (pitch-variant (melodize (omn :pitch chords))))) :velocity '(ff))) (setf bass-line (assemble-seq '((-1) (-1)) (gen-eval 31 '(polygon-rhythm 9 16 '? :pitch (ambitus '(e1 g4) (pitch-variant (pitch-transpose -24 (rnd-air :type :pitch)))) :velocity '(fff))))) (ps 'vsl :ssax (list ssax) :grand (list piano) :cb (list bass-line) :ds-bd (list bd-gon) :ds-sd (list sd-gon) :ds-lt (list lt-gon) :ds-cc (list cc-gon) :ds-rc (list cc-gon) :ds-hh (list hh-gon) :tempo 120 :output :live-coding :title "Dada Quartet - EXP.2 (c) 2019 OPMO") (init-seed nil) ) Best wishes,
    Janusz

    P.S. I am almost there with the new release. 😎
  24. Thanks
    opmo got a reaction from loopyc in polygon-rhythm   
    Second example, this time with code.
    VSL: Soprano Sax, Steinway D, Upright Bass and Jazz DrumSet.
     
       
     
    (progn (init-seed 3578) (setf bd '(c2 cs2)) (setf sd '(d2 ds2 e2 f2 fs2 g2 gs2 a2 bb2 b2)) (setf lt '(c5 cs5 d5 ds5 e5 f5 fs5 g5 gs5 a5 bb5 b5)) (setf cc '(g7 c7)) (setf rc '(c4 cs7 d7 ds7 e7 f7)) (setf hh '(c4 cs4 d4 ds4 e4)) (setf ds-vel '(ff f fff)) (setf bd-gon (gen-eval 33 '(polygon-rhythm 3 16 0 :pitch (rnd-sample 32 bd) :velocity (rnd-sample 32 ds-vel)))) (setf sd-gon (gen-eval 32 '(polygon-rhythm 2 16 '? :pitch (rnd-sample 32 sd) :velocity (rnd-sample 32 ds-vel)))) (setf lt-gon (gen-eval 32 '(polygon-rhythm 2 16 '? :pitch (rnd-sample 32 lt) :velocity (rnd-sample 32 ds-vel)))) (setf cc-gon (gen-eval 32 '(polygon-rhythm 5 24 '? :pitch (rnd-sample 32 cc) :velocity (rnd-sample 32 ds-vel)))) (setf rc-gon (gen-eval 32 '(polygon-rhythm 5 24 '? :pitch (rnd-sample 32 rc) :velocity (rnd-sample 32 ds-vel)))) (setf hh-gon (gen-eval 33 '(polygon-rhythm 5 16 '? :pitch (rnd-sample 32 hh) :velocity (rnd-sample 32 ds-vel)))) (setf hexachord '(d4 eb4 fs4 g4 a4 bb4)) (setf chords (assemble-seq (gen-eval 16 '(polygon-rhythm 3 16 '? :pitch (gen-chord-series hexachord hexachord :type '? :width '(30 24 36 12) :segment t))) (gen-eval 4 '(polygon-rhythm 5 16 '? :pitch (gen-chord-series hexachord hexachord :type '? :width '(30 24 36 12) :segment t))) (gen-eval 7 '(polygon-rhythm 4 16 '? :pitch (gen-chord-series hexachord hexachord :type '? :width '(30 24 36 12) :segment nil) :legato t)) (gen-eval 5 '(polygon-rhythm 3 16 '? :pitch (gen-chord-series hexachord hexachord :type '? :width '(30 24 36 12) :segment t))))) (setf piano (assemble-seq '((-1) (-1) (-1) (-1)) (rnd-octaves '(c2 b6) (subseq chords 4 31)) '(-1))) (setf ssax (make-omn :length (assemble-seq '((-1) (-1) (-1) (-1) (-1) (-1) (-1)) (polygon-rhythm 6 16 '?) (polygon-rhythm 7 16 '?) (polygon-rhythm 9 16 '?) (polygon-rhythm 3 8 '?) (polygon-rhythm 16 16 '?) (polygon-rhythm 24 24 '?) (polygon-rhythm 8 16 '?) (polygon-rhythm 11 16 '?) (polygon-rhythm 5 16 '?) (polygon-rhythm 16 24 '?) (polygon-rhythm 6 8 '?) (polygon-rhythm 4 16 2) (polygon-rhythm 5 16 2) (polygon-rhythm 7 16 2) (polygon-rhythm 9 16 0) (polygon-rhythm 13 16 0) (polygon-rhythm 16 16 0) (polygon-rhythm 21 24 0) (polygon-rhythm 22 24 0) (polygon-rhythm 20 24 0) (polygon-rhythm 20 24 0) (polygon-rhythm 16 24 0) (polygon-rhythm 4 16 2) '((-1) (-1)) ) :pitch (ambitus 'soprano-sax (pitch-transpose (vector-to-pitch '(fs3 fs4) (mod-sine-waves 5 36 4 0.3 :modulation (gen-sine 120 5 0.4))) (pitch-variant (melodize (omn :pitch chords))))) :velocity '(ff))) (setf bass-line (assemble-seq '((-1) (-1)) (gen-eval 31 '(polygon-rhythm 9 16 '? :pitch (ambitus '(e1 g4) (pitch-variant (pitch-transpose -24 (rnd-air :type :pitch)))) :velocity '(fff))))) (ps 'vsl :ssax (list ssax) :grand (list piano) :cb (list bass-line) :ds-bd (list bd-gon) :ds-sd (list sd-gon) :ds-lt (list lt-gon) :ds-cc (list cc-gon) :ds-rc (list cc-gon) :ds-hh (list hh-gon) :tempo 120 :output :live-coding :title "Dada Quartet - EXP.2 (c) 2019 OPMO") (init-seed nil) ) Best wishes,
    Janusz

    P.S. I am almost there with the new release. 😎
  25. Thanks
    opmo reacted to loopyc in polygon-rhythm   
    You've got my attention! Amazing example, thanks 🙂
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy