Jump to content

torstenanders

Members
  • Posts

    496
  • Joined

  • Last visited

Posts posted by torstenanders

  1. BTW: It seems that Opusmodus sends various redundant MIDI events when looking at its realtime output with MIDI monitor. Initially, CC 123 and 120 are initialised to 0 for all 16 channels, but this is done several times (at the end this is done again, but only once).

     

    More worryingly, notes are send multiple times. For example, when you send the example below in a score, a note-on for the first note (C5) is send twice almost simultaneously, followed by a note-off for both those notes simultaneously. Indeed, you can commonly hear the result of that as a quasi hick-up in the output, or that the first note is simply skipped. The next notes are also always output twice, but those double events are exactly simultaneously. 

    (q c5 d5 e5 f5) 

     

    A related problem is that note-offs and succeeding note-ons are exactly at the same time, which can result in problems for note repetitions. 

     

    Best,

    Torsten

  2. I am still working on getting playback for GrandOrgue working properly. I defined a sound set with various articulations (shown in a related post, see link below) for setting, e.g., which manual to use for the current hand, and which stop combinations on that manual. Those articulations already work individually in Opusmodus.

     

    The problem I am facing is that I need to constantly combine multiple of such articulations in a single note. For example, I may need to specify that the right hand stops playing on the manual I (one articulation), that it instead plays on manual II and III coupled (two further articulations) and which stop combinations to use for those manuals (two more articulations). So, in this example we have five articulations on a single note, and each needs to send a specific MIDI event. Such an occurrence is something completely normal in organ literature. In OMN, this could be written, e.g., as follows using my sound set shown in the post linked below. 

     

    '((q c4 -I+II5+III6+II+III))

     

    Now, my only problem is that whenever there are two articulations combined for a single note, where each should output its own MIDI event, Opusmodus always only outputs just one of these MIDI events. I confirmed this by checking the resulting MIDI events both in an exported MIDI file and with a realtime MIDI monitor (https://www.snoize.com/MIDIMonitor/). Note that my setup works with other software (notation software and DAWs), as they allow for having multiple articulations allocated to a single note outputting separate MIDI events. 

     

    Is this perhaps somehow possible with Opusmodus as well?

     

    Best,

    Torsten

     

    PS: I realise that Opusmodus does send multiple MIDI events if multiple MIDI events are explicitly specified for a single articulation, as in the "VSL Cello Solo" file. However, I cannot really explicitly define all the possible articulation combinations as individual articulations instead, as what would result in an impractical large number of them. There are currently individual 48 articulations (for an organ with three manuals and 10 preset combinations each), and these articulations can be combined in various ways in pairs, triplets, quadruples etc., which would result in an impractically huge number of articulations to define. 

     

    PPS: One potential workaround for some situations would be to instead allocate some of these articulations to rests immediately preceding the notes for which they are needed, but that is not possible either, because custom articulations cannot be added to rests. Instead, additional notes are added. 

     

    PPPS: For completeness: a related post.

     

     

  3. > Check the GET-RUNNING function. This will explain as well how to use floats in tuning.

     
    Is that a new function? It is not available in my image.
     
    Best,
    Torsten

     

    --------------------------

    Unfortunately, evaluating add-cents-tuning-to-text-atrributes results in an error for me. 

     

    > Error: ((= (length (explode i)) 5) (filter-first 3 (explode i))  (filter-first 2 (explode i))) can't be destructured against the lambda list (ccl::test true &optional false), because it contains 4 elements, and at most 3 are expected.
    > While executing: (:internal ccl::nx1-compile-lambda), in process Listener-2(9).

  4. Good to hear that you have both IRCAM solo-instruments and conTimbre. I was considering getting one of those at some stage.

     

    What is your impression of either using them for sequencing with a DAW or notation software?

     

    Best,

    Torsten

     

  5. with MIDI you can either send pitch bend values, but that always affects the whole voice.

     

    Actually, MIDI pitch bend always detunes all notes in the respective MIDI channel (no voice). The same is true for CC messages, channel aftertouch etc. That is a principle limitation of the MIDI protocol, and not related to ConTimbre. So, if you have an instrument performing polyphonic music (more than one note at a time), and you want to detune different notes differently, this is not possible if all the notes are played by the same MIDI channel. 

     

    One workaround, meanwhile part of the MIDI standard are the so-called MIDI polyphonic expressions (MPE, https://www.midi.org/articles-old/midi-polyphonic-expression-mpe). In a nutshell, with MPE you can detune multiple simultaneous pitches independently. The trick is simply to use multiple MIDI channels for performing a single polyphonic instrument, so that every note is played by its own MIDI channel. The second solution proposed by the ConTimbre doc you are quoting is referring to exactly that (but again misleadingly talking about several voices instead of several channels). MPE is meanwhile supported by several major players as listed at the above link in an easy-to-use way (also by Play i.e. EWQL libraries).

     

    Best,

    Torsten

  6. > i'm musician but only an "amateur programmer" 

     

    I think the most important part is the musical knowledge encoded, and that your definitions work as described. How that is implemented is secondary for its use for others. (Clean implementations can make a big difference, though, for the maintainability of your code.) 

     

    > I have no idea how to do that professionally with GitHub

     

    I am pretty busy at this stage of the academic year, but in a few weeks, I would be happy to help you with that, if you want. What I cannot do, is documenting your definitions, but I can also show you, once you added some documentation in the form of doc strings added to your function etc. defs, how to automatically turn that into HTML docs. 

     

    as ORDINARY text - no problem. perhaps i will share it like that on my website...

     

    If such a straightforward approach makes you feel you are more in control, then why not? However, in your place, I would add some doc strings that explain what a function is supposed to do. That makes it also more easy for yourself to re-use these functions at some later time. 

     

    Best,

    Torsten

     

  7. I agree that this is useful, and therefore I also implemented a similar functionality in my function rotate-omn 🙂  You can find its documentation at https://tanders.github.io/tot/sources/form.html#_g229430 and download the whole library at https://github.com/tanders/tot.

     

    BTW: You meanwhile should also have quite a sizeable collection of custom functions for Opusmodus. While not sharing them together in some kind of library as well? 

     

    Best,

    Torsten

     

  8. the value of the number attached to the "glued side" is arbitrary

     

    No, it is not, it depends on the implementation of the random generator used. However, this is far from being intuitive to understand, and beyond that, for several functions, the seed controls multiple random generators, where basically the seed for their seed is then computed randomly. So, for practical uses, you can consider the choice of seed values random.

     

    Just for background, in a simple random number generator, the seed can be used in an integer division where the resulting random value is the modulus (see https://en.wikipedia.org/wiki/Lehmer_random_number_generator). So, there is no indexing... 

     

    Best,

    Torsten

  9. It seems that some attributes (e.g., the pause/fermata sign) can be assigned to rests, but not all.

     

    '(-q -q fermata -h)

     

    It might make sense that some attributes cannot be assigned to a rest, e.g., the following instead creates an additional note.

     

    '(-q -q stacc -h)

     

    However, I would agree that it would be useful to be able to assign user-defined attributes to rests.

     

    Best,

    Torsten

     

  10. but (((((((  ))))))))) drives me nuts!

     

    Actually, the editor helps you there. Just place the cursor directly before an opening or after a closing parenthesis, and the matching parenthesis is shown.

     

    Now, I am probably biased after using Lisp for quite some time, but I actually appreciate this simple syntax. I also programmed in various other languages, and I meanwhile prefer the Lisp syntax...

     

    Best,

    Torsten

  11. > the random state number.

     

    Seed values are only relevant for functions that do some random operations. In layman's terms, think of rolling a dice. You want to ensure that the dice always rolls the same number, and for that purpose, you put some glue on one of its sides. The seed number effectively controls on which side of your dice you put the glue. It is not the same as the number that is the result, but controls which number will be the result. Now think of having some more complex algorithm than just a dice, where you have a similar mechanism to control what the output should be and that way fixing the output to a static value that can be re-computed multiple times. 

  12. I have not tried to send pitch bend messages via Opusmodus' :controllers output yet, but I remember the following from the MIDI standard. Pitch bend messages are not CC messages. This is partly, because the pitch bend range is not only 7 bit (128 values) like CC messages, but instead 14 bit (16,384 values). What those pitch bend values actually mean depends on the pitch bend range set in your sound generator.  

     

    You might want to check some seminal reference on this subject, like https://books.google.co.uk/books?id=ajDaXh-qgDUC&printsec=frontcover&redir_esc=y#v=onepage&q&f=false 

     

    Someone else (Janusz?) would need to respond how to send actual pitch bend messages from within Opusmodus. I can't say whether controller actually supports that, but you cannot send pitchbend messages by sending certain CC messages, these are different things with different formats in the MIDI standard. 

     

    Best,

    Torsten

  13. all your hard work to document

     

    I actually do such detailed documentation for my own benefit as well. I once spent several months on developing some personal library that I used for composing some piece, but when I wanted to re-use it some two years later, I could not really understand my own functions anymore. Since then I better err on the side of overdoing the docs 🙂

     

    Best,

    Torsten

     

  14. I got just four 16th notes.

     

    This function allows for various controls that you did not use – Of course this function also allows for plain sequences of 1/16-notes, when you select its arguments accordingly 🙂   I am interested in CAC as a means of control on a higher level instead of some automatic "magic".

     

    You might want to run the examples below in Opusmodus to get music notation outputs, which are likely more easy to read than the OMN expressions, but nevertheless I provide the OMN expressions for completeness as well.

     

    The argument position (3rd argument) controls the kind of rhythmic cell that you get, see the doc for details. Here is an example where different rhythmic cells are returned. Note that by default all returned cells carry potentially a durational accent. 

     

    (gen-karnatic-cell 4 4 '(0 4 3 2 1 0))
    => ((1/4) (1/16 1/16 1/16 1/16) (1/8 1/16 1/16) (1/8 1/8) (3/16 1/16) (1/4))

     

    Now, if you use the same positions but different gati or jathi settings then you get a somewhat similar rhythm in that different gati/jathi. Below I slightly adapted the positions to make the results even more similar. 

     

    (gen-karnatic-cell 4 5 '(0 6 3 2 1 0))
    => ((5/16) (1/16 1/16 1/16 1/16 1/16) (3/16 1/16 1/16) (3/16 1/8) (1/4 1/16) (5/16))

     

    You can, of course, use these in a different time signature (e.g., the tala of your choice).

     

    (omn-to-time-signature (gen-karnatic-cell 4 5 '(0 6 3 2 1 0)) '(4 4))
    => ((q c4 tie s s s s s s e. s s s tie) (e c4 c4 q s q tie s))

     

    If you want to keep track of where the accents are located, you could mark them before this transformation (the function articulate-phrase is defined below this post). You could then manually later revise the notation to instead you the beam-breaking that Reina recommends. 

     

    (omn-to-time-signature 
     (articulate-phrase (gen-karnatic-cell 4 5 '(0 6 3 2 1 0))
                        :accent 'marc)
    '(4 4))

    => ((q c4 tie+marc s marc s marc s s s s e. marc s s s tie+marc) (e c4 c4 q marc s q tie+marc s marc))
     

    After the changed jathi above, here is a different gati. Results are more similar, because the underlying data is the same with different gati but the same jathi. Here is an example with quintuplets. 

     

    (gen-karnatic-cell 5 4 '(0 4 3 2 1 0))
    => ((1/5) (1/20 1/20 1/20 1/20) (1/10 1/20 1/20) (1/10 1/10) (3/20 1/20) (1/5))

     

    Here is the same with triplets -- exactly the same, only slower. 

     

    (gen-karnatic-cell 3 4 '(0 4 3 2 1 0))
    => ((1/3) (1/12 1/12 1/12 1/12) (1/6 1/12 1/12) (1/6 1/6) (1/4 1/12) (1/3))


    You can also change the jathi (or even gati) on the fly in a phrase. The given pattern is then 'cycled through'.

     

    (gen-karnatic-cell 4 '(5 5 3 3) '(0 6 3 2 1 0))

    => ((5/16) (1/16 1/16 1/16 1/16 1/16) (1/16 1/16 1/16) (1/16 1/16 1/16) (1/4 1/16) (5/16))


    You can also randomise your position

     

    (gen-karnatic-cell 4 5 '(0 1 ? ? 0))

    => ((5/16) (1/4 1/16) (3/16 1/8) (3/16 1/16 1/16) (5/16))


    And I did not even start discussing the other parameters yet. For example, you can set whether or not cells start with a durational accent (not a karnatic concept, but very useful notion for Western ears when dealing with rhythm). 

     

    (gen-karnatic-cell 4 5 '(3 3 3 3) :accented? '(T nil nil T))

    => ((3/16 1/16 1/16) (1/16 3/16 1/16) (1/16 3/16 1/16) (3/16 1/16 1/16))

     

    You can filter in various ways want kind of rhythm you want, e.g., set the minimum or maximum number of notes per cell. 

     

    (gen-karnatic-cell 4 5 '(? ? ? ?) :min-number '(3 3 3 3) :seed 1)

    =>((1/8 1/8 1/16) (3/16 1/16 1/16) (1/16 1/16 1/16 1/16 1/16) (1/8 1/8 1/16)) 

     

    EDIT: Oops, that are is seemingly not fully working as expected.

     

    I stop here and refer you do the documentation for more details: there are several more arguments that I did not even mention yet. I know that my documentation is rather concise and not a textbook, but it briefly discusses every detail. I said from the beginning, I wrote this for myself, so you might want to first spend a bit of time with the doc 🙂

     

    As you hopefully can see, this function alone allows for a rather rich world of rhythm with rather precise control that allows varying some rhythmic idea in various ways. I am interested here in clearly perceivable rhythmic similarities, e.g., between rhythms in different gati and jathi combinations in the Western tradition of thematic variation.  

     

    Of course, you can also process the result further in various ways. E.g., I am adding ties after long notes and/or subdivide short notes to increase the rhythmic contrast, and I am turning certain notes into rests...
     

    Best,

    Torsten

     

    (defun articulate-phrase (sequence &key (accent 'marc))
      "Add articulations to phrase for more clear rhythmic accents, e.g, an accent on every first beat
    .
      
      NOTE: This function assumes that `sequence' is a purely rhythmic OMN expression with only length values and perhaps ties. However, a sequence with (constant) pitches is returned, because certain Opusmodus functions do not support an OMN sequence without pitches.

      Examples:
      (articulate-phrase '((h h) (q q q q tie) (q q q q) (-q q) (q q q q)) :accent 'marc)
      => ((h marc h) (q marc q q q tie) (q q q q) (-q q) (q marc q q q))
      "
      (cons 
       ;; First bar
       ;;; NOTE: code repetition...
       (let ((bar1 (first sequence)))
         (if (length-notep (first bar1))
           (if (and (= (count-notes bar1) 1)
                    (eql (first (last bar1)) 'tie))
             (tu:replace-element (merge-articulations (list accent 'tie)) 1 bar1)
             (tu:insert-after bar1 0 accent))
           bar1))
       ;; other bars
       (loop :for (bar1 bar2) :on sequence :while bar2
         ;;; NOTE: code repetition
         :collect (if (and (length-notep (first bar2))
                           (not (eql (first (last bar1)) 'tie)))
                    (if (and (= (count-notes bar2) 1)
                             (eql (first (last bar2)) 'tie))
                      (tu:replace-element (merge-articulations (list accent 'tie)) 1 bar2)
                      (tu:insert-after bar2 0 accent))
                    bar2))))

     

  15. > I like the Carnatic Stuff.

     

    To best understand what those functions offer I recommend the book referenced in the doc (Reina, 2016), which was quite an eye-opener for me. There is a partial preview at Google Books (https://books.google.co.uk/books?id=4RSrCwAAQBAJ&printsec=frontcover#v=onepage&q&f=false), and further information is available at the associated websites (http://www.contemporary-music-through-non-western-techniques.com and http://www.rafaelreina.org/book-online-material.html).

     

    Best,

    Torsten

     

    References

    Reina, R. (2016) Applying Karnatic Rhythmical Techniques to Western Music. Routledge.
    added 8 minutes later

    I just noticed the perhaps most important Karnatic function so far, gen-karnatic-cell, is not contained in the automatically generated documentation, because the documentation tool seemingly skips functions that are not defined at the top level. I may fix that at some stage, but for now you can read the documentation in the doc string of the function in its source file (rhythm.lisp), or you evaluate the following line and read it in the listener.

     

    (documentation 'gen-karnatic-cell 'function)

     

    Best,

    Torsten

     

  16. Actually, these are warnings and not errors. They point out various issues in the code that could be improved (in particular in the library cluster engine, as you may have noticed), but the code should still work overall. Also, you should see these compilation and warning messages only once (if you never change the code of the relevant library).

     

    Just try to go on and actually run some examples of these libraries. 

     

    Please let me know if you run into an actual error message. (There are some minor bugs of course, but at least for my tot library I try to make them explicit in the documentation as well.)

     

    Best,

    Torsten

  17. Dear Julio,

     

    As the link you copied said, "ASDF is the de facto standard build facility for Common Lisp." In other words, it is the standard software for organising, compiling, loading etc. Common Lisp programs that consist of more than just one file. I think it is already built into CCL, the compiler used by Opusmodus. Have you tried after the installation to simply run the given Common Lisp command to load the library?

    (require :tot)

    >  When I update to next Opusmodus release, do I have to reinstall it ?

     

    Not if you follow the installation instructions and install it in ~/common-lisp/

     

    Best,

    Torsten

     

  18. 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 sure you also install/upgrade all its dependencies, as described in the detailed installation instructions at https://github.com/tanders/tot

     

    Best,
    Torsten
     

    PS: This is not an official release. As I am primarily developing this library for my own purposes, I keep it rather informal and extend it on a continuous basis for my own composition projects. Anyway, I thought at least some of you might be interested to learn that there have been many developments 🙂

  19. For sound synthesis purposes (e.g., for an expressive performance), we may want to use note lengths beyond the restricted set of quantised note durations. However, Opusmodus currently prevents various irregular note duration sequences to be auditioned and throws an error instead. What is really interesting, though, is that the notation for such irregular durations still seem to work. It might make sense the other way round (i.e. refusing to notate certain rhythms -- though I am definitely not voting for introducing that :), but I don't see any real reason why arbitrary rhythms may not be auditioned. 

     

    As an example, below is a short example of some arbitrary non-regular rhythm. Opusmodus can notate this rhythm, but when trying to play it back it throws an error.

     

    '((1/10 1/11 1/12 1/13))

     

    Thanks! 

     

    Best,

    Torsten 

  20. It is handy that Opusmodus can display multiple score snippets and full scores alongside each other.

     

    Is there perhaps also a way to re-play some snippet still shown? Either with some GUI element that I may have missed or programmatically (they all have a unique name shown, like "UNTITLED 101 (Snippet)").? There is a function audition-musicxml-last-score, is there perhaps a function to again audition a score that is specified by its name? 

     

    Thanks! 

     

    Best,

    Torsten

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy