Okay, I didn't need any such thing.
If I receive a midi note from | notein 1 |, supposing that's say, midi note 69 with velocity 60, run that pair through | pack | to a message box: ) outgrib $1 $2 |
into | s4pd | --
all I really need is a scheme procedure to send '69' and 'frequency of 69' out one outlet (sending a scoreline_i line to csound, where it sets the global value
gkFreq[69] used by instr 2 to set the pitch it generates), and to then (via sending '69 60 out the other outlet) generate a midi note to instr 2 using the original values
to output the new frequency (This line in instr 2: "ifreq = i(gkFreq, ikey)" ).
This ought to work for that:
(define outgrib (lambda (x y) (begin (out 0 (list x (* freq (rats (scale (degree (inexact->exact (modulo x 12))))) (expt 2 (floor (/ x 12)))))) (out 1 (list x y)))))