Recent Updates Page 2 Toggle Comment Threads | Keyboard Shortcuts

  • Daniel Ross 13:16 on June 6, 2016 Permalink | Reply
    Tags: add-bar, make-rthm-chain, rthm-chain   

    How do I add a bar to the end of a rthm-chain? The add-bar method returns an error.

    (let* ((rch (make-rthm-chain
    	     'test-rch 23
    	     '((((e) e)			; 4 in total
    		(- s (s) (s) s -)
    		({ 3 (te) - te te - })
    		((e.) s))
    	       (({ 3 (te) te (te) })	; what we transition to
    		({ 3 - te (te) te - })
    		({ 3 (te) - te te - })
    		({ 3 (te) (te) te })))
    	     '((((q q)			; the 2/4 bars: 5 total
    		 ((q) q)
    		 ((q) q)
    		 ((q) (s) e.)
    		 (- e e - (e) e))
    		(({ 3 te+te te+te te+te }) ; what we transition to
    		 (q - s e. -)
    		 (q (s) e.)
    		 (q (s) - s e -)
    		 ({ 3 te+te te+te - te te - })))
    	       ((((e.) s (e) e (s) e.)	; the 3/4 bars: 4 total
    		 (- e e - (e) e (q))
    		 (- e. s - - +e e - (q))
    		 (q (e.) s (q)))
    		(({ 3 (te) (te) te+te te+te } (q)) ; what we transition to
    		 (- e. s - (q) (s) - s e -)
    		 ({ 3 te+te te } (q) q)
    		 ({ 3 - te te te - } (e) e { 3 (te) (te) te }))))
    	     :players '(pno pnol)
    	     :slow-fibonacci t
    	     :activity-curve '(0 1 100 10)
    	     :harmonic-rthm-curve '(0 1 100 3)
    	     :do-sticking t
    	     :do-sticking-curve '(0 1 25 0 50 1 75 0 100 1)
    	     :sticking-curve '(0 0 100 10)
    	     :sticking-repeats '(3 5 7 11 2 7 5 3 13)
    	     :sticking-rthms '(e s. 32 e.)
    	     :split-data '(4 7))))
      (create-psps (palette rch))
       :title "Your Title Here" 
       :composer "Your Name Here"
       :ensemble '(((pno (piano :midi-channel 1))
    		(pnol (piano-lh :midi-channel 1))))
       :staff-groupings '(2)
       :tempo-map '((1 (q 60)))
       :set-palette `((set1 ((b2 a4 d5 e5 a5 d6))) 
    		  (set2 ((b2 fs3 d4 e4 a4 d5 e5 a5 d6))))
       :set-map `((1 ,(loop for i below (num-rthm-seqs rch)
    		     collect (if (evenp i) 'set1 'set2))))
       :rthm-seq-palette (palette rch)
       :rthm-seq-map rch)
      (add-bar rch (make-rthm-seq-bar '((5 8) e e+32 s. +q)))
    ;;; Output
      (midi-play +mini+)			; midi file
      (cmn-display +mini+)			; score display
    					;(lp-display +mini+) ; lilypond display
    • Michael Edwards 14:22 on June 6, 2016 Permalink | Reply

      add-bar is a rthm-seq method but rthm-chain is a rthm-seq-map subclass so you just can’t do what you’ve tried to do. Maybe if you get a rthm-seq out of rch via get-data you might be able to add a bar

  • Daniel Ross 09:42 on June 6, 2016 Permalink | Reply

    I did a recording session with the disklavier on Friday. Velocity 90 is massive. Don’t go above 90.

    • Michael Edwards 12:19 on June 6, 2016 Permalink | Reply

      anyone who’s setting their amplitudes before the call to midi-play can make sure their velocities don’t get too high via this hard-limiting approach when calling midi-play:

      (midi-play +jitterbug+ :force-velocity
      	   #'(lambda (event)
      	       (min 100 (floor (* (amplitude event) 127)))))
      • Michael Edwards 12:23 on June 6, 2016 Permalink | Reply

        or perhaps simpler and not hard-limiting, this will automatically range over 100 instead of 127, assuming that your events’ amplitude values range up to 1.0

        (midi-play +jitterbug+ :force-velocity
                   #'(lambda (event)
                       (floor (* (amplitude event) 100))))
  • Michael Edwards 13:17 on June 2, 2016 Permalink | Reply
    Tags: , velocity   

    Dan’s tested the Goldsmiths Disklavier. All keys are working, as are the damper and una corda pedals. He suggests limiting your MIDI velocities to 100 as anything higher is phenomenally loud and liable to disturb the tuning or perhaps even damage the instrument. See the post below for how to handle velocities within the midi-play method.

    • Michael Edwards 13:19 on June 2, 2016 Permalink | Reply

      the middle (sostenuto) pedal does not seem to be responding to controller number 66.

    • Daniel Ross 15:52 on June 2, 2016 Permalink | Reply

      MIDI Velocity 90 is LOUD on the dislklav. Go up to 100 at your peril!

  • Daniel Ross 16:22 on May 31, 2016 Permalink | Reply  

    Would be lovely to include something like this in sl-c. Something to discuss at the symposium, perhaps?

    • Michael Edwards 16:48 on June 1, 2016 Permalink | Reply

      That looks great though I’m not sure how it works. Definitely something to discuss at the symposium though, thanks.

  • Michael Edwards 08:34 on May 27, 2016 Permalink | Reply
    Tags: auxiliary notes, post-generation,   

    Some of you will already know the rm-repeated-pitches method. This finds repeating pitches in any or all voices of a slippery-chicken object and replaces them with other pitches from the current set. Of course what this is doing is ironing out some of the problems inherent to algorithmic pitch selection, and slippery chicken’s in particular.

    For the Goldsmith’s project next month I’ve developed a related method called add-auxiliary-notes. This tries to deal with some of the static pitch structures that arise out of limited but extended harmonic fields. It analyses slippery-chicken voices phrase by phrase to find the most frequently used notes, then changes some of them (according to an activity-levels object) to auxiliary notes (up a semitone by default but any and varied intervals are possible). It’s already available on the SVN server so those of you who want it will find it along with documentation in the file slippery-chicken-edit.lsp after doing (update-app-src …)

    • Daniel Ross 16:19 on June 2, 2016 Permalink | Reply

      I’m getting the following error with this new add-aux–notes method:
      (LET* ((POC
      (PITCH-OR-CHORD E)))

      • Daniel Ross 16:19 on June 2, 2016 Permalink | Reply

        Execution of a form compiled with errors.
        (LET* ((POC
        (IF WRITTEN
        (PITCH-OR-CHORD E)))
        (IS-CHORD E)
        Compile-time error:
        The LET* binding spec (IF (IS-CHORD E)
        COLLECT (FREQUENCY P))) is malformed.
        [Condition of type SB-INT:COMPILED-PROGRAM-ERROR]

      • Michael Edwards 16:40 on June 2, 2016 Permalink | Reply

        that code works fine for me. I can’t see an error in there and my Lisp doesn’t complain when I compile event.lsp

        I think you’ll have to send the offending code

        • Daniel Ross 16:45 on June 2, 2016 Permalink | Reply

          It’ll take me ages to get something you an run on your machine….
          Isn’t it just a misplaced bracket in the get-frequency method? (A close paren missing on line 7 and on line 10 instead)

          • Michael Edwards 17:08 on June 2, 2016 Permalink | Reply

            I know what you mean but I can’t see an error there. Maybe a download problem? This is what I’ve got and it runs fine for me:

            (defmethod get-frequency ((e event) &key written force-list average)
              (if (is-rest e)
                  (let* ((poc (if written
                                  (written-pitch-or-chord e)
                                  (pitch-or-chord e))))
                    (if (is-chord e)
                        (if average
                            (/ (loop for p in (data poc) sum (frequency p))
                               (sclist-length poc))
                            (loop for p in (data poc) collect (frequency p)))
                        ;; single pitch
                        (if force-list (list (frequency poc)) (frequency poc))))))
            • Daniel Ross 17:23 on June 2, 2016 Permalink

              That’s nothing like what I have. Will try update-app-src again…

            • Daniel Ross 17:25 on June 2, 2016 Permalink

              Nope, no luck. Still looks like this:
              (defmethod get-frequency ((e event) &key written force-list)
              ;;; ****
              (if (is-rest e)
              (let* ((poc (if written
              (written-pitch-or-chord e)
              (pitch-or-chord e)))
              (if (is-chord e)
              (loop for p in (data poc) collect (frequency p)))
              (if force-list (list (frequency poc)) (frequency poc))))))

            • Michael Edwards 17:34 on June 2, 2016 Permalink

              so your code is different to mine. that’s weird. I’m updating the src at svn-latest. In the meantime just replace your method definition with mine and all should be well.

            • Michael Edwards 17:37 on June 2, 2016 Permalink

              try (update-app-src …) I can definitely see the right version of the method at

            • Daniel Ross 08:41 on June 3, 2016 Permalink

              Cool, that works now. Thanks!

  • Michael Edwards 13:48 on May 25, 2016 Permalink | Reply
    Tags: pedalling, piano,   


    If you who read facebook slippery chicken group posts you may remember this one about pedalling:

    “Those of you working on piano pieces: as of yesterday, if you add one of the three pedal marks ‘ped, ‘ped-up, or ‘ped^ you’ll get the correct controller information written to your MIDI files for free—in other words, during MIDI playback the sustain pedal should work.

    If you want to set the controller message of an event yourself, just e.g.
    (push '(1 64 127) (midi-control-changes event))
    where the first 3-element list there is (midi-channel controller-number value). 64 is the sustain pedal controller number; 127 will depress and 0 will release.

    If you need this functionality do (update-app-src …)”

    Just wanted to update this to mention that this will also work with the ‘uc and ‘tc marks (una corda / tre corde) and the ‘sost and ‘sost-up marks (middle / sostenuto pedal), i.e. not only will the pedal marking appear in the score but the MIDI controller data will be written when you call midi-play.

  • Michael Edwards 16:56 on May 23, 2016 Permalink | Reply
    Tags: MIDI   

    Some of you might be interested in the following bit of code to get bass notes to play louder (not at all Fletcher-Munson curve correction but that could be implemented too by using the a-weighting function).

    :force-velocity can either be a fixed number or a function. If the latter then each consecutive event is passed to the function automatically by midi-play. Below we subtract the degree (equivalent to MIDI note number when using the chromatic scale) from 127 to make lower notes louder than higher notes, but we do restrict this to between 70 and 110, so there’ll be a hard cut-off—notes above MIDI 55 will have a velocity of 70 and those < 18 will have 110. Note that we do randomise/humanise the velocities by 10% for a less mechanical feeling (assuming your synth/sampler will distinguish significantly there); also that get-degree will return an average for chords.

    (midi-play +jitterbug+ :force-velocity
               #'(lambda (event)
                   (let* ((d (get-degree event :average t))
                          (v (when d
                                 (min 110 (max 70 (- 127 d)))
                     (format t “~&~a –> ~a” d v)
  • Michael Edwards 09:58 on May 20, 2016 Permalink | Reply
    Tags: lachenmann, nono,   

    I have never quite been able to separate my sadness at the loss of Luigi Nono from a feeling of greater awareness, of happiness and gratitude that he ever existed—and ever existed in our proximity. And despite the loneliness which I share with so many others who loved him, I feel, when I think of him, a unique sense of the triumph of art and a hope that its restless force will endure in times of apparent hopelessness.

    Helmut Lachenmann
  • Daniel Ross 09:46 on May 20, 2016 Permalink | Reply

    slip chick symp

    slippery chicken symposium

compose new post
next post/next comment
previous post/previous comment
show/hide comments
go to top
go to login
show/hide help
shift + esc