unable to create these tones

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
steve
Site Admin
Posts: 80694
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: unable to create these tones

Post by steve » Mon Apr 01, 2019 2:33 pm

Congratulations on your successful modification.

A couple of suggestions that I'd make regarding the code, which I hope you will find useful:

1) For new plug-ins, it is highly recommended that they are written as "version 4" (the most recent version). See: https://wiki.audacityteam.org/wiki/Nyqu ... rs#version


2) Use spaces rather than tabs, and avoid trailing parentheses.
When I look on this page https://github.com/ElliotMebane/Isochro ... odInOut.ny I see code like this:

Code: Select all

(setq *waveform*
   (abs-env 
                (list 
                        (pwl  
                                0 -1
                                ftin 1
                                ftout 1 
                                pw -1
                                1 -1
                        )
                        (hz-to-step 1.0) t
                )
        )
) 
For anyone familiar with LISP, it becomes much easier to read like this:

Code: Select all

(setq *waveform*
  (abs-env 
    (list 
      (pwl 0 -1 ftin 1 ftout 1 pw -1 1 -1)
      (hz-to-step 1.0) t)))

3) In the above, PWL should take an odd number of arguments (http://www.cs.cmu.edu/~rbd/doc/nyquist/ ... l#index407). The final "tn" is missing.

Given that the initial time (t0) is zero, it would be better to write this with PWLV (http://www.cs.cmu.edu/~rbd/doc/nyquist/ ... l#index409)

Code: Select all

(setq *waveform*
  (abs-env 
    (list 
      (pwlv -1 ftin 1 ftout 1 pw -1 1 -1)
      (hz-to-step 1.0) t)))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply