[CM] Snd + Gauche
Kjetil S. Matheussen
kjetil@ccrma.Stanford.EDU
Mon, 24 Apr 2006 18:05:22 -0700 (PDT)
On Mon, 24 Apr 2006, Rick Taube wrote:
>>
>> Well, I think Rick should have supported rscheme instead of stklos and
>> gauche. I think the "r" in rscheme actually stands for "realtime", not
>> sure... At least, it is a realtime scheme, so it makes very much
>
> apropos, i think Todd and I just got the C RTS working in Gauche about 1
> minute ago:
>
> gosh> (do ((now (rts:scheduler-time) (+ now 500))
> (num 1 (+ num 1)))
> ((= num 10) #t)
> (rts:scheduler-enqueue num 0 now 1))
> #t
> gosh> 1 0 21297
> 2 0 21796
> 3 0 22296
> 4 0 22796
> 5 0 23296
> 6 0 23796
> 7 0 24296
> 8 0 24796
> 9 0 25296
>
By the way, the rt-extension for snd has a realtime scheduler as well:
(let ((rb (make-ringbuffer 64)))
(do ((now (rte-time) (+ now 500))
(num 1 (+ num 1)))
((= num 10) #t)
(<rt-play> (/ now 1000)
#:position 'last
(lambda ()
(put-ringbuffer rb now)
(remove-me))))
(ringbuffer-get rb
(lambda (num)
(c-display num))))
59.8378219604492
559.837829589844
1059.83776855469
1559.83776855469
2059.837890625
2559.837890625
3059.837890625
3559.837890625
4059.837890625