; typechecks.sal -- unit tests for typechecks
; 
; This code was generated from typechecks.txt by
; typecheck-gen.lsp

exec ny:expect("plot sum()",
               :plot, T)
exec #print("plot sum()")
exec catch(quote(simulated-error), 
           sal-compile("plot sum()", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print sum(1)",
               :print, 1)
exec #print("print sum(1)")
exec catch(quote(simulated-error), 
           sal-compile("print sum(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sum(lfo(6))",
               :plot, T)
exec #print("plot sum(lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sum(vector(lfo(6)))[0]",
               :plot, T)
exec #print("plot sum(vector(lfo(6)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(vector(lfo(6)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print sum(1, 2)",
               :print, 3)
exec #print("print sum(1, 2)")
exec catch(quote(simulated-error), 
           sal-compile("print sum(1, 2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print sum(1, 2, 3)",
               :print, 6)
exec #print("print sum(1, 2, 3)")
exec catch(quote(simulated-error), 
           sal-compile("print sum(1, 2, 3)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sum(1, lfo(6))",
               :plot, T)
exec #print("plot sum(1, lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(1, lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sum(1, lfo(6), lfo(5))",
               :plot, T)
exec #print("plot sum(1, lfo(6), lfo(5))")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(1, lfo(6), lfo(5))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sum(lfo(6), lfo(5))",
               :plot, T)
exec #print("plot sum(lfo(6), lfo(5))")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(lfo(6), lfo(5))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sum(lfo(6), 2)",
               :plot, T)
exec #print("plot sum(lfo(6), 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(lfo(6), 2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sum(lfo(6), 2, 3)",
               :plot, T)
exec #print("plot sum(lfo(6), 2, 3)")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(lfo(6), 2, 3)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print sum(vector(1, 2))",
               :nyerror, {"SIM or SUM (or + in SAL)" 0 {{NUMBER SOUND} {}}})
exec #print("print sum(vector(1, 2))")
exec catch(quote(simulated-error), 
           sal-compile("print sum(vector(1, 2))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SIM or SUM (or + in SAL), argument must be a number, sound or array thereof, got #(1 2), an ARRAY

exec ny:expect("print sum(vector(1, 2), 2)",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("print sum(vector(1, 2), 2)")
exec catch(quote(simulated-error), 
           sal-compile("print sum(vector(1, 2), 2)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(1 2), an ARRAY

exec ny:expect("print sum(1, vector(2, 3))",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("print sum(1, vector(2, 3))")
exec catch(quote(simulated-error), 
           sal-compile("print sum(1, vector(2, 3))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(2 3), an ARRAY

exec ny:expect("plot sum(vector(1, 2), lfo(6))[0]",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("plot sum(vector(1, 2), lfo(6))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(vector(1, 2), lfo(6))[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(1 2), an ARRAY

exec ny:expect("plot sum(lfo(6), vector(2, 3))[0]",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("plot sum(lfo(6), vector(2, 3))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(lfo(6), vector(2, 3))[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(2 3), an ARRAY

exec ny:expect("plot sum(1, vector(lfo(6), lfo(5)))[0]",
               :plot, T)
exec #print("plot sum(1, vector(lfo(6), lfo(5)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(1, vector(lfo(6), lfo(5)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sum(vector(lfo(5), lfo(4)), 1)[0]",
               :plot, T)
exec #print("plot sum(vector(lfo(5), lfo(4)), 1)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(vector(lfo(5), lfo(4)), 1)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sum(1, vector(vector(lfo(6)), lfo(5)))",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("plot sum(1, vector(vector(lfo(6)), lfo(5)))")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(1, vector(vector(lfo(6)), lfo(5)))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(#(#<Sound: #10b823ad0>) #<Sound: #10b823b40>), an ARRAY

exec ny:expect("plot sum(lfo(6), vector(lfo(5)))[0]",
               :plot, T)
exec #print("plot sum(lfo(6), vector(lfo(5)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(lfo(6), vector(lfo(5)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sum(lfo(6), vector(lfo(5), lfo(4)))[0]",
               :plot, T)
exec #print("plot sum(lfo(6), vector(lfo(5), lfo(4)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(lfo(6), vector(lfo(5), lfo(4)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sum(vector(lfo(5), lfo(4)), lfo(6))[0]",
               :plot, T)
exec #print("plot sum(vector(lfo(5), lfo(4)), lfo(6))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(vector(lfo(5), lfo(4)), lfo(6))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sum(vector(lfo(5), lfo(4)), vector(1, 2))[0]",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("plot sum(vector(lfo(5), lfo(4)), vector(1, 2))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(vector(lfo(5), lfo(4)), vector(1, 2))[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(1 2), an ARRAY

exec ny:expect("plot sum(vector(1, 2), vector(lfo(5), lfo(4)))[0]",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("plot sum(vector(1, 2), vector(lfo(5), lfo(4)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot sum(vector(1, 2), vector(lfo(5), lfo(4)))[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(1 2), an ARRAY

exec ny:expect("print 1 + 2",
               :print, 3)
exec #print("print 1 + 2")
exec catch(quote(simulated-error), 
           sal-compile("print 1 + 2", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print 1 + 2 + 3",
               :print, 6)
exec #print("print 1 + 2 + 3")
exec catch(quote(simulated-error), 
           sal-compile("print 1 + 2 + 3", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot 1 + lfo(6)",
               :plot, T)
exec #print("plot 1 + lfo(6)")
exec catch(quote(simulated-error), 
           sal-compile("plot 1 + lfo(6)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot 1 + lfo(6) + lfo(5)",
               :plot, T)
exec #print("plot 1 + lfo(6) + lfo(5)")
exec catch(quote(simulated-error), 
           sal-compile("plot 1 + lfo(6) + lfo(5)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lfo(6) + lfo(5)",
               :plot, T)
exec #print("plot lfo(6) + lfo(5)")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(6) + lfo(5)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lfo(6) + 2",
               :plot, T)
exec #print("plot lfo(6) + 2")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(6) + 2", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lfo(6) + 2 + 3",
               :plot, T)
exec #print("plot lfo(6) + 2 + 3")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(6) + 2 + 3", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print vector(1, 2) + 2",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("print vector(1, 2) + 2")
exec catch(quote(simulated-error), 
           sal-compile("print vector(1, 2) + 2", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(1 2), an ARRAY

exec ny:expect("print 1 + vector(2, 3)",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("print 1 + vector(2, 3)")
exec catch(quote(simulated-error), 
           sal-compile("print 1 + vector(2, 3)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(2 3), an ARRAY

exec ny:expect("plot (vector(1, 2) + lfo(6))[0]",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("plot (vector(1, 2) + lfo(6))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot (vector(1, 2) + lfo(6))[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(1 2), an ARRAY

exec ny:expect("plot (lfo(6) + vector(2, 3))[0]",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("plot (lfo(6) + vector(2, 3))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot (lfo(6) + vector(2, 3))[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(2 3), an ARRAY

exec ny:expect("plot (1 + vector(lfo(6), lfo(5)))[0]",
               :plot, T)
exec #print("plot (1 + vector(lfo(6), lfo(5)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot (1 + vector(lfo(6), lfo(5)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot (vector(lfo(5) + lfo(4)) + 1)[0]",
               :plot, T)
exec #print("plot (vector(lfo(5) + lfo(4)) + 1)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot (vector(lfo(5) + lfo(4)) + 1)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot (1 + vector(vector(lfo(6)), lfo(5)))",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("plot (1 + vector(vector(lfo(6)), lfo(5)))")
exec catch(quote(simulated-error), 
           sal-compile("plot (1 + vector(vector(lfo(6)), lfo(5)))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(#(#<Sound: #10b824108>) #<Sound: #10b823f00>), an ARRAY

exec ny:expect("plot (lfo(6) + vector(lfo(5)))[0]",
               :plot, T)
exec #print("plot (lfo(6) + vector(lfo(5)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot (lfo(6) + vector(lfo(5)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot (lfo(6) + vector(lfo(5), lfo(4)))[0]",
               :plot, T)
exec #print("plot (lfo(6) + vector(lfo(5), lfo(4)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot (lfo(6) + vector(lfo(5), lfo(4)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot (vector(lfo(5), lfo(4), lfo(6)))[0]",
               :plot, T)
exec #print("plot (vector(lfo(5), lfo(4), lfo(6)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot (vector(lfo(5), lfo(4), lfo(6)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot (vector(lfo(5), lfo(4)) + vector(1, 2))[0]",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("plot (vector(lfo(5), lfo(4)) + vector(1, 2))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot (vector(lfo(5), lfo(4)) + vector(1, 2))[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(1 2), an ARRAY

exec ny:expect("plot (vector(1, 2) + vector(lfo(5), lfo(4)))[0]",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("plot (vector(1, 2) + vector(lfo(5), lfo(4)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot (vector(1, 2) + vector(lfo(5), lfo(4)))[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got #(1 2), an ARRAY

exec ny:expect("print get-duration(osc(c4))  ; error",
               :nyerror, {"GET-DURATION" 0 {{NUMBER} {}}})
exec #print("print get-duration(osc(c4))  ; error")
exec catch(quote(simulated-error), 
           sal-compile("print get-duration(osc(c4))  ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In GET-DURATION, argument must be a number, got a SOUND

exec ny:expect("print get-duration(1)",
               :print, 1)
exec #print("print get-duration(1)")
exec catch(quote(simulated-error), 
           sal-compile("print get-duration(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print get-duration(1) ~ 2",
               :print, 2)
exec #print("print get-duration(1) ~ 2")
exec catch(quote(simulated-error), 
           sal-compile("print get-duration(1) ~ 2", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print get-loud()",
               :print, 0)
exec #print("print get-loud()")
exec catch(quote(simulated-error), 
           sal-compile("print get-loud()", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print loud(2, get-loud())",
               :print, 2)
exec #print("print loud(2, get-loud())")
exec catch(quote(simulated-error), 
           sal-compile("print loud(2, get-loud())", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print get-sustain()",
               :print, 1)
exec #print("print get-sustain()")
exec catch(quote(simulated-error), 
           sal-compile("print get-sustain()", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print get-sustain() ~ 2",
               :print, 1)
exec #print("print get-sustain() ~ 2")
exec catch(quote(simulated-error), 
           sal-compile("print get-sustain() ~ 2", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print get-tempo()",
               :print, 1)
exec #print("print get-tempo()")
exec catch(quote(simulated-error), 
           sal-compile("print get-tempo()", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print get-tempo() ~ 2",
               :print, 0.5)
exec #print("print get-tempo() ~ 2")
exec catch(quote(simulated-error), 
           sal-compile("print get-tempo() ~ 2", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print get-transpose()",
               :print, 0)
exec #print("print get-transpose()")
exec catch(quote(simulated-error), 
           sal-compile("print get-transpose()", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print transpose(2, get-transpose())",
               :print, 2)
exec #print("print transpose(2, get-transpose())")
exec catch(quote(simulated-error), 
           sal-compile("print transpose(2, get-transpose())", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot get-warp() ~ ramp()",
               :error, "1st argument of STRETCH (or 2nd argument of SAL's ~ operator) should be a number (stretch factor)")
exec #print("plot get-warp() ~ ramp()")
exec catch(quote(simulated-error), 
           sal-compile("plot get-warp() ~ ramp()", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot get-warp()",
               :error, "In GET-WARP, there is no warp function, probably because you are not within WARP or WARP-ABS")
exec #print("plot get-warp()")
exec catch(quote(simulated-error), 
           sal-compile("plot get-warp()", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot warp(ramp(), get-warp())",
               :plot, T)
exec #print("plot warp(ramp(), get-warp())")
exec catch(quote(simulated-error), 
           sal-compile("plot warp(ramp(), get-warp())", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot build-harmonic(3, 128)",
               :plot, T)
exec #print("plot build-harmonic(3, 128)")
exec catch(quote(simulated-error), 
           sal-compile("plot build-harmonic(3, 128)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot build-harmonic(3, 128.1)",
               :nyerror, {"BUILD-HARMONIC" 2 {{INTEGER} "table-size"}})
exec #print("plot build-harmonic(3, 128.1)")
exec catch(quote(simulated-error), 
           sal-compile("plot build-harmonic(3, 128.1)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In BUILD-HARMONIC, 2nd argument (table-size) must be a integer, got 128.1, a FLONUM

exec ny:expect("plot build-harmonic(3.1, 128)",
               :nyerror, {"BUILD-HARMONIC" 1 {{INTEGER} "n"}})
exec #print("plot build-harmonic(3.1, 128)")
exec catch(quote(simulated-error), 
           sal-compile("plot build-harmonic(3.1, 128)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In BUILD-HARMONIC, 1st argument (n) must be a integer, got 3.1, a FLONUM

exec ny:expect("plot amosc(a4, pwl(0.5, 1, 1))",
               :plot, T)
exec #print("plot amosc(a4, pwl(0.5, 1, 1))")
exec catch(quote(simulated-error), 
           sal-compile("plot amosc(a4, pwl(0.5, 1, 1))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot amosc(const(a4), pwl(0.5, 1, 1)) ; error",
               :nyerror, {"AMOSC" 1 {{STEP} "pitch"}})
exec #print("plot amosc(const(a4), pwl(0.5, 1, 1)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot amosc(const(a4), pwl(0.5, 1, 1)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In AMOSC, 1st argument (pitch) must be a step number, got a SOUND

exec ny:expect("plot amosc(a4, 2) ; error",
               :nyerror, {"AMOSC" 2 {{SOUND} "modulation"}})
exec #print("plot amosc(a4, 2) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot amosc(a4, 2) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In AMOSC, 2nd argument (modulation) must be a sound, got 2, a FIXNUM

exec ny:expect("plot amosc(a4, pwl(0.5, 1, 1), *sine-table*)",
               :plot, T)
exec #print("plot amosc(a4, pwl(0.5, 1, 1), *sine-table*)")
exec catch(quote(simulated-error), 
           sal-compile("plot amosc(a4, pwl(0.5, 1, 1), *sine-table*)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot amosc(a4, pwl(0.5, 1, 1), lfo(1)) ; error",
               :error, "In AMOSC, 3rd argument (table) should be a list of 3 elements")
exec #print("plot amosc(a4, pwl(0.5, 1, 1), lfo(1)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot amosc(a4, pwl(0.5, 1, 1), lfo(1)) ; error", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot amosc(a4, pwl(0.5, 1, 1), *sine-table*, 1.0)",
               :plot, T)
exec #print("plot amosc(a4, pwl(0.5, 1, 1), *sine-table*, 1.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot amosc(a4, pwl(0.5, 1, 1), *sine-table*, 1.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot amosc(a4, pwl(0.5, 1, 1), *sine-table*, osc(c4)) ; error",
               :nyerror, {"AMOSC" 4 {{NUMBER} "phase"}})
exec #print("plot amosc(a4, pwl(0.5, 1, 1), *sine-table*, osc(c4)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot amosc(a4, pwl(0.5, 1, 1), *sine-table*, osc(c4)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In AMOSC, 4th argument (phase) must be a number, got a SOUND

exec ny:expect("plot fmosc(a4, lfo(6))",
               :plot, T)
exec #print("plot fmosc(a4, lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot fmosc(a4, lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot fmosc(const(a4), lfo(6)) ; error",
               :nyerror, {"FMOSC" 1 {{STEP} "pitch"}})
exec #print("plot fmosc(const(a4), lfo(6)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot fmosc(const(a4), lfo(6)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FMOSC, 1st argument (pitch) must be a step number, got a SOUND

exec ny:expect("plot fmosc(a4, 6) ; error",
               :nyerror, {"FMOSC" 2 {{SOUND} "modulation"}})
exec #print("plot fmosc(a4, 6) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot fmosc(a4, 6) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FMOSC, 2nd argument (modulation) must be a sound, got 6, a FIXNUM

exec ny:expect("plot fmosc(a4, lfo(6), *sine-table*)",
               :plot, T)
exec #print("plot fmosc(a4, lfo(6), *sine-table*)")
exec catch(quote(simulated-error), 
           sal-compile("plot fmosc(a4, lfo(6), *sine-table*)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot fmosc(a4, lfo(6), lfo(1)) ; error",
               :error, "In FMOSC, 3rd argument (table) should be a list of 3 elements")
exec #print("plot fmosc(a4, lfo(6), lfo(1)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot fmosc(a4, lfo(6), lfo(1)) ; error", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot fmosc(a4, lfo(6), *sine-table*, 1.0)",
               :plot, T)
exec #print("plot fmosc(a4, lfo(6), *sine-table*, 1.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot fmosc(a4, lfo(6), *sine-table*, 1.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot fmosc(a4, lfo(6), *sine-table*, osc(c4)) ; error",
               :nyerror, {"FMOSC" 4 {{NUMBER} "phase"}})
exec #print("plot fmosc(a4, lfo(6), *sine-table*, osc(c4)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot fmosc(a4, lfo(6), *sine-table*, osc(c4)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FMOSC, 4th argument (phase) must be a number, got a SOUND

exec ny:expect("plot fmfb(a4, 1.1)",
               :plot, T)
exec #print("plot fmfb(a4, 1.1)")
exec catch(quote(simulated-error), 
           sal-compile("plot fmfb(a4, 1.1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot fmfb(const(a4), 1.1) ; error",
               :nyerror, {"FMFB" 1 {{STEP} "pitch"}})
exec #print("plot fmfb(const(a4), 1.1) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot fmfb(const(a4), 1.1) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FMFB, 1st argument (pitch) must be a step number, got a SOUND

exec ny:expect("plot fmfb(a4, const(1.1))",
               :plot, T)
exec #print("plot fmfb(a4, const(1.1))")
exec catch(quote(simulated-error), 
           sal-compile("plot fmfb(a4, const(1.1))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot fmfb(a4, 1.1, 2.0)",
               :plot, T)
exec #print("plot fmfb(a4, 1.1, 2.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot fmfb(a4, 1.1, 2.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot fmfb(a4, 1.1, const(2, 2)) ; error",
               :nyerror, {"FMFB" 3 {{NUMBER} "dur"}})
exec #print("plot fmfb(a4, 1.1, const(2, 2)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot fmfb(a4, 1.1, const(2, 2)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FMFB, 3rd argument (dur) must be a number, got a SOUND

exec ny:expect("plot buzz(4, a4, lfo(6))",
               :plot, T)
exec #print("plot buzz(4, a4, lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot buzz(4, a4, lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot buzz(4.1, a4, lfo(6)) ; error",
               :nyerror, {"BUZZ" 1 {{INTEGER} "number of harmonics"}})
exec #print("plot buzz(4.1, a4, lfo(6)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot buzz(4.1, a4, lfo(6)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In BUZZ, 1st argument (number of harmonics) must be a integer, got 4.1, a FLONUM

exec ny:expect("plot buzz(4, const(a4), lfo(6)) ; error",
               :nyerror, {"BUZZ" 2 {{STEP} "pitch"}})
exec #print("plot buzz(4, const(a4), lfo(6)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot buzz(4, const(a4), lfo(6)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In BUZZ, 2nd argument (pitch) must be a step number, got a SOUND

exec ny:expect("plot buzz(4, a4, 6) ; error",
               :nyerror, {"BUZZ" 3 {{SOUND} "modulation"}})
exec #print("plot buzz(4, a4, 6) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot buzz(4, a4, 6) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In BUZZ, 3rd argument (modulation) must be a sound, got 6, a FIXNUM

exec ny:expect("plot hzosc(440)",
               :plot, T)
exec #print("plot hzosc(440)")
exec catch(quote(simulated-error), 
           sal-compile("plot hzosc(440)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hzosc(440, *sine-table*)",
               :plot, T)
exec #print("plot hzosc(440, *sine-table*)")
exec catch(quote(simulated-error), 
           sal-compile("plot hzosc(440, *sine-table*)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hzosc(const(440), *sine-table*) ; error",
               :plot, T)
exec #print("plot hzosc(const(440), *sine-table*) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot hzosc(const(440), *sine-table*) ; error", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hzosc(440, osc(c4)) ; error",
               :error, "In HZOSC, 2nd argument (table) should be a list of 3 elements")
exec #print("plot hzosc(440, osc(c4)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot hzosc(440, osc(c4)) ; error", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hzosc(440, list(1, 2, 3)) ; error",
               :error, "In HZOSC, 2nd argument (table) should be a list beginning with a sound")
exec #print("plot hzosc(440, list(1, 2, 3)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot hzosc(440, list(1, 2, 3)) ; error", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hzosc(440, *sine-table*, 1.0)",
               :plot, T)
exec #print("plot hzosc(440, *sine-table*, 1.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot hzosc(440, *sine-table*, 1.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hzosc(440, *sine-table*, const(1.0)) ; error",
               :nyerror, {"HZOSC" 3 {{NUMBER} "phase"}})
exec #print("plot hzosc(440, *sine-table*, const(1.0)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot hzosc(440, *sine-table*, const(1.0)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HZOSC, 3rd argument (phase) must be a number, got a SOUND

exec ny:expect("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), 10, build-harmonic(2, 512)))",
               :plot, T)
exec #print("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), 10, build-harmonic(2, 512)))")
exec catch(quote(simulated-error), 
           sal-compile("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), 10, build-harmonic(2, 512)))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), 10))",
               :error, "In SIOSC, 3rd argument (breakpoints) must be a list with at least 3 elements")
exec #print("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), 10))")
exec catch(quote(simulated-error), 
           sal-compile("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), 10))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot siosc(const(a4), lfo(6), list(build-harmonic(1, 512), 10, build-harmonic(2, 512))) ; 1st arg error",
               :nyerror, {"SIOSC" 1 {{STEP} "pitch"}})
exec #print("plot siosc(const(a4), lfo(6), list(build-harmonic(1, 512), 10, build-harmonic(2, 512))) ; 1st arg error")
exec catch(quote(simulated-error), 
           sal-compile("plot siosc(const(a4), lfo(6), list(build-harmonic(1, 512), 10, build-harmonic(2, 512))) ; 1st arg error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SIOSC, 1st argument (pitch) must be a step number, got a SOUND

exec ny:expect("plot siosc(a4, 6, list(build-harmonic(1, 512), 10, build-harmonic(2, 512))) ; 2nd arg error",
               :nyerror, {"SIOSC" 2 {{SOUND} "modulation"}})
exec #print("plot siosc(a4, 6, list(build-harmonic(1, 512), 10, build-harmonic(2, 512))) ; 2nd arg error")
exec catch(quote(simulated-error), 
           sal-compile("plot siosc(a4, 6, list(build-harmonic(1, 512), 10, build-harmonic(2, 512))) ; 2nd arg error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SIOSC, 2nd argument (modulation) must be a sound, got 6, a FIXNUM

exec ny:expect("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), 10, 20)) ; error ",
               :error, "In SIOSC, expected a sound in breakpoints list at index 2")
exec #print("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), 10, 20)) ; error ")
exec catch(quote(simulated-error), 
           sal-compile("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), 10, 20)) ; error ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), 10, list(20))) ; error ",
               :error, "In SIOSC, expected a sound in breakpoints list at index 2")
exec #print("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), 10, list(20))) ; error ")
exec catch(quote(simulated-error), 
           sal-compile("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), 10, list(20))) ; error ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot siosc(a4, lfo(6), list(10, build-harmonic(1, 512), 10)) ; error ",
               :error, "In SIOSC, expected a sound in breakpoints list at index 0")
exec #print("plot siosc(a4, lfo(6), list(10, build-harmonic(1, 512), 10)) ; error ")
exec catch(quote(simulated-error), 
           sal-compile("plot siosc(a4, lfo(6), list(10, build-harmonic(1, 512), 10)) ; error ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), build-harmonic(2, 512), 10)) ; error ",
               :error, "In SIOSC, expected a number (time) in breakpoints list at index 1")
exec #print("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), build-harmonic(2, 512), 10)) ; error ")
exec catch(quote(simulated-error), 
           sal-compile("plot siosc(a4, lfo(6), list(build-harmonic(1, 512), build-harmonic(2, 512), 10)) ; error ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lfo(6)",
               :plot, T)
exec #print("plot lfo(6)")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(6)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lfo(const(6)) ; error",
               :nyerror, {"LFO" 1 {{NUMBER} "freq"}})
exec #print("plot lfo(const(6)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(const(6)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LFO, 1st argument (freq) must be a number, got a SOUND

exec ny:expect("plot lfo(6, 2) ",
               :plot, T)
exec #print("plot lfo(6, 2) ")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(6, 2) ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lfo(6, const(2)) ; error",
               :nyerror, {"LFO" 2 {{NUMBER} "duration"}})
exec #print("plot lfo(6, const(2)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(6, const(2)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LFO, 2nd argument (duration) must be a number, got a SOUND

exec ny:expect("plot lfo(6, 2, *sine-table*) ",
               :plot, T)
exec #print("plot lfo(6, 2, *sine-table*) ")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(6, 2, *sine-table*) ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lfo(6, 2, osc(c4)) ; error",
               :error, "In LFO, 3rd argument (table) should be a list of 3 elements")
exec #print("plot lfo(6, 2, osc(c4)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(6, 2, osc(c4)) ; error", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lfo(6, 2, *sine-table*, 1.0)",
               :plot, T)
exec #print("plot lfo(6, 2, *sine-table*, 1.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(6, 2, *sine-table*, 1.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lfo(6, 2, *sine-table*, lfo(1.0)) ; error",
               :nyerror, {"LFO" 4 {{NUMBER} "phase"}})
exec #print("plot lfo(6, 2, *sine-table*, lfo(1.0)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(6, 2, *sine-table*, lfo(1.0)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LFO, 4th argument (phase) must be a number, got a SOUND

exec ny:expect("plot fmlfo(6) ; error",
               :nyerror, {"FMLFO" 1 {{SOUND} "freq"}})
exec #print("plot fmlfo(6) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot fmlfo(6) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FMLFO, 1st argument (freq) must be a sound, got 6, a FIXNUM

exec ny:expect("plot fmlfo(const(6)) ",
               :plot, T)
exec #print("plot fmlfo(const(6)) ")
exec catch(quote(simulated-error), 
           sal-compile("plot fmlfo(const(6)) ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot fmlfo(const(6), *sine-table*)",
               :plot, T)
exec #print("plot fmlfo(const(6), *sine-table*)")
exec catch(quote(simulated-error), 
           sal-compile("plot fmlfo(const(6), *sine-table*)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot fmlfo(const(6), lfo(1)) ; error",
               :error, "In FMLFO, 2nd argument (table) should be a list of 3 elements")
exec #print("plot fmlfo(const(6), lfo(1)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot fmlfo(const(6), lfo(1)) ; error", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot fmlfo(const(6), *sine-table*, 1.0)",
               :plot, T)
exec #print("plot fmlfo(const(6), *sine-table*, 1.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot fmlfo(const(6), *sine-table*, 1.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot fmlfo(const(6), *sine-table*, const(1.0)) ; error",
               :nyerror, {"FMLFO" 3 {{NUMBER} "phase"}})
exec #print("plot fmlfo(const(6), *sine-table*, const(1.0)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot fmlfo(const(6), *sine-table*, const(1.0)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FMLFO, 3rd argument (phase) must be a number, got a SOUND

exec ny:expect("plot osc(a4)",
               :plot, T)
exec #print("plot osc(a4)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc(a4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc(a4, 2.0)",
               :plot, T)
exec #print("plot osc(a4, 2.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc(a4, 2.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc(a4, 2.0, *sine-table*)",
               :plot, T)
exec #print("plot osc(a4, 2.0, *sine-table*)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc(a4, 2.0, *sine-table*)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc(a4, 2.0, *sine-table*, 1.0)",
               :plot, T)
exec #print("plot osc(a4, 2.0, *sine-table*, 1.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc(a4, 2.0, *sine-table*, 1.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc(const(a4)) ; error",
               :nyerror, {"OSC" 1 {{STEP} "pitch"}})
exec #print("plot osc(const(a4)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot osc(const(a4)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In OSC, 1st argument (pitch) must be a step number, got a SOUND

exec ny:expect("plot osc(a4, const(2.0)) ; error",
               :nyerror, {"OSC" 2 {{NUMBER} "duration"}})
exec #print("plot osc(a4, const(2.0)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot osc(a4, const(2.0)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In OSC, 2nd argument (duration) must be a number, got a SOUND

exec ny:expect("plot osc(a4, 2.0, osc(c4)) ; error",
               :error, "In OSC, 3rd argument (table) should be a list of 3 elements")
exec #print("plot osc(a4, 2.0, osc(c4)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot osc(a4, 2.0, osc(c4)) ; error", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc(a4, 2.0, *sine-table*, const(1.0)) ; error",
               :nyerror, {"OSC" 4 {{NUMBER} "phase"}})
exec #print("plot osc(a4, 2.0, *sine-table*, const(1.0)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot osc(a4, 2.0, *sine-table*, const(1.0)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In OSC, 4th argument (phase) must be a number, got a SOUND

exec ny:expect("plot partial(a4, pwl(0.5, 1, 1))",
               :plot, T)
exec #print("plot partial(a4, pwl(0.5, 1, 1))")
exec catch(quote(simulated-error), 
           sal-compile("plot partial(a4, pwl(0.5, 1, 1))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot partial(const(a4), pwl(0.5, 1, 1)) ; error",
               :nyerror, {"PARTIAL" 1 {{STEP} "steps"}})
exec #print("plot partial(const(a4), pwl(0.5, 1, 1)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot partial(const(a4), pwl(0.5, 1, 1)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PARTIAL, 1st argument (steps) must be a step number, got a SOUND

exec ny:expect("plot partial(a4, 2) ; error",
               :nyerror, {"PARTIAL" 2 {{SOUND} "env"}})
exec #print("plot partial(a4, 2) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot partial(a4, 2) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PARTIAL, 2nd argument (env) must be a sound, got 2, a FIXNUM

exec ny:expect("plot sampler(a4, pwl(0.5, 1, 1))",
               :plot, T)
exec #print("plot sampler(a4, pwl(0.5, 1, 1))")
exec catch(quote(simulated-error), 
           sal-compile("plot sampler(a4, pwl(0.5, 1, 1))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sampler(const(a4), pwl(0.5, 1, 1)) ; error",
               :nyerror, {"SAMPLER" 1 {{STEP} "pitch"}})
exec #print("plot sampler(const(a4), pwl(0.5, 1, 1)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot sampler(const(a4), pwl(0.5, 1, 1)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SAMPLER, 1st argument (pitch) must be a step number, got a SOUND

exec ny:expect("plot sampler(a4, 2) ; error",
               :nyerror, {"SAMPLER" 2 {{SOUND} "modulation"}})
exec #print("plot sampler(a4, 2) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot sampler(a4, 2) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SAMPLER, 2nd argument (modulation) must be a sound, got 2, a FIXNUM

exec ny:expect("plot sampler(a4, pwl(0.5, 1, 1), *sine-table*)",
               :error, "In SAMPLER, 3rd argument (table) should be a list whose 3rd element is the sample start time")
exec #print("plot sampler(a4, pwl(0.5, 1, 1), *sine-table*)")
exec catch(quote(simulated-error), 
           sal-compile("plot sampler(a4, pwl(0.5, 1, 1), *sine-table*)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sampler(a4, pwl(0.5, 1, 1), hzosc(1.0)) ; error",
               :error, "In SAMPLER, 3rd argument (table) should be a list of 3 elements")
exec #print("plot sampler(a4, pwl(0.5, 1, 1), hzosc(1.0)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot sampler(a4, pwl(0.5, 1, 1), hzosc(1.0)) ; error", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sampler(a4, pwl(0.5, 1, 1), *sine-sample*, 2)",
               :plot, T)
exec #print("plot sampler(a4, pwl(0.5, 1, 1), *sine-sample*, 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot sampler(a4, pwl(0.5, 1, 1), *sine-sample*, 2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sampler(a4, pwl(0.5, 1, 1), *sine-sample*, 2.1) ; error",
               :nyerror, {"BUZZ" 3 {{INTEGER} "npoints"}})
exec #print("plot sampler(a4, pwl(0.5, 1, 1), *sine-sample*, 2.1) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot sampler(a4, pwl(0.5, 1, 1), *sine-sample*, 2.1) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In BUZZ, 3rd argument (npoints) must be a integer, got 2.1, a FLONUM

exec ny:expect("plot sine(a4)",
               :plot, T)
exec #print("plot sine(a4)")
exec catch(quote(simulated-error), 
           sal-compile("plot sine(a4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sine(const(a4)) ; error",
               :nyerror, {"SINE" 1 {{STEP} "steps"}})
exec #print("plot sine(const(a4)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot sine(const(a4)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SINE, 1st argument (steps) must be a step number, got a SOUND

exec ny:expect("plot sine(a4, 1.0)",
               :plot, T)
exec #print("plot sine(a4, 1.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot sine(a4, 1.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sine(a4, const(1.0)) ; error",
               :nyerror, {"SINE" 2 {{NUMBER} "duration"}})
exec #print("plot sine(a4, const(1.0)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot sine(a4, const(1.0)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SINE, 2nd argument (duration) must be a number, got a SOUND

exec ny:expect("plot pluck(a4)",
               :plot, T)
exec #print("plot pluck(a4)")
exec catch(quote(simulated-error), 
           sal-compile("plot pluck(a4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pluck(const(a4)) ; error",
               :nyerror, {"PLUCK" 1 {{NUMBER} "steps"}})
exec #print("plot pluck(const(a4)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot pluck(const(a4)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PLUCK, 1st argument (steps) must be a number, got a SOUND

exec ny:expect("plot pluck(a4, 2)",
               :plot, T)
exec #print("plot pluck(a4, 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot pluck(a4, 2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pluck(a4, const(2)) ; error",
               :nyerror, {"PLUCK" 2 {{NUMBER} "duration"}})
exec #print("plot pluck(a4, const(2)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot pluck(a4, const(2)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PLUCK, 2nd argument (duration) must be a number, got a SOUND

exec ny:expect("plot pluck(a4, 2, 0.01)",
               :plot, T)
exec #print("plot pluck(a4, 2, 0.01)")
exec catch(quote(simulated-error), 
           sal-compile("plot pluck(a4, 2, 0.01)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pluck(a4, 2, const(0.01)) ; error",
               :nyerror, {"PLUCK" 3 {{NUMBER} "final-amp"}})
exec #print("plot pluck(a4, 2, const(0.01)) ; error")
exec catch(quote(simulated-error), 
           sal-compile("plot pluck(a4, 2, const(0.01)) ; error", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PLUCK, 3rd argument (final-amp) must be a number, got a SOUND

exec ny:expect("plot osc(c4) @ 1",
               :plot, T)
exec #print("plot osc(c4) @ 1")
exec catch(quote(simulated-error), 
           sal-compile("plot osc(c4) @ 1", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc(c4) @ lfo(1)",
               :error, "1st argument of AT (or 2nd argument of SAL's @ operator) should be a time offset number")
exec #print("plot osc(c4) @ lfo(1)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc(c4) @ lfo(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc(c4) @@ 1",
               :plot, T)
exec #print("plot osc(c4) @@ 1")
exec catch(quote(simulated-error), 
           sal-compile("plot osc(c4) @@ 1", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc(c4) @@ lfo(1)",
               :error, "1st argument of AT-ABS (or 2nd argument of SAL's @@ operator) should be a number (start time)")
exec #print("plot osc(c4) @@ lfo(1)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc(c4) @@ lfo(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot clip(osc(c4), 0.5)",
               :plot, T)
exec #print("plot clip(osc(c4), 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot clip(osc(c4), 0.5)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print clip(0.6, 0.5)",
               :print, 0.5)
exec #print("print clip(0.6, 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("print clip(0.6, 0.5)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot clip(vector(osc(c4), osc(c4)), 0.5)[0]",
               :plot, T)
exec #print("plot clip(vector(osc(c4), osc(c4)), 0.5)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot clip(vector(osc(c4), osc(c4)), 0.5)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot clip(\"bad\", 0.5)",
               :nyerror, {"CLIP" 1 {{NUMBER SOUND} {}}})
exec #print("plot clip(\"bad\", 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot clip(\"bad\", 0.5)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CLIP, 1st argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("plot clip(osc(c4), \"bad\")",
               :nyerror, {"CLIP" 2 {{NUMBER} {}}})
exec #print("plot clip(osc(c4), \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot clip(osc(c4), \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CLIP, 2nd argument must be a number, got "bad", a STRING

exec ny:expect("plot control-srate-abs(100, lfo(100))",
               :plot, T)
exec #print("plot control-srate-abs(100, lfo(100))")
exec catch(quote(simulated-error), 
           sal-compile("plot control-srate-abs(100, lfo(100))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot control-srate-abs(osc(c4), lfo(100))",
               :nyerror, {"CONTROL-SRATE-ABS" 1 {{NUMBER} "sample rate"}})
exec #print("plot control-srate-abs(osc(c4), lfo(100))")
exec catch(quote(simulated-error), 
           sal-compile("plot control-srate-abs(osc(c4), lfo(100))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CONTROL-SRATE-ABS, 1st argument (sample rate) must be a number, got a SOUND

exec ny:expect("print db-to-linear(-6)",
               :print, 0.501187)
exec #print("print db-to-linear(-6)")
exec catch(quote(simulated-error), 
           sal-compile("print db-to-linear(-6)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot db-to-linear(lfo(1))",
               :plot, T)
exec #print("plot db-to-linear(lfo(1))")
exec catch(quote(simulated-error), 
           sal-compile("plot db-to-linear(lfo(1))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot db-to-linear(vector(lfo(1), lfo(2)))[0]",
               :plot, T)
exec #print("plot db-to-linear(vector(lfo(1), lfo(2)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot db-to-linear(vector(lfo(1), lfo(2)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot db-to-linear(\"bad\")",
               :nyerror, {"DB-TO-LINEAR" 0 {{NUMBER SOUND} {}}})
exec #print("plot db-to-linear(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot db-to-linear(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In DB-TO-LINEAR, argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("print linear-to-db(2)",
               :print, 6.0206)
exec #print("print linear-to-db(2)")
exec catch(quote(simulated-error), 
           sal-compile("print linear-to-db(2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot linear-to-db(1 + lfo(1))",
               :plot, T)
exec #print("plot linear-to-db(1 + lfo(1))")
exec catch(quote(simulated-error), 
           sal-compile("plot linear-to-db(1 + lfo(1))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot linear-to-db(1 + vector(lfo(1), lfo(2)))[0]",
               :plot, T)
exec #print("plot linear-to-db(1 + vector(lfo(1), lfo(2)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot linear-to-db(1 + vector(lfo(1), lfo(2)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print linear-to-db(\"bad\")",
               :nyerror, {"LINEAR-TO-DB" 0 {{NUMBER SOUND} {}}})
exec #print("print linear-to-db(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("print linear-to-db(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LINEAR-TO-DB, argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("print step-to-hz(67)",
               :print, 391.995)
exec #print("print step-to-hz(67)")
exec catch(quote(simulated-error), 
           sal-compile("print step-to-hz(67)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot step-to-hz(67 + lfo(4) * 4)",
               :plot, T)
exec #print("plot step-to-hz(67 + lfo(4) * 4)")
exec catch(quote(simulated-error), 
           sal-compile("plot step-to-hz(67 + lfo(4) * 4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot step-to-hz(60 + vector(lfo(4), lfo(6)))[0]",
               :plot, T)
exec #print("plot step-to-hz(60 + vector(lfo(4), lfo(6)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot step-to-hz(60 + vector(lfo(4), lfo(6)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print step-to-hz(\"bad\")",
               :nyerror, {"STEP-TO-HZ" 0 {{NUMBER SOUND} {}}})
exec #print("print step-to-hz(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("print step-to-hz(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In STEP-TO-HZ, argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("print hz-to-step(440)",
               :print, 69)
exec #print("print hz-to-step(440)")
exec catch(quote(simulated-error), 
           sal-compile("print hz-to-step(440)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hz-to-step(440 + lfo(4) * 4)",
               :plot, T)
exec #print("plot hz-to-step(440 + lfo(4) * 4)")
exec catch(quote(simulated-error), 
           sal-compile("plot hz-to-step(440 + lfo(4) * 4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hz-to-step(60 + vector(lfo(40), lfo(60)))[0]",
               :plot, T)
exec #print("plot hz-to-step(60 + vector(lfo(40), lfo(60)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot hz-to-step(60 + vector(lfo(40), lfo(60)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print hz-to-step(\"bad\")",
               :nyerror, {"HZ-TO-STEP" 0 {{NUMBER SOUND} {}}})
exec #print("print hz-to-step(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("print hz-to-step(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HZ-TO-STEP, argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("print sref(lfo(6), 0.5)",
               :print, 0)
exec #print("print sref(lfo(6), 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("print sref(lfo(6), 0.5)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print sref(vector(lfo(6), lfo(5)), 0.5)",
               :nyerror, {"SREF" 1 {{SOUND} "sound"}})
exec #print("print sref(vector(lfo(6), lfo(5)), 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("print sref(vector(lfo(6), lfo(5)), 0.5)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SREF, 1st argument (sound) must be a sound, got a 2-channel SOUND

exec ny:expect("print sref(lfo(6), lfo(0.5))",
               :nyerror, {"SREF" 2 {{NUMBER} "time"}})
exec #print("print sref(lfo(6), lfo(0.5))")
exec catch(quote(simulated-error), 
           sal-compile("print sref(lfo(6), lfo(0.5))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SREF, 2nd argument (time) must be a number, got a SOUND

exec ny:expect("plot extract(0, 1, lfo(5))",
               :plot, T)
exec #print("plot extract(0, 1, lfo(5))")
exec catch(quote(simulated-error), 
           sal-compile("plot extract(0, 1, lfo(5))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot extract(lfo(1), 1, lfo(5))",
               :nyerror, {"EXTRACT" 1 {{NUMBER} "start"}})
exec #print("plot extract(lfo(1), 1, lfo(5))")
exec catch(quote(simulated-error), 
           sal-compile("plot extract(lfo(1), 1, lfo(5))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EXTRACT, 1st argument (start) must be a number, got a SOUND

exec ny:expect("plot extract(0, lfo(1), lfo(5))",
               :nyerror, {"EXTRACT" 2 {{NUMBER} "stop"}})
exec #print("plot extract(0, lfo(1), lfo(5))")
exec catch(quote(simulated-error), 
           sal-compile("plot extract(0, lfo(1), lfo(5))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EXTRACT, 2nd argument (stop) must be a number, got a SOUND

exec ny:expect("plot extract(0, 1, 2)",
               :nyerror, {"EXTRACT" 3 {{SOUND} "sound"}})
exec #print("plot extract(0, 1, 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot extract(0, 1, 2)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EXTRACT, 3rd argument (sound) must be a sound, got 2, a FIXNUM

exec ny:expect("plot extract-abs(0, 1, lfo(1))",
               :plot, T)
exec #print("plot extract-abs(0, 1, lfo(1))")
exec catch(quote(simulated-error), 
           sal-compile("plot extract-abs(0, 1, lfo(1))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot extract-abs(0, 1, lfo(1), 0.1)",
               :plot, T)
exec #print("plot extract-abs(0, 1, lfo(1), 0.1)")
exec catch(quote(simulated-error), 
           sal-compile("plot extract-abs(0, 1, lfo(1), 0.1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot extract-abs(lfo(1), 1, lfo(1))",
               :nyerror, {"EXTRACT-ABS" 1 {{NUMBER} "start"}})
exec #print("plot extract-abs(lfo(1), 1, lfo(1))")
exec catch(quote(simulated-error), 
           sal-compile("plot extract-abs(lfo(1), 1, lfo(1))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EXTRACT-ABS, 1st argument (start) must be a number, got a SOUND

exec ny:expect("plot extract-abs(0, lfo(1), lfo(1))",
               :nyerror, {"EXTRACT-ABS" 2 {{NUMBER} "stop"}})
exec #print("plot extract-abs(0, lfo(1), lfo(1))")
exec catch(quote(simulated-error), 
           sal-compile("plot extract-abs(0, lfo(1), lfo(1))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EXTRACT-ABS, 2nd argument (stop) must be a number, got a SOUND

exec ny:expect("plot extract-abs(0, 1, 2)",
               :nyerror, {"EXTRACT-ABS" 3 {{SOUND} "sound"}})
exec #print("plot extract-abs(0, 1, 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot extract-abs(0, 1, 2)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EXTRACT-ABS, 3rd argument (sound) must be a sound, got 2, a FIXNUM

exec ny:expect("plot extract-abs(0, 1, lfo(1), lfo(2))",
               :nyerror, {"EXTRACT-ABS" 4 {{NUMBER} "start-time"}})
exec #print("plot extract-abs(0, 1, lfo(1), lfo(2))")
exec catch(quote(simulated-error), 
           sal-compile("plot extract-abs(0, 1, lfo(1), lfo(2))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EXTRACT-ABS, 4th argument (start-time) must be a number, got a SOUND

exec ny:expect("print local-to-global(0.5)",
               :print, 0.5)
exec #print("print local-to-global(0.5)")
exec catch(quote(simulated-error), 
           sal-compile("print local-to-global(0.5)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print local-to-global(lfo(0.5))",
               :nyerror, {"LOCAL-TO-GLOBAL" 0 {{NUMBER} "local-time"}})
exec #print("print local-to-global(lfo(0.5))")
exec catch(quote(simulated-error), 
           sal-compile("print local-to-global(lfo(0.5))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LOCAL-TO-GLOBAL, argument (local-time) must be a number, got a SOUND

exec ny:expect("plot loud(2, lfo(1))",
               :plot, T)
exec #print("plot loud(2, lfo(1))")
exec catch(quote(simulated-error), 
           sal-compile("plot loud(2, lfo(1))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot loud(2 + lfo(2), lfo(1))",
               :plot, T)
exec #print("plot loud(2 + lfo(2), lfo(1))")
exec catch(quote(simulated-error), 
           sal-compile("plot loud(2 + lfo(2), lfo(1))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot loud-abs(2, lfo(1))",
               :plot, T)
exec #print("plot loud-abs(2, lfo(1))")
exec catch(quote(simulated-error), 
           sal-compile("plot loud-abs(2, lfo(1))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot loud-abs(2 + lfo(2), lfo(1))",
               :plot, T)
exec #print("plot loud-abs(2 + lfo(2), lfo(1))")
exec catch(quote(simulated-error), 
           sal-compile("plot loud-abs(2 + lfo(2), lfo(1))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot scale-db(6, lfo(6))",
               :plot, T)
exec #print("plot scale-db(6, lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot scale-db(6, lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot scale-db(vector(6, 12), lfo(6))[0]",
               :plot, T)
exec #print("plot scale-db(vector(6, 12), lfo(6))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot scale-db(vector(6, 12), lfo(6))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot scale-db(6, vector(lfo(6), lfo(5)))[0]",
               :plot, T)
exec #print("plot scale-db(6, vector(lfo(6), lfo(5)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot scale-db(6, vector(lfo(6), lfo(5)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot scale-db(vector(6, 12), vector(lfo(6), lfo(5)))[0]",
               :plot, T)
exec #print("plot scale-db(vector(6, 12), vector(lfo(6), lfo(5)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot scale-db(vector(6, 12), vector(lfo(6), lfo(5)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot scale-db(\"bad\", lfo(6))",
               :nyerror, {"SCALE-DB" 1 {{NUMBER} "factor"}})
exec #print("plot scale-db(\"bad\", lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot scale-db(\"bad\", lfo(6))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SCALE-DB, 1st argument (factor) must be a number or array of numbers, got "bad", a STRING

exec ny:expect("plot scale-db(6, 12)",
               :nyerror, {"SCALE-DB" 2 {{SOUND} "sound"}})
exec #print("plot scale-db(6, 12)")
exec catch(quote(simulated-error), 
           sal-compile("plot scale-db(6, 12)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SCALE-DB, 2nd argument (sound) must be a sound or multichannel sound, got 12, a FIXNUM

exec ny:expect("print set-control-srate(2205)",
               :print, T)
exec #print("print set-control-srate(2205)")
exec catch(quote(simulated-error), 
           sal-compile("print set-control-srate(2205)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print set-control-srate(\"bad\")",
               :nyerror, {"SET-CONTROL-SRATE" 0 {{NUMBER} "rate"}})
exec #print("print set-control-srate(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("print set-control-srate(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SET-CONTROL-SRATE, argument (rate) must be a number, got "bad", a STRING

exec ny:expect("print set-sound-srate(2205)",
               :print, T)
exec #print("print set-sound-srate(2205)")
exec catch(quote(simulated-error), 
           sal-compile("print set-sound-srate(2205)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print set-sound-srate(\"bad\")",
               :nyerror, {"SET-SOUND-SRATE" 0 {{NUMBER} "rate"}})
exec #print("print set-sound-srate(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("print set-sound-srate(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SET-SOUND-SRATE, argument (rate) must be a number, got "bad", a STRING

exec ny:expect("plot sound-srate-abs(100, lfo(6))",
               :plot, T)
exec #print("plot sound-srate-abs(100, lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot sound-srate-abs(100, lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sound-srate-abs(\"bad\", lfo(6))",
               :nyerror, {"SOUND-SRATE-ABS" 1 {{NUMBER} "sample rate"}})
exec #print("plot sound-srate-abs(\"bad\", lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot sound-srate-abs(\"bad\", lfo(6))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SOUND-SRATE-ABS, 1st argument (sample rate) must be a number, got "bad", a STRING

exec ny:expect("plot stretch(2, lfo(6))",
               :plot, T)
exec #print("plot stretch(2, lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot stretch(2, lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot stretch(\"bad\", lfo(6))",
               :error, "1st argument of STRETCH (or 2nd argument of SAL's ~ operator) should be a number (stretch factor)")
exec #print("plot stretch(\"bad\", lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot stretch(\"bad\", lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot stretch-abs(2, lfo(6))",
               :plot, T)
exec #print("plot stretch-abs(2, lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot stretch-abs(2, lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot stretch-abs(\"bad\", lfo(6))",
               :error, "1st argument of STRETCH-ABS (or 2nd argument of SAL's ~~ operator) should be a number (stretch factor)")
exec #print("plot stretch-abs(\"bad\", lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot stretch-abs(\"bad\", lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sustain(2, lfo(6))",
               :plot, T)
exec #print("plot sustain(2, lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot sustain(2, lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sustain(\"bad\", lfo(6))",
               :nyerror, {"SUSTAIN" 1 {{NUMBER SOUND} {}}})
exec #print("plot sustain(\"bad\", lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot sustain(\"bad\", lfo(6))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SUSTAIN, 1st argument must be a number or sound, got "bad", a STRING

exec ny:expect("plot sustain-abs(2, lfo(6))",
               :plot, T)
exec #print("plot sustain-abs(2, lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot sustain-abs(2, lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sustain-abs(\"bad\", lfo(6))",
               :nyerror, {"SUSTAIN-ABS" 1 {{NUMBER SOUND} {}}})
exec #print("plot sustain-abs(\"bad\", lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot sustain-abs(\"bad\", lfo(6))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SUSTAIN-ABS, 1st argument must be a number or sound, got "bad", a STRING

exec ny:expect("plot transpose(2, lfo(6))",
               :plot, T)
exec #print("plot transpose(2, lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot transpose(2, lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot transpose(\"bad\", lfo(6))",
               :nyerror, {"TRANSPOSE" 1 {{NUMBER SOUND} {}}})
exec #print("plot transpose(\"bad\", lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot transpose(\"bad\", lfo(6))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In TRANSPOSE, 1st argument must be a number or sound, got "bad", a STRING

exec ny:expect("plot transpose-abs(2, lfo(6))",
               :plot, T)
exec #print("plot transpose-abs(2, lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot transpose-abs(2, lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot transpose-abs(\"bad\", lfo(6))",
               :nyerror, {"TRANSPOSE-ABS" 1 {{NUMBER} {}}})
exec #print("plot transpose-abs(\"bad\", lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot transpose-abs(\"bad\", lfo(6))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In TRANSPOSE-ABS, 1st argument must be a number, got "bad", a STRING

exec ny:expect("plot control-warp(ramp() ~ 2, lfo(6))",
               :plot, T)
exec #print("plot control-warp(ramp() ~ 2, lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot control-warp(ramp() ~ 2, lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot control-warp(\"bad\", lfo(6))",
               :nyerror, {"CONTROL-WARP" 1 {{SOUND} "warp-fn"}})
exec #print("plot control-warp(\"bad\", lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot control-warp(\"bad\", lfo(6))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CONTROL-WARP, 1st argument (warp-fn) must be a sound, got "bad", a STRING

exec ny:expect("plot control-warp(ramp() ~ 2, \"bad\")",
               :nyerror, {"CONTROL-WARP" 2 {{SOUND} "control"}})
exec #print("plot control-warp(ramp() ~ 2, \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot control-warp(ramp() ~ 2, \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CONTROL-WARP, 2nd argument (control) must be a sound, got "bad", a STRING

exec ny:expect("plot control-warp(ramp() ~ 2, lfo(6), 100)",
               :plot, T)
exec #print("plot control-warp(ramp() ~ 2, lfo(6), 100)")
exec catch(quote(simulated-error), 
           sal-compile("plot control-warp(ramp() ~ 2, lfo(6), 100)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot control-warp(ramp() ~ 2, lfo(6), \"bad\")",
               :nyerror, {"CONTROL-WARP" 3 {{NUMBER} "wrate"}})
exec #print("plot control-warp(ramp() ~ 2, lfo(6), \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot control-warp(ramp() ~ 2, lfo(6), \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CONTROL-WARP, 3rd argument (wrate) must be a number, got "bad", a STRING

exec ny:expect("plot cue(lfo(6))",
               :plot, T)
exec #print("plot cue(lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot cue(lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot cue(vector(lfo(6), lfo(4)))[0]",
               :plot, T)
exec #print("plot cue(vector(lfo(6), lfo(4)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot cue(vector(lfo(6), lfo(4)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot cue(\"bad\")",
               :nyerror, {"CUE" 0 {{SOUND} {}}})
exec #print("plot cue(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot cue(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CUE, argument must be a sound or multichannel sound, got "bad", a STRING

exec ny:expect("plot sound(lfo(6))",
               :plot, T)
exec #print("plot sound(lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot sound(lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sound(vector(lfo(6), lfo(4)))[0]",
               :plot, T)
exec #print("plot sound(vector(lfo(6), lfo(4)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot sound(vector(lfo(6), lfo(4)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sound(\"bad\")",
               :nyerror, {"SOUND" 0 {{SOUND} {}}})
exec #print("plot sound(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot sound(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SOUND, argument must be a sound or multichannel sound, got "bad", a STRING

exec ny:expect("plot scale-srate(lfo(6), 2)",
               :plot, T)
exec #print("plot scale-srate(lfo(6), 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot scale-srate(lfo(6), 2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot scale-srate(\"bad\", 2)",
               :nyerror, {"SCALE-SRATE" 1 {{SOUND} "sound"}})
exec #print("plot scale-srate(\"bad\", 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot scale-srate(\"bad\", 2)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SCALE-SRATE, 1st argument (sound) must be a sound, got "bad", a STRING

exec ny:expect("plot scale-srate(lfo(6), \"bad\")",
               :nyerror, {"SCALE-SRATE" 2 {{NUMBER} "scale"}})
exec #print("plot scale-srate(lfo(6), \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot scale-srate(lfo(6), \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SCALE-SRATE, 2nd argument (scale) must be a number, got "bad", a STRING

exec ny:expect("plot shift-time(lfo(6), 1)",
               :plot, T)
exec #print("plot shift-time(lfo(6), 1)")
exec catch(quote(simulated-error), 
           sal-compile("plot shift-time(lfo(6), 1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot shift-time(\"bad\", 1)",
               :nyerror, {"SHIFT-TIME" 1 {{SOUND} "sound"}})
exec #print("plot shift-time(\"bad\", 1)")
exec catch(quote(simulated-error), 
           sal-compile("plot shift-time(\"bad\", 1)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SHIFT-TIME, 1st argument (sound) must be a sound, got "bad", a STRING

exec ny:expect("plot shift-time(lfo(6), \"bad\")",
               :nyerror, {"SHIFT-TIME" 2 {{NUMBER} "shift"}})
exec #print("plot shift-time(lfo(6), \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot shift-time(lfo(6), \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SHIFT-TIME, 2nd argument (shift) must be a number, got "bad", a STRING

exec ny:expect("plot control(lfo(6))",
               :plot, T)
exec #print("plot control(lfo(6))")
exec catch(quote(simulated-error), 
           sal-compile("plot control(lfo(6))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot control(vector(lfo(6), lfo(4)))[0]",
               :plot, T)
exec #print("plot control(vector(lfo(6), lfo(4)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot control(vector(lfo(6), lfo(4)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot control(\"bad\")",
               :nyerror, {"CONTROL" 0 {{SOUND} {}}})
exec #print("plot control(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot control(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CONTROL, argument must be a sound or multichannel sound, got "bad", a STRING

exec ny:expect("print s-save(osc(c4), ny:all, \"temp.wav\")",
               :print, 0.999999)
exec #print("print s-save(osc(c4), ny:all, \"temp.wav\")")
exec catch(quote(simulated-error), 
           sal-compile("print s-save(osc(c4), ny:all, \"temp.wav\")", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot cue-file(\"temp.wav\")",
               :plot, T)
exec #print("plot cue-file(\"temp.wav\")")
exec catch(quote(simulated-error), 
           sal-compile("plot cue-file(\"temp.wav\")", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot cue-file(lfo(1))",
               :nyerror, {"CUE-FILE" 0 {{STRING} "name"}})
exec #print("plot cue-file(lfo(1))")
exec catch(quote(simulated-error), 
           sal-compile("plot cue-file(lfo(1))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CUE-FILE, argument (name) must be a string, got a SOUND

exec ny:expect("plot env(0.1, 0.2, 0.3, 1, 0.9, 0.8)",
               :plot, T)
exec #print("plot env(0.1, 0.2, 0.3, 1, 0.9, 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot env(0.1, 0.2, 0.3, 1, 0.9, 0.8)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot env(0.1, 0.2, 0.3, 1, 0.9, 0.8, 2.0)",
               :plot, T)
exec #print("plot env(0.1, 0.2, 0.3, 1, 0.9, 0.8, 2.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot env(0.1, 0.2, 0.3, 1, 0.9, 0.8, 2.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot env(\"bad\", 0.2, 0.3, 1, 0.9, 0.8, 2.0)",
               :error, "In ENV, expected 6 numbers (t1, t2, t4, l1, l2, l3)")
exec #print("plot env(\"bad\", 0.2, 0.3, 1, 0.9, 0.8, 2.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot env(\"bad\", 0.2, 0.3, 1, 0.9, 0.8, 2.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot env(0.1, \"bad\", 0.3, 1, 0.9, 0.8, 2.0)",
               :error, "In ENV, expected 6 numbers (t1, t2, t4, l1, l2, l3)")
exec #print("plot env(0.1, \"bad\", 0.3, 1, 0.9, 0.8, 2.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot env(0.1, \"bad\", 0.3, 1, 0.9, 0.8, 2.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot env(0.1, 0.2, \"bad\", 1, 0.9, 0.8, 2.0)",
               :error, "In ENV, expected 6 numbers (t1, t2, t4, l1, l2, l3)")
exec #print("plot env(0.1, 0.2, \"bad\", 1, 0.9, 0.8, 2.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot env(0.1, 0.2, \"bad\", 1, 0.9, 0.8, 2.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot env(0.1, 0.2, 0.3, \"bad\", 0.9, 0.8, 2.0)",
               :error, "In ENV, expected 6 numbers (t1, t2, t4, l1, l2, l3)")
exec #print("plot env(0.1, 0.2, 0.3, \"bad\", 0.9, 0.8, 2.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot env(0.1, 0.2, 0.3, \"bad\", 0.9, 0.8, 2.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot env(0.1, 0.2, 0.3, 1, \"bad\", 0.8, 2.0)",
               :error, "In ENV, expected 6 numbers (t1, t2, t4, l1, l2, l3)")
exec #print("plot env(0.1, 0.2, 0.3, 1, \"bad\", 0.8, 2.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot env(0.1, 0.2, 0.3, 1, \"bad\", 0.8, 2.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot env(0.1, 0.2, 0.3, 1, 0.9, \"bad\", 2.0)",
               :error, "In ENV, expected 6 numbers (t1, t2, t4, l1, l2, l3)")
exec #print("plot env(0.1, 0.2, 0.3, 1, 0.9, \"bad\", 2.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot env(0.1, 0.2, 0.3, 1, 0.9, \"bad\", 2.0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot env(0.1, 0.2, 0.3, 1, 0.9, 0.8, \"bad\")",
               :nyerror, {"ENV" 7 {{NUMBER} "duration"}})
exec #print("plot env(0.1, 0.2, 0.3, 1, 0.9, 0.8, \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot env(0.1, 0.2, 0.3, 1, 0.9, 0.8, \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In ENV, 7th argument (duration) must be a number, got "bad", a STRING

exec ny:expect("plot gate(lfo(4), 0.01, 0.01, 0.01, 0.01, 0.3)",
               :plot, T)
exec #print("plot gate(lfo(4), 0.01, 0.01, 0.01, 0.01, 0.3)")
exec catch(quote(simulated-error), 
           sal-compile("plot gate(lfo(4), 0.01, 0.01, 0.01, 0.01, 0.3)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot gate(\"bad\", 0.01, 0.01, 0.01, 0.01, 0.3)",
               :nyerror, {"GATE" 1 {{SOUND} "sound"}})
exec #print("plot gate(\"bad\", 0.01, 0.01, 0.01, 0.01, 0.3)")
exec catch(quote(simulated-error), 
           sal-compile("plot gate(\"bad\", 0.01, 0.01, 0.01, 0.01, 0.3)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In GATE, 1st argument (sound) must be a sound, got "bad", a STRING

exec ny:expect("plot gate(lfo(4), \"bad\", 0.01, 0.01, 0.01, 0.3)",
               :nyerror, {"GATE" 2 {{NUMBER} "lookahead"}})
exec #print("plot gate(lfo(4), \"bad\", 0.01, 0.01, 0.01, 0.3)")
exec catch(quote(simulated-error), 
           sal-compile("plot gate(lfo(4), \"bad\", 0.01, 0.01, 0.01, 0.3)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In GATE, 2nd argument (lookahead) must be a number, got "bad", a STRING

exec ny:expect("plot gate(lfo(4), 0.01, \"bad\", 0.01, 0.01, 0.3)",
               :nyerror, {"GATE" 3 {{NUMBER} "risetime"}})
exec #print("plot gate(lfo(4), 0.01, \"bad\", 0.01, 0.01, 0.3)")
exec catch(quote(simulated-error), 
           sal-compile("plot gate(lfo(4), 0.01, \"bad\", 0.01, 0.01, 0.3)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In GATE, 3rd argument (risetime) must be a number, got "bad", a STRING

exec ny:expect("plot gate(lfo(4), 0.01, 0.01, \"bad\", 0.01, 0.3)",
               :nyerror, {"GATE" 4 {{NUMBER} "falltime"}})
exec #print("plot gate(lfo(4), 0.01, 0.01, \"bad\", 0.01, 0.3)")
exec catch(quote(simulated-error), 
           sal-compile("plot gate(lfo(4), 0.01, 0.01, \"bad\", 0.01, 0.3)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In GATE, 4th argument (falltime) must be a number, got "bad", a STRING

exec ny:expect("plot gate(lfo(4), 0.01, 0.01, 0.01, \"bad\", 0.3)",
               :nyerror, {"GATE" 5 {{NUMBER} "floor"}})
exec #print("plot gate(lfo(4), 0.01, 0.01, 0.01, \"bad\", 0.3)")
exec catch(quote(simulated-error), 
           sal-compile("plot gate(lfo(4), 0.01, 0.01, 0.01, \"bad\", 0.3)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In GATE, 5th argument (floor) must be a number, got "bad", a STRING

exec ny:expect("plot gate(lfo(4), 0.01, 0.01, 0.01, 0.01, \"bad\")",
               :nyerror, {"GATE" 6 {{NUMBER} "threshold"}})
exec #print("plot gate(lfo(4), 0.01, 0.01, 0.01, 0.01, \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot gate(lfo(4), 0.01, 0.01, 0.01, 0.01, \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In GATE, 6th argument (threshold) must be a number, got "bad", a STRING

exec ny:expect("plot osc-note(c4)",
               :plot, T)
exec #print("plot osc-note(c4)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-note(c4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc-note(c4, 2)",
               :plot, T)
exec #print("plot osc-note(c4, 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-note(c4, 2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7})",
               :plot, T)
exec #print("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7})")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7}, 0.8)",
               :plot, T)
exec #print("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7}, 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7}, 0.8)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7}, 0.8, *TABLE*)",
               :plot, T)
exec #print("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7}, 0.8, *TABLE*)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7}, 0.8, *TABLE*)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc-note(\"bad\")",
               :nyerror, {"OSC-NOTE" 1 {{STEP} "pitch"}})
exec #print("plot osc-note(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-note(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In OSC-NOTE, 1st argument (pitch) must be a step number, got "bad", a STRING

exec ny:expect("plot osc-note(c4, \"bad\")",
               :nyerror, {"OSC-NOTE" 2 {{NUMBER} "duration"}})
exec #print("plot osc-note(c4, \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-note(c4, \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In OSC-NOTE, 2nd argument (duration) must be a number, got "bad", a STRING

exec ny:expect("plot osc-note(c4, 1, \"bad\")",
               :error, "In OSCNOTE, 3rd argument (env-spec) must be a  list of 6 or 7 numbers to pass as arguments to ENV")
exec #print("plot osc-note(c4, 1, \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-note(c4, 1, \"bad\")", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7}, \"bad\")",
               :nyerror, {"OSC-NOTE" 4 {{NUMBER} "volume"}})
exec #print("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7}, \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7}, \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In OSC-NOTE, 4th argument (volume) must be a number, got "bad", a STRING

exec ny:expect("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7}, 0.8, \"bad\")",
               :error, "In OSC-NOTE, 5th argument (table) should be a list of 3 elements")
exec #print("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7}, 0.8, \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-note(c4, 1, {0.1 0.2 0.3 1 0.8 0.7}, 0.8, \"bad\")", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot force-srate(100, lfo(4))",
               :plot, T)
exec #print("plot force-srate(100, lfo(4))")
exec catch(quote(simulated-error), 
           sal-compile("plot force-srate(100, lfo(4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot force-srate(lfo(5), lfo(4))",
               :nyerror, {"FORCE-SRATE" 1 {{NUMBER} "sr"}})
exec #print("plot force-srate(lfo(5), lfo(4))")
exec catch(quote(simulated-error), 
           sal-compile("plot force-srate(lfo(5), lfo(4))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FORCE-SRATE, 1st argument (sr) must be a number, got a SOUND

exec ny:expect("plot force-srate(100, 50)",
               :nyerror, {"FORCE-SRATE" 2 {{SOUND} "snd"}})
exec #print("plot force-srate(100, 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot force-srate(100, 50)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FORCE-SRATE, 2nd argument (snd) must be a sound or multichannel sound, got 50, a FIXNUM

exec ny:expect("plot pwl(1, 1, 2)",
               :plot, T)
exec #print("plot pwl(1, 1, 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwl(1, 1, 2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwl(1, 1, nil)",
               :error, "In PWL, expected only numbers in breakpoint list, got NIL")
exec #print("plot pwl(1, 1, nil)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwl(1, 1, nil)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwl({1 1 2})",
               :error, "In PWL, expected only numbers in breakpoint list, got (1 1 2)")
exec #print("plot pwl({1 1 2})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwl({1 1 2})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlr(1, 1, 1)",
               :plot, T)
exec #print("plot pwlr(1, 1, 1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlr(1, 1, 1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlr({1 1 2})",
               :error, "In PWLR, expected only numbers in breakpoints list, got (1 1 2)")
exec #print("plot pwlr({1 1 2})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlr({1 1 2})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlr(1, 1, nil)",
               :error, "In PWLR, expected only numbers in breakpoints list, got NIL")
exec #print("plot pwlr(1, 1, nil)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlr(1, 1, nil)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwl-list({1 1 2})",
               :plot, T)
exec #print("plot pwl-list({1 1 2})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwl-list({1 1 2})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwl-list({1 1 nil})",
               :error, "In PWL-LIST, expected only numbers in breakpoint list, got NIL")
exec #print("plot pwl-list({1 1 nil})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwl-list({1 1 nil})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwl-list(1)",
               :error, "In PWL-LIST, expected a list of numbers")
exec #print("plot pwl-list(1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwl-list(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlr-list({1 1 1})",
               :plot, T)
exec #print("plot pwlr-list({1 1 1})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlr-list({1 1 1})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlr-list({1 1 nil})",
               :error, "In PWLR-LIST, expected only numbers in breakpoints list, got NIL")
exec #print("plot pwlr-list({1 1 nil})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlr-list({1 1 nil})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlr-list(1)",
               :error, "In PWLR-LIST, expected list of numbers, got 1")
exec #print("plot pwlr-list(1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlr-list(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlv(1, 1, 2)",
               :plot, T)
exec #print("plot pwlv(1, 1, 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlv(1, 1, 2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlv(1, 1, nil)",
               :error, "In PWLV, expected only numbers in breakpoint list")
exec #print("plot pwlv(1, 1, nil)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlv(1, 1, nil)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlv({1 1 2})",
               :error, "In PWLV, expected only numbers in breakpoint list")
exec #print("plot pwlv({1 1 2})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlv({1 1 2})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlv-list({1 1 2})",
               :plot, T)
exec #print("plot pwlv-list({1 1 2})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlv-list({1 1 2})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlv-list({1 1 nil})",
               :error, "In PWLV-LIST, expected only numbers in breakpoint list")
exec #print("plot pwlv-list({1 1 nil})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlv-list({1 1 nil})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlv-list(1)",
               :error, "In PWLV-LIST, expected list of numbers, got 1")
exec #print("plot pwlv-list(1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlv-list(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlvr(1, 1, 1)",
               :plot, T)
exec #print("plot pwlvr(1, 1, 1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlvr(1, 1, 1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlvr(1, 1, nil)",
               :error, "In PWLVR, expected only numbers in breakpoints list, got NIL")
exec #print("plot pwlvr(1, 1, nil)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlvr(1, 1, nil)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlvr({1 1 1})",
               :error, "In PWLVR, expected only numbers in breakpoints list, got (1 1 1)")
exec #print("plot pwlvr({1 1 1})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlvr({1 1 1})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlvr-list({1 1 1})",
               :plot, T)
exec #print("plot pwlvr-list({1 1 1})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlvr-list({1 1 1})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlvr-list({1 1 nil})",
               :error, "In PWLVR-LIST, expected only numbers in breakpoints list, got NIL")
exec #print("plot pwlvr-list({1 1 nil})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlvr-list({1 1 nil})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwlvr-list(1)",
               :error, "In PWLVR-LIST, expected list of numbers, got 1")
exec #print("plot pwlvr-list(1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwlvr-list(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwe(1, 2, 2)",
               :plot, T)
exec #print("plot pwe(1, 2, 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwe(1, 2, 2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwe(1, 2, nil)",
               :error, "In PWE, expected number in breakpoint list, got NIL")
exec #print("plot pwe(1, 2, nil)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwe(1, 2, nil)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwe({1 2 2})",
               :error, "In PWE, expected number in breakpoint list, got (1 2 2)")
exec #print("plot pwe({1 2 2})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwe({1 2 2})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwer(1, 2, 1)",
               :plot, T)
exec #print("plot pwer(1, 2, 1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwer(1, 2, 1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwer({1 2 2})",
               :error, "In PWER, expected only numbers in breakpoints list, got (1 2 2)")
exec #print("plot pwer({1 2 2})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwer({1 2 2})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwer(1, 2, nil)",
               :error, "In PWER, expected only numbers in breakpoints list, got NIL")
exec #print("plot pwer(1, 2, nil)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwer(1, 2, nil)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwe-list({1 2 2})",
               :plot, T)
exec #print("plot pwe-list({1 2 2})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwe-list({1 2 2})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwe-list({1 2 nil})",
               :error, "In PWE-LIST, expected number in breakpoint list, got NIL")
exec #print("plot pwe-list({1 2 nil})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwe-list({1 2 nil})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwe-list(1)",
               :error, "In PWE-LIST, expected list of numbers, got 1")
exec #print("plot pwe-list(1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwe-list(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwer-list({1 2 1})",
               :plot, T)
exec #print("plot pwer-list({1 2 1})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwer-list({1 2 1})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwer-list({1 2 nil})",
               :error, "In PWER-LIST, expected only numbers in breakpoints list, got NIL")
exec #print("plot pwer-list({1 2 nil})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwer-list({1 2 nil})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwer-list(1)",
               :error, "In PWER-LIST, expected list of numbers, got 1")
exec #print("plot pwer-list(1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwer-list(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwev(1, 2, 2)",
               :plot, T)
exec #print("plot pwev(1, 2, 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwev(1, 2, 2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwev(1, 2, nil)",
               :error, "In PWEV, expected number in breakpoint list, got NIL")
exec #print("plot pwev(1, 2, nil)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwev(1, 2, nil)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwev({1 2 2})",
               :error, "In PWEV, expected number in breakpoint list, got (1 2 2)")
exec #print("plot pwev({1 2 2})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwev({1 2 2})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwev-list({1 2 2})",
               :plot, T)
exec #print("plot pwev-list({1 2 2})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwev-list({1 2 2})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwev-list({1 2 nil})",
               :error, "In PWEV-LIST, expected number in breakpoint list, got NIL")
exec #print("plot pwev-list({1 2 nil})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwev-list({1 2 nil})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwev-list(1)",
               :error, "In PWEV-LIST, expected list of numbers, got 1")
exec #print("plot pwev-list(1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwev-list(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwevr(1, 2, 2)",
               :plot, T)
exec #print("plot pwevr(1, 2, 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwevr(1, 2, 2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwevr(1, 2, nil)",
               :error, "In PWEVR, expected only numbers in breakpoints list, got NIL")
exec #print("plot pwevr(1, 2, nil)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwevr(1, 2, nil)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwevr({1 2 2})",
               :error, "In PWEVR, expected only numbers in breakpoints list, got (1 2 2)")
exec #print("plot pwevr({1 2 2})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwevr({1 2 2})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwevr-list({1 2 2})",
               :plot, T)
exec #print("plot pwevr-list({1 2 2})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwevr-list({1 2 2})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwevr-list({1 2 nil})",
               :error, "In PWEVR-LIST, expected only numbers in breakpoints list, got NIL")
exec #print("plot pwevr-list({1 2 nil})")
exec catch(quote(simulated-error), 
           sal-compile("plot pwevr-list({1 2 nil})", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pwevr-list(1)",
               :error, "In PWEVR-LIST, expected list of numbers, got 1")
exec #print("plot pwevr-list(1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pwevr-list(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sound-warp(ramp(), lfo(4))",
               :plot, T)
exec #print("plot sound-warp(ramp(), lfo(4))")
exec catch(quote(simulated-error), 
           sal-compile("plot sound-warp(ramp(), lfo(4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sound-warp(ramp(), lfo(4), 100)",
               :plot, T)
exec #print("plot sound-warp(ramp(), lfo(4), 100)")
exec catch(quote(simulated-error), 
           sal-compile("plot sound-warp(ramp(), lfo(4), 100)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sound-warp(1, lfo(4), 100)",
               :nyerror, {"SOUND-WARP" 1 {{SOUND} "warp-fn"}})
exec #print("plot sound-warp(1, lfo(4), 100)")
exec catch(quote(simulated-error), 
           sal-compile("plot sound-warp(1, lfo(4), 100)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SOUND-WARP, 1st argument (warp-fn) must be a sound, got 1, a FIXNUM

exec ny:expect("plot sound-warp(ramp(), 4)",
               :nyerror, {"SOUND-WARP" 2 {{SOUND} "signal"}})
exec #print("plot sound-warp(ramp(), 4)")
exec catch(quote(simulated-error), 
           sal-compile("plot sound-warp(ramp(), 4)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SOUND-WARP, 2nd argument (signal) must be a sound, got 4, a FIXNUM

exec ny:expect("plot sound-warp(ramp(), lfo(4), \"bad\")",
               :nyerror, {"SOUND-WARP" 3 {{NUMBER} "wrate"}})
exec #print("plot sound-warp(ramp(), lfo(4), \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot sound-warp(ramp(), lfo(4), \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SOUND-WARP, 3rd argument (wrate) must be a number, got "bad", a STRING

exec ny:expect("print snd-extent(lfo(4), 100000)",
               :print, {0 1})
exec #print("print snd-extent(lfo(4), 100000)")
exec catch(quote(simulated-error), 
           sal-compile("print snd-extent(lfo(4), 100000)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print snd-extent(vector(lfo(4), lfo(3)), 100000)",
               :nyerror, {"SND-EXTENT" 1 {{SOUND} "sound"}})
exec #print("print snd-extent(vector(lfo(4), lfo(3)), 100000)")
exec catch(quote(simulated-error), 
           sal-compile("print snd-extent(vector(lfo(4), lfo(3)), 100000)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SND-EXTENT, 1st argument (sound) must be a sound, got a 2-channel SOUND

exec ny:expect("print snd-extent(lfo(4), \"bad\")",
               :nyerror, {"SND-EXTENT" 2 {{INTEGER} "maxsamples"}})
exec #print("print snd-extent(lfo(4), \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("print snd-extent(lfo(4), \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SND-EXTENT, 2nd argument (maxsamples) must be a integer, got "bad", a STRING

exec ny:expect("print length(maketable(lfo(4)))",
               :print, 3)
exec #print("print length(maketable(lfo(4)))")
exec catch(quote(simulated-error), 
           sal-compile("print length(maketable(lfo(4)))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print maketable(7)",
               :nyerror, {"MAKETABLE" 0 {{SOUND} {}}})
exec #print("print maketable(7)")
exec catch(quote(simulated-error), 
           sal-compile("print maketable(7)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In MAKETABLE, argument must be a sound, got 7, a FIXNUM

exec ny:expect("plot pan(osc(c5), 0.4)[0]",
               :plot, T)
exec #print("plot pan(osc(c5), 0.4)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot pan(osc(c5), 0.4)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pan(osc(c5), 1 + lfo(3) * 0.5)[0]",
               :plot, T)
exec #print("plot pan(osc(c5), 1 + lfo(3) * 0.5)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot pan(osc(c5), 1 + lfo(3) * 0.5)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pan(10, 0.4)[0]",
               :nyerror, {"PAN" 1 {{SOUND} "sound"}})
exec #print("plot pan(10, 0.4)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot pan(10, 0.4)[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PAN, 1st argument (sound) must be a sound, got 10, a FIXNUM

exec ny:expect("plot pan(osc(c5), \"bad\")[0]",
               :nyerror, {"PAN" 2 {{NUMBER SOUND} "where"}})
exec #print("plot pan(osc(c5), \"bad\")[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot pan(osc(c5), \"bad\")[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PAN, 2nd argument (where) must be a number or sound, got "bad", a STRING

exec ny:expect("plot prod()",
               :plot, T)
exec #print("plot prod()")
exec catch(quote(simulated-error), 
           sal-compile("plot prod()", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(lfo(1))",
               :plot, T)
exec #print("plot prod(lfo(1))")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(lfo(1))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(lfo(1), lfo(2))",
               :plot, T)
exec #print("plot prod(lfo(1), lfo(2))")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(lfo(1), lfo(2))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(lfo(1), lfo(2), lfo(3))",
               :plot, T)
exec #print("plot prod(lfo(1), lfo(2), lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(lfo(1), lfo(2), lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print prod(1)",
               :print, 1)
exec #print("print prod(1)")
exec catch(quote(simulated-error), 
           sal-compile("print prod(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(2, lfo(2))",
               :plot, T)
exec #print("plot prod(2, lfo(2))")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(2, lfo(2))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(lfo(2), 2)",
               :plot, T)
exec #print("plot prod(lfo(2), 2)")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(lfo(2), 2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(2, lfo(2), lfo(3))",
               :plot, T)
exec #print("plot prod(2, lfo(2), lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(2, lfo(2), lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(lfo(1), 2, lfo(3))",
               :plot, T)
exec #print("plot prod(lfo(1), 2, lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(lfo(1), 2, lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(lfo(1), lfo(2), 3)",
               :plot, T)
exec #print("plot prod(lfo(1), lfo(2), 3)")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(lfo(1), lfo(2), 3)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(vector(lfo(1), lfo(2)), vector(lfo(1), lfo(2)))[0]",
               :plot, T)
exec #print("plot prod(vector(lfo(1), lfo(2)), vector(lfo(1), lfo(2)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(vector(lfo(1), lfo(2)), vector(lfo(1), lfo(2)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(lfo(1), vector(lfo(1), lfo(2)))[0]",
               :plot, T)
exec #print("plot prod(lfo(1), vector(lfo(1), lfo(2)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(lfo(1), vector(lfo(1), lfo(2)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(2, vector(lfo(1), lfo(2)))[0]",
               :plot, T)
exec #print("plot prod(2, vector(lfo(1), lfo(2)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(2, vector(lfo(1), lfo(2)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(vector(lfo(1), lfo(2)), lfo(3))[0]",
               :plot, T)
exec #print("plot prod(vector(lfo(1), lfo(2)), lfo(3))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(vector(lfo(1), lfo(2)), lfo(3))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(vector(lfo(1), lfo(2)), 3)[0]",
               :plot, T)
exec #print("plot prod(vector(lfo(1), lfo(2)), 3)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(vector(lfo(1), lfo(2)), 3)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot prod(vector(lfo(1), lfo(2)), vector(lfo(1), lfo(2), lfo(3)))[0] ; bad",
               :error, "In PROD (or * in SAL), unequal number of channels, got a 2-channel SOUND and a 3-channel SOUND")
exec #print("plot prod(vector(lfo(1), lfo(2)), vector(lfo(1), lfo(2), lfo(3)))[0] ; bad")
exec catch(quote(simulated-error), 
           sal-compile("plot prod(vector(lfo(1), lfo(2)), vector(lfo(1), lfo(2), lfo(3)))[0] ; bad", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot ramp()",
               :plot, T)
exec #print("plot ramp()")
exec catch(quote(simulated-error), 
           sal-compile("plot ramp()", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot ramp(3)",
               :plot, T)
exec #print("plot ramp(3)")
exec catch(quote(simulated-error), 
           sal-compile("plot ramp(3)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot ramp(lfo(3))",
               :nyerror, {"RAMP" 0 {{NUMBER} {}}})
exec #print("plot ramp(lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot ramp(lfo(3))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In RAMP, argument must be a number, got a SOUND

exec ny:expect("plot resample(osc(c2), 10000)",
               :plot, T)
exec #print("plot resample(osc(c2), 10000)")
exec catch(quote(simulated-error), 
           sal-compile("plot resample(osc(c2), 10000)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot resample(vector(osc(c2), osc(d2)), 10000)[0]",
               :plot, T)
exec #print("plot resample(vector(osc(c2), osc(d2)), 10000)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot resample(vector(osc(c2), osc(d2)), 10000)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot scale(0.2, osc(c4))",
               :plot, T)
exec #print("plot scale(0.2, osc(c4))")
exec catch(quote(simulated-error), 
           sal-compile("plot scale(0.2, osc(c4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot scale(0.2, vector(osc(c4), osc(c5)))[0]",
               :plot, T)
exec #print("plot scale(0.2, vector(osc(c4), osc(c5)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot scale(0.2, vector(osc(c4), osc(c5)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot scale(vector(0.2, 0.3), vector(osc(c4), osc(c5)))[0]",
               :plot, T)
exec #print("plot scale(vector(0.2, 0.3), vector(osc(c4), osc(c5)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot scale(vector(0.2, 0.3), vector(osc(c4), osc(c5)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot scale(vector(0.2, 0.3, 0.4), vector(osc(c4), osc(c5))) ; bad",
               :error, "In SCALE, two arguments are multichannels of differing length, got #(0.2 0.3 0.4), an ARRAY, and a 2-channel SOUND")
exec #print("plot scale(vector(0.2, 0.3, 0.4), vector(osc(c4), osc(c5))) ; bad")
exec catch(quote(simulated-error), 
           sal-compile("plot scale(vector(0.2, 0.3, 0.4), vector(osc(c4), osc(c5))) ; bad", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot scale(\"Bad\", osc(c4))",
               :nyerror, {"SCALE" 1 {{NUMBER} "amt"}})
exec #print("plot scale(\"Bad\", osc(c4))")
exec catch(quote(simulated-error), 
           sal-compile("plot scale(\"Bad\", osc(c4))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SCALE, 1st argument (amt) must be a number or array of numbers, got "Bad", a STRING

exec ny:expect("plot scale(0.2, \"bad\")",
               :nyerror, {"SCALE" 2 {{SOUND} "snd"}})
exec #print("plot scale(0.2, \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot scale(0.2, \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SCALE, 2nd argument (snd) must be a sound or multichannel sound, got "bad", a STRING

exec ny:expect("print peak(osc(c4), ny:all)",
               :print, 0.999999)
exec #print("print peak(osc(c4), ny:all)")
exec catch(quote(simulated-error), 
           sal-compile("print peak(osc(c4), ny:all)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-max(lfo(2), lfo(3))",
               :plot, T)
exec #print("plot s-max(lfo(2), lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot s-max(lfo(2), lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-max(vector(lfo(2), lfo(4)), lfo(3))[0]",
               :plot, T)
exec #print("plot s-max(vector(lfo(2), lfo(4)), lfo(3))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot s-max(vector(lfo(2), lfo(4)), lfo(3))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-max(lfo(2), vector(lfo(4), lfo(3)))[0]",
               :plot, T)
exec #print("plot s-max(lfo(2), vector(lfo(4), lfo(3)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot s-max(lfo(2), vector(lfo(4), lfo(3)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-max(2, lfo(3))",
               :plot, T)
exec #print("plot s-max(2, lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot s-max(2, lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-max(lfo(2), 3)",
               :plot, T)
exec #print("plot s-max(lfo(2), 3)")
exec catch(quote(simulated-error), 
           sal-compile("plot s-max(lfo(2), 3)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-min(lfo(2), lfo(3))",
               :plot, T)
exec #print("plot s-min(lfo(2), lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot s-min(lfo(2), lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-min(vector(lfo(2), lfo(4)), lfo(3))[0]",
               :plot, T)
exec #print("plot s-min(vector(lfo(2), lfo(4)), lfo(3))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot s-min(vector(lfo(2), lfo(4)), lfo(3))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-min(lfo(2), vector(lfo(4), lfo(3)))[0]",
               :plot, T)
exec #print("plot s-min(lfo(2), vector(lfo(4), lfo(3)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot s-min(lfo(2), vector(lfo(4), lfo(3)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-min(2, lfo(3))",
               :plot, T)
exec #print("plot s-min(2, lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot s-min(2, lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-min(lfo(2), 45)",
               :plot, T)
exec #print("plot s-min(lfo(2), 45)")
exec catch(quote(simulated-error), 
           sal-compile("plot s-min(lfo(2), 45)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot set-logical-stop(osc(c4), 0.5)",
               :plot, T)
exec #print("plot set-logical-stop(osc(c4), 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot set-logical-stop(osc(c4), 0.5)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot set-logical-stop(vector(osc(c4), osc(d4)), 0.5)[0]",
               :plot, T)
exec #print("plot set-logical-stop(vector(osc(c4), osc(d4)), 0.5)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot set-logical-stop(vector(osc(c4), osc(d4)), 0.5)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot set-logical-stop(osc(c4), 0.5)",
               :plot, T)
exec #print("plot set-logical-stop(osc(c4), 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot set-logical-stop(osc(c4), 0.5)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot set-logical-stop(c4, 0.5)",
               :nyerror, {"SET-LOGICAL-STOP" 1 {{SOUND} "snd"}})
exec #print("plot set-logical-stop(c4, 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot set-logical-stop(c4, 0.5)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SET-LOGICAL-STOP, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot set-logical-stop(osc(c4), vector(2, 3))[0]",
               :nyerror, {"SET-LOGICAL-STOP" 2 {{NUMBER} "logical stop time"}})
exec #print("plot set-logical-stop(osc(c4), vector(2, 3))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot set-logical-stop(osc(c4), vector(2, 3))[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SET-LOGICAL-STOP, 2nd argument (logical stop time) must be a number, got #(2 3), an ARRAY

exec ny:expect("plot set-logical-stop(osc(c4), \"bad\")",
               :nyerror, {"SET-LOGICAL-STOP" 2 {{NUMBER} "logical stop time"}})
exec #print("plot set-logical-stop(osc(c4), \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot set-logical-stop(osc(c4), \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SET-LOGICAL-STOP, 2nd argument (logical stop time) must be a number, got "bad", a STRING

exec ny:expect("plot set-logical-stop-abs(osc(c4), 0.5)",
               :plot, T)
exec #print("plot set-logical-stop-abs(osc(c4), 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot set-logical-stop-abs(osc(c4), 0.5)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot set-logical-stop-abs(vector(osc(c4), osc(d4)), 0.5)[0]",
               :plot, T)
exec #print("plot set-logical-stop-abs(vector(osc(c4), osc(d4)), 0.5)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot set-logical-stop-abs(vector(osc(c4), osc(d4)), 0.5)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot set-logical-stop-abs(osc(c4), 0.5)",
               :plot, T)
exec #print("plot set-logical-stop-abs(osc(c4), 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot set-logical-stop-abs(osc(c4), 0.5)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot set-logical-stop-abs(c4, 0.5)",
               :nyerror, {"SET-LOGICAL-STOP-ABS" 1 {{SOUND} "snd"}})
exec #print("plot set-logical-stop-abs(c4, 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot set-logical-stop-abs(c4, 0.5)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SET-LOGICAL-STOP-ABS, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot set-logical-stop-abs(osc(c4), vector(2, 3))[0]",
               :nyerror, {"SET-LOGICAL-STOP-ABS" 2 {{NUMBER} "logical stop time"}})
exec #print("plot set-logical-stop-abs(osc(c4), vector(2, 3))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot set-logical-stop-abs(osc(c4), vector(2, 3))[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SET-LOGICAL-STOP-ABS, 2nd argument (logical stop time) must be a number, got #(2 3), an ARRAY

exec ny:expect("plot set-logical-stop-abs(osc(c4), \"bad\")",
               :nyerror, {"SET-LOGICAL-STOP-ABS" 2 {{NUMBER} "logical stop time"}})
exec #print("plot set-logical-stop-abs(osc(c4), \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot set-logical-stop-abs(osc(c4), \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SET-LOGICAL-STOP-ABS, 2nd argument (logical stop time) must be a number, got "bad", a STRING

exec ny:expect("plot sim(lfo(3))",
               :plot, T)
exec #print("plot sim(lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot sim(lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sim(lfo(3), lfo(4))",
               :plot, T)
exec #print("plot sim(lfo(3), lfo(4))")
exec catch(quote(simulated-error), 
           sal-compile("plot sim(lfo(3), lfo(4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sim(lfo(3), lfo(4), lfo(5))",
               :plot, T)
exec #print("plot sim(lfo(3), lfo(4), lfo(5))")
exec catch(quote(simulated-error), 
           sal-compile("plot sim(lfo(3), lfo(4), lfo(5))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sim(3, lfo(4))",
               :plot, T)
exec #print("plot sim(3, lfo(4))")
exec catch(quote(simulated-error), 
           sal-compile("plot sim(3, lfo(4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot sim(lfo(3), 4)",
               :plot, T)
exec #print("plot sim(lfo(3), 4)")
exec catch(quote(simulated-error), 
           sal-compile("plot sim(lfo(3), 4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot simrep(i, 2, lfo(i + 4))",
               :plot, T)
exec #print("plot simrep(i, 2, lfo(i + 4))")
exec catch(quote(simulated-error), 
           sal-compile("plot simrep(i, 2, lfo(i + 4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot simrep(i, 2, #?(i = 0, lfo(3), 5))",
               :plot, T)
exec #print("plot simrep(i, 2, #?(i = 0, lfo(3), 5))")
exec catch(quote(simulated-error), 
           sal-compile("plot simrep(i, 2, #?(i = 0, lfo(3), 5))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot simrep(i, 2, vector(lfo(i + 4), lfo(i + 3)))[0]",
               :plot, T)
exec #print("plot simrep(i, 2, vector(lfo(i + 4), lfo(i + 3)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot simrep(i, 2, vector(lfo(i + 4), lfo(i + 3)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-rest()",
               :plot, T)
exec #print("plot s-rest()")
exec catch(quote(simulated-error), 
           sal-compile("plot s-rest()", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-rest(2)",
               :plot, T)
exec #print("plot s-rest(2)")
exec catch(quote(simulated-error), 
           sal-compile("plot s-rest(2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-rest(2, 2)[0]",
               :plot, T)
exec #print("plot s-rest(2, 2)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot s-rest(2, 2)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-rest(\"bad\")",
               :nyerror, {"S-REST" 1 {{NUMBER} "dur"}})
exec #print("plot s-rest(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot s-rest(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In S-REST, 1st argument (dur) must be a number, got "bad", a STRING

exec ny:expect("plot s-rest(2, 2.2)[0]",
               :nyerror, {"S-REST" 2 {{INTEGER} "chans"}})
exec #print("plot s-rest(2, 2.2)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot s-rest(2, 2.2)[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In S-REST, 2nd argument (chans) must be a integer, got 2.2, a FLONUM

exec ny:expect("plot tempo(ramp())",
               :plot, T)
exec #print("plot tempo(ramp())")
exec catch(quote(simulated-error), 
           sal-compile("plot tempo(ramp())", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot tempo(60)",
               :nyerror, {"TEMPO" 0 {{SOUND} "warpfn"}})
exec #print("plot tempo(60)")
exec catch(quote(simulated-error), 
           sal-compile("plot tempo(60)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In TEMPO, argument (warpfn) must be a sound, got 60, a FIXNUM

exec ny:expect("plot warp(ramp(2), lfo(3))",
               :plot, T)
exec #print("plot warp(ramp(2), lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot warp(ramp(2), lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot warp(2, lfo(3))",
               :nyerror, {"WARP" 1 {{SOUND} "warp function"}})
exec #print("plot warp(2, lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot warp(2, lfo(3))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In WARP, 1st argument (warp function) must be a sound, got 2, a FIXNUM

exec ny:expect("print warp(ramp(2), 3)",
               :print, 3)
exec #print("print warp(ramp(2), 3)")
exec catch(quote(simulated-error), 
           sal-compile("print warp(ramp(2), 3)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot warp-abs(ramp(2), lfo(3))",
               :plot, T)
exec #print("plot warp-abs(ramp(2), lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot warp-abs(ramp(2), lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot warp-abs(2, lfo(3))",
               :nyerror, {"WARP-ABS" 1 {{NULL SOUND} {}}})
exec #print("plot warp-abs(2, lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot warp-abs(2, lfo(3))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In WARP-ABS, 1st argument must be a sound or NIL, got 2, a FIXNUM

exec ny:expect("print warp-abs(ramp(2), 3)",
               :print, 3)
exec #print("print warp-abs(ramp(2), 3)")
exec catch(quote(simulated-error), 
           sal-compile("print warp-abs(ramp(2), 3)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot exp-dec(1, 2, 5)  ",
               :plot, T)
exec #print("plot exp-dec(1, 2, 5)  ")
exec catch(quote(simulated-error), 
           sal-compile("plot exp-dec(1, 2, 5)  ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot exp-dec(lfo(1), 2, 5)  ",
               :nyerror, {"EXP-DEC" 1 {{NUMBER} "hold"}})
exec #print("plot exp-dec(lfo(1), 2, 5)  ")
exec catch(quote(simulated-error), 
           sal-compile("plot exp-dec(lfo(1), 2, 5)  ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EXP-DEC, 1st argument (hold) must be a number, got a SOUND

exec ny:expect("plot exp-dec(1, lfo(1), 5)  ",
               :nyerror, {"EXP-DEC" 2 {{NUMBER} "halfdec"}})
exec #print("plot exp-dec(1, lfo(1), 5)  ")
exec catch(quote(simulated-error), 
           sal-compile("plot exp-dec(1, lfo(1), 5)  ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EXP-DEC, 2nd argument (halfdec) must be a number, got a SOUND

exec ny:expect("plot exp-dec(1, 2, lfo(1))  ",
               :nyerror, {"EXP-DEC" 3 {{NUMBER} "length"}})
exec #print("plot exp-dec(1, 2, lfo(1))  ")
exec catch(quote(simulated-error), 
           sal-compile("plot exp-dec(1, 2, lfo(1))  ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EXP-DEC, 3rd argument (length) must be a number, got a SOUND

exec ny:expect("plot lfo(3) - lfo(4)",
               :plot, T)
exec #print("plot lfo(3) - lfo(4)")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(3) - lfo(4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lfo(3) - 4",
               :plot, T)
exec #print("plot lfo(3) - 4")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(3) - 4", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot 3 - lfo(4)",
               :plot, T)
exec #print("plot 3 - lfo(4)")
exec catch(quote(simulated-error), 
           sal-compile("plot 3 - lfo(4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print 3 - 4",
               :print, -1)
exec #print("print 3 - 4")
exec catch(quote(simulated-error), 
           sal-compile("print 3 - 4", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot \"bad\" - lfo(4)",
               :nyerror, {"DIFF (or - in SAL)" 0 {{NUMBER SOUND} {}}})
exec #print("plot \"bad\" - lfo(4)")
exec catch(quote(simulated-error), 
           sal-compile("plot \"bad\" - lfo(4)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In DIFF (or - in SAL), argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("print lfo(3) - \"bad\"",
               :nyerror, {"DIFF (or - in SAL)" 0 {{NUMBER SOUND} {}}})
exec #print("print lfo(3) - \"bad\"")
exec catch(quote(simulated-error), 
           sal-compile("print lfo(3) - \"bad\"", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In DIFF (or - in SAL), argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("plot (vector(lfo(1), lfo(2)) - 3)[0]",
               :plot, T)
exec #print("plot (vector(lfo(1), lfo(2)) - 3)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot (vector(lfo(1), lfo(2)) - 3)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot (3 - vector(lfo(1), lfo(2)))[0]",
               :plot, T)
exec #print("plot (3 - vector(lfo(1), lfo(2)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot (3 - vector(lfo(1), lfo(2)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot (vector(lfo(1), lfo(2)) - vector(lfo(3)))[0]",
               :plot, T)
exec #print("plot (vector(lfo(1), lfo(2)) - vector(lfo(3)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot (vector(lfo(1), lfo(2)) - vector(lfo(3)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lfo(3) + lfo(4)",
               :plot, T)
exec #print("plot lfo(3) + lfo(4)")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(3) + lfo(4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lfo(3) + 4",
               :plot, T)
exec #print("plot lfo(3) + 4")
exec catch(quote(simulated-error), 
           sal-compile("plot lfo(3) + 4", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot 3 + lfo(4)",
               :plot, T)
exec #print("plot 3 + lfo(4)")
exec catch(quote(simulated-error), 
           sal-compile("plot 3 + lfo(4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print 3 + 4",
               :print, 7)
exec #print("print 3 + 4")
exec catch(quote(simulated-error), 
           sal-compile("print 3 + 4", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot \"bad\" + lfo(4)",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("plot \"bad\" + lfo(4)")
exec catch(quote(simulated-error), 
           sal-compile("plot \"bad\" + lfo(4)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("print lfo(3) + \"bad\"",
               :nyerror, {"+ operation in SAL" 0 {{NUMBER SOUND} {}}})
exec #print("print lfo(3) + \"bad\"")
exec catch(quote(simulated-error), 
           sal-compile("print lfo(3) + \"bad\"", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In + operation in SAL, argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("plot (vector(lfo(1), lfo(2)) + 3)[0] ",
               :plot, T)
exec #print("plot (vector(lfo(1), lfo(2)) + 3)[0] ")
exec catch(quote(simulated-error), 
           sal-compile("plot (vector(lfo(1), lfo(2)) + 3)[0] ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot (3 + vector(lfo(1), lfo(2)))[0] ",
               :plot, T)
exec #print("plot (3 + vector(lfo(1), lfo(2)))[0] ")
exec catch(quote(simulated-error), 
           sal-compile("plot (3 + vector(lfo(1), lfo(2)))[0] ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot (vector(lfo(1), lfo(2)) + vector(lfo(3)))[0] ",
               :plot, T)
exec #print("plot (vector(lfo(1), lfo(2)) + vector(lfo(3)))[0] ")
exec catch(quote(simulated-error), 
           sal-compile("plot (vector(lfo(1), lfo(2)) + vector(lfo(3)))[0] ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot compare(lfo(3), lfo(4))",
               :plot, T)
exec #print("plot compare(lfo(3), lfo(4))")
exec catch(quote(simulated-error), 
           sal-compile("plot compare(lfo(3), lfo(4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot compare(lfo(3), 0.8)",
               :plot, T)
exec #print("plot compare(lfo(3), 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot compare(lfo(3), 0.8)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot compare(0.8, lfo(3))",
               :plot, T)
exec #print("plot compare(0.8, lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot compare(0.8, lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot compare(lfo(3), \"bad\")",
               :nyerror, {"COMPARE" 2 {{SOUND NUMBER} {}}})
exec #print("plot compare(lfo(3), \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot compare(lfo(3), \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In COMPARE, 2nd argument must be a number or sound, got "bad", a STRING

exec ny:expect("plot compare(\"bad\", lfo(3))",
               :nyerror, {"COMPARE" 1 {{SOUND NUMBER} {}}})
exec #print("plot compare(\"bad\", lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot compare(\"bad\", lfo(3))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In COMPARE, 1st argument must be a number or sound, got "bad", a STRING

exec ny:expect("plot compare(vector(lfo(1), lfo(2)), 3)[0]",
               :error, "In COMPARE, either first or second argument must be a sound")
exec #print("plot compare(vector(lfo(1), lfo(2)), 3)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot compare(vector(lfo(1), lfo(2)), 3)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot compare(3, vector(lfo(1), lfo(2)))[0]",
               :error, "In COMPARE, either first or second argument must be a sound")
exec #print("plot compare(3, vector(lfo(1), lfo(2)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot compare(3, vector(lfo(1), lfo(2)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot compare(vector(lfo(1), lfo(2)), vector(lfo(3)))[0] ",
               :error, "In COMPARE, either first or second argument must be a sound")
exec #print("plot compare(vector(lfo(1), lfo(2)), vector(lfo(3)))[0] ")
exec catch(quote(simulated-error), 
           sal-compile("plot compare(vector(lfo(1), lfo(2)), vector(lfo(3)))[0] ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot compare(vector(lfo(1), lfo(2)), lfo(3))[0]  ",
               :nyerror, {"COMPARE" 1 {{SOUND NUMBER} {}}})
exec #print("plot compare(vector(lfo(1), lfo(2)), lfo(3))[0]  ")
exec catch(quote(simulated-error), 
           sal-compile("plot compare(vector(lfo(1), lfo(2)), lfo(3))[0]  ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In COMPARE, 1st argument must be a number or sound, got a 2-channel SOUND

exec ny:expect("plot compare(lfo(3), vector(lfo(1), lfo(2)))[0]  ",
               :nyerror, {"COMPARE" 2 {{SOUND NUMBER} {}}})
exec #print("plot compare(lfo(3), vector(lfo(1), lfo(2)))[0]  ")
exec catch(quote(simulated-error), 
           sal-compile("plot compare(lfo(3), vector(lfo(1), lfo(2)))[0]  ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In COMPARE, 2nd argument must be a number or sound, got a 2-channel SOUND

exec ny:expect("plot osc-saw(400)",
               :plot, T)
exec #print("plot osc-saw(400)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-saw(400)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc-saw(lfo(100) + 100)",
               :plot, T)
exec #print("plot osc-saw(lfo(100) + 100)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-saw(lfo(100) + 100)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc-tri(400)",
               :plot, T)
exec #print("plot osc-tri(400)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-tri(400)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot osc-tri(lfo(100) + 100)",
               :plot, T)
exec #print("plot osc-tri(lfo(100) + 100)")
exec catch(quote(simulated-error), 
           sal-compile("plot osc-tri(lfo(100) + 100)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot tapv(osc(c4), 0.1, lfo(2) * 0.02, 0.2)    ",
               :plot, T)
exec #print("plot tapv(osc(c4), 0.1, lfo(2) * 0.02, 0.2)    ")
exec catch(quote(simulated-error), 
           sal-compile("plot tapv(osc(c4), 0.1, lfo(2) * 0.02, 0.2)    ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot tapv(c4, 0.1, lfo(2) * 0.02, 0.2)   ",
               :nyerror, {"TAPV" 1 {{SOUND} "snd"}})
exec #print("plot tapv(c4, 0.1, lfo(2) * 0.02, 0.2)   ")
exec catch(quote(simulated-error), 
           sal-compile("plot tapv(c4, 0.1, lfo(2) * 0.02, 0.2)   ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In TAPV, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot tapv(osc(c4), 0.1, 0.02, 0.2)  ",
               :nyerror, {"TAPV" 3 {{SOUND} "vardelay"}})
exec #print("plot tapv(osc(c4), 0.1, 0.02, 0.2)  ")
exec catch(quote(simulated-error), 
           sal-compile("plot tapv(osc(c4), 0.1, 0.02, 0.2)  ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In TAPV, 3rd argument (vardelay) must be a sound or multichannel sound, got 0.02, a FLONUM

exec ny:expect("plot tapv(osc(c4), const(0.1), lfo(2) * 0.02, 0.2)   ",
               :nyerror, {"TAPV" 2 {{NUMBER} "offset"}})
exec #print("plot tapv(osc(c4), const(0.1), lfo(2) * 0.02, 0.2)   ")
exec catch(quote(simulated-error), 
           sal-compile("plot tapv(osc(c4), const(0.1), lfo(2) * 0.02, 0.2)   ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In TAPV, 2nd argument (offset) must be a number or array of numbers, got a SOUND

exec ny:expect("plot tapv(osc(c4), 0.1, lfo(2) * 0.02, const(0.2))  ",
               :nyerror, {"TAPV" 4 {{NUMBER} "maxdelay"}})
exec #print("plot tapv(osc(c4), 0.1, lfo(2) * 0.02, const(0.2))  ")
exec catch(quote(simulated-error), 
           sal-compile("plot tapv(osc(c4), 0.1, lfo(2) * 0.02, const(0.2))  ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In TAPV, 4th argument (maxdelay) must be a number or array of numbers, got a SOUND

exec ny:expect("plot tapv(vector(osc(c4), osc(c5)), vector(0.1, 0.2), lfo(2) * 0.02, 0.2)[0]",
               :plot, T)
exec #print("plot tapv(vector(osc(c4), osc(c5)), vector(0.1, 0.2), lfo(2) * 0.02, 0.2)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot tapv(vector(osc(c4), osc(c5)), vector(0.1, 0.2), lfo(2) * 0.02, 0.2)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot tapv(vector(osc(c4), osc(c5)), vector(0.1, 0.2), lfo(2) * 0.02, vector(0.2))[0]",
               :error, "In TAPV, two arguments are multichannels of differing length, got #(0.1 0.2), an ARRAY, and #(0.2), an ARRAY")
exec #print("plot tapv(vector(osc(c4), osc(c5)), vector(0.1, 0.2), lfo(2) * 0.02, vector(0.2))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot tapv(vector(osc(c4), osc(c5)), vector(0.1, 0.2), lfo(2) * 0.02, vector(0.2))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot tapf(osc(c4), 0.1, lfo(2) * 0.02, 0.2)    ",
               :plot, T)
exec #print("plot tapf(osc(c4), 0.1, lfo(2) * 0.02, 0.2)    ")
exec catch(quote(simulated-error), 
           sal-compile("plot tapf(osc(c4), 0.1, lfo(2) * 0.02, 0.2)    ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot tapf(c4, 0.1, lfo(2) * 0.02, 0.2)   ",
               :nyerror, {"TAPF" 1 {{SOUND} "snd"}})
exec #print("plot tapf(c4, 0.1, lfo(2) * 0.02, 0.2)   ")
exec catch(quote(simulated-error), 
           sal-compile("plot tapf(c4, 0.1, lfo(2) * 0.02, 0.2)   ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In TAPF, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot tapf(osc(c4), 0.1, 0.02, 0.2)  ",
               :nyerror, {"TAPF" 3 {{SOUND} "vardelay"}})
exec #print("plot tapf(osc(c4), 0.1, 0.02, 0.2)  ")
exec catch(quote(simulated-error), 
           sal-compile("plot tapf(osc(c4), 0.1, 0.02, 0.2)  ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In TAPF, 3rd argument (vardelay) must be a sound or multichannel sound, got 0.02, a FLONUM

exec ny:expect("plot tapf(osc(c4), const(0.1), lfo(2) * 0.02, 0.2)   ",
               :nyerror, {"TAPF" 2 {{NUMBER} "offset"}})
exec #print("plot tapf(osc(c4), const(0.1), lfo(2) * 0.02, 0.2)   ")
exec catch(quote(simulated-error), 
           sal-compile("plot tapf(osc(c4), const(0.1), lfo(2) * 0.02, 0.2)   ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In TAPF, 2nd argument (offset) must be a number or array of numbers, got a SOUND

exec ny:expect("plot tapf(osc(c4), 0.1, lfo(2) * 0.02, const(0.2))  ",
               :nyerror, {"TAPF" 4 {{NUMBER} "maxdelay"}})
exec #print("plot tapf(osc(c4), 0.1, lfo(2) * 0.02, const(0.2))  ")
exec catch(quote(simulated-error), 
           sal-compile("plot tapf(osc(c4), 0.1, lfo(2) * 0.02, const(0.2))  ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In TAPF, 4th argument (maxdelay) must be a number or array of numbers, got a SOUND

exec ny:expect("plot tapf(vector(osc(c4), osc(c5)), vector(0.1, 0.2), lfo(2) * 0.02, 0.2)[0]",
               :plot, T)
exec #print("plot tapf(vector(osc(c4), osc(c5)), vector(0.1, 0.2), lfo(2) * 0.02, 0.2)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot tapf(vector(osc(c4), osc(c5)), vector(0.1, 0.2), lfo(2) * 0.02, 0.2)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot tapf(vector(osc(c4), osc(c5)), vector(0.1, 0.2), lfo(2) * 0.02, vector(0.2))[0]",
               :error, "In TAPF, two arguments are multichannels of differing length, got #(0.1 0.2), an ARRAY, and #(0.2), an ARRAY")
exec #print("plot tapf(vector(osc(c4), osc(c5)), vector(0.1, 0.2), lfo(2) * 0.02, vector(0.2))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot tapf(vector(osc(c4), osc(c5)), vector(0.1, 0.2), lfo(2) * 0.02, vector(0.2))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot areson(pluck(c4), 300, 50)",
               :plot, T)
exec #print("plot areson(pluck(c4), 300, 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot areson(pluck(c4), 300, 50)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot areson(vector(pluck(c4), pluck(g4)), 300, 50)[0]",
               :plot, T)
exec #print("plot areson(vector(pluck(c4), pluck(g4)), 300, 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot areson(vector(pluck(c4), pluck(g4)), 300, 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot areson(pluck(c4), vector(300, 250), 50)[0]",
               :plot, T)
exec #print("plot areson(pluck(c4), vector(300, 250), 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot areson(pluck(c4), vector(300, 250), 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot areson(pluck(c4), 300, vector(50, 60))[0]",
               :plot, T)
exec #print("plot areson(pluck(c4), 300, vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot areson(pluck(c4), 300, vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot areson(vector(pluck(c4), pluck(g4)), vector(300, 250), 50)[0]",
               :plot, T)
exec #print("plot areson(vector(pluck(c4), pluck(g4)), vector(300, 250), 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot areson(vector(pluck(c4), pluck(g4)), vector(300, 250), 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot areson(vector(pluck(c4), pluck(g4)), 300, vector(50, 60))[0]",
               :plot, T)
exec #print("plot areson(vector(pluck(c4), pluck(g4)), 300, vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot areson(vector(pluck(c4), pluck(g4)), 300, vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot areson(pluck(c4), vector(300, 250), vector(50, 60))[0]",
               :plot, T)
exec #print("plot areson(pluck(c4), vector(300, 250), vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot areson(pluck(c4), vector(300, 250), vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot areson(vector(pluck(c4), pluck(g4)), vector(300, 250), vector(50, 60))[0]",
               :plot, T)
exec #print("plot areson(vector(pluck(c4), pluck(g4)), vector(300, 250), vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot areson(vector(pluck(c4), pluck(g4)), vector(300, 250), vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot areson(c4, 300, 50)",
               :nyerror, {"ARESON" 1 {{SOUND} {}}})
exec #print("plot areson(c4, 300, 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot areson(c4, 300, 50)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In ARESON, 1st argument must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot areson(pluck(c4), 300 + lfo(4), 50)",
               :plot, T)
exec #print("plot areson(pluck(c4), 300 + lfo(4), 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot areson(pluck(c4), 300 + lfo(4), 50)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot areson(pluck(c4), 300, 50 + lfo(4))",
               :plot, T)
exec #print("plot areson(pluck(c4), 300, 50 + lfo(4))")
exec catch(quote(simulated-error), 
           sal-compile("plot areson(pluck(c4), 300, 50 + lfo(4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hp(pluck(c4), 300)",
               :plot, T)
exec #print("plot hp(pluck(c4), 300)")
exec catch(quote(simulated-error), 
           sal-compile("plot hp(pluck(c4), 300)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hp(vector(pluck(c4), pluck(g4)), 300)[0]",
               :plot, T)
exec #print("plot hp(vector(pluck(c4), pluck(g4)), 300)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot hp(vector(pluck(c4), pluck(g4)), 300)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hp(pluck(c4), vector(300, 250))[0]",
               :plot, T)
exec #print("plot hp(pluck(c4), vector(300, 250))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot hp(pluck(c4), vector(300, 250))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hp(vector(pluck(c4), pluck(g4)), vector(300, 250))[0]",
               :plot, T)
exec #print("plot hp(vector(pluck(c4), pluck(g4)), vector(300, 250))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot hp(vector(pluck(c4), pluck(g4)), vector(300, 250))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hp(c4, 300)",
               :nyerror, {"HP" 1 {{SOUND} "snd"}})
exec #print("plot hp(c4, 300)")
exec catch(quote(simulated-error), 
           sal-compile("plot hp(c4, 300)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HP, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot hp(pluck(c4), 300 + lfo(4))",
               :plot, T)
exec #print("plot hp(pluck(c4), 300 + lfo(4))")
exec catch(quote(simulated-error), 
           sal-compile("plot hp(pluck(c4), 300 + lfo(4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot hp(pluck(c4), \"bad\")",
               :nyerror, {"HP" 2 {{NUMBER SOUND} "cutoff"}})
exec #print("plot hp(pluck(c4), \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot hp(pluck(c4), \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HP, 2nd argument (cutoff) must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("plot comb(pluck(c4), 3, 50)",
               :plot, T)
exec #print("plot comb(pluck(c4), 3, 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(pluck(c4), 3, 50)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(pluck(c4), 3 + lfo(1), 50)",
               :plot, T)
exec #print("plot comb(pluck(c4), 3 + lfo(1), 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(pluck(c4), 3 + lfo(1), 50)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(vector(pluck(c4), pluck(g4)), 3, 50)[0]",
               :plot, T)
exec #print("plot comb(vector(pluck(c4), pluck(g4)), 3, 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(vector(pluck(c4), pluck(g4)), 3, 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(pluck(c4), vector(3, 2.5), 50)[0]",
               :plot, T)
exec #print("plot comb(pluck(c4), vector(3, 2.5), 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(pluck(c4), vector(3, 2.5), 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(pluck(c4), vector(3 + lfo(1), 2.5), 50)[0]",
               :plot, T)
exec #print("plot comb(pluck(c4), vector(3 + lfo(1), 2.5), 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(pluck(c4), vector(3 + lfo(1), 2.5), 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(pluck(c4), 3, vector(50, 60))[0]",
               :plot, T)
exec #print("plot comb(pluck(c4), 3, vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(pluck(c4), 3, vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(pluck(c4), 3 + lfo(1), vector(50, 60))[0]",
               :plot, T)
exec #print("plot comb(pluck(c4), 3 + lfo(1), vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(pluck(c4), 3 + lfo(1), vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(vector(pluck(c4), pluck(g4)), vector(3, 2.5), 50)[0]",
               :plot, T)
exec #print("plot comb(vector(pluck(c4), pluck(g4)), vector(3, 2.5), 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(vector(pluck(c4), pluck(g4)), vector(3, 2.5), 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(vector(pluck(c4), pluck(g4)), vector(3 + lfo(1), 2.5), 50)[0]",
               :plot, T)
exec #print("plot comb(vector(pluck(c4), pluck(g4)), vector(3 + lfo(1), 2.5), 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(vector(pluck(c4), pluck(g4)), vector(3 + lfo(1), 2.5), 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(vector(pluck(c4), pluck(g4)), 3, vector(50, 60))[0]",
               :plot, T)
exec #print("plot comb(vector(pluck(c4), pluck(g4)), 3, vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(vector(pluck(c4), pluck(g4)), 3, vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(vector(pluck(c4), pluck(g4)), 3 + lfo(2), vector(50, 60))[0]",
               :plot, T)
exec #print("plot comb(vector(pluck(c4), pluck(g4)), 3 + lfo(2), vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(vector(pluck(c4), pluck(g4)), 3 + lfo(2), vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(pluck(c4), vector(3, 2.5), vector(50, 60))[0]",
               :plot, T)
exec #print("plot comb(pluck(c4), vector(3, 2.5), vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(pluck(c4), vector(3, 2.5), vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(pluck(c4), vector(3 + lfo(2), 2.5), vector(50, 60))[0]",
               :plot, T)
exec #print("plot comb(pluck(c4), vector(3 + lfo(2), 2.5), vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(pluck(c4), vector(3 + lfo(2), 2.5), vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(vector(pluck(c4), pluck(g4)), vector(3, 2.5), vector(50, 60))[0]",
               :plot, T)
exec #print("plot comb(vector(pluck(c4), pluck(g4)), vector(3, 2.5), vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(vector(pluck(c4), pluck(g4)), vector(3, 2.5), vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(vector(pluck(c4), pluck(g4)), vector(3 + lfo(2), 2.5), vector(50, 60))[0]",
               :plot, T)
exec #print("plot comb(vector(pluck(c4), pluck(g4)), vector(3 + lfo(2), 2.5), vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(vector(pluck(c4), pluck(g4)), vector(3 + lfo(2), 2.5), vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot comb(c4, 300, 50)",
               :nyerror, {"COMB" 1 {{SOUND} "snd"}})
exec #print("plot comb(c4, 300, 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(c4, 300, 50)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In COMB, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot comb(pluck(c4), \"bad\", 50)",
               :nyerror, {"COMB" 2 {{NUMBER SOUND} "decay"}})
exec #print("plot comb(pluck(c4), \"bad\", 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(pluck(c4), \"bad\", 50)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In COMB, 2nd argument (decay) must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("plot comb(pluck(c4), 300, \"bad\")",
               :nyerror, {"COMB" 3 {{POSITIVE} "hz"}})
exec #print("plot comb(pluck(c4), 300, \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot comb(pluck(c4), 300, \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In COMB, 3rd argument (hz) must be a positive number or array of positive numbers, got "bad", a STRING

exec ny:expect("plot alpass(pluck(c4), 2, 30, 20)",
               :plot, T)
exec #print("plot alpass(pluck(c4), 2, 30, 20)")
exec catch(quote(simulated-error), 
           sal-compile("plot alpass(pluck(c4), 2, 30, 20)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot alpass(pluck(c4), 2, 30 + lfo(2), 20)",
               :plot, T)
exec #print("plot alpass(pluck(c4), 2, 30 + lfo(2), 20)")
exec catch(quote(simulated-error), 
           sal-compile("plot alpass(pluck(c4), 2, 30 + lfo(2), 20)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot alpass(vector(pluck(c4), pluck(d4)), 2, 30, 20)[0]",
               :plot, T)
exec #print("plot alpass(vector(pluck(c4), pluck(d4)), 2, 30, 20)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot alpass(vector(pluck(c4), pluck(d4)), 2, 30, 20)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot alpass(vector(pluck(c4), pluck(d4)), const(2), 30, 20)[0]",
               :plot, T)
exec #print("plot alpass(vector(pluck(c4), pluck(d4)), const(2), 30, 20)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot alpass(vector(pluck(c4), pluck(d4)), const(2), 30, 20)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot alpass(vector(pluck(c4), pluck(d4)), 2, 30 + lfo(2), 20)[0]",
               :plot, T)
exec #print("plot alpass(vector(pluck(c4), pluck(d4)), 2, 30 + lfo(2), 20)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot alpass(vector(pluck(c4), pluck(d4)), 2, 30 + lfo(2), 20)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot alpass(pluck(c4), vector(2, 3), 30, 20)[0]",
               :plot, T)
exec #print("plot alpass(pluck(c4), vector(2, 3), 30, 20)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot alpass(pluck(c4), vector(2, 3), 30, 20)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot alpass(pluck(c4), vector(const(2), const(3)), 30, 20)[0]",
               :plot, T)
exec #print("plot alpass(pluck(c4), vector(const(2), const(3)), 30, 20)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot alpass(pluck(c4), vector(const(2), const(3)), 30, 20)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot alpass(vector(pluck(c4), pluck(d4)), 2, vector(30, 40), 20)[0]",
               :plot, T)
exec #print("plot alpass(vector(pluck(c4), pluck(d4)), 2, vector(30, 40), 20)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot alpass(vector(pluck(c4), pluck(d4)), 2, vector(30, 40), 20)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot alpass(vector(pluck(c4), pluck(d4)), const(2), vector(30, 40), 20)[0]",
               :plot, T)
exec #print("plot alpass(vector(pluck(c4), pluck(d4)), const(2), vector(30, 40), 20)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot alpass(vector(pluck(c4), pluck(d4)), const(2), vector(30, 40), 20)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot alpass(vector(pluck(c4), pluck(d4)), 2, vector(30 + lfo(2), 40), 20)[0]",
               :plot, T)
exec #print("plot alpass(vector(pluck(c4), pluck(d4)), 2, vector(30 + lfo(2), 40), 20)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot alpass(vector(pluck(c4), pluck(d4)), 2, vector(30 + lfo(2), 40), 20)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot alpass(vector(pluck(c4), pluck(d4)), 2, vector(30 + lfo(2), 40), 20 + lfo(1)) ;; bad",
               :nyerror, {"ALPASS" 4 {{POSITIVE} "min-hz"}})
exec #print("plot alpass(vector(pluck(c4), pluck(d4)), 2, vector(30 + lfo(2), 40), 20 + lfo(1)) ;; bad")
exec catch(quote(simulated-error), 
           sal-compile("plot alpass(vector(pluck(c4), pluck(d4)), 2, vector(30 + lfo(2), 40), 20 + lfo(1)) ;; bad", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In ALPASS, 4th argument (min-hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot alpass(vector(pluck(c4), pluck(d4)), 2, vector(30 + lfo(2), 40), vector(30 + lfo(2), 20 + lfo(1))) ;; bad",
               :nyerror, {"ALPASS" 4 {{POSITIVE} "min-hz"}})
exec #print("plot alpass(vector(pluck(c4), pluck(d4)), 2, vector(30 + lfo(2), 40), vector(30 + lfo(2), 20 + lfo(1))) ;; bad")
exec catch(quote(simulated-error), 
           sal-compile("plot alpass(vector(pluck(c4), pluck(d4)), 2, vector(30 + lfo(2), 40), vector(30 + lfo(2), 20 + lfo(1))) ;; bad", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In ALPASS, 4th argument (min-hz) must be a positive number or array of positive numbers, got a 2-channel SOUND

exec ny:expect("plot const(2)",
               :plot, T)
exec #print("plot const(2)")
exec catch(quote(simulated-error), 
           sal-compile("plot const(2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot const(2, 3)",
               :plot, T)
exec #print("plot const(2, 3)")
exec catch(quote(simulated-error), 
           sal-compile("plot const(2, 3)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot const(lfo(2))",
               :nyerror, {"CONST" 1 {{NUMBER} "value"}})
exec #print("plot const(lfo(2))")
exec catch(quote(simulated-error), 
           sal-compile("plot const(lfo(2))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CONST, 1st argument (value) must be a number, got a SOUND

exec ny:expect("plot const(2, lfo(3))",
               :nyerror, {"CONST" 2 {{NUMBER} "dur"}})
exec #print("plot const(2, lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot const(2, lfo(3))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CONST, 2nd argument (dur) must be a number, got a SOUND

exec ny:expect("plot convolve(pluck(c4), osc(c7, 0.01))",
               :plot, T)
exec #print("plot convolve(pluck(c4), osc(c7, 0.01))")
exec catch(quote(simulated-error), 
           sal-compile("plot convolve(pluck(c4), osc(c7, 0.01))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot convolve(vector(pluck(c4), pluck(d4)), osc(c7, 0.01))[0]",
               :plot, T)
exec #print("plot convolve(vector(pluck(c4), pluck(d4)), osc(c7, 0.01))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot convolve(vector(pluck(c4), pluck(d4)), osc(c7, 0.01))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot convolve(pluck(c4), vector(osc(c7, 0.01), osc(c8, 0.01)))[0]",
               :plot, T)
exec #print("plot convolve(pluck(c4), vector(osc(c7, 0.01), osc(c8, 0.01)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot convolve(pluck(c4), vector(osc(c7, 0.01), osc(c8, 0.01)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot convolve(vector(pluck(c4), pluck(d4)), vector(osc(c7, 0.01), osc(c8, 0.01)))[0]",
               :plot, T)
exec #print("plot convolve(vector(pluck(c4), pluck(d4)), vector(osc(c7, 0.01), osc(c8, 0.01)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot convolve(vector(pluck(c4), pluck(d4)), vector(osc(c7, 0.01), osc(c8, 0.01)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot convolve(pluck(c4), 100)",
               :nyerror, {"CONVOLVE" 2 {{SOUND} {}}})
exec #print("plot convolve(pluck(c4), 100)")
exec catch(quote(simulated-error), 
           sal-compile("plot convolve(pluck(c4), 100)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CONVOLVE, 2nd argument must be a sound or multichannel sound, got 100, a FIXNUM

exec ny:expect("plot convolve(100, pluck(c4))",
               :nyerror, {"CONVOLVE" 1 {{SOUND} {}}})
exec #print("plot convolve(100, pluck(c4))")
exec catch(quote(simulated-error), 
           sal-compile("plot convolve(100, pluck(c4))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CONVOLVE, 1st argument must be a sound or multichannel sound, got 100, a FIXNUM

exec ny:expect("plot feedback-delay(pluck(c4), 0.1, 0.2)",
               :plot, T)
exec #print("plot feedback-delay(pluck(c4), 0.1, 0.2)")
exec catch(quote(simulated-error), 
           sal-compile("plot feedback-delay(pluck(c4), 0.1, 0.2)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot feedback-delay(pluck(c4), const(0.1), 0.2)",
               :nyerror, {"FEEDBACK-DELAY" 2 {{NUMBER} "delay"}})
exec #print("plot feedback-delay(pluck(c4), const(0.1), 0.2)")
exec catch(quote(simulated-error), 
           sal-compile("plot feedback-delay(pluck(c4), const(0.1), 0.2)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FEEDBACK-DELAY, 2nd argument (delay) must be a number or array of numbers, got a SOUND

exec ny:expect("plot feedback-delay(pluck(c4), 0.1, const(0.2))",
               :plot, T)
exec #print("plot feedback-delay(pluck(c4), 0.1, const(0.2))")
exec catch(quote(simulated-error), 
           sal-compile("plot feedback-delay(pluck(c4), 0.1, const(0.2))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot feedback-delay(vector(pluck(c4), pluck(d4)), 0.1, 0.2)[0]",
               :plot, T)
exec #print("plot feedback-delay(vector(pluck(c4), pluck(d4)), 0.1, 0.2)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot feedback-delay(vector(pluck(c4), pluck(d4)), 0.1, 0.2)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot feedback-delay(vector(pluck(c4), pluck(d4)), const(0.1), 0.2)[0]",
               :nyerror, {"FEEDBACK-DELAY" 2 {{NUMBER} "delay"}})
exec #print("plot feedback-delay(vector(pluck(c4), pluck(d4)), const(0.1), 0.2)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot feedback-delay(vector(pluck(c4), pluck(d4)), const(0.1), 0.2)[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FEEDBACK-DELAY, 2nd argument (delay) must be a number or array of numbers, got a SOUND

exec ny:expect("plot feedback-delay(vector(pluck(c4), pluck(d4)), 0.1, const(0.2))[0]",
               :plot, T)
exec #print("plot feedback-delay(vector(pluck(c4), pluck(d4)), 0.1, const(0.2))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot feedback-delay(vector(pluck(c4), pluck(d4)), 0.1, const(0.2))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot feedback-delay(pluck(c4), vector(0.1, 0.2), 0.2)[0]",
               :plot, T)
exec #print("plot feedback-delay(pluck(c4), vector(0.1, 0.2), 0.2)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot feedback-delay(pluck(c4), vector(0.1, 0.2), 0.2)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot feedback-delay(pluck(c4), vector(const(0.1), const(0.2)), 0.2)[0]",
               :nyerror, {"FEEDBACK-DELAY" 2 {{NUMBER} "delay"}})
exec #print("plot feedback-delay(pluck(c4), vector(const(0.1), const(0.2)), 0.2)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot feedback-delay(pluck(c4), vector(const(0.1), const(0.2)), 0.2)[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FEEDBACK-DELAY, 2nd argument (delay) must be a number or array of numbers, got a 2-channel SOUND

exec ny:expect("plot feedback-delay(pluck(c4), vector(0.1, 0.2), const(0.2))[0]",
               :plot, T)
exec #print("plot feedback-delay(pluck(c4), vector(0.1, 0.2), const(0.2))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot feedback-delay(pluck(c4), vector(0.1, 0.2), const(0.2))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot feedback-delay(pluck(c4), 0.1, vector(0.2, 0.3))[0]",
               :plot, T)
exec #print("plot feedback-delay(pluck(c4), 0.1, vector(0.2, 0.3))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot feedback-delay(pluck(c4), 0.1, vector(0.2, 0.3))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot feedback-delay(pluck(c4), const(0.1), vector(const(0.2), const(0.3)))[0]",
               :nyerror, {"FEEDBACK-DELAY" 2 {{NUMBER} "delay"}})
exec #print("plot feedback-delay(pluck(c4), const(0.1), vector(const(0.2), const(0.3)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot feedback-delay(pluck(c4), const(0.1), vector(const(0.2), const(0.3)))[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FEEDBACK-DELAY, 2nd argument (delay) must be a number or array of numbers, got a SOUND

exec ny:expect("plot feedback-delay(pluck(c4), 0.1, vector(const(0.2), const(0.3)))[0]",
               :plot, T)
exec #print("plot feedback-delay(pluck(c4), 0.1, vector(const(0.2), const(0.3)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot feedback-delay(pluck(c4), 0.1, vector(const(0.2), const(0.3)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot congen(pluck(c4), 0.1, 0.1)",
               :plot, T)
exec #print("plot congen(pluck(c4), 0.1, 0.1)")
exec catch(quote(simulated-error), 
           sal-compile("plot congen(pluck(c4), 0.1, 0.1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot congen(vector(pluck(c4), pluck(d3)), 0.1, 0.1)[0]",
               :plot, T)
exec #print("plot congen(vector(pluck(c4), pluck(d3)), 0.1, 0.1)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot congen(vector(pluck(c4), pluck(d3)), 0.1, 0.1)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot congen(pluck(c4), vector(0.1, 0.2), 0.1)[0]",
               :plot, T)
exec #print("plot congen(pluck(c4), vector(0.1, 0.2), 0.1)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot congen(pluck(c4), vector(0.1, 0.2), 0.1)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot congen(pluck(c4), vector(0.1, 0.2), vector(0.1, 0.2))[0]",
               :plot, T)
exec #print("plot congen(pluck(c4), vector(0.1, 0.2), vector(0.1, 0.2))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot congen(pluck(c4), vector(0.1, 0.2), vector(0.1, 0.2))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot congen(5, 0.1, 0.1)",
               :nyerror, {"CONGEN" 1 {{SOUND} "gate"}})
exec #print("plot congen(5, 0.1, 0.1)")
exec catch(quote(simulated-error), 
           sal-compile("plot congen(5, 0.1, 0.1)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CONGEN, 1st argument (gate) must be a sound or multichannel sound, got 5, a FIXNUM

exec ny:expect("plot congen(pluck(c4), lfo(1), 0.1)",
               :nyerror, {"CONGEN" 2 {{NONNEGATIVE} "rise"}})
exec #print("plot congen(pluck(c4), lfo(1), 0.1)")
exec catch(quote(simulated-error), 
           sal-compile("plot congen(pluck(c4), lfo(1), 0.1)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CONGEN, 2nd argument (rise) must be a non-negative number or array of non-negative numbers, got a SOUND

exec ny:expect("plot congen(pluck(c4), 0.1, lfo(2))",
               :nyerror, {"CONGEN" 3 {{NONNEGATIVE} "fall"}})
exec #print("plot congen(pluck(c4), 0.1, lfo(2))")
exec catch(quote(simulated-error), 
           sal-compile("plot congen(pluck(c4), 0.1, lfo(2))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In CONGEN, 3rd argument (fall) must be a non-negative number or array of non-negative numbers, got a SOUND

exec ny:expect("print s-exp(2.1)",
               :print, 8.16617)
exec #print("print s-exp(2.1)")
exec catch(quote(simulated-error), 
           sal-compile("print s-exp(2.1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-exp(lfo(3))",
               :plot, T)
exec #print("plot s-exp(lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot s-exp(lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print round(s-exp(vector(2.1, 2.4))[0])",
               :print, 8)
exec #print("print round(s-exp(vector(2.1, 2.4))[0])")
exec catch(quote(simulated-error), 
           sal-compile("print round(s-exp(vector(2.1, 2.4))[0])", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-exp(vector(lfo(3), lfo(4)))[0]",
               :plot, T)
exec #print("plot s-exp(vector(lfo(3), lfo(4)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot s-exp(vector(lfo(3), lfo(4)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print s-exp(\"bad\")",
               :nyerror, {"S-EXP" 0 {{NUMBER SOUND} {}}})
exec #print("print s-exp(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("print s-exp(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In S-EXP, argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("print s-abs(2.1)",
               :print, 2.1)
exec #print("print s-abs(2.1)")
exec catch(quote(simulated-error), 
           sal-compile("print s-abs(2.1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-abs(lfo(3))",
               :plot, T)
exec #print("plot s-abs(lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot s-abs(lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print round(s-abs(vector(2.1, 2.4))[0])",
               :print, 2)
exec #print("print round(s-abs(vector(2.1, 2.4))[0])")
exec catch(quote(simulated-error), 
           sal-compile("print round(s-abs(vector(2.1, 2.4))[0])", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-abs(vector(lfo(3), lfo(4)))[0]",
               :plot, T)
exec #print("plot s-abs(vector(lfo(3), lfo(4)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot s-abs(vector(lfo(3), lfo(4)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print s-abs(\"bad\")",
               :nyerror, {"S-ABS" 0 {{NUMBER SOUND} {}}})
exec #print("print s-abs(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("print s-abs(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In S-ABS, argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("print s-sqrt(2.1)",
               :print, 1.44914)
exec #print("print s-sqrt(2.1)")
exec catch(quote(simulated-error), 
           sal-compile("print s-sqrt(2.1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-sqrt(lfo(3))",
               :plot, T)
exec #print("plot s-sqrt(lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot s-sqrt(lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print round(s-sqrt(vector(2.1, 2.4))[0])",
               :print, 1)
exec #print("print round(s-sqrt(vector(2.1, 2.4))[0])")
exec catch(quote(simulated-error), 
           sal-compile("print round(s-sqrt(vector(2.1, 2.4))[0])", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-sqrt(vector(lfo(3), lfo(4)))[0]",
               :plot, T)
exec #print("plot s-sqrt(vector(lfo(3), lfo(4)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot s-sqrt(vector(lfo(3), lfo(4)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print s-sqrt(\"bad\")",
               :nyerror, {"S-SQRT" 0 {{NUMBER SOUND} {}}})
exec #print("print s-sqrt(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("print s-sqrt(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In S-SQRT, argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("print s-log(2.1)",
               :print, 0.741937)
exec #print("print s-log(2.1)")
exec catch(quote(simulated-error), 
           sal-compile("print s-log(2.1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-log(lfo(3))",
               :plot, T)
exec #print("plot s-log(lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot s-log(lfo(3))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print round(s-log(vector(2.1, 2.4))[0])",
               :print, 1)
exec #print("print round(s-log(vector(2.1, 2.4))[0])")
exec catch(quote(simulated-error), 
           sal-compile("print round(s-log(vector(2.1, 2.4))[0])", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot s-log(vector(lfo(3), lfo(4)))[0]",
               :plot, T)
exec #print("plot s-log(vector(lfo(3), lfo(4)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot s-log(vector(lfo(3), lfo(4)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print s-log(\"bad\")",
               :nyerror, {"S-LOG" 0 {{NUMBER SOUND} {}}})
exec #print("print s-log(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("print s-log(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In S-LOG, argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("plot noise()",
               :plot, T)
exec #print("plot noise()")
exec catch(quote(simulated-error), 
           sal-compile("plot noise()", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot noise(1)",
               :plot, T)
exec #print("plot noise(1)")
exec catch(quote(simulated-error), 
           sal-compile("plot noise(1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot noise(const(1))",
               :nyerror, {"NOISE" 1 {{NUMBER} {}}})
exec #print("plot noise(const(1))")
exec catch(quote(simulated-error), 
           sal-compile("plot noise(const(1))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In NOISE, 1st argument must be a number, got a SOUND

exec ny:expect("plot noise-gate(pluck(c4))",
               :plot, T)
exec #print("plot noise-gate(pluck(c4))")
exec catch(quote(simulated-error), 
           sal-compile("plot noise-gate(pluck(c4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot noise-gate(pluck(c4), 0.4)",
               :plot, T)
exec #print("plot noise-gate(pluck(c4), 0.4)")
exec catch(quote(simulated-error), 
           sal-compile("plot noise-gate(pluck(c4), 0.4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot noise-gate(pluck(c4), lfo(3))",
               :nyerror, {"NOISE-GATE" 2 {{NUMBER} "lookahead"}})
exec #print("plot noise-gate(pluck(c4), lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot noise-gate(pluck(c4), lfo(3))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In NOISE-GATE, 2nd argument (lookahead) must be a number, got a SOUND

exec ny:expect("plot noise-gate(pluck(c4), 0.4, 0.4)",
               :plot, T)
exec #print("plot noise-gate(pluck(c4), 0.4, 0.4)")
exec catch(quote(simulated-error), 
           sal-compile("plot noise-gate(pluck(c4), 0.4, 0.4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot noise-gate(pluck(c4), 0.4, lfo(3))",
               :nyerror, {"NOISE-GATE" 3 {{NUMBER} "risetime"}})
exec #print("plot noise-gate(pluck(c4), 0.4, lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot noise-gate(pluck(c4), 0.4, lfo(3))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In NOISE-GATE, 3rd argument (risetime) must be a number, got a SOUND

exec ny:expect("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4)",
               :plot, T)
exec #print("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4)")
exec catch(quote(simulated-error), 
           sal-compile("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot noise-gate(pluck(c4), 0.4, 0.4, lfo(3))",
               :nyerror, {"NOISE-GATE" 4 {{NUMBER} "falltime"}})
exec #print("plot noise-gate(pluck(c4), 0.4, 0.4, lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot noise-gate(pluck(c4), 0.4, 0.4, lfo(3))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In NOISE-GATE, 4th argument (falltime) must be a number, got a SOUND

exec ny:expect("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4, 0.4)  ",
               :plot, T)
exec #print("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4, 0.4)  ")
exec catch(quote(simulated-error), 
           sal-compile("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4, 0.4)  ", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4, lfo(3))",
               :nyerror, {"NOISE-GATE" 5 {{NUMBER} "floor"}})
exec #print("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4, lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4, lfo(3))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In NOISE-GATE, 5th argument (floor) must be a number, got a SOUND

exec ny:expect("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4, 0.4, 0.4)",
               :plot, T)
exec #print("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4, 0.4, 0.4)")
exec catch(quote(simulated-error), 
           sal-compile("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4, 0.4, 0.4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4, 0.4, lfo(3))",
               :nyerror, {"NOISE-GATE" 6 {{NUMBER} "threshold"}})
exec #print("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4, 0.4, lfo(3))")
exec catch(quote(simulated-error), 
           sal-compile("plot noise-gate(pluck(c4), 0.4, 0.4, 0.4, 0.4, lfo(3))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In NOISE-GATE, 6th argument (threshold) must be a number, got a SOUND

exec ny:expect("plot quantize(pluck(c4), 256)",
               :plot, T)
exec #print("plot quantize(pluck(c4), 256)")
exec catch(quote(simulated-error), 
           sal-compile("plot quantize(pluck(c4), 256)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot quantize(vector(pluck(d4), pluck(c4)), 256)[0]",
               :plot, T)
exec #print("plot quantize(vector(pluck(d4), pluck(c4)), 256)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot quantize(vector(pluck(d4), pluck(c4)), 256)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot quantize(pluck(c4), vector(256, 512))[0]",
               :plot, T)
exec #print("plot quantize(pluck(c4), vector(256, 512))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot quantize(pluck(c4), vector(256, 512))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot quantize(c4, 256)",
               :nyerror, {"QUANTIZE" 1 {{SOUND} {}}})
exec #print("plot quantize(c4, 256)")
exec catch(quote(simulated-error), 
           sal-compile("plot quantize(c4, 256)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In QUANTIZE, 1st argument must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot quantize(pluck(c4), const(256))",
               :nyerror, {"QUANTIZE" 2 {{POSITIVE} {}}})
exec #print("plot quantize(pluck(c4), const(256))")
exec catch(quote(simulated-error), 
           sal-compile("plot quantize(pluck(c4), const(256))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In QUANTIZE, 2nd argument must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("print recip(4)",
               :print, 0.25)
exec #print("print recip(4)")
exec catch(quote(simulated-error), 
           sal-compile("print recip(4)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot recip(2 + lfo(4))",
               :plot, T)
exec #print("plot recip(2 + lfo(4))")
exec catch(quote(simulated-error), 
           sal-compile("plot recip(2 + lfo(4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot recip(vector(2 + lfo(4), 3 + lfo(4)))[0]",
               :plot, T)
exec #print("plot recip(vector(2 + lfo(4), 3 + lfo(4)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot recip(vector(2 + lfo(4), 3 + lfo(4)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("print recip(vector(4, 5))[0]",
               :print, 0.25)
exec #print("print recip(vector(4, 5))[0]")
exec catch(quote(simulated-error), 
           sal-compile("print recip(vector(4, 5))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot recip(\"bad\")",
               :nyerror, {"RECIP" 0 {{NUMBER SOUND} {}}})
exec #print("plot recip(\"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot recip(\"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In RECIP, argument must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("plot rms(pluck(c5))",
               :plot, T)
exec #print("plot rms(pluck(c5))")
exec catch(quote(simulated-error), 
           sal-compile("plot rms(pluck(c5))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot rms(pluck(c5), 200)",
               :plot, T)
exec #print("plot rms(pluck(c5), 200)")
exec catch(quote(simulated-error), 
           sal-compile("plot rms(pluck(c5), 200)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot rms(pluck(c5), 200, 64)",
               :plot, T)
exec #print("plot rms(pluck(c5), 200, 64)")
exec catch(quote(simulated-error), 
           sal-compile("plot rms(pluck(c5), 200, 64)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot reson(pluck(c4), 300, 50)",
               :plot, T)
exec #print("plot reson(pluck(c4), 300, 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot reson(pluck(c4), 300, 50)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot reson(vector(pluck(c4), pluck(g4)), 300, 50)[0]",
               :plot, T)
exec #print("plot reson(vector(pluck(c4), pluck(g4)), 300, 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot reson(vector(pluck(c4), pluck(g4)), 300, 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot reson(pluck(c4), vector(300, 250), 50)[0]",
               :plot, T)
exec #print("plot reson(pluck(c4), vector(300, 250), 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot reson(pluck(c4), vector(300, 250), 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot reson(pluck(c4), 300, vector(50, 60))[0]",
               :plot, T)
exec #print("plot reson(pluck(c4), 300, vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot reson(pluck(c4), 300, vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot reson(vector(pluck(c4), pluck(g4)), vector(300, 250), 50)[0]",
               :plot, T)
exec #print("plot reson(vector(pluck(c4), pluck(g4)), vector(300, 250), 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot reson(vector(pluck(c4), pluck(g4)), vector(300, 250), 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot reson(vector(pluck(c4), pluck(g4)), 300, vector(50, 60))[0]",
               :plot, T)
exec #print("plot reson(vector(pluck(c4), pluck(g4)), 300, vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot reson(vector(pluck(c4), pluck(g4)), 300, vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot reson(pluck(c4), vector(300, 250), vector(50, 60))[0]",
               :plot, T)
exec #print("plot reson(pluck(c4), vector(300, 250), vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot reson(pluck(c4), vector(300, 250), vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot reson(vector(pluck(c4), pluck(g4)), vector(300, 250), vector(50, 60))[0]",
               :plot, T)
exec #print("plot reson(vector(pluck(c4), pluck(g4)), vector(300, 250), vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot reson(vector(pluck(c4), pluck(g4)), vector(300, 250), vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot reson(c4, 300, 50)",
               :nyerror, {"RESON" 1 {{SOUND} "snd"}})
exec #print("plot reson(c4, 300, 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot reson(c4, 300, 50)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In RESON, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot reson(pluck(c4), 300 + lfo(4), 50)",
               :plot, T)
exec #print("plot reson(pluck(c4), 300 + lfo(4), 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot reson(pluck(c4), 300 + lfo(4), 50)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot reson(pluck(c4), 300, 50 + lfo(4))",
               :plot, T)
exec #print("plot reson(pluck(c4), 300, 50 + lfo(4))")
exec catch(quote(simulated-error), 
           sal-compile("plot reson(pluck(c4), 300, 50 + lfo(4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot shape(osc(c4), ramp(2) - 0.5, 1)",
               :plot, T)
exec #print("plot shape(osc(c4), ramp(2) - 0.5, 1)")
exec catch(quote(simulated-error), 
           sal-compile("plot shape(osc(c4), ramp(2) - 0.5, 1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot shape(vector(osc(d4), osc(c4)), ramp(2) - 0.5, 1)[0]",
               :plot, T)
exec #print("plot shape(vector(osc(d4), osc(c4)), ramp(2) - 0.5, 1)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot shape(vector(osc(d4), osc(c4)), ramp(2) - 0.5, 1)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot shape(osc(c4), vector(ramp(2) - 0.5, ramp(2.2) - 0.4), 1)[0]",
               :plot, T)
exec #print("plot shape(osc(c4), vector(ramp(2) - 0.5, ramp(2.2) - 0.4), 1)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot shape(osc(c4), vector(ramp(2) - 0.5, ramp(2.2) - 0.4), 1)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot shape(osc(c4), ramp(2) - 0.5, vector(1, 1.1))[0]",
               :plot, T)
exec #print("plot shape(osc(c4), ramp(2) - 0.5, vector(1, 1.1))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot shape(osc(c4), ramp(2) - 0.5, vector(1, 1.1))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot shape(c4, ramp(2) - 0.5, const(1.2))",
               :nyerror, {"SHAPE" 1 {{SOUND} "snd"}})
exec #print("plot shape(c4, ramp(2) - 0.5, const(1.2))")
exec catch(quote(simulated-error), 
           sal-compile("plot shape(c4, ramp(2) - 0.5, const(1.2))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SHAPE, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot shape(osc(c4), 0.5, const(1.2))",
               :nyerror, {"SHAPE" 2 {{SOUND} "shape"}})
exec #print("plot shape(osc(c4), 0.5, const(1.2))")
exec catch(quote(simulated-error), 
           sal-compile("plot shape(osc(c4), 0.5, const(1.2))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SHAPE, 2nd argument (shape) must be a sound or multichannel sound, got 0.5, a FLONUM

exec ny:expect("plot shape(osc(c4), ramp(2) - 0.5, const(1.2))",
               :nyerror, {"SHAPE" 3 {{NUMBER} "origin"}})
exec #print("plot shape(osc(c4), ramp(2) - 0.5, const(1.2))")
exec catch(quote(simulated-error), 
           sal-compile("plot shape(osc(c4), ramp(2) - 0.5, const(1.2))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SHAPE, 3rd argument (origin) must be a number or array of numbers, got a SOUND

exec ny:expect("plot slope(osc(c4))",
               :plot, T)
exec #print("plot slope(osc(c4))")
exec catch(quote(simulated-error), 
           sal-compile("plot slope(osc(c4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot slope(vector(osc(c4), osc(c5)))[0]",
               :plot, T)
exec #print("plot slope(vector(osc(c4), osc(c5)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot slope(vector(osc(c4), osc(c5)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot slope(50)",
               :nyerror, {"SLOPE" 0 {{SOUND} {}}})
exec #print("plot slope(50)")
exec catch(quote(simulated-error), 
           sal-compile("plot slope(50)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In SLOPE, argument must be a sound or multichannel sound, got 50, a FIXNUM

exec ny:expect("plot lp(pluck(c4), 500)",
               :plot, T)
exec #print("plot lp(pluck(c4), 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot lp(pluck(c4), 500)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lp(vector(pluck(c4), pluck(d4)), 500)[0]",
               :plot, T)
exec #print("plot lp(vector(pluck(c4), pluck(d4)), 500)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lp(vector(pluck(c4), pluck(d4)), 500)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lp(pluck(c4), vector(500, 600))[0]",
               :plot, T)
exec #print("plot lp(pluck(c4), vector(500, 600))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lp(pluck(c4), vector(500, 600))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lp(pluck(c4), const(500))",
               :plot, T)
exec #print("plot lp(pluck(c4), const(500))")
exec catch(quote(simulated-error), 
           sal-compile("plot lp(pluck(c4), const(500))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lp(vector(pluck(c4), pluck(d4)), const(500))[0]",
               :plot, T)
exec #print("plot lp(vector(pluck(c4), pluck(d4)), const(500))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lp(vector(pluck(c4), pluck(d4)), const(500))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lp(pluck(c4), vector(const(500), const(600)))[0]",
               :plot, T)
exec #print("plot lp(pluck(c4), vector(const(500), const(600)))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lp(pluck(c4), vector(const(500), const(600)))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lp(pluck(c4), pluck(500, 600))",
               :plot, T)
exec #print("plot lp(pluck(c4), pluck(500, 600))")
exec catch(quote(simulated-error), 
           sal-compile("plot lp(pluck(c4), pluck(500, 600))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lp(c4, 500)",
               :nyerror, {"LP" 1 {{SOUND} "snd"}})
exec #print("plot lp(c4, 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot lp(c4, 500)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LP, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot lp(pluck(c4), \"bad\")",
               :nyerror, {"LP" 2 {{NUMBER SOUND} "cutoff"}})
exec #print("plot lp(pluck(c4), \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot lp(pluck(c4), \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LP, 2nd argument (cutoff) must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("plot lowpass2(pluck(c4), 200)",
               :plot, T)
exec #print("plot lowpass2(pluck(c4), 200)")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(pluck(c4), 200)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass2(pluck(c4), 200, 0.8)",
               :plot, T)
exec #print("plot lowpass2(pluck(c4), 200, 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(pluck(c4), 200, 0.8)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass2(vector(pluck(c4), pluck(d4)), 200)[0]",
               :plot, T)
exec #print("plot lowpass2(vector(pluck(c4), pluck(d4)), 200)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(vector(pluck(c4), pluck(d4)), 200)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass2(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]",
               :plot, T)
exec #print("plot lowpass2(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass2(pluck(c4), vector(200, 250))[0]",
               :plot, T)
exec #print("plot lowpass2(pluck(c4), vector(200, 250))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(pluck(c4), vector(200, 250))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass2(pluck(c4), vector(200, 250), 0.8)[0]",
               :plot, T)
exec #print("plot lowpass2(pluck(c4), vector(200, 250), 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(pluck(c4), vector(200, 250), 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass2(vector(pluck(c4), pluck(d4)), vector(200, 250))[0]",
               :plot, T)
exec #print("plot lowpass2(vector(pluck(c4), pluck(d4)), vector(200, 250))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(vector(pluck(c4), pluck(d4)), vector(200, 250))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]",
               :plot, T)
exec #print("plot lowpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass2(pluck(c4), 200, vector(0.8, 0.9))[0]",
               :plot, T)
exec #print("plot lowpass2(pluck(c4), 200, vector(0.8, 0.9))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(pluck(c4), 200, vector(0.8, 0.9))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9))[0]",
               :plot, T)
exec #print("plot lowpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass2(c4, 200, 0.8)",
               :nyerror, {"LOWPASS2" 1 {{SOUND} "snd"}})
exec #print("plot lowpass2(c4, 200, 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(c4, 200, 0.8)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LOWPASS2, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot lowpass2(pluck(c4), const(200))",
               :nyerror, {"LOWPASS2" 2 {{POSITIVE} "hz"}})
exec #print("plot lowpass2(pluck(c4), const(200))")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(pluck(c4), const(200))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LOWPASS2, 2nd argument (hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot lowpass2(pluck(c4), 200, const(0.8))",
               :nyerror, {"LOWPASS2" 3 {{POSITIVE} "q"}})
exec #print("plot lowpass2(pluck(c4), 200, const(0.8))")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass2(pluck(c4), 200, const(0.8))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LOWPASS2, 3rd argument (q) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot highpass2(pluck(c4), 200)",
               :plot, T)
exec #print("plot highpass2(pluck(c4), 200)")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(pluck(c4), 200)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass2(pluck(c4), 200, 0.8)",
               :plot, T)
exec #print("plot highpass2(pluck(c4), 200, 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(pluck(c4), 200, 0.8)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass2(vector(pluck(c4), pluck(d4)), 200)[0]",
               :plot, T)
exec #print("plot highpass2(vector(pluck(c4), pluck(d4)), 200)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(vector(pluck(c4), pluck(d4)), 200)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass2(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]",
               :plot, T)
exec #print("plot highpass2(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass2(pluck(c4), vector(200, 250))[0]",
               :plot, T)
exec #print("plot highpass2(pluck(c4), vector(200, 250))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(pluck(c4), vector(200, 250))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass2(pluck(c4), vector(200, 250), 0.8)[0]",
               :plot, T)
exec #print("plot highpass2(pluck(c4), vector(200, 250), 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(pluck(c4), vector(200, 250), 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass2(vector(pluck(c4), pluck(d4)), vector(200, 250))[0]",
               :plot, T)
exec #print("plot highpass2(vector(pluck(c4), pluck(d4)), vector(200, 250))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(vector(pluck(c4), pluck(d4)), vector(200, 250))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]",
               :plot, T)
exec #print("plot highpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass2(pluck(c4), 200, vector(0.8, 0.9))[0]",
               :plot, T)
exec #print("plot highpass2(pluck(c4), 200, vector(0.8, 0.9))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(pluck(c4), 200, vector(0.8, 0.9))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9))[0]",
               :plot, T)
exec #print("plot highpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass2(c4, 200, 0.8)",
               :nyerror, {"HIGHPASS2" 1 {{SOUND} "snd"}})
exec #print("plot highpass2(c4, 200, 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(c4, 200, 0.8)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HIGHPASS2, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot highpass2(pluck(c4), const(200))",
               :nyerror, {"HIGHPASS2" 2 {{POSITIVE} "hz"}})
exec #print("plot highpass2(pluck(c4), const(200))")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(pluck(c4), const(200))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HIGHPASS2, 2nd argument (hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot highpass2(pluck(c4), 200, const(0.8))",
               :nyerror, {"HIGHPASS2" 3 {{POSITIVE} "q"}})
exec #print("plot highpass2(pluck(c4), 200, const(0.8))")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass2(pluck(c4), 200, const(0.8))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HIGHPASS2, 3rd argument (q) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot notch2(pluck(c4), 200, 0.8)",
               :plot, T)
exec #print("plot notch2(pluck(c4), 200, 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot notch2(pluck(c4), 200, 0.8)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot notch2(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]",
               :plot, T)
exec #print("plot notch2(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot notch2(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot notch2(pluck(c4), vector(200, 250), 0.8)[0]",
               :plot, T)
exec #print("plot notch2(pluck(c4), vector(200, 250), 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot notch2(pluck(c4), vector(200, 250), 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot notch2(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]",
               :plot, T)
exec #print("plot notch2(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot notch2(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot notch2(pluck(c4), 200, vector(0.8, 0.9))[0]",
               :plot, T)
exec #print("plot notch2(pluck(c4), 200, vector(0.8, 0.9))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot notch2(pluck(c4), 200, vector(0.8, 0.9))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot notch2(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9))[0]",
               :plot, T)
exec #print("plot notch2(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot notch2(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot notch2(c4, 200, 0.8)",
               :nyerror, {"NOTCH2" 1 {{SOUND} "snd"}})
exec #print("plot notch2(c4, 200, 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot notch2(c4, 200, 0.8)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In NOTCH2, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot notch2(pluck(c4), const(200), 0.8)  ",
               :nyerror, {"NOTCH2" 2 {{POSITIVE} "hz"}})
exec #print("plot notch2(pluck(c4), const(200), 0.8)  ")
exec catch(quote(simulated-error), 
           sal-compile("plot notch2(pluck(c4), const(200), 0.8)  ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In NOTCH2, 2nd argument (hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot notch2(pluck(c4), 200, const(0.8)) ",
               :nyerror, {"NOTCH2" 3 {{POSITIVE} "q"}})
exec #print("plot notch2(pluck(c4), 200, const(0.8)) ")
exec catch(quote(simulated-error), 
           sal-compile("plot notch2(pluck(c4), 200, const(0.8)) ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In NOTCH2, 3rd argument (q) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot allpass2(pluck(c4), 200, 0.8)",
               :plot, T)
exec #print("plot allpass2(pluck(c4), 200, 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot allpass2(pluck(c4), 200, 0.8)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot allpass2(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]",
               :plot, T)
exec #print("plot allpass2(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot allpass2(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot allpass2(pluck(c4), vector(200, 250), 0.8)[0]",
               :plot, T)
exec #print("plot allpass2(pluck(c4), vector(200, 250), 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot allpass2(pluck(c4), vector(200, 250), 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot allpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]",
               :plot, T)
exec #print("plot allpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot allpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot allpass2(pluck(c4), 200, vector(0.8, 0.9))[0]",
               :plot, T)
exec #print("plot allpass2(pluck(c4), 200, vector(0.8, 0.9))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot allpass2(pluck(c4), 200, vector(0.8, 0.9))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot allpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9))[0]",
               :plot, T)
exec #print("plot allpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot allpass2(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot allpass2(c4, 200, 0.8)",
               :nyerror, {"ALLPASS2" 1 {{SOUND} "snd"}})
exec #print("plot allpass2(c4, 200, 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot allpass2(c4, 200, 0.8)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In ALLPASS2, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot allpass2(pluck(c4), const(200), 0.8)  ",
               :nyerror, {"ALLPASS2" 2 {{POSITIVE} "hz"}})
exec #print("plot allpass2(pluck(c4), const(200), 0.8)  ")
exec catch(quote(simulated-error), 
           sal-compile("plot allpass2(pluck(c4), const(200), 0.8)  ", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In ALLPASS2, 2nd argument (hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot allpass2(pluck(c4), 200, const(0.8))",
               :nyerror, {"ALLPASS2" 3 {{POSITIVE} "q"}})
exec #print("plot allpass2(pluck(c4), 200, const(0.8))")
exec catch(quote(simulated-error), 
           sal-compile("plot allpass2(pluck(c4), 200, const(0.8))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In ALLPASS2, 3rd argument (q) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot eq-lowshelf(pluck(c4), 200, 0.8)",
               :plot, T)
exec #print("plot eq-lowshelf(pluck(c4), 200, 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(pluck(c4), 200, 0.8)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-lowshelf(pluck(c4), 200, 0.8, 0.5)",
               :plot, T)
exec #print("plot eq-lowshelf(pluck(c4), 200, 0.8, 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(pluck(c4), 200, 0.8, 0.5)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]",
               :plot, T)
exec #print("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), 200, 0.8, 0.5)[0]",
               :plot, T)
exec #print("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), 200, 0.8, 0.5)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), 200, 0.8, 0.5)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-lowshelf(pluck(c4), vector(200, 250), 0.8)[0]",
               :plot, T)
exec #print("plot eq-lowshelf(pluck(c4), vector(200, 250), 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(pluck(c4), vector(200, 250), 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-lowshelf(pluck(c4), vector(200, 250), 0.8, 0.5)[0]",
               :plot, T)
exec #print("plot eq-lowshelf(pluck(c4), vector(200, 250), 0.8, 0.5)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(pluck(c4), vector(200, 250), 0.8, 0.5)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]",
               :plot, T)
exec #print("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8, 0.5)[0]",
               :plot, T)
exec #print("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8, 0.5)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8, 0.5)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-lowshelf(pluck(c4), 200, vector(0.8, 0.9))[0]",
               :plot, T)
exec #print("plot eq-lowshelf(pluck(c4), 200, vector(0.8, 0.9))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(pluck(c4), 200, vector(0.8, 0.9))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-lowshelf(pluck(c4), 200, vector(0.8, 0.9), 0.5)[0]",
               :plot, T)
exec #print("plot eq-lowshelf(pluck(c4), 200, vector(0.8, 0.9), 0.5)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(pluck(c4), 200, vector(0.8, 0.9), 0.5)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-lowshelf(pluck(c4), 200, 0.8, vector(0.5, 0.4))[0]",
               :plot, T)
exec #print("plot eq-lowshelf(pluck(c4), 200, 0.8, vector(0.5, 0.4))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(pluck(c4), 200, 0.8, vector(0.5, 0.4))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9), vector(0.5, 0.4))[0]",
               :plot, T)
exec #print("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9), vector(0.5, 0.4))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9), vector(0.5, 0.4))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-lowshelf(c4, 200, 0.8, 0.5)",
               :nyerror, {"EQ-LOWSHELF" 1 {{SOUND} "snd"}})
exec #print("plot eq-lowshelf(c4, 200, 0.8, 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(c4, 200, 0.8, 0.5)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EQ-LOWSHELF, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot eq-lowshelf(pluck(c4), const(200), 0.5)",
               :nyerror, {"EQ-LOWSHELF" 2 {{POSITIVE} "hz"}})
exec #print("plot eq-lowshelf(pluck(c4), const(200), 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(pluck(c4), const(200), 0.5)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EQ-LOWSHELF, 2nd argument (hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot eq-lowshelf(pluck(c4), 200, const(0.8), 0.5)",
               :nyerror, {"EQ-LOWSHELF" 3 {{NUMBER} "gain"}})
exec #print("plot eq-lowshelf(pluck(c4), 200, const(0.8), 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(pluck(c4), 200, const(0.8), 0.5)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EQ-LOWSHELF, 3rd argument (gain) must be a number or array of numbers, got a SOUND

exec ny:expect("plot eq-lowshelf(pluck(c4), 200, 0.8, const(0.5))",
               :nyerror, {"EQ-LOWSHELF" 4 {{NUMBER} "slope"}})
exec #print("plot eq-lowshelf(pluck(c4), 200, 0.8, const(0.5))")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-lowshelf(pluck(c4), 200, 0.8, const(0.5))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EQ-LOWSHELF, 4th argument (slope) must be a number or array of numbers, got a SOUND

exec ny:expect("plot eq-highshelf(pluck(c4), 200, 0.8)",
               :plot, T)
exec #print("plot eq-highshelf(pluck(c4), 200, 0.8)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(pluck(c4), 200, 0.8)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-highshelf(pluck(c4), 200, 0.8, 0.5)",
               :plot, T)
exec #print("plot eq-highshelf(pluck(c4), 200, 0.8, 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(pluck(c4), 200, 0.8, 0.5)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-highshelf(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]",
               :plot, T)
exec #print("plot eq-highshelf(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(vector(pluck(c4), pluck(d4)), 200, 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-highshelf(vector(pluck(c4), pluck(d4)), 200, 0.8, 0.5)[0]",
               :plot, T)
exec #print("plot eq-highshelf(vector(pluck(c4), pluck(d4)), 200, 0.8, 0.5)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(vector(pluck(c4), pluck(d4)), 200, 0.8, 0.5)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-highshelf(pluck(c4), vector(200, 250), 0.8)[0]",
               :plot, T)
exec #print("plot eq-highshelf(pluck(c4), vector(200, 250), 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(pluck(c4), vector(200, 250), 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-highshelf(pluck(c4), vector(200, 250), 0.8, 0.5)[0]",
               :plot, T)
exec #print("plot eq-highshelf(pluck(c4), vector(200, 250), 0.8, 0.5)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(pluck(c4), vector(200, 250), 0.8, 0.5)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-highshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]",
               :plot, T)
exec #print("plot eq-highshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-highshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8, 0.5)[0]",
               :plot, T)
exec #print("plot eq-highshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8, 0.5)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), 0.8, 0.5)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-highshelf(pluck(c4), 200, vector(0.8, 0.9))[0]",
               :plot, T)
exec #print("plot eq-highshelf(pluck(c4), 200, vector(0.8, 0.9))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(pluck(c4), 200, vector(0.8, 0.9))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-highshelf(pluck(c4), 200, vector(0.8, 0.9), 0.5)[0]",
               :plot, T)
exec #print("plot eq-highshelf(pluck(c4), 200, vector(0.8, 0.9), 0.5)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(pluck(c4), 200, vector(0.8, 0.9), 0.5)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-highshelf(pluck(c4), 200, 0.8, vector(0.5, 0.4))[0]",
               :plot, T)
exec #print("plot eq-highshelf(pluck(c4), 200, 0.8, vector(0.5, 0.4))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(pluck(c4), 200, 0.8, vector(0.5, 0.4))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-highshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9), vector(0.5, 0.4))[0]",
               :plot, T)
exec #print("plot eq-highshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9), vector(0.5, 0.4))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(vector(pluck(c4), pluck(d4)), vector(200, 250), vector(0.8, 0.9), vector(0.5, 0.4))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-highshelf(c4, 200, 0.8, 0.5)",
               :nyerror, {"EQ-HIGHSHELF" 1 {{SOUND} "snd"}})
exec #print("plot eq-highshelf(c4, 200, 0.8, 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(c4, 200, 0.8, 0.5)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EQ-HIGHSHELF, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot eq-highshelf(pluck(c4), const(200), 0.5)",
               :nyerror, {"EQ-HIGHSHELF" 2 {{POSITIVE} "hz"}})
exec #print("plot eq-highshelf(pluck(c4), const(200), 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(pluck(c4), const(200), 0.5)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EQ-HIGHSHELF, 2nd argument (hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot eq-highshelf(pluck(c4), 200, const(0.8), 0.5)",
               :nyerror, {"EQ-HIGHSHELF" 3 {{NUMBER} "gain"}})
exec #print("plot eq-highshelf(pluck(c4), 200, const(0.8), 0.5)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(pluck(c4), 200, const(0.8), 0.5)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EQ-HIGHSHELF, 3rd argument (gain) must be a number or array of numbers, got a SOUND

exec ny:expect("plot eq-highshelf(pluck(c4), 200, 0.8, const(0.5))",
               :nyerror, {"EQ-HIGHSHELF" 4 {{NUMBER} "slope"}})
exec #print("plot eq-highshelf(pluck(c4), 200, 0.8, const(0.5))")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-highshelf(pluck(c4), 200, 0.8, const(0.5))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EQ-HIGHSHELF, 4th argument (slope) must be a number or array of numbers, got a SOUND

exec ny:expect("plot eq-band(pluck(c4), 300, 0.5, 50)",
               :plot, T)
exec #print("plot eq-band(pluck(c4), 300, 0.5, 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(pluck(c4), 300, 0.5, 50)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(vector(pluck(c4), pluck(g4)), 300, 0.5, 50)[0]",
               :plot, T)
exec #print("plot eq-band(vector(pluck(c4), pluck(g4)), 300, 0.5, 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(vector(pluck(c4), pluck(g4)), 300, 0.5, 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(pluck(c4), vector(300, 250), 0.5, 50)[0]",
               :plot, T)
exec #print("plot eq-band(pluck(c4), vector(300, 250), 0.5, 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(pluck(c4), vector(300, 250), 0.5, 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(pluck(c4), vector(300, 250), vector(0.5, 0.6), 50)[0]",
               :plot, T)
exec #print("plot eq-band(pluck(c4), vector(300, 250), vector(0.5, 0.6), 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(pluck(c4), vector(300, 250), vector(0.5, 0.6), 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(pluck(c4), 300, 0.5, vector(50, 60))[0]",
               :plot, T)
exec #print("plot eq-band(pluck(c4), 300, 0.5, vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(pluck(c4), 300, 0.5, vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(vector(pluck(c4), pluck(g4)), vector(300, 250), 0.5, 50)[0]",
               :plot, T)
exec #print("plot eq-band(vector(pluck(c4), pluck(g4)), vector(300, 250), 0.5, 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(vector(pluck(c4), pluck(g4)), vector(300, 250), 0.5, 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(vector(pluck(c4), pluck(g4)), vector(300, 250), vector(0.5, 0.6), 50)[0]",
               :plot, T)
exec #print("plot eq-band(vector(pluck(c4), pluck(g4)), vector(300, 250), vector(0.5, 0.6), 50)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(vector(pluck(c4), pluck(g4)), vector(300, 250), vector(0.5, 0.6), 50)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(vector(pluck(c4), pluck(g4)), 300, 0.5, vector(50, 60))[0]",
               :plot, T)
exec #print("plot eq-band(vector(pluck(c4), pluck(g4)), 300, 0.5, vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(vector(pluck(c4), pluck(g4)), 300, 0.5, vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(pluck(c4), vector(300, 250), 0.5, vector(50, 60))[0]",
               :plot, T)
exec #print("plot eq-band(pluck(c4), vector(300, 250), 0.5, vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(pluck(c4), vector(300, 250), 0.5, vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(pluck(c4), vector(300, 250), vector(0.5, 0.6), vector(50, 60))[0]",
               :plot, T)
exec #print("plot eq-band(pluck(c4), vector(300, 250), vector(0.5, 0.6), vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(pluck(c4), vector(300, 250), vector(0.5, 0.6), vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(vector(pluck(c4), pluck(g4)), vector(300, 250), 0.5, vector(50, 60))[0]",
               :plot, T)
exec #print("plot eq-band(vector(pluck(c4), pluck(g4)), vector(300, 250), 0.5, vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(vector(pluck(c4), pluck(g4)), vector(300, 250), 0.5, vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(vector(pluck(c4), pluck(g4)), vector(300, 250), vector(0.5, 0.6), vector(50, 60))[0]",
               :plot, T)
exec #print("plot eq-band(vector(pluck(c4), pluck(g4)), vector(300, 250), vector(0.5, 0.6), vector(50, 60))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(vector(pluck(c4), pluck(g4)), vector(300, 250), vector(0.5, 0.6), vector(50, 60))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(c4, 300, 0.5, 50)",
               :nyerror, {"EQ-BAND" 1 {{SOUND} "snd"}})
exec #print("plot eq-band(c4, 300, 0.5, 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(c4, 300, 0.5, 50)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EQ-BAND, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot eq-band(pluck(c4), 300 + lfo(4), 0.5, 50)",
               :error, "In EQ-BAND, hz, gain, and width must be all numbers or all sounds (if any parameter is an array, there is a problem with at least one channel), hz is a SOUND, gain is 0.5, a FLONUM, width is 50, a FIXNUM")
exec #print("plot eq-band(pluck(c4), 300 + lfo(4), 0.5, 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(pluck(c4), 300 + lfo(4), 0.5, 50)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(pluck(c4), 300, 0.5 + lfo(3) * 0.1, 50)",
               :error, "In EQ-BAND, hz, gain, and width must be all numbers or all sounds (if any parameter is an array, there is a problem with at least one channel), hz is 300, a FIXNUM, gain is a SOUND, width is 50, a FIXNUM")
exec #print("plot eq-band(pluck(c4), 300, 0.5 + lfo(3) * 0.1, 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(pluck(c4), 300, 0.5 + lfo(3) * 0.1, 50)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(pluck(c4), 300, 0.5, 50 + lfo(4))",
               :error, "In EQ-BAND, hz, gain, and width must be all numbers or all sounds (if any parameter is an array, there is a problem with at least one channel), hz is 300, a FIXNUM, gain is 0.5, a FLONUM, width is a SOUND")
exec #print("plot eq-band(pluck(c4), 300, 0.5, 50 + lfo(4))")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(pluck(c4), 300, 0.5, 50 + lfo(4))", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot eq-band(pluck(c4), \"bad\", 0.5, 50)",
               :nyerror, {"EQ-BAND" 2 {{POSITIVE SOUND} "hz"}})
exec #print("plot eq-band(pluck(c4), \"bad\", 0.5, 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(pluck(c4), \"bad\", 0.5, 50)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EQ-BAND, 2nd argument (hz) must be a positive number, sound or array thereof, got "bad", a STRING

exec ny:expect("plot eq-band(pluck(c4), 300, \"bad\", 50)",
               :nyerror, {"EQ-BAND" 3 {{NUMBER SOUND} "gain"}})
exec #print("plot eq-band(pluck(c4), 300, \"bad\", 50)")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(pluck(c4), 300, \"bad\", 50)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EQ-BAND, 3rd argument (gain) must be a number, sound or array thereof, got "bad", a STRING

exec ny:expect("plot eq-band(pluck(c4), 300, 0.5, \"bad\")",
               :nyerror, {"EQ-BAND" 4 {{POSITIVE SOUND} "width"}})
exec #print("plot eq-band(pluck(c4), 300, 0.5, \"bad\")")
exec catch(quote(simulated-error), 
           sal-compile("plot eq-band(pluck(c4), 300, 0.5, \"bad\")", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In EQ-BAND, 4th argument (width) must be a positive number, sound or array thereof, got "bad", a STRING

exec ny:expect("plot lowpass4(pluck(c4), 500)",
               :plot, T)
exec #print("plot lowpass4(pluck(c4), 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass4(pluck(c4), 500)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass4(vector(pluck(c4), pluck(d4)), 500)[0]",
               :plot, T)
exec #print("plot lowpass4(vector(pluck(c4), pluck(d4)), 500)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass4(vector(pluck(c4), pluck(d4)), 500)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass4(pluck(c4), vector(500, 600))[0]",
               :plot, T)
exec #print("plot lowpass4(pluck(c4), vector(500, 600))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass4(pluck(c4), vector(500, 600))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass4(pluck(c4), const(500))",
               :nyerror, {"LOWPASS4" 2 {{POSITIVE} "hz"}})
exec #print("plot lowpass4(pluck(c4), const(500))")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass4(pluck(c4), const(500))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LOWPASS4, 2nd argument (hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot lowpass4(c4, 500)",
               :nyerror, {"LOWPASS4" 1 {{SOUND} "snd"}})
exec #print("plot lowpass4(c4, 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass4(c4, 500)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LOWPASS4, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot lowpass6(pluck(c4), 500)",
               :plot, T)
exec #print("plot lowpass6(pluck(c4), 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass6(pluck(c4), 500)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass6(vector(pluck(c4), pluck(d4)), 500)[0]",
               :plot, T)
exec #print("plot lowpass6(vector(pluck(c4), pluck(d4)), 500)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass6(vector(pluck(c4), pluck(d4)), 500)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass6(pluck(c4), vector(500, 600))[0]",
               :plot, T)
exec #print("plot lowpass6(pluck(c4), vector(500, 600))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass6(pluck(c4), vector(500, 600))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass6(pluck(c4), const(500))",
               :nyerror, {"LOWPASS6" 2 {{POSITIVE} "hz"}})
exec #print("plot lowpass6(pluck(c4), const(500))")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass6(pluck(c4), const(500))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LOWPASS6, 2nd argument (hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot lowpass6(c4, 500)",
               :nyerror, {"LOWPASS6" 1 {{SOUND} "snd"}})
exec #print("plot lowpass6(c4, 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass6(c4, 500)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LOWPASS6, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot lowpass8(pluck(c4), 500)",
               :plot, T)
exec #print("plot lowpass8(pluck(c4), 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass8(pluck(c4), 500)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass8(vector(pluck(c4), pluck(d4)), 500)[0]",
               :plot, T)
exec #print("plot lowpass8(vector(pluck(c4), pluck(d4)), 500)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass8(vector(pluck(c4), pluck(d4)), 500)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass8(pluck(c4), vector(500, 600))[0]",
               :plot, T)
exec #print("plot lowpass8(pluck(c4), vector(500, 600))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass8(pluck(c4), vector(500, 600))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot lowpass8(pluck(c4), const(500))",
               :nyerror, {"LOWPASS8" 2 {{POSITIVE} "hz"}})
exec #print("plot lowpass8(pluck(c4), const(500))")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass8(pluck(c4), const(500))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LOWPASS8, 2nd argument (hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot lowpass8(c4, 500)",
               :nyerror, {"LOWPASS8" 1 {{SOUND} "snd"}})
exec #print("plot lowpass8(c4, 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot lowpass8(c4, 500)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In LOWPASS8, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot highpass4(pluck(c4), 500)",
               :plot, T)
exec #print("plot highpass4(pluck(c4), 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass4(pluck(c4), 500)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass4(vector(pluck(c4), pluck(d4)), 500)[0]",
               :plot, T)
exec #print("plot highpass4(vector(pluck(c4), pluck(d4)), 500)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass4(vector(pluck(c4), pluck(d4)), 500)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass4(pluck(c4), vector(500, 600))[0]",
               :plot, T)
exec #print("plot highpass4(pluck(c4), vector(500, 600))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass4(pluck(c4), vector(500, 600))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass4(pluck(c4), const(500))",
               :nyerror, {"HIGHPASS4" 2 {{POSITIVE} "hz"}})
exec #print("plot highpass4(pluck(c4), const(500))")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass4(pluck(c4), const(500))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HIGHPASS4, 2nd argument (hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot highpass4(c4, 500)",
               :nyerror, {"HIGHPASS4" 1 {{SOUND} "snd"}})
exec #print("plot highpass4(c4, 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass4(c4, 500)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HIGHPASS4, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot highpass6(pluck(c4), 500)",
               :plot, T)
exec #print("plot highpass6(pluck(c4), 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass6(pluck(c4), 500)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass6(vector(pluck(c4), pluck(d4)), 500)[0]",
               :plot, T)
exec #print("plot highpass6(vector(pluck(c4), pluck(d4)), 500)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass6(vector(pluck(c4), pluck(d4)), 500)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass6(pluck(c4), vector(500, 600))[0]",
               :plot, T)
exec #print("plot highpass6(pluck(c4), vector(500, 600))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass6(pluck(c4), vector(500, 600))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass6(pluck(c4), const(500))",
               :nyerror, {"HIGHPASS6" 2 {{POSITIVE} "hz"}})
exec #print("plot highpass6(pluck(c4), const(500))")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass6(pluck(c4), const(500))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HIGHPASS6, 2nd argument (hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot highpass6(c4, 500)",
               :nyerror, {"HIGHPASS6" 1 {{SOUND} "snd"}})
exec #print("plot highpass6(c4, 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass6(c4, 500)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HIGHPASS6, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot highpass8(pluck(c4), 500)",
               :plot, T)
exec #print("plot highpass8(pluck(c4), 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass8(pluck(c4), 500)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass8(vector(pluck(c4), pluck(d4)), 500)[0]",
               :plot, T)
exec #print("plot highpass8(vector(pluck(c4), pluck(d4)), 500)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass8(vector(pluck(c4), pluck(d4)), 500)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass8(pluck(c4), vector(500, 600))[0]",
               :plot, T)
exec #print("plot highpass8(pluck(c4), vector(500, 600))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass8(pluck(c4), vector(500, 600))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot highpass8(pluck(c4), const(500))",
               :nyerror, {"HIGHPASS8" 2 {{POSITIVE} "hz"}})
exec #print("plot highpass8(pluck(c4), const(500))")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass8(pluck(c4), const(500))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HIGHPASS8, 2nd argument (hz) must be a positive number or array of positive numbers, got a SOUND

exec ny:expect("plot highpass8(c4, 500)",
               :nyerror, {"HIGHPASS8" 1 {{SOUND} "snd"}})
exec #print("plot highpass8(c4, 500)")
exec catch(quote(simulated-error), 
           sal-compile("plot highpass8(c4, 500)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In HIGHPASS8, 1st argument (snd) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot yin(pluck(c4), 30, 80, 100)[0]",
               :plot, T)
exec #print("plot yin(pluck(c4), 30, 80, 100)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot yin(pluck(c4), 30, 80, 100)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot yin(c4, 30, 80, 0.01)[0]",
               :nyerror, {"YIN" 1 {{SOUND} "sound"}})
exec #print("plot yin(c4, 30, 80, 0.01)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot yin(c4, 30, 80, 0.01)[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In YIN, 1st argument (sound) must be a sound, got 60, a FLONUM

exec ny:expect("plot yin(pluck(c4), const(30), 80, 0.01)[0]",
               :nyerror, {"YIN" 2 {{NUMBER} "minstep"}})
exec #print("plot yin(pluck(c4), const(30), 80, 0.01)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot yin(pluck(c4), const(30), 80, 0.01)[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In YIN, 2nd argument (minstep) must be a number, got a SOUND

exec ny:expect("plot yin(pluck(c4), 30, const(80), 0.01)[0]",
               :nyerror, {"YIN" 3 {{NUMBER} "maxstep"}})
exec #print("plot yin(pluck(c4), 30, const(80), 0.01)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot yin(pluck(c4), 30, const(80), 0.01)[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In YIN, 3rd argument (maxstep) must be a number, got a SOUND

exec ny:expect("plot yin(pluck(c4), 30, 80, const(0.01))[0]",
               :nyerror, {"YIN" 4 {{INTEGER} "stepsize"}})
exec #print("plot yin(pluck(c4), 30, 80, const(0.01))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot yin(pluck(c4), 30, 80, const(0.01))[0]", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In YIN, 4th argument (stepsize) must be a integer, got a SOUND

exec ny:expect("plot follow(pluck(c4), 0.01, 0.1, 0.2, 0.1)",
               :plot, T)
exec #print("plot follow(pluck(c4), 0.01, 0.1, 0.2, 0.1)")
exec catch(quote(simulated-error), 
           sal-compile("plot follow(pluck(c4), 0.01, 0.1, 0.2, 0.1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot follow(c4, 0.01, 0.1, 0.2, 0.1)",
               :nyerror, {"FOLLOW" 1 {{SOUND} "sound"}})
exec #print("plot follow(c4, 0.01, 0.1, 0.2, 0.1)")
exec catch(quote(simulated-error), 
           sal-compile("plot follow(c4, 0.01, 0.1, 0.2, 0.1)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FOLLOW, 1st argument (sound) must be a sound, got 60, a FLONUM

exec ny:expect("plot follow(pluck(c4), const(0.01), 0.1, 0.2, 0.1)",
               :nyerror, {"FOLLOW" 2 {{NUMBER} "floor"}})
exec #print("plot follow(pluck(c4), const(0.01), 0.1, 0.2, 0.1)")
exec catch(quote(simulated-error), 
           sal-compile("plot follow(pluck(c4), const(0.01), 0.1, 0.2, 0.1)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FOLLOW, 2nd argument (floor) must be a number, got a SOUND

exec ny:expect("plot follow(pluck(c4), 0.01, const(0.1), 0.2, 0.1)",
               :nyerror, {"FOLLOW" 3 {{NUMBER} "risetime"}})
exec #print("plot follow(pluck(c4), 0.01, const(0.1), 0.2, 0.1)")
exec catch(quote(simulated-error), 
           sal-compile("plot follow(pluck(c4), 0.01, const(0.1), 0.2, 0.1)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FOLLOW, 3rd argument (risetime) must be a number, got a SOUND

exec ny:expect("plot follow(pluck(c4), 0.01, 0.1, const(0.2), 0.1)",
               :nyerror, {"FOLLOW" 4 {{NUMBER} "stepsize"}})
exec #print("plot follow(pluck(c4), 0.01, 0.1, const(0.2), 0.1)")
exec catch(quote(simulated-error), 
           sal-compile("plot follow(pluck(c4), 0.01, 0.1, const(0.2), 0.1)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FOLLOW, 4th argument (stepsize) must be a number, got a SOUND

exec ny:expect("plot follow(pluck(c4), 0.01, 0.1, 0.2, const(0.1))",
               :nyerror, {"FOLLOW" 5 {{NUMBER} "lookahead"}})
exec #print("plot follow(pluck(c4), 0.01, 0.1, 0.2, const(0.1))")
exec catch(quote(simulated-error), 
           sal-compile("plot follow(pluck(c4), 0.01, 0.1, 0.2, const(0.1))", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In FOLLOW, 5th argument (lookahead) must be a number, got a SOUND

exec ny:expect("plot phasevocoder(pluck(c4), ramp())",
               :plot, T)
exec #print("plot phasevocoder(pluck(c4), ramp())")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(pluck(c4), ramp())", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot phasevocoder(pluck(c4), ramp(), 512)",
               :plot, T)
exec #print("plot phasevocoder(pluck(c4), ramp(), 512)")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(pluck(c4), ramp(), 512)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot phasevocoder(pluck(c4), ramp(), 512, 128)",
               :plot, T)
exec #print("plot phasevocoder(pluck(c4), ramp(), 512, 128)")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(pluck(c4), ramp(), 512, 128)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot phasevocoder(pluck(c4), ramp(), 512, 128, 0)",
               :plot, T)
exec #print("plot phasevocoder(pluck(c4), ramp(), 512, 128, 0)")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(pluck(c4), ramp(), 512, 128, 0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot phasevocoder(vector(pluck(c4), pluck(d4)), ramp())[0]",
               :plot, T)
exec #print("plot phasevocoder(vector(pluck(c4), pluck(d4)), ramp())[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(vector(pluck(c4), pluck(d4)), ramp())[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot phasevocoder(pluck(c4), vector(ramp(), ramp() * 2), 512)[0]",
               :plot, T)
exec #print("plot phasevocoder(pluck(c4), vector(ramp(), ramp() * 2), 512)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(pluck(c4), vector(ramp(), ramp() * 2), 512)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot phasevocoder(pluck(c4), vector(ramp(), ramp() * 2), vector(512, 1024))[0]",
               :plot, T)
exec #print("plot phasevocoder(pluck(c4), vector(ramp(), ramp() * 2), vector(512, 1024))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(pluck(c4), vector(ramp(), ramp() * 2), vector(512, 1024))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot phasevocoder(pluck(c4), ramp(), vector(512, 1024), vector(128, 64))[0]",
               :plot, T)
exec #print("plot phasevocoder(pluck(c4), ramp(), vector(512, 1024), vector(128, 64))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(pluck(c4), ramp(), vector(512, 1024), vector(128, 64))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot phasevocoder(pluck(c4), ramp(), 512, 128, vector(0, 1))[0]",
               :plot, T)
exec #print("plot phasevocoder(pluck(c4), ramp(), 512, 128, vector(0, 1))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(pluck(c4), ramp(), 512, 128, vector(0, 1))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot phasevocoder(c4, ramp())",
               :nyerror, {"PHASEVOCODER" 1 {{SOUND} {}}})
exec #print("plot phasevocoder(c4, ramp())")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(c4, ramp())", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PHASEVOCODER, 1st argument must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot phasevocoder(pluck(c4), 23)",
               :nyerror, {"PHASEVOCODER" 2 {{SOUND} "map"}})
exec #print("plot phasevocoder(pluck(c4), 23)")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(pluck(c4), 23)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PHASEVOCODER, 2nd argument (map) must be a sound or multichannel sound, got 23, a FIXNUM

exec ny:expect("plot phasevocoder(pluck(c4), ramp(), 512.0)",
               :nyerror, {"PHASEVOCODER" 3 {{INTEGER} "fftsize"}})
exec #print("plot phasevocoder(pluck(c4), ramp(), 512.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(pluck(c4), ramp(), 512.0)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PHASEVOCODER, 3rd argument (fftsize) must be a integer or array of integers, got 512, a FLONUM

exec ny:expect("plot phasevocoder(pluck(c4), ramp(), 512, 128.0)",
               :nyerror, {"PHASEVOCODER" 4 {{INTEGER} "hopsize"}})
exec #print("plot phasevocoder(pluck(c4), ramp(), 512, 128.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(pluck(c4), ramp(), 512, 128.0)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PHASEVOCODER, 4th argument (hopsize) must be a integer or array of integers, got 128, a FLONUM

exec ny:expect("plot phasevocoder(pluck(c4), ramp(), 512, 128, 0.0)",
               :nyerror, {"PHASEVOCODER" 5 {{INTEGER} "mode"}})
exec #print("plot phasevocoder(pluck(c4), ramp(), 512, 128, 0.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot phasevocoder(pluck(c4), ramp(), 512, 128, 0.0)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PHASEVOCODER, 5th argument (mode) must be a integer or array of integers, got 0, a FLONUM

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1)",
               :plot, T)
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512)",
               :plot, T)
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512)")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128)",
               :plot, T)
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128)")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128, 0)",
               :plot, T)
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128, 0)")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128, 0)", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pv-time-pitch(vector(pluck(c4), pluck(d4)), const(1.1), const(1.2), 1)[0]",
               :plot, T)
exec #print("plot pv-time-pitch(vector(pluck(c4), pluck(d4)), const(1.1), const(1.2), 1)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(vector(pluck(c4), pluck(d4)), const(1.1), const(1.2), 1)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pv-time-pitch(pluck(c4), vector(const(1.1), const(1.1) * 2), const(1.2), 1)[0]",
               :plot, T)
exec #print("plot pv-time-pitch(pluck(c4), vector(const(1.1), const(1.1) * 2), const(1.2), 1)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), vector(const(1.1), const(1.1) * 2), const(1.2), 1)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), vector(const(1.2), const(1.3)), 1)[0]",
               :plot, T)
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), vector(const(1.2), const(1.3)), 1)[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), vector(const(1.2), const(1.3)), 1)[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), vector(1, 1.1))[0]",
               :plot, T)
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), vector(1, 1.1))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), vector(1, 1.1))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pv-time-pitch(pluck(c4), vector(const(1.1), const(1.1) * 2), const(1.2), 1, vector(512, 1024))[0]",
               :plot, T)
exec #print("plot pv-time-pitch(pluck(c4), vector(const(1.1), const(1.1) * 2), const(1.2), 1, vector(512, 1024))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), vector(const(1.1), const(1.1) * 2), const(1.2), 1, vector(512, 1024))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, vector(512, 1024), vector(128, 64))[0]",
               :plot, T)
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, vector(512, 1024), vector(128, 64))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, vector(512, 1024), vector(128, 64))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128, vector(0, 1))[0]",
               :plot, T)
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128, vector(0, 1))[0]")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128, vector(0, 1))[0]", #t, #f,
                       "<in typecheck.sal>"))

exec ny:expect("plot pv-time-pitch(c4, const(1.1), const(1.2), 1)",
               :nyerror, {"PV-TIME-PITCH" 1 {{SOUND} "input"}})
exec #print("plot pv-time-pitch(c4, const(1.1), const(1.2), 1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(c4, const(1.1), const(1.2), 1)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PV-TIME-PITCH, 1st argument (input) must be a sound or multichannel sound, got 60, a FLONUM

exec ny:expect("plot pv-time-pitch(pluck(c4), 23, const(1.2), 1)",
               :nyerror, {"PV-TIME-PITCH" 2 {{SOUND} "stretchfn"}})
exec #print("plot pv-time-pitch(pluck(c4), 23, const(1.2), 1)")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), 23, const(1.2), 1)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PV-TIME-PITCH, 2nd argument (stretchfn) must be a sound or multichannel sound, got 23, a FIXNUM

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), 1.2, 1, 512.0)",
               :nyerror, {"PV-TIME-PITCH" 3 {{SOUND} "pitchfn"}})
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), 1.2, 1, 512.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), 1.2, 1, 512.0)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PV-TIME-PITCH, 3rd argument (pitchfn) must be a sound or multichannel sound, got 1.2, a FLONUM

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), lfo(1), 512, 128)",
               :nyerror, {"PV-TIME-PITCH" 4 {{NUMBER} "dur"}})
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), lfo(1), 512, 128)")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), lfo(1), 512, 128)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PV-TIME-PITCH, 4th argument (dur) must be a number or array of numbers, got a SOUND

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512.0, 128)",
               :nyerror, {"PV-TIME-PITCH" 5 {{INTEGER} "fftsize"}})
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512.0, 128)")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512.0, 128)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PV-TIME-PITCH, 5th argument (fftsize) must be a integer or array of integers, got 512, a FLONUM

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128.0)",
               :nyerror, {"PV-TIME-PITCH" 6 {{INT-OR-NULL} "hopsize"}})
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128.0)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PV-TIME-PITCH, 6th argument (hopsize) must be a integer, NIL or array thereof, got 128, a FLONUM

exec ny:expect("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128, 0.0)",
               :nyerror, {"PV-TIME-PITCH" 7 {{INTEGER} "mode"}})
exec #print("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128, 0.0)")
exec catch(quote(simulated-error), 
           sal-compile("plot pv-time-pitch(pluck(c4), const(1.1), const(1.2), 1, 512, 128, 0.0)", #t, #f,
                       "<in typecheck.sal>"))
; ERROR MSG: In PV-TIME-PITCH, 7th argument (mode) must be a integer or array of integers, got 0, a FLONUM

