[CM] CM3 Grace Sal and csound ftables

Adam ahcnz at ihug.co.nz
Sun Sep 27 17:57:24 PDT 2009


Am quite warming to Sal, but having trouble generating 
an f zero score instruction, which is commonly used to 
simply prolong the score time. ie "f 0 20"

Perhaps its problematic because it just has p1 p2 slots, 
instead of the usual p1, p2, p3 for ftables and instruments. 

Its tempting to use Sal's header: facility, but am using 
that already to load a file of many ftables.  

Here's an example; 

; --------------------------------------------------------

;; process that sends csound data

define process ransco(len, rhy, lb, ub, amp)
  run with dur = rhy * 2
    repeat len
    for t = elapsed(#t) ; get true score time
    for k = lb then between(lb,ub)
    send "cs:i", 1, t , dur, k, amp
    wait rhy
  end

;; write a scorfile

sprout ransco(10, .2, 60, 72, 1000), "test.sco", 
       play: #t, orchestra: "simp.orc"

; this above works fine, as per the doc's Csound example


; this below works OK too
sprout (list(ransco(10, .2, 60, 72, 1000))), 
        "test.sco",        play: #t, orchestra: "simp.orc"


; so I thought this might work, but doesn't like Send
sprout (list((ransco(10, .2, 60, 72, 1000)) 
             (send "cs:data", {f 0 15}))), 
        "test.sco",        play: #t, orchestra: "simp.orc"

; same here
sprout (list((ransco(10, .2, 60, 72, 1000))
            (send "cs:f", 0 15))), 
        "test.sco",        play: #t, orchestra: "simp.orc"

; so make a new process 
define process xf0(p1, p2)
    run
      print "f -> ", p1, p2
      send "cs:f", p1, p2
    end

; this below runs, but the score seems not 
; to include the f zero statement "f 0 15"
; In fact seems to have trouble with the xf0 function

sprout (list(
             (ransco(10, .2, 60, 72, 1000)), 
             (xf0(0, 15))
        )), "test.sco", play: #t, orchestra: "simp.orc"




More information about the Cmdist mailing list