I have trouble calling siosc

Using Nyquist scripts in Audacity.
Post and download new plug-ins.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
dem
Posts: 1
Joined: Thu Jun 14, 2018 12:03 am
Operating System: Windows 7

I have trouble calling siosc

Post by dem » Thu Jun 14, 2018 10:44 pm

I'm trying to learn Nyquist, and I'm having trouble figuring out how the tables argument of siosc is supposed to look.
The reference manual has this to say:
The tables specify a list of waveforms as follows: (table0 time1 table2 ... timeN tableN), where each table is a sound representing one period.
Here is my attempt:

Code: Select all

(setf mytable (maketable (osc 2)))
(setf mytable2 (maketable (osc 1)))
(siosc 60 (s-rest 1) '(mytable 1 mytable2))
siosc-breakpoints throws an error when I run this:
siosc-breakpoints : BREAKPOINTS = (MYTABLE 1 MYTABLE2)
error: SIOSC expecting SOUND in table list

from reading nyquist.lsp, it seems that (soundp (car '(mytable 1 mytable2))) returns false. Why is that?

steve
Site Admin
Posts: 47264
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: I have trouble calling siosc

Post by steve » Thu Jun 14, 2018 11:58 pm

Try this:

Code: Select all

(siosc 60 (pwlv 0 1 800) (list (hzosc 4) 1 (hzosc 1)))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 47264
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: I have trouble calling siosc

Post by steve » Fri Jun 15, 2018 12:36 am

I've not used SIOSC before. It's cool 8-)

Code: Select all

(stretch-abs 2
    (mult (pwlv 0 0.01 1 0.1 1 0.2 0.2 1 0)
          (siosc 72
              (mult (pwlv -10 0.5 10 1 -10)(sum 10 (hzosc 4)))
              (list (mult (pwlv 0 0.2 1 1 0)(hzosc 1))
                    0.4
                    (mult (pwlv 0 0.8 1 1 0)(osc-tri 0.8) )
                    0.6
                    (mult (pwlv 0 0.2 1 1 0)(hzosc 2))))))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply