summaryrefslogtreecommitdiff
path: root/extsnd.html
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@iem.at>2016-08-04 10:52:15 +0200
committerIOhannes m zmölnig <zmoelnig@iem.at>2016-08-04 10:52:15 +0200
commit595a8d637b81d45fe73f566b25d64cf8bca672c1 (patch)
tree0a88f6ef6f0c857ba5c37842a0c5ad63b84d3915 /extsnd.html
parent3eb3c4d013403119c639870bf55d61e3456c1078 (diff)
Imported Upstream version 16.7
Diffstat (limited to 'extsnd.html')
-rw-r--r--extsnd.html27
1 files changed, 13 insertions, 14 deletions
diff --git a/extsnd.html b/extsnd.html
index cf72cda..2cc7659 100644
--- a/extsnd.html
+++ b/extsnd.html
@@ -7907,15 +7907,14 @@ then check to see how close our reconstruction is to the original:
<pre class="indented">
(define* (<em class="noem" id="cosinechannel">cosine-channel</em> (beg 0) dur snd chn edpos)
- (<em class=red>map-channel</em>
- (let* ((samps (or dur (<a class=quiet href="#framples">framples</a> snd chn)))
- (incr (/ pi samps))
- (angle (* -0.5 pi)))
- (lambda (y)
- (let ((val (* y (cos angle))))
- (set! angle (+ angle incr))
- val)))
- beg dur snd chn edpos))
+ (let ((fnc (let* ((samps (or dur (<a class=quiet href="#framples">framples</a> snd chn)))
+ (incr (/ pi samps))
+ (angle (* -0.5 pi)))
+ (lambda (y)
+ (let ((val (* y (cos angle))))
+ (set! angle (+ angle incr))
+ val)))))
+ (<em class=red>map-channel</em> fnc beg dur snd chn edpos)))
</pre>
<p id="mapsilence">Here's a slightly more involved example;
@@ -9109,8 +9108,8 @@ sample 'samp' for 'samps' samples to the values in 'data'.
</p>
<pre class="indented">
-(set! (samples 0 100) (make-vct 100 .1))
-(set-samples 0 100 (make-vct 100 .1))
+(set! (samples 0 100) (make-float-vector 100 .1))
+(set-samples 0 100 (make-float-vector 100 .1))
</pre>
<p>both change all samples between 0 and 100 to be 0.1.
@@ -11347,8 +11346,8 @@ and initial-phase:
(define (fft-&gt;sines amps phases)
(let* ((len (length phases))
(fft-size (expt 2 (+ 10 (ceiling (log len 2)))))
- (rl (make-vct fft-size))
- (im (make-vct fft-size)))
+ (rl (make-float-vector fft-size))
+ (im (make-float-vector fft-size)))
(do ((i 0 (+ i 1)))
((= i len))
(let ((amp (amps i))
@@ -12087,7 +12086,7 @@ starts the help dialog with help related to the selection if "h" is typed in the
(let ((documentation "start help dialog based on listener selected text"))
(lambda ()
(let ((subject (<em class=red>listener-selection</em>)))
- (if subject
+ (if (string? subject)
(<a class=quiet href="#helpdialog">help-dialog</a> subject (<a class=quiet href="#sndhelp">snd-help</a> subject)))))))
</pre>
<div class="spacer"></div>