On OS X the example program below from the docs fails.
The error message is:
s16vector-ref: bad index 88800 for s16vector bounds of 0..88199
DrRacket highlights the form:
(rs-ith/left waveform i)
I attempted this on a 6.7 (standard) and 6.90 (racket7 branch).
#lang racket
(require rsound)
(define waveform (synth-waveform "vgame" 4))
; wrap i around when it goes off the end:
(define (maybe-wrap i)
(cond [(< i 48000) i]
[else (- i 48000)]))
; a signal that plays from a waveform:
(define loop-sig
(network (pitch)
[i = (maybe-wrap (+ (prev i 0) (round pitch)))]
[out = (rs-ith/left waveform i)]))
(signal-play
(network ()
[alternator <= square-wave 2]
[s <= loop-sig (+ (* 200 (inexact->exact alternator)) 400)]
[out = (* s 0.1)]))
On OS X the example program below from the docs fails. The error message is: s16vector-ref: bad index 88800 for s16vector bounds of 0..88199 DrRacket highlights the form: (rs-ith/left waveform i)
I attempted this on a 6.7 (standard) and 6.90 (racket7 branch).