« October 2010 | Main | March 2011 »

February 18, 2011

fetchmail and Exchange 2007

Lund University upgraded their email server to Exchange 2007 which suddenly made it impossible to fetch my email over IMAP via fetchmail using my old settings. It turns out I have to specify the autorization method, which is not 'password' by default as it says in the man page for fetchmail (the default is 'defualt' though I'm not sure what that means), and set it to 'password':

poll imap.lu.se proto imap
auth password
user [remote-user], with password [password], is [local-user] here ssl;

Now it works!

Posted by henrikfr at 11:01 AM | Comments (0)

February 14, 2011

Writing microtonal music in Lilypond

In the process of writing a second (and possibly a third) part to The Mystic Writing Pad I've been trying to figure out a way that allows me to improvise on the 43-tone scale it uses and easily transcribe the material into the notation program lilypond. After som poking around in the Scheme interface to lilypond I managed to get a transformer function working. The tranformer takes the input in which the 43-tone scale has been mapped unto the first 43 keys on the keyboard, starting with middle C (MIDI note number 60) and prints out each pitch, squeezed into its average chromatic value and prints a deviation in cents (+/- 99).

The heart of the transformation are these two functions which gets the pitch number from each note in the input. The rest is just mapping this to a list of output pitches and text scripts retrieved in the call to the (get-text mapping-table index) routine.

#(define (add-text-script m)
 (if (equal? (ly:music-property m 'name) 'EventChord)
    (ly:music-set-property! m 'elements
          (cons (make-text-script (get-pitch m))
                (ly:music-property m 'elements)))
    (let ((es (ly:music-property m 'elements))
           (e (ly:music-property m 'element)))
      (if (pair? es)(ly:music-set-property! m 'elements
         (map add-text-script es)))
      (if (ly:music? e)(ly:music-set-property! m 'element
                                               (add-text-script e)))))
m)
#(define (get-pitch music)
  (let* ((es (ly:music-property music 'elements))
         (p  (ly:music-property (car es) 'pitch)))
   (if (ly:pitch? p)(ly:pitch-semitones p) -1)))
#(define (make-text-script x) 
(make-music 'TextScriptEvent
            'direction UP
            'text (markup #:line 
                          (#:fontsize -3
                                      (#:sans (get-text texts x))))))

Posted by henrikfr at 03:40 PM | Comments (0)

Back