## [Audacity-nyquist] 1st derivative, and print statement

 [Audacity-nyquist] 1st derivative, and print statement From: paul beach - 2010-05-16 16:06:18 ```If Bezier curves are connected, that is, P0(x,y) of the second is connected to P3(x,y) of the first; then there are conditions for it to have a first derivative, C1. http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/Bezier/bezier-der.html How would that affect the spectrum? From a graphics point of view, it is an interesting curiosity. Is it more than a curiosity with respect to sound files? The plug-in seems to do the calculation; but it does not want to print the list, instead, "Does not return audio". ;nyquist plug-in ;version 1 ;type generate ;name "Bezier_0 ..." ;action "Bezier_0 ..." ;control P0x "Start" real "Fixed" 0.0 0 100 ;control P0y "Start" real "Fixed" 0.0 0 100 ;control P1x "Cont" real "Var" 4.0 0 100 ;control P1y "Cont" real "Var" 4.0 0 100 ;control P2x "Cont" real "Var" 5.0 0 100 ;control P2y "Cont" real "Var" 5.0 0 100 ;control P3x "End" real "Fixed" 0.0 0 100 ;control P3y "End" real "Fixed" 0.0 0 100 ;; Function BEZIER ;Returns a bezier curve with relative length 1.0 ;Variables used: P0x,P0y,P1x,P1y,P2x,P2y,P3x,P3y ;all values should be positive. ;Equation for Bezier curve: B(t)=((1-t)^3)*P0 + 3*((1-t)^2)*t*P1 + 3*((1-t)t^2)*P2 + (t^3)*P3 ;End points of curve are P0 and P3 ;Handles are P1 and P2 ;Returns sound from (pwl-list ....) (defun Bezier (P0x P0y P1x P1y P2x P2y P3x P3y) (let ((coords ())) (dotimes (i 51) (setq var (/ i 50.0)) (setq f0x (* (power (- 1.0 var) 3) p0x)) (setq f0y (* (power (- 1.0 var) 3) p0y)) (setq f1x (* 3.0 (power (- 1.0 var) 2) var p1x)) (setq f1y (* 3.0 (power (- 1.0 var) 2) var p1y)) (setq f2x (* 3.0 (- 1.0 var) var var p2x)) (setq f2y (* 3.0 (- 1.0 var) var var p2y)) (setq f3x (* (power var 3) p3x)) (setq f3y (* (power var 3) p3y)) (setf coords (cons (+ f0x f1x f2x f3x) coords)) (setf coords (cons (+ f0y f1y f2y f3y) coords))) (control-srate-abs *sound-srate* (pwlv-list (cdr (reverse coords)))) (print (cdr (reverse coords))) )) -- paul beach sniffyraven@... ```