Jump to content


Popular Content

Showing most liked content since 07/18/2017 in all areas

  1. 4 points
    In case someone is interested, I just put some of my libraries online. Fenv is a library of highly flexible envelopes for algorithmic composition. The software represents envelopes as numerical functions, called fenvs. It provides a rich set of functions to generate, combine and transform these envelopes. You can find the code at https://github.com/tanders/fenv, together with some information how to install and use. Best, Torsten
  2. 4 points

    Polyphonic preview?

    I really like how Opusmodus allows to preview monophonic snippets (and other material, like interval sequences). No need to explicitly call some function or connect to some editor, as in other composition systems -- just use a keyboard shortcut to see and hear an intermediate result. However, what I miss is notating/auditioning intermediate results of polyphonic music with a single shortcut. So, I defined the function preview-score, based on def-score. The function expects a polyphonic score in the slightly simplified format we discussed earlier. Here is a minimal example. (preview-score '(:vln ((q b4 a4 h g4)) :vlc ((h g3 b3)))) If I want to control further notation or playback parameters, preview-score provides arguments for that, but that is basically the same as using def-score directly. Instead, such parameters can be defined only once with global variables, and then used for multiple calls to preview-score. Here is some example setting. (setf *default-preview-score-instruments* '(:vln (:program 'violin :sound 'gm) :vlc (:program 'cello :sound 'gm))) (defparameter *default-preview-score-header* '(:title "Opus magnum" :tempo 80)) Janusz: How can I define a keyboard shortcut that calls the function preview-score with the score returned by a selected code region (or the Lisp expression just before the cursor)? Thanks! For completeness, the definition of preview-score is below. Best, Torsten ;;; just some dummy settings for now (defparameter *default-preview-score-instruments* '(:vln (:program 'violin :sound 'gm) :vlc (:program 'cello :sound 'gm)) "Settings for each instrument used by `preview-score'. The format is a plist where keys are the instrument labels, and values a list with the actual settings. For format of these settings are the same as instrument settings for `def-score' with keywords like :sound, :channel etc. -- except for they key :omn.") ;;; just some dummy settings for now (defparameter *default-preview-score-header* '(:title "Opus magnum" :tempo 80) "Global score settings used by `preview-score'. The format is a plist where keys are the instrument labels, and values a list with the actual settings. The format is the same as the header settings for `def-score' with keywords like :title, :key-signature etc.") (defun preview-score (score &key (name 'test-score) (instruments *default-preview-score-instruments*) (header *default-preview-score-header*)) "Notates and plays a score in a format slightly simpler than expected by def-score, i.e., without its header. Args: - score (plist): a headerless score. See below for its format. - name (symbol): The score name. - instruments (plist): Keys are instrument labels, and values a list with the actual settings. These settings have the same format as instrument settings for `def-score' with keywords like :sound, :channel etc. -- except for they key :omn. - header (plist): The format is the same as the header settings for `def-score' with keywords like :title, :composer, :key-signature etc. Score format: ;;; (<part1-name-keyword> <part1-OMN> ;;; <part2-name-keyword> <part2-OMN> ;;; ...) Example: ;;; (preview-score ;;; '(:vln ((q g4) (q. c5 e d5 q e5 f5) (h. e5)) ;;; :vlc ((q g3) (q c4 b3 a3 g3) (h. c3))) ;;; :instruments '(:vln (:program 'violin :sound 'gm) ;;; :vlc (:program 'cello :sound 'gm)) ;;; :header '(:title \"Opus magnum\" ;;; :tempo 80)) " ;; Using eval is problematic (https://stackoverflow.com/questions/2571401/why-exactly-is-eval-evil/), ;; but hard to avoid for a dynamically created def-score expression that requires splicing with ,@. ;; Possible alternative would be to define preview-score as macro, but then arguments are not evaluated. (eval `(def-score ,name ;; quote all header args, because symbol values must be quoted... ,(mapcar #'(lambda (x) `',x) (append header ;; add default vals of required header args at end -- they are overwritten by args given (list :key-signature 'atonal ;; By default, use implicit time signature of 1st part :time-signature (om:get-time-signature (second score)) :tempo 70))) ,@(mapcar #'(lambda (part) (let ((part-symbol (first part)) (part-omn (second part))) (list* part-symbol :omn `(quote ,part-omn) (getf instruments part-symbol)))) (plist->pairs score))) ) (audition-musicxml-last-score) *last-score*) #| ; mini test (preview-score '(:vln ((q g4) (q. c5 e d5 q e5 f5) (h. e5)) :vlc ((q g3) (q c4 b3 a3 g3) (h. c3))) :instruments '(:vln (:program 'violin :sound 'gm) :vlc (:program 'cello :sound 'gm)) :header '(:title "Opus magnum" :tempo 80)) |#
  3. 4 points

    Out-of-the-box algorithms

    > more high-level algorithms I cannot answer your question concerning built-in algorithms, but if you are looking for further ideas what could be added, here is some related literature. A good general overview of algorithmic composition techniques, from a technical point of view. Nierhaus, G. (2009) Algorithmic Composition: Paradigms of Automated Music Generation. Wien, New York: Springer. Discussions of compositional applications in OpenMusic (likewise implemented in Common Lisp, though the main interface is a visual language) by various composers. Agon, C. et al. (eds.) (2006) The OM Composer’s Book. 1. Delatour France. Bresson, J. et al. (eds.) (2008) The OM Composer’s Book. 2. Editions Delatour France / Ircam. Hirs, R. & Gilmore, B. (eds.) (2009) Contemporary Compositional Techniques and OpenMusic. Collection Musique/Sciences. IRCAM/Delatour. Bresson, J. et al. (eds.) (2016) The OM Composer’s Book . 3. Paris; Sampzon: Editions Delatour France. Most of you likely already know the book by Nigel Morgan, containing discussions of compositional applications in Opusmodus itself. Morgan, N. & Legard, P. (2015) Parametric Composition: Computer-Assisted Strategies for Human Performance. West Yorkshire, UK: Tonality Systems Press. The perhaps most important algorithmic composition technique of Common Music (also implemented in common Lisp) and SuperCollider are patterns / item streams, which can be nested. http://commonmusic.sourceforge.net/cm/res/doc/cm.html#patterns Taube, H. (2004) Notes from the Metalevel. London and New York: Taylor & Francis. Online: http://www.moz.ac.at/sem/lehre/lib/cm/Notes from the Metalevel/00/contents.html The libraries of the venerable PatchWork and its successors PWGL and OpenMusic (all Common Lisp) provide ideas for various approaches, some already mentioned above. Below are links to relevant link collections. OpenMusic libraries: http://repmus.ircam.fr/openmusic/libraries PWGL libraries: http://www2.siba.fi/pwgl/downloads.html Another successful technique, implemented in multiple PWGL and OpenMusic libraries and beyond is constraint programming. I did a lot of research in this area and therefore quote some own publication here. Anders, T. & Miranda, E. R. (2011) Constraint Programming Systems for Modeling Music Theories and Composition. ACM Computing Surveys. 43 (4), 30:1–30:38. Online: https://pdfs.semanticscholar.org/7d0e/783e5bb1c35a871a45e72fddaf7bf3db5d28.pdf. Of course, there is much more literature on algorithmic composition (computer-aided composition) out there, but the above literature gives a good starting point to study more general composition techniques and their applications. Best, Torsten
  4. 3 points

    little stupid bot

    an output-seq of "a little stupid bot" (works with stochastic broken-symmetrical elements and PM..) - could produce for eternety (never ending)... it works and i am going for holidays now greetings andré
  5. 3 points

    Opusmodus 1.2.22292

    Below is a generalised version that expects a test function instead of a static parameter. That way you can, e.g., filter out all notes above a certain pitch threshold or arbitrary other conditions that you can express with a function. Demonstration examples are contained in the doc string below. Best, Torsten (defun filter-notes-if (test OMN &key (remain T) (section nil)) "Extracts events in OMN for which a given test function returns true (or keeps only events for which the test function returns nils). All other notes are turned into rests. Args: - test: Boolean function expecting individual parameters of each note in `OMN' - OMN: An OMN sequence - remain: Boolean expressing whether only matching notes (T) or non-matching notes (nil) should be kept. - section: an integer or list of integers. Selected list or lists to process. The default is NIL. See also Opusmodus builtin `filter-events'. Examples: Keep only notes above middle C and turn other notes into rests (filter-notes-if #'(lambda (dur pitch &rest other-args) (> (pitch-to-midi pitch) 60)) '(e c4 mp -e fermata e. d4 -h e. c4 e e4)) Do the opposite with :remain nil. (filter-notes-if #'(lambda (dur pitch &rest other-args) (> (pitch-to-midi pitch) 60)) '(e c4 mp -e fermata e. d4 -h e. c4 e e4) :remain nil) This also works with nested lists and you can process only selected bars (other bars are kept unchanged). (filter-notes-if #'(lambda (dur pitch &rest other-args) (> (pitch-to-midi pitch) 60)) '((e c4 mp -e fermata e. d4 -s) (-q.. e. c4 e e4)) :section 1) " (if section (maybe-section #'(lambda (seq) (filter-notes-if test seq :remain remain)) OMN section) (copy-time-signature OMN (flatten (mapcar #'(lambda (params) (if (length-notep (first params)) (if (if remain (apply test params) (not (apply test params))) params ;; turn non-matching note into rest ;;; TODO: preserve params relevant for rests (e.g., fermatas) (- (omn-encode (first params)))) ;; leave rests unchanged params)) (single-events (flatten OMN))))))) (defun copy-time-signature (music-with-time-signature music-to-rebar) "Rebars `music-to-rebar' so that it fits the meter of `music-with-time-signature'." ;; only rebar if music-with-time-signature is nested (if (every #'listp music-with-time-signature) (omn-to-time-signature music-to-rebar (get-time-signature music-with-time-signature)) music-to-rebar))
  6. 2 points

    Opusmodus 1.2.22292

    Do you have your divisi strings represented as chords and what to split them into separate parts? You could do that with the polyphonic representation I was talking about. For the definition of preview-score please see https://opusmodus.com/forums/topic/902-polyphonic-preview/. (setf my-score '(:vl1 (h g4b4 g4a4) :vl2 (h e4 d4) :vla (h c4 b3) :vlc (h c3 g3))) ; test (preview-score my-score) (setf divisi-part (single-events (pitch-melodize (get-part-omn :vl1 my-score)))) (setf result-score (split-part :vl1 my-score `(:vl1_div1 ,(flatten (at-even-position divisi-part)) :vl1_div2 ,(flatten (at-odd-position divisi-part)))))) ; test (preview-score result-score) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; I am using above various other functions I have in my libraries, and I am copying their definition below. Hope I did not forget any... ;;; (defun get-part-omn (instrument score) "Returns the part (OMN expression) of `instrument' in `score', a headerless score (see {defun preview-score} for its format)." (getf score instrument)) (defun split-part (instrument orig-score score-to-insert) "Replaces part of `instrument' in `orig-score' with `score-to-insert'." (let ((instr-position (position instrument orig-score))) (append (subseq orig-score 0 instr-position) score-to-insert (subseq orig-score (+ instr-position 2))))) (defun at-even-position (in-list) (at-position in-list 2 0)) (defun at-odd-position (in-list) (at-position in-list 2 1)) (defun at-position (in-list factor offset) "Returns a list containing every factor-th elements of in-list starting at offset" (mapcar #'(lambda (i) (nth i in-list)) (arithmeric-series factor offset (ceiling (/ (length in-list) factor))))) (defun arithmeric-series (factor offset length) (let (result) (reverse (dotimes (i length result) (push (+ (* i factor) offset) result))))) Best, Torsten
  7. 2 points
    > you would like to have some code which produces/composes a "nearly complete piece" for you Actually, this is not what most of the techniques listed by Wim or me are. Instead, computer-aided composition techniques offer the composer to control the result on a higher level, but by offering various dimensions of control and by often generating intermediate results that are then further processed either by hand or with other algorithms, and not just a single bottom to start the computation of a new piece. The opposite can be called automatic composition, and much of David Cope's work is indeed a good example of that. Details on his publications etc. can be found at his website, http://artsites.ucsc.edu/faculty/cope/. Best, Torsten
  8. 1 point

    4th Element - Attributes

    Attributes (Articulations) The largest element of the OMN language is ATTRIBUTE. This term covers the many hundreds of symbols and words that describe musical expression. These terms are divided up very broadly within the OMN Glossary into two groupings: Articulations, Ornaments and Marks affecting all instrumental and vocal performance; Strings, Woodwind and Brass performance indicators being specific only to those instruments. Articulations cover Accents, Cesura, Fermata, Legato, Ties and Pedal. In musical performance these words, signs and symbols indicate a specific way of controlling the dynamic, intensity or duration of a musical event. This may be a single instance or covering a group of events. Ornaments are closely linked to articulation but usually include the addition of further pitches and subsequent changes in duration. Ornaments in OMN include Acciaccatura, Appoggiatura, Arpeggio, Glissando, Mordent, Trill, Tremolo, Turn and Two-note Tremolo. Ornamentation was once a required art for the musician to master with an expectation in the 17C and 18C that performers would freely embellish notated music as a matter of course, often going way beyond what was indicated in a score. In contemporary music ornamentation, whilst still using the symbols of Baroque performance practice, is most usually a precise and obligatory requirement seeking to give a special intensity to individual pitched events. Marks cover the many general performance indications found on a notated score that govern all instruments and voices. These include Repeat Signs and Rehearsal Marks. In OMN, performance instructions for woodwind and brass include the now common terms found in contemporary scores first collected together in Bruno Bartolozzi’s New Sounds for Woodwind. These may be linked through DEF-SOUND-SET to available sample sets of woodwind and brass attack transients. For strings, performance instructions in OMN are comprehensively cited and in conjunction with a sample library can be used to trigger complex mixtures and layers of timbre type. Included within OMN are Arco, Pizz, Col Legno, Harmonics, Pizzicato, String, Sul Ponticello, Sul Tasto, Bowing Techniques and Vibrato. Here's the complete build-in attributes listing: Reset norm ord nat non-trem sim ad-lib Strings Articulations arco-tasto tasto alto-tasto extr-tasto molto-tasto arco-ponte poco-ponte ponte molto-ponte da-ponte extr-ponte alto-ponte flaut spicc gettato ricochet jete crini arco arco-ord arco-lento tallone punta vib senza-vib con-vib vib-norm non-vib poco-vib molto-vib secco vib-ord legno legno-batt legno-tratto batt tasto-ponte tasto-ponte-tasto ponte-tasto-ponte ponte-tasto espr lh-pizz pizz pizz-nail snap pizz-ord pizz-trem slap lh-slap tap knock pizz-chit unis div tutti solo soli sulla-corda tutto-arco arm non-arm Bow ubow dbow Open String sul sul1 sul2 sul3 sul4 sul5 sulg suld sula sule sulc Brass / Wind flutter-tongue half-depressed-valves hit-on-mouthpiece insert-straight-mute-into-bell kiss mouthpiece-backwards mouthpiece-only play-and-sing silent-brass snap-with-a-finger-on-the-bell stop-mute-closed stop-mute-open stop-mute-wahwah-effect without-mouthpiece air-noise-f air-noise-h air-noise-k air-noise-p air-noise-s air-noise-sh air-noise-t without-tubings over-blow under-blow harsh-blow without-air low-noise-blow high-noise-blow finger-damp hum breathy Tongue frull tong1 tong2 tong3 tong-blocked tong-soft tong-hard Handbell hbmart Accents stacc stacs mart marc ten deta Harmonic harm harm2 Muting mute unmute open con-sord senza-sord via-sord Grace Note app app-h acc-h app. -app -app-h -acc-h -app. app-q acc-q -app-q -acc-q acc app-e acc-e acc. -acc -app-e -acc-e -acc. app-s acc-s app-t acc-t app-x acc-x -app-s -acc-s -app-t -acc-t -app-x -acc-x Arpeggio arp arp-up arp-down arp-adlib Trill tr1-s tr1 tr1-t tr1-x tr1-3e tr1-3s tr1-5q tr1-5e tr1-7q tr1-7e tr2-s tr2 tr2-t tr2-x tr2-3e tr2-3s tr2-5q tr2-5e tr2-7q tr2-7e ltr1-s ltr1-t ltr1 ltr1-x ltr1-3e ltr1-3s ltr1-5q ltr1-5e ltr1-7q ltr1-7e ltr2-s ltr2-t ltr2 ltr2-x ltr2-3e ltr2-3s ltr2-5q ltr2-5e ltr2-7q ltr2-7e TREMOLO trem-e trem-s trem trem-t trem-x trem-3e trem-3s trem-3t trem-5q trem-5e trem-5s trem-5t trem-7q trem-7e trem-7s trem-7t Two-Note-Tremolo ttrem-e ttrem-s ttrem ttrem-t ttrem-x ttrem-3e ttrem-3s ttrem-3t ttrem-5q ttrem-5e trem-5s trem-5t ttrem-7q ttrem-7e ttrem-7s ttrem-7t Fermata fermata fermata-s fermata-vs fermata-l fermata-vl Cesura cesura cesura2 cesura3 cesura4 cesura5 cesura6 Comma comma comma2 comma3 comma4 comma5 comma6 Mordent Upper mordent1 mordent1-x mordent1-t mordent2 mordent2-x mordent2-t Lower lmordent1 lmordent1-x lmordent1-t lmordent2 lmordent2-x lmordent2-t Upper Double dmordent1 dmordent1-x dmordent1-t dmordent2 dmordent2-x dmordent2-t Lower Double ldmordent1 ldmordent1-x ldmordent1-t ldmordent2 ldmordent2-x ldmordent2-t Turn Upper turn12 turn22 turn21 turn11 turn12-s turn22-s turn21-s turn11-s turn12-x turn22-x turn21-x turn11-x Lower lturn12 lturn22 lturn21 lturn11 lturn12-s lturn22-s lturn21-s lturn11-s lturn12-x lturn22-x lturn21-x lturn11-x Upper Classic cturn12 cturn22 cturn21 cturn11 cturn12-5e cturn22-5e cturn21-5e cturn11-5e Lower Classic lcturn12 lcturn22 lcturn21 lcturn11 lcturn12-5e lcturn22-5e lcturn21-5e lcturn11-5e KEY SLAP key-slap Harp bisb thin-pick between-tuning-peg-and-tuning-mechanism clang close-to-table dampened fingernail hand-on-the-corpus hand-on-the-strings knuckle-on-the-corpus semitone-downwards semitone-upwards wholetone-downwards wholetone-upwards pedal-noise tuning-wrench hit xylophone-tone Cue Notes (50% Size Note) cue Number num0 num1 num2 num3 num4 num5 num6 num7 num8 num9 num10 num11 num12 Finger dig1 dig2 dig3 dig4 dig5 Repeat repeat Ending end1 end2 end3 end4 end5 end6 end7 end8 end9 end10 Legato leg Tie tie Glissando gliss gliss2 gliss3 gliss4 kgliss kgliss-ch Octave Shifts 8va 8vb 15ma 15mb Pedals ped1 ped half-ped1 half-ped sost-ped1 sost-ped una-corda1 una-corda Hand ms md lh rh User Attributes The ADD-TEXT-ATTRIBUTES function allows you to add your own list of attribute names (playing techniques) to the system. (add-text-attributes '(ord-tasto "ord⟶tasto") '(tasto-ponte "sul tasto⟶pont.") ) Example: '(h c4 ppp> ord-tasto+leg cs5 pppp tasto-ponte)
  9. 1 point

    3rd Element - Velocity

    Velocity Traditional staff notation has a collection of common symbols that are formed from the first letter of Italian words for degrees of intensity we want to attach to a note or a phrase. In OMN there are 12 such terms ranging from ppppp to fffff. The items in this collection have specific pre-set data values attached and as such produce in MIDI play back differences of attack on the notes they accompany. OMN Notation: (q a4 ppppp) (q a4 pppp) (q a4 ppp) (q a4 pp) (q a4 p) (q a4 mp) (q a4 mf) (q a4 f) (q a4 ff) (q a4 fff) (q a4 ffff) (q a4 fffff) Dynamic The symbols classed as being Dynamic have a relative MIDI velocity value attached to them. The objective within OMN is to primarily to provide the notation for such symbols. OMN Notation: (q a4 cresc) (q a4 dim) (q a4 <) (q a4 >) (q a4 0<) (q a4 >0) (q a4 pfp) (q a4 pf) (q a4 fp) (q a4 sfp) (q a4 sf) (q a4 sff) (q a4 sfff) (q a4 sfz) (q a4 sffz) (q a4 sfffz) (q a4 rf) (q a4 rfz) (q a4 fz) (q a4 ffz) (q a4 fffz) Crescendo The collection titled Crescendo takes the Italian abbreviations for the common dynamic descriptions and places a < directly following the abbreviation. OMN Notation: (q a4 ppppp<) (q a4 pppp<) (q a4 ppp<) (q a4 pp<) (q a4 p<) (q a4 mp<) (q a4 mf<) (q a4 f<) (q a4 ff<) (q a4 fff<) (q a4 ffff<) Diminuendo The collection titled Diminuendo takes the Italian abbreviations for the common dynamic descriptions and places a > directly following the abbreviation. OMN Notation: (q a4 pppp>) (q a4 ppp>) (q a4 pp>) (q a4 p>) (q a4 mp>) (q a4 mf>) (q a4 f>) (q a4 ff>) (q a4 fff>) (q a4 ffff>) (q a4 fffff>) List of Symbols: ppppp pppp ppp pp p mp mf f ff fff ffff fffff ppppp< pppp< ppp< pp< p< mp< mf< f< ff< fff< ffff< fffff< ppppp> pppp> ppp> pp> p> mp> mf> f> ff> fff> ffff> fffff> 0< < > >0 cresc dim Sforzando pfp fpf pf fp ffp fffp sfp sfpp sfppp sffp sfffp sf sff sfff sffff sfz sffz sfffz fz ffz fffz rf rfz One Note Dynamic Symbols This notation is used in wind, brass and string performance to suggest a precise dynamic changes to take place on a single pitch. The symbols are particularly associated with the use of hand-held mutes in writing for trumpets and trombones. 0<ppppp 0<pppp 0<ppp 0<pp 0<p 0<mp 0<mf 0<f 0<ff 0<fff 0<ffff 0<fffff ppppp>0 pppp>0 ppp>0 pp>0 p>0 mp>0 mf>0 f>0 ff>0 fff>0 ffff>0 fffff>0 0<ppppp> 0<pppp> 0<ppp> 0<pp> 0<p> 0<mp> 0<mf> 0<f> 0<ff> 0<fff> 0<ffff> 0<fffff> <ppppp>0 <pppp>0 <ppp>0 <pp>0 <p>0 <mp>0 <mf>0 <f>0 <ff>0 <fff>0 <ffff>0 <fffff>0 0<ppppp>0 0<pppp>0 0<ppp>0 0<pp>0 0<p>0 0<mp>0 0<mf>0 0<f>0 0<ff>0 0<fff>0 0<ffff>0 0<fffff>0 <ppppp> <pppp> <ppp> <pp> <p> <mp> <mf> <f> <ff> <fff> <ffff> <fffff> >ppppp< >pppp< >ppp< >pp< >p< >mp< >mf< >f< >ff< >fff< >ffff< >fffff< ppppp<> pppp<> ppp<> pp<> p<> mp<> mf<> f<> ff<> fff<> ffff<> fffff<> ppppp>< pppp>< ppp>< pp>< p>< mp>< mf>< f>< ff>< fff>< ffff>< fffff>< ppppp<pppp ... ffff<fffff pppp>ppppp ... fffff>ffff ppppp<>ppppp ... ffff<>ffff pppp><pppp ... fffff><fffff ppppp<pppp>ppppp ... ffff<fffff>ffff pppp>ppppp<pppp ... fffff>ffff<fffff >0< 0<>0 <>0 0<> <> >< Examples: '((q d4f4bb4d5 f< leg c4eb4a4c5 leg bb3d4g4bb4 leg e c4eb4a4c5 leg d4f4ab4d5 ff leg) (q f4ab4d5f5 > leg e4g4bb4e5 leg h fs4a4d5 mf) (q c4ds4a4 p< leg bb3e4g4 leg b3d4fs4 f leg e3g3cs4 > leg) (h d3fs3d4 pp)) Figure 1 (M. Reger, Aus meinem Tagebuch, I, 3, 1904/12) '(t a3 p stacc a3 stacc a3 stacc a3 tie e a3 q... b3 t f h. gs4 mp (acc e e4 p f4 e4 d4) w e4) Figure 2 (K. Stockhausen, Mantra für 2 Pianisten, 1970) '((e b4 f) (w b4 sf leg) (q e4 marc+stacc+espr - - -e fs4 stacc) (w g4 sf leg) (q b3 stacc+marc - - -e ds4 stacc) (h e4 sf marc+leg q g3 stacc+marc -e a3 stacc) (h b3 sf leg q e3 stacc+marc -e fs3 stacc) ((leg q g3 marc e e3 -s fs3 ten))) Figure 3 (B. Smetana, Aus meinem Leben, Streichquartett e-Moll, 1876) '(((marc e e3 mp eb4 fs3 c3) s g3 stacc e fs2 < marc (stacc s g2 < 5q gs2 < d3 < cs4 < e4 < d3 <)) (e c3 < marc gb2 < marc (stacc 5q c3 < d3 < c3 < ab2 < g3 < d3 < cs4 < eb4 < a3 < bb2 < d3 < a2 < b2 < bb2 < c4 mf))) Figure 4 (J. Podrazik, Kritiken Nostalgia, 2004)
  10. 1 point

    2nd Element - Pitch

    Pitch In OMN a pitch is written as a text symbol that combines a note’s lower-case letter name with its octave number. OMN uses the convention that c4 is ‘middle c’ , so numbered because of the note's position as the fourth C key on a standard 88-key piano keyboard. In fact the composer can go a little beyond the standard keyboard range because OMN takes in the MIDI range of 0 - 127 pitches. '(c4 cs4 d4 ds4 e4 f4 fs4 g4 gs4 a4 as4 b4) Figure 1 (Chromatic scale) In an ascending chromatic scale the convention is to notate the chromatic pitches in sharps. '(cs4 ds4 es4 fs4 gs4 as4 bs4) Figure 2 (Sharps) The sharp is written as an ’s’ symbol preceded by the letter of the diatonic pitch and then the octave number, thus cs4. '(cb4 db4 eb4 fb4 gb4 ab4 bb4) Figure 3 (Flats) The flat is written as an ’b’ symbol preceded by the letter of the diatonic pitch and then the octave number, thus db4.  '(c4 d4 e4 f4 g4 a4 b4) Figure 4 (C major) In a diatonic C major scale where no chromatic notes exist the letter name and the octave number suffice. When transpositions are made using an algorithmic function the note spelling will often mix sharps and flats to seek the best compromise. 12 Tone Row '(eb4 b4 g4 cs4 c4 fs4 e4 bb4 a4 f4 ab4 d4) Figure 5 (A. Berg, Wozzeck, Act 1, Scene 4) In a 12 Tone Row sharp and flat spellings are common. In OMN they can be freely mixed to enable intervallic analysis to be undertaken. (pitch-to-interval '(eb4 b4 g4 cs4 c4 fs4 e4 bb4 a4 f4 ab4 d4)) => (8 -4 -6 -1 6 -2 6 -1 -4 3 -6) Opusmodus can make conversions to and from interval sets. '(c4 e4 g4 cs4 a4 b4 f4 ds4 d4 fs4 gs4 as4) Figure 6 (A. Schönberg, Opus 28, Number 1) This row is taken from Schoenberg’s Three Satires for mixed chorus. The song is directed at those exploiting tonal and atonal principles alike without being aware of origins or consequences. The text of the song Am Scheideweg corresponds to a C-major triad which is worked into this twelve-tone row and the row’s chromatic spelling is chosen to make the vocal pitching of intervals easier. Chord To create a chord, individual pitches are brought together as a single entity. '(q c4e4g4 e4g4c5 g4c5e5 c4e4a4 e4a4c5 a4c5e5) Figure 7 (Chords) The ordering of pitches within a chord grouping does not have to reflect ascending or descending patterns to be displayed correctly in notation. This means algorithmic constructions of chords can be freely undertaken.  '(q g2d3g3b3 a2c3fs3a3 b2d3g3) Figure 8 (Chords) As with individual pitches, chords adopt sharp or flat spellings as they occur in a list. Examples: '((e g5g3 g5g3 fs5fs3) (e e5e3 g5g3 e5e3) (e a4a2 a5a3 g5g3) (e fs5fs3 a5a3 fs5fs3) (e b4b2 b5b3 a5a3) (e g5g3 b5b3 g5g3) (e e5e3 e6e4 d6d4) (s cs6cs4 e6e4 e6e4 cs6cs4 cs6cs4 a5a3) (s a5a3 cs6cs4 cs6cs4 a5a3 a5a3 fs5fs3) (s fs5fs3 a5a3 a5a3 fs5fs3 fs5fs3 d5d3) (e d5d3 -q) (e a4a2 -q) (e d4d2 -q)) Figure 9 (J. S. Bach, Brandenburg Concerto No.4 in G major, BWV 1049, 1720) '((s d5f5b5 f e5g5c6 e f5a5d6 s g5b5e6 f5a5d6 e5g5c6 d5f5b5) (e c5e5a5 c5e5a5 q d5f5b5 marc) (s d5f5b5 e5g5c6 f5a5d6 g5b5e6 e f5a5d6 s e5g5c6 d5f5b5) (e c5e5a5 c5e5a5 q d5f5b5 marc)) Figure 10 (I. Strawinsky, Petruschka, 1911/21) '((t cs5 pp bs4 < cs5 < dn5 > cs5 > bn4 > gs4 es4 -s fermata) (t gs4 fss4 gs4 an4 gs4 fss4 en4 cs4 -s fermata)) Figure 11 (L. Janáček, In the Mists, 1914)
  11. 1 point

    1st Element - Length

    Length The OMN language provides for a textual equivalent to the many symbols used in traditional staff notation. In the parameter of LENGTH these symbols represent exact durations of virtual time.  Figure 1 Here are the standard values of note-lengths. The most commonly-used are represented in the OMN language by the first letter of their American arithmetic name, so w is a whole-note, h is a half-note, q is a quarter note and so on.  Figure 2 Here are the standard values of rest-lengths.The most commonly-used are represented in the OMN language by the first letter of their American arithmetic name but with the prefix of a - (minus) sign, so -w is a whole-note rest, -h is a half-note rest, -q is a quarter note rest and so on. To assist with multiple rests -12 will produce 12 bars of whole-note rests. '(q q q)  Figure 3 Here is a list of three quarter-notes. The list has to begin with a '(a quote) and be enclosed by parentheses ( ). '(q -e e q)  Figure 4 The example above shows note-lengths and rest-lengths in combination. Length 8 will produce 8 bars of whole-notes lengths. '(8 h q q)  Figure 5 Length -8 will produce 8 bars of whole-notes rests. '(-8 h q q)  Figure 6 Dotted Length Symbol: . .. ... OMN dots are used the same way as in the standard notation. The maximum dots in OMN length is 3 (q...). Tuplet The OMN system of rhythmical notation is initially constructed on the principle of duple divisions. Here the individual note-lengths stand for their face value. w = (h h) h = (q q) q = (e e) and so on. The other divisional types must make do by borrowing from this binary series: duplet (2), triplet (3), quadruplet (4), quintuplet (5), sextuplet (6), septuplet (7), octuplet (8), nontuplet (9) etc… When we write these values we use the same note-values as the immediately preceding binary division. '((3w 3w 3w) (3h 3h 3h) (3q 3q 3q))  Figure 7 This means for example that a triplet division of the quarter note uses eighth notes. '((5w = = = =) (5h = = = =) (5q = = = =))  Figure 8 This means for example that a quintuple division of the quarter note uses sixteenth notes. Repeat Note: = Rest: - '((e. s q =) (e. s q =))  Figure 9 The use of repeat symbols for note-lengths and rest-lengths is fundamental to OMN. Its use can give score scripts a very particular style and appearance. Composers will soon discover different approaches will suit particular situations when writing for percussion or in the notation of repetitive textures. '((q -e = q) (q - e. t =))  Figure 10 If a note-length repeat symbol follows a rest-length a note-length is given. '(s e - s - e. -s e s -e)  Figure 11 The use of the rest-length repeat can bring clarity to the visual layout of a phrase. Compound Length Length composed of two or more separate length elements; '(qs s e h)  Figure 12 '(hqs -s qe)  Figure 13 Tie Symbol: _ Attribute: tie (omn form) OMN has two types of ties. The first one is a tie length symbol _ and the second one is the attribute tie. '((h_e e q) (q_3q 3q 3q -h))  Figure 14 The tie symbol is used when a tie is necessary in the middle of a list. '((h_e c4 e_q tie) (q_3q c4 3q 3q_h))  Figure 15 The tie as an attribute is necessary when a tie goes across one list to join a length symbol in an adjacent list. Extended Length Note: == Rest: -- '(s == -- = - === - == = --)  Figure 16 Both note-lengths and rest-lengths can be extended simply by bringing the symbols together in the same way pitches come together to produce chords. In percussion writing this can provide further clarity because only one length value needs to be set at the beginning of the list. '(3q == -e = s - = - == --)  Figure 17 Extended Periodic Length '(s== = = = = =)  Figure 18 '(5q== = = 7q=== = = =)  Figure 19 '(5q== - = 7q=== = - =)  Figure 20 '(s== == -- = - === - == = --)  Figure 21 Ratios OMN notation allows the use of ratio values if more convenient. '((q = e = h) (q - e. t =)) same as: '((1/4 1/4 1/8 1/8 1/2) (1/4 -1/4 3/16 1/32 1/32))  Figure 22 Many functions automatically output ratios as a default rather than OMN symbols. This can usually be changed by setting a keyword within the function such as :omn t. '((q_e e q) (q -3q = = h)) same as: '((1/4_1/8 1/8 1/4) (1/4 -1/12 1/12 1/12 1/2))  Figure 23 The tie mechanism in both its forms works with ratios. Examples: '((e 3e = = e 3e = = e =) (e 3e = = e 3e = = = = =)) Figure 24 (M. Ravel, Bolero, 1928) '((s a4 d5 fs4 d5 g4 d5) (s a4 d5 fs4 d5 g4 d5) (s a4 d5 cs5 b4 a4 g4) (s fs4 d4 e4 c4 e d4)) Figure 25 (G. Ph. Telemann, 12 Fantasie per clavicembalo TWV 33, n.1, 1732) '((e e5 3e g5 bb4 g4 e a4) (3e a5 c4 a4 e bb4 3e g5 bb4 g4) (s a4 c6 c6 a5 a5 f5) (s f5 d5 d5 c5 d5 bb5)) Figure 26 (D. Scarlatti, Sonata B-Dur, 1736) '((3e gb6 bb6 db6 gb6 eb6 gb6 db6 gb6 bb5 db6 gb5 bb5) (3e gb5 bb5 db5 gb5 eb5 gb5 db5 gb5 bb4 db5 gb4 bb4) (3e db4 db5 ab4 db5 ab4 ab5 ab4 ab5 eb5 ab5 eb5 eb6) (3e eb5 eb6 ab5 eb6 ab5 ab6 ab5 ab6 db6 ab6 db6 db7)) Figure 27 (F. Chopin, Etudes, Op. 10, No. 5, 1833) '((e b6as7d7cs7 ff a6as7 p b6c6b5b4as5 mp e5f4b4a3 ffff s. ds3cs3c4b3 ff t c4fs3as2b2 mp) (3e= ds1a0gs1as1 mf a1gs1d1cs2d2ds2 ffff tie 3s a1gs1d1cs2d2ds2 ffff 3e d4c4 mp s b4f5a4as4d4ds4 ffff e cs2g1) (3h d1c1b0as0 pp as0c1fs1f1e1 b2cs3c4cs4 mf 3q d4cs4ds5e4fs4 mp f7e6 c6b5fs5c5e5as4 mf)) Figure 26 (J. Podrazik, Piano Study No.3, 2013)
  12. 1 point
    Ah, thanks -- indeed length-legato does the same. So, I will simply remove my new but redundant function again :) BTW, this function could be useful also for implementing Beethoven-like motif condensation, where (less important) notes are removed from a motif. Here is a simple example motif. (setf my-motif '((q. c4 e d4 q. e4 e f4) (h g4 -h))) Lets turn all the eighths notes in this motif into rests, and then extend the notes preceding the rests by the duration of the rests. The eighths notes occur at every 2nd position, and I am using a variant of length-rest-series to turn them into rests. While length-rest-series returns a list of lengths, this variant returns an OMN expression that retains all parameters. (setf my-motif2 (length-rest-series-omn '(2 2) my-motif)) => ((q. c4 -e q. d4 -e) (h e4 -)) (length-legato my-motif2) => ((h c4 d4) (w e4)) Of course, the tricky bit here is to determine which notes to "remove", i.e. which notes are less important. Above, these notes are selected by hand in the argument to length-rest-series-omn. An alternative approach would be to select these notes with a test. In the example below, all notes that are shorter than a quarter note are automatically removed and turned into rests. (length-legato (filter-notes-if #'(lambda (dur pitch &rest other-args) (> (omn-encode dur) 1/4)) my-motif)) => ((h c4 e4) (w g4)) filter-notes-if is defined at For completeness, below is the definition of length-rest-series-omn. It is defined with a (revision of) edit-omn that I reported before at Best, Torsten (defun length-rest-series-omn (rest-distances sequence) "Same as length-rest-series, but works on OMN expressions retaining all parameters. See doc of length-rest-series for more details." (edit-omn :length sequence #'(lambda (ls) (length-rest-series rest-distances ls)))) (defun edit-omn (type notation fun &key (flat T)) "Use function `fun', defined for transforming individual OMN parameters of `type' (e.g., :length, or :velocity) to transform omn expression `notation'. This function is intended as a convenient way to generalise functions your functions to support omn notation as input. Args: - type: a keyword like :length, :pitch, :velocity, :duration, or :articulation (any keyword supported by function omn or make-omn). - fun: a function expecting a parameter sequence of given type. It is sufficient to support only a flat input list, support for nested lists is added implicitly. - notation: a omn sequence or a plain parameter list (can be nested). - flat (default T): whether or not `fun' expects a flat input list. Example: roll your own transposition supporting omn input first aux def supporting only pitches ;;; (defun my-transposition-aux (interval pitches) ;;; (midi-to-pitch (loop for p in (pitch-to-midi pitches) ;;; collect (+ p interval)))) test ;;; (my-transposition-aux 7 '(c4 e4 g4)) ;;; => (g4 b4 d5) variant supporting also omn expressions ;;; (defun my-transposition (interval omn) ;;; (edit-omn :pitch omn ;;; #'(lambda (ps) (my-transposition-aux interval ps)))) test with nested OMN including a rest ;;; (my-transposition 7 '((q c4 mp -q q e4 q f4) (h g4 tr2))) ;;; => ((q g4 mp - b4 c5) (h d5 mp tr2)) More information at {https://opusmodus.com/forums/topic/799-user-functions-supporting-arbitrary-omn-input-–-defining-them-more-easily/}." (if (omn-formp notation) (copy-time-signature notation (let ((params (omn nil notation)) (type-is-length? (equal type :length))) (apply #'make-omn (append (list type (funcall fun (if flat (flatten (getf params type)) (getf params type)))) (remove-properties (if type-is-length? '(:length :duration) type) params) )))) ;; notation is plain parameter list (span notation (funcall fun (if flat (flatten notation) notation))))) (defun copy-time-signature (music-with-time-signature music-to-rebar) "Rebars `music-to-rebar' so that it fits the meter of `music-with-time-signature'." ;; only rebar if music-with-time-signature is nested (if (every #'listp music-with-time-signature) (omn-to-time-signature music-to-rebar (get-time-signature music-with-time-signature)) music-to-rebar)) (defun remove-properties (properties property-list) "Removes all properties and their values out of a property list" (reduce #'(lambda (list val) (remove-property val list)) properties :initial-value property-list))
  13. 1 point
    Sorry, it is length-legato function. S.
  14. 1 point

    Opusmodus 1.2.22479

    Added to the system: (pushnew :opusmodus *features*)
  15. 1 point

    Polyphonic preview?

    Dear Janusz, To be clear: I do not expect that there will be a keyboard shortcut for every user added to Opusmodus. Instead, if you just share an example of code how to add a short key (and ideally a menu entry) to the Hemlock editor, that would be great. Thanks again! Best, Torsten
  16. 1 point
    I am interested in controlling musical textures, i.e., relations between polyphonic parts. I defined a bunch of functions that use the simple polyphonic music representation used also by my function preview-score that I presented shortly (see https://opusmodus.com/forums/topic/902-polyphonic-preview/#comment-2686). Apologies that this post is a bit longer. Here is a particularly flexible function: map-parts transforms a polyphonic score. It is a variant of the standard Lisp function mapcar, where a function is applied to every part in a score, but each instrument/part can be given its own function arguments for the transformation. One argument is the respective part of the score. This argument is marked by an underscore (_) in the argument lists. In the following example, the function pitch-transpose is applied to a score with two very simple parts consisting of only a single note each. This function has two required arguments, a transposition interval (measured in semitones), and the pitch sequence or OMN to transpose. The transposition interval for the first part is 4 (major third upwards), and the underscore marks the position of the violin part to transpose, etc. Note that you can always see and hear the resulting score by wrapping preview-score around each example. Hopefully these examples sufficiently demonstrate my need to have some shortcut for preview-score :) (map-parts '(:vln ((h e4)) :vlc ((h c3))) #'pitch-transpose '(:vln (4 _) :vlc (12 _))) -> (:vln ((h gs4)) :vlc ((h c4))) Here are a few more relatively simple application examples. I am first defining some musical material to reduce the length of the remaining definitions. (setf material '((-3h fs4 pp eb4 <) (q e4 < fs4 <) (3h gs4 mp> a4 > bb4 >) (q a4 pp -) (-5h - g4 pp leg eb4 < leg d4 < leg) (q bb4 < e4 <) (5h g4 mp> leg b4 > leg a4 > leg bb4 > leg d4 > leg) (q gs4 pp -))) Now, the next example creates a strict canon formed with the given material -- but without following any counterpoint rules :) For different parts the material is metrically shifted and transposed. This example also shows that map-parts calls can be nested (naturally). The function metric-shift appends some rest before some musical material, but preserves its rhythmical structure, i.e. metrically shifts the material. (map-parts (map-parts `(:vl1 ,material :vl2 ,material :vla ,material :vlc ,material) #'metric-shift '(:vl1 :skip ;; :skip means to leave part unchanged :vl2 (-q _) :vla (-h _) :vlc (-h. _))) #'pitch-transpose '(:vl1 (6 _) :vl2 (4 _) :vla (2 _) :vlc :skip)) The next examples shows some simple homorhythmic texture created by randomised transpositions. Each part shares a similar overall pitch profile. Note also that calls can be more concise with a (lambda) function that nests calls to transformation functions -- instead of nesting map-parts as shown above. (map-parts `(:vl1 ,material :vl2 ,material :vla ,material :vlc ,material) #'(lambda (transpose seq) ;; static transposition for moving parts into different registers (pitch-transpose transpose ;; randomised transposition of notes in parts (pitch-transpose-n (rnd 10 :low -2 :high 2) seq))) '(:vl1 (7 _) :vl2 (0 _) :vla (-10 _) :vlc (-20 _))) Finally, here is a homophonic texture created by random pitch variants (retrograde, inversion etc.). The global pitch profiles of parts differ here, in contrast to the previous example. (map-parts `(:vl1 ,material :vl2 ,material :vla ,material :vlc ,material) #'pitch-variant `(:vl1 (_ :transpose 7 :seed 10) :vl2 (_ :transpose 0 :seed 20) :vla (_ :transpose -10 :seed 30) :vlc (_ :transpose -20 :seed 40)) :shared-args '(:variant ?)) All these examples demonstrate very conventional textures, as such textures are more easy to explain. For completeness, below is the definition of map-parts. There are various dependencies that I tried all to add as well. Please let me know if I missed any definition, and apologies in advance. Best, Torsten (defun map-parts (score fn part-args &key (parameter nil) (shared-args nil)) "Create or transform a polyphonic score. The original purpose is for creating/transforming musical textures, i.e., relations between polyphonic parts. Applies function `fn' to parts in `score': this function is a variant of the standard Lisp function `mapcar', but specialised for scores. A score is represented in the format discussed in the documentation of the function `preview-score'. Additional arguments for `fn' can be specified in `part-args', and these argument lists can be different for each part. However, one argument is the part of the score. This argument is marked by an underscore (_) in the argument lists. In the following example, the function `pitch-transpose' is applied to a score with two parts. This function has two required arguments, a transposition interval (measured in semitones), and the pitch sequence or OMN to transpose. The transposition interval for the first part is 4 (major third upwards), and the underscore marks the position of the violin part to transpose, etc. ;;; (map-parts '(:vln ((h e4)) ;;; :vlc ((h c3))) ;;; #'pitch-transpose ;;; '(:vln (4 _) ;;; :vlc (12 _))) Args: - score (headerless score): See {defun preview-score} for format description. - fn: A function that expects and returns an OMN sequence or a sequence of parameter values (e.g., lengths, or pitches) as specified in the argument `parameter'. - part-args (plist): Alternating instrument keywords (same as in `score') followed by arguments list for `fn' for that instrument/part. If arguments is :skip, then that part is returned unchanged. - parameter (omn parameter, e.g., :length or :pitch, default nil means processing full OMN expression): If `fn' expects only single parameter to process, then it can be set here. - shared-args (list): For all instruments/parts, these arguments are appended at end end of its part-specific arguments. They are useful, e.g., for keyword arguments. " ;; catching hard-to-find user error... (let* ((instruments (get-instruments score)) (missing-instruments (remove-if #'(lambda (arg-instr) (member arg-instr instruments)) (get-instruments part-args)))) (assert (not missing-instruments) (part-args) "map-parts: Some instruments in `part-args' don't have a matching instrument in `score'. ~A.~%" missing-instruments)) (let ((parts (make-hash-table :test #'equal))) ;; fill hash table, using leading keywords as keys (loop for part in (tu:plist->pairs score) do (setf (gethash (first part) parts) part)) (tu:pairs->plist (loop for instrument-arg-pair in (tu:plist->pairs part-args) for instrument = (first instrument-arg-pair) for part = (gethash instrument parts) for part-omn = (second part) for fn-args = (second instrument-arg-pair) collect (if (equal fn-args :skip) part ; no processing (cons instrument (let ((result (apply fn (append (substitute (if parameter (omn parameter part-omn) part-omn) '_ fn-args) shared-args)))) (list (if parameter (omn-replace parameter result part-omn) result))))) )))) (defun metric-shift (l lengths) "Appends `l' (a length or omn) before `lengths' (a list of lengths or omn), but maintains the metric structure, i.e., the function shifts `lengths' metrically 'to the right' by `l'. Returns an OMN form if lengths is an OMN form, otherwise a length form. Related: assemble-seq (but that does not shift across bars)" (let* ((time-sigs (get-time-signature lengths)) (result (omn-to-time-signature (cons l (flatten lengths)) time-sigs))) (if (omn-formp lengths) result (omn :length result)))) ; (metric-shift '-h '((q q q q) (q q q q))) ; (metric-shift '(h g4) '((q c4 q d4 q e4 q f4) (q c4 q d4 q e4 q f4))) (defun get-instruments (score) "Returns all instruments of `score', a headerless score (see {defun preview-score} for its format)." (at-even-position score)) (defun at-even-position (in-list) (at-position in-list 2 0)) (defun at-position (in-list factor offset) "Returns a list containing every factor-th elements of in-list starting at offset" (mapcar #'(lambda (i) (nth i in-list)) (arithmeric-series factor offset (ceiling (/ (length in-list) factor))))) (defun arithmeric-series (factor offset length) (let (result) (reverse (dotimes (i length result) (push (+ (* i factor) offset) result))))) (defun plist->pairs (plist) (loop :for (key val) :on plist :by #'cddr :collect (list key val))) (defun pairs->plist (pairs) (one-level-flat pairs)) (defun one-level-flat (list) "flatens one level of the given form. Example: (one-level-flat '(((note) (note)) ((pause) (pause)) ((note)))) -> ( (note) (note) (pause) (pause) (note))" (apply #'append list))
  17. 1 point

    Polyphonic preview?

    Sorry, I am using multiple libraries of own functions in the background. Easy to miss one :) EDIT: Sorry, the function one-level-flat was still missing and has been added now. I also removed the package prefix above. (defun plist->pairs (plist) (loop :for (key val) :on plist :by #'cddr :collect (list key val))) ; (plist->pairs '(:length 1/16 :pitch 60 :velocity 30)) ; -> ((:LENGTH 1/16) (:PITCH 60) (:VELOCITY 30)) (defun pairs->plist (pairs) (one-level-flat pairs)) ; (pairs->plist '((:LENGTH 1/16) (:PITCH 60) (:VELOCITY 30))) ; -> (:LENGTH 1/16 :PITCH 60 :VELOCITY 30) (defun one-level-flat (list) "flatens one level of the given form. Example: (one-level-flat '(((note) (note)) ((pause) (pause)) ((note)))) -> ( (note) (note) (pause) (pause) (note))" (apply #'append list))
  18. 1 point

    Polyphonic preview?

    A function is missing: PLIST->PAIRS > Error: There is no package named "TU" . > While executing: ccl::%parse-token, in process Listener-1(6). > Type cmd-/ to continue, cmd-. to abort, cmd-\ for a list of available restarts. > If continued: Retry finding package with name "TU". > Type :? for other options.
  19. 1 point
    Stephane Boussuge

    Prelude for Piano

    Dear Wim, thank you for your kind words. the transposition was chosen by hear. About the harmonic path, it come from my original idea mat1: (setf mat1 '(#|1|# (ped e a2 p ds3 a3 d4 q c5 fs4 ped+tie) #|2|# (ped w fs4) #|3|# (ped e a2 ds3 a3 d4 q c5 fs4 ped) #|4|# (ped q d5 h. c5) #|5|# (ped e a2 ds3 a3 d4 q c5 fs4) #|6|# (w fs4 ped1) #|7|# (ped e a2 ds3 a3 d4 q d5 c5 ped) #|8|# (w fs4 ped) )) ;;; get the harmonic content from basic material mat1 (setf hmat1 (get-harmonic-path mat1 :chord t :unique t :time '(ww))) After this extraction, i apply some transposition to this material (extended by gen-trim): ;;; Transpose list to apply to harmonic path (setf trsp2 '(-2 4 -2 2 8 -1 8 3 -3 2 6 0 1 0 -1 -1 4 4 9 7)) (setf path2 (pitch-transpose trsp2 (gen-trim 20 (mclist hmat1)))) And finally, i use chord-closest-path function for the voice leading: ;; chord closest path generation to use as harmonic material for variation 3 ;(setf closest-hpath2 (chord-closest-path (car path2) path2)) And i've added the output of this function directly in a variable because the computation time for chord-closest-path is a bit long and i like to be able to run my scripts very often when composing (for reading the score and hearing) and need fast evaluation: (setf closest-hpath2 '((g2cs3g3c4bb4e4) (g2cs3fs3cs4bb4e4fs5) (g2cs3g3c4bb4e4) (gs2d3f3b3b4e4e5) (gs2d3f3b3bb4f4) (gs2cs3gs3b3cs5f4d3) (gs2d3f3b3bb4f4) (fs2c3a3c4f4eb4f5) (fs2c3fs3b3a4eb4) (gs2d3f3b3b4e4e5) (gs2c3fs3eb4a4eb4) (fs2d3a3c4a4eb4d5) (g2cs3bb3bb3eb5e4) (fs2c3a3d4a4eb4d5) (gs2cs3gs3b3d5f4) (gs2cs3gs3b3cs5f4d3) (g2cs3fs3cs4bb4e4) (g2cs3fs3cs4bb4e4fs5) (fs2c3fs3b3a4eb4) (g2cs3a3bb3a4e4e4))) SB.
  20. 1 point

    Opusmodus 1.2.22468

    Update: Fixed a bug in LENGTH-EXPANSION-VARIANT function when :variant with '?. Additional keyword :quantize takes care of the unfinished tuplets.
  21. 1 point
    Wim Dijkgraaf

    Out-of-the-box algorithms

    Hi AM, A couple of months ago I followed some online courses on http://www.kadenze.com . Especially the generative art courses as well as The Nature Of Code course. So I started wondering which of the techniques form those courses are supported by standard Opusmodus functions. That brought me to the idea to make a list of those topics and eventually also have a couple of links to online and free material with inspiring explanations and background info. Kind regards, Wim
  22. 1 point
    Wim Dijkgraaf

    Out-of-the-box algorithms

    Do we know of additional algorithms created by users which they have made publicly available. For instance: Tonnetz: https://github.com/willemdijkgraaf/ClTonnetz