[CM] sharps & flats from CM key

Heinrich Taube taube at uiuc.edu
Fri May 14 04:42:27 PDT 2010

this is all doable with fomus. i think you just need to tell fomus  
what the keysig is and the pass it key numbers, not note names.
but your example isnt using fomus at all so im confused. midi doesnt  
have any notion of note names. i could add note coersion in cm but im  
not sure what it would be good for -- the way to notate things is to  
use a notation package like fomus.

On May 14, 2010, at 12:43 AM, Adam wrote:

> Sorry about these Grace CM queries.
> Here below I came to after running into trouble with Fomus
> mixing sharps and flats within the one key.   I thought if
> I defined the scales closely, then that would correct it.
> It doesn't, and whether there's a hack or hook in Fomus for
> fixing this common problem later on, I don't know.
> For example in the E major output below, is there any way to
> coerce the output to use only sharps ?  And only flats for F
> Bf Ef Af etc ?
> Perhaps an option for "note", such as
> (note 34 :coerce f)   ; use bf1
> (note 34 :coerce s)  ; use as1
> with the 4th degree of Gb maj being treated as Cf and B respectively.
> Maybe its intractable here, and more an issue at the
> Fomus Lilypond interface.
> Thanks and best,    Adam.
> (define C  '(c0  d0  e0 f0  g0  a0  b0))
> (define Cs '(cs0 ds0 f0 fs0 gs0 as0 c1))
> (define D  '(d0 e0 fs0 g0 a0 b0 cs1))
> (define Ef '(ef0 f0 g0 af0 bf0 c1 d1))
> (define E  '(e0 fs0 gs0 a0 b0 cs1 ds1))
> (define F  '(f0 g0 a0 bf0 c1 d1 e1))
> (define Fs '(fs0 gs0 as0 b0 cs1 ds1 es1))
> (define Gf '(gf0 af0 bf0 cf1 df1 ef1 f1))
> (define G  '(g0  a0  b0  c1  d1  e1 fs1))
> (define Af '(af0 bf0 c1  df1 ef1 f1 g1))
> (define A  '(a0  b0  cs1 d1  e1  fs1 gs1))
> (define Bf '(bf0 c1  d1  ef1 f1  g1 a1))
> (define B  '(b0  cs1 ds1 es1 f1 as1 bs1))
> (define (playlist klist ndur)
>  (process for nl in klist
>           for ldur = (* ndur (+ (* 2 (length nl)) 1))
>           do
>           (print (newline))
>           (sprout (play2octs nl ndur))
>           (wait ldur)))
> (define (play2octs xa ndur)
>  (process for n in (concat xa (transpose xa 12) (transpose (first  
> xa) 24))
>           for nk = (transpose (key n) 36)
>           do
>           (send "mp:midi" :key nk :amp 0.9 :dur ndur)
>           (display (note nk))
>           (display " ")
>           (wait (* ndur 0.9))))
> (sprout (play2octs E 0.2))
> (sprout (playlist (list C Cs E) .2))
> e3 fs3 af3 a3 b3 df4 ef4 e4 fs4 af4 a4 b4 df5 ef5 e5
> c3 d3 e3 f3 g3 a3 b3 c4 d4 e4 f4 g4 a4 b4 c5
> df3 ef3 f3 fs3 af3 bf3 c4 df4 ef4 f4 fs4 af4 bf4 c5 df5
> e3 fs3 af3 a3 b3 df4 ef4 e4 fs4 af4 a4 b4 df5 ef5 e5  <---
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

More information about the Cmdist mailing list