Jump to content

Function Examples

Functions, arguments, values and results

  1. Started by born,

    Hi all, is there a function/ method to merge several rhythms into one which is displaying all the onsets of these rhythms. Here the first two systems are merged into the third. Thanks for help. Achim

  2. Dear All, Please, help ! ;;; Question How to use DICTUM to filter the use of omn-to-time-signature ? ;;; MAterial (setf vl1 '((-s) (e. gs4 s as4 h. e4 tie) (h e4 d4 tie) (q d4 e ds4 s fs4 hs b4 tie) (h b4 s gs4 g4 a4 qs c5 tie) (q c5 s as4 e a4 cs4 e. d4 d4 s) (w g4 tie) (q g4 h. d5) (e b4 s g4 h.s f4 tie) (q f4 s ds4 e4 f4 hs fs4) (s c5 e as4 ds5 e. cs5 fs4 s g4 q fs4 tie) (w fs4) (h. g4 e gs4 s a4 d5 tie) (w d5) (s b4 g4 a4 hs s gs4 e as4 s e4 tie) (s e4 e. d4 ds4 s fs4 h b4 tie) (h. b4 q gs4 tie) (h gs4 e g4 s a4 qs c5 tie) (h. c5 s as4 a4 cs4 d4 tie) (h d4 s e e g4 e. d5))) ;;; Filter works rigth in this example: pitch transposing only long …

    • 0 replies
    • 382 views
  3. Started by born,

    Does anybody have an idea, how to sample x equidistant values from an env like xy-plot? (xy-plot '((2 0) (3 1) (5 1) (7 2) (11 3) (13 5) (17 8) (19 13) (20 21)) :join-points t :point-radius 2 :style :axis :point-style :square) For example 10 values from this graph:

  4. Started by born,

    Does anybody have an idea, how to loop through a directory and writing the content of a textfile (like the one attached) without the semicolons into normal lists? Thanks for help. Achimch1-amp-envs.txt

  5. Started by AM,

    Bildschirmaufnahme 2023-03-18 um 14.05.56.mov OPMO

  6. Started by NagyMusic,

    I'm studying the pitch-segment-variant and noticing when the :segment argument includes a list, it doesn't seem to generate but the number of segments represented by the first digit in the list. (setf bach (attribute-series '(leg 8) '((s g2 d3 b3 a3 b3 d3 b3 d3) (g2 d3 b3 a3 b3 d3 b3 d3)))) (pitch-segment-variant bach :size '((20) (30) (40) (100)) :segment '(1 2) :position '? :variant '? :transpose '((0) (6)) :initial t) => ((s g2 leg d3 leg b3 leg a3 leg b3 leg d3 leg b3 leg d3) (s a3 leg b3 leg) (s g2 leg d3 leg b3 leg a3 leg b3 leg d3 leg b3 leg d3) (s f4 leg f4 leg)) However, when the :segment argument call…

  7. Started by born,

    Is there a shorter way to write this in OM? (loop for i from 1 to 9 collect (* 100 i))

  8. Started by born,

    Is there a function that returns all intervals from a chord? Thanks, Achim

  9. Started by NagyMusic,

    Is there an Opusmodus function that counts the number of items in each sublist? '((c4 d4 e4) (f4 g4) (a4) (b4 c5)) => (3 2 1 2) Thanks!

  10. Started by NagyMusic,

    I have two brief examples taken from a piano piece. In the first one, I'd like to attach the piano pedal marking on every octave, hold it and reattach at the next octave. (setf ex1 '((-q a2a1 a2a1) (-q a3a2) (-wq q b2b1) (-wq q b2b1) (-q a2a1 - g3g2) (-q f3f2 a2a1) (q f3f2) (q f2f1) (-wq q f3f2) (-q g2g1) (-q g2g1 - g2g1) (-q f2f1 e3e2) (-q f2f1 d3d2) (-w q d3d2))) In the second, I'd like to attach the piano pedal on every octave - not single pitches - and hold it until the next octave appears, and reattach it again. (setf ex2 '((-q) (q g4 mp -) (q a4 mp - a4a3) (q cs4 mp - cs4cs3 -) (q f4 mp - f4f3) (q f4 mp - f4f3 -) (q e4 mp - …

  11. Started by NagyMusic,

    I just started working with Opusmodus 3 and noticed that preview score playback might work differently, at least on my end. Using the custom sound sets via Logic works when evaluating individual code snippets and def-score blocks. However, when evaluating ps blocks in the same context produces this error message: OM 8 > audition-musicxml-omn-snippet Error: OMN Parse Error: fail 1 (abort) Return to top loop level 0. Type :b for backtrace or :c <option number> to proceed. Type :bug-form "<subject>" for a bug report template or :? for other options. I attached the screenshots of Opusmodus Audition Preferences and a code excer…

  12. Started by NagyMusic,

    I'd like to know why I can't seem to process this list of chords using the pitch-variation function. Thank you! (setf chords '((h a2a3c4 c4a3a3) (h d4f3g2 f4g3d4) (h e4c4a3 c3a3e4) (h d3a3f4 w f4d4a3) (h e2e3g3 g3e4e4) (h a3f4e4 f2e3a3) (h e4g3b3 b3e3g2) (h a2d3fs2 w fs2a2e2) (h a2e3c4 c4a3e4) (h e4g3b3 b3e3g2) (h f2e3a3 a3f4e4) (h e4e4g3 w g3e3e2) (h d3a3f4 f4d4a3) (h e4c4a3 c3a3e4) (h b2a3d4 d4b3a3) (h a3a3c4 w c4a3a2))) (pitch-variation 0 1 7 chords :type '? :seed 23)

  13. Dear all, I updated my library tot (https://github.com/tanders/tot) in various ways. In particular, there are many new functions available. You can now read the documentation online at https://tanders.github.io/tot/. However, remember that you can directly evaluate the many examples in the documentation when (after installing the library) you drag the library folder into your Opusmodus project navigator and open the documentation within Opusmodus. If you are interested in the details of how the library developed, you can see a changelog at https://github.com/tanders/tot/commits/master . NOTE: When you install/upgrade this library, make su…

  14. Hello, I'm hitting a brick wall with m thinking from object-oriented approaches. Basically, I want to create a melody line that "flutters" pitches in a key corresponding to a bass pitch, and only when that bass pitch occurs. It's easy enough for an "If, then" statement but my attempt to solve this are leading me to take a first step of interpolating between bass pitches (as integers) and manually calculating the remains of the bar manually. However this is not ideal as I would prefer to use euclidean-rhythm with a rotation, so finding a parametric approach this would be ideal. Here's the general approach I've begun. Any advice from people more experie…

    • 5 replies
    • 568 views
  15. I'm studying the Orchestral Example code from Opusmodus documentation. After changing the original melodic source (setf solo => setf elvis), compiling solovar1 and solovar2 functions produce error messages more than half the time. Does anyone know how to fix that? Thank you! ;;; MELODY ;; Basic melodic material (setf elvis (gen-repeat 2 '((h f4 c5) (h f4 -q e g4 a4) (h bb4 a4) (h g4 -q -e c4) (h d4 e4) (h f4 3h g4 a4 bb4) (h a4 g4 w f4) ))) (setf frag1 (gen-loop 14 (list (rnd-pick '(2 3 1 4)) (rnd-pick '(2 3))))) (setf frag2 (gen-loop 14 (list (rnd-pic…

  16. Started by JulioHerrlein,

    Dear Friends, I was revisiting some 12-tone theory today and I found something strange: This returns NIL (twelve-tonep '(c3 eb3 d3 f3 e3 g3 fs3 a3 gs3 b3 bb3 cs4)) but this returns TRUE (twelve-tonep '(c4 eb4 d4 f4 e4 g4 fs4 a4 gs4 b4 bb4 cs4)) It´s the SAME tone-row NIL for this (twelve-tonep (pitch-transpose -12 '(c4 eb4 d4 f4 e4 g4 fs4 a4 gs4 b4 bb4 cs4))) TRUE for this (twelve-tonep (pitch-transpose 0 '(c4 eb4 d4 f4 e4 g4 fs4 a4 gs4 b4 bb4 cs4))) Maybe the algorithm to find the row is based in the c4 octave... I don´t know... …

  17. Started by JulioHerrlein,

    Dear Friends , I have this question regarding Get-Beats Function. All the best ! Julio ;;; THIS WORKS ! (setf omn-forum '((h b4 s d5 mf ord g5 ord c5 ord e. a5 ord s b5 ord e5 ord fs5 ord d5 ord e g5 f stacc c5 stacc a5 stacc - b5 stacc q e5 mf ord)(h bb4 s d5 mf ord gb5 ord c5 ord e. ab5 ord s b5 ord e5 ord fs5 ord d5 ord e g5 f stacc c5 stacc a5 stacc - b5 stacc q eb5 mf ord)) (get-beats '( (1 1 (1 2 4 7 5 8 6 3)) (1 2 (1 2 4 4 4 7 6 3))) omn-forum) ;;; But THIS WON´T WORK - Why ? (setf bts (rnd-unique 8 '(4 7 5 8 3 6 1 2))) (get-beats '( (list 1 1 bts) (1 2 (1 2 4 4 4 7 6 3))) omn-forum)

  18. Started by AM,

    dear all, i have a basic lisp-question to FORMAT and i did not find a solution... INPUT (setf alist '((/player "12" 1.0 1.0 1.0) (/player "23" 1.0 1.0 1.0) (/player "12" 1.0 1.0 1.0) (/player "23" 1.0 1.0 1.0))) ;; with FORMAT to => /player "12" 1.0 1.0 1.0, /player "23" 1.0 1.0 1.0, /player "12" 1.0 1.0 1.0, /player "23" 1.0 1.0 1.0 by FORMAT => i will save it in a TXT-file on desktop (that works (with-open-file...)), but i have a format-problems with the commatas and the () thanx for such basic-lisp-help andré

    • 2 replies
    • 528 views
  19. Started by david,

    Hello everyone, Is there a way to remove the same repeated notes with rnd-order function? like (setf for4 (rnd-order seq+ry12 :type :pitch))

  20. Started by JulioHerrlein,

    Dear All, Is there a function where you can specify the creation parameters of the melodic patterns devised by Slonimsky on the Thesaurus ? Is there a function where you can specify: 1) The division of the octave (Tritone, Ditone, Sesquitone) ? 2) The pattern way (Infra, ultra, interpolation, and their combinations) ? Thanks for the help ! Best, Julio

  21. Started by JulioHerrlein,

    Dear Friends, This is the example in the docs for the distribute-stream function. (setf sym '(c4 cs4 d4 eb4 e4 f4 fs4 g4 gs4 a4 bb4 c5 cs5 d5 eb5 e5)) (setf v1 '(1/8 1/8 -1/8 2/8 -1/8 5/8)) (setf v2 '(1/8 1/8 1/8 -1/8 2/8 1/8)) (setf va '(-2/8 1/8 1/8 -5/8 1/8)) (setf vc '(-1/8 3/8 3/8 1/8 1/8)) (setf inst (distribute-stream sym (list v1 v2 va vc))) (setf in1 (make-omn :length v1 :pitch (1~ inst))) (setf in2 (make-omn :length v2 :pitch (2~ inst))) (setf in3 (make-omn :length va :pitch (3~ inst))) (setf in4 (make-omn :length vc :pitch (4~ inst))) (list in1 in2 in3 in4) The result shows that the chromatic pitch sequence is distributed in …

  22. Started by vpolajnar,

    Dear Opusmodus masters! I Have a chord: And I was wondering if i could arpeggiate this chord depending on subdivisions? For example (e s 3q): Or for example (e s 3q 5q): I don't know if Opusmodus is build for this kind of stuff, but i always have to calculate if 2nd note of quintuplet comes before or earlier of 2nd note of triplet. For any response I'd be very thankful! Best wishes, Vili

  23. Started by JulioHerrlein,

    Dear Friends, I´m searching for a function to make rhythmic displacement of lists and sublists at once. It´s not like rotating, it´s more like displacing all the rhythms by a fixed amount, like transforming this: (-e he. d4 mf e cs4 hs eb4) into this (he. d4 mf e cs4 hs eb4 -e) This means displace all the phrase one 8th note earlier in time. Thank you all ! Best ! Julio

  24. Started by o_e,

    Is it possible to remove rest(s) with dictum? Thanks! Edit: Why this does not work? (dictum '(:apply (length-rest-remove x)) '(w c5 ped -e))

  25. Started by born,

    Hi, attached is a function I wrote for a piece. Does anybody have an idea how to extend this with a seed functionality. I have tried a few things but so far without any real success ... The other thing: It can take quite a while until a possible solution ist found. Does anybody have an idea to improve the calculation speed? Thanks and best, Achim fill-space.opmo


Copyright © 2014-2025 Opusmodus™ Ltd. All rights reserved.
Product features, specifications, system requirements and availability are subject to change without notice.
Opusmodus, the Opusmodus logo, and other Opusmodus trademarks are either registered trademarks or trademarks of Opusmodus Ltd.
All other trademarks contained herein are the property of their respective owners.

Powered by Invision Community

Important Information

Terms of Use Privacy Policy