Search found 59476 matches

by steve
Tue Jun 12, 2012 5:16 pm
Forum: Nyquist
Topic: Label data to text file
Replies: 108
Views: 21011

Re: Label data to text file

Next comes decision time. What do you want to do with the data? Currently you have a list [in reverse order] of lists that contain (start-time end-time number) [where "number" increments for each detected sound]. How do you want to output this data? The length of a sound can be found by: (...
by steve
Tue Jun 12, 2012 5:10 pm
Forum: Nyquist
Topic: Analysis of Surface Electromyography-Signals
Replies: 34
Views: 12014

Re: Analysis of Surface Electromyography-Signals

Do you think you could write a code similar to..... .... that can be applied to three mono tracks at once? The problem is in retaining the data from one track to the next. Nyquist processes each track separately and reinitialises all variables on completing processing of a track. Fortunately, not q...
by steve
Tue Jun 12, 2012 4:59 pm
Forum: Nyquist
Topic: Label data to text file
Replies: 108
Views: 21011

Re: Label data to text file

thro So basically nesting a loop inside another loop. Can you follow this code [in Notepad++ you can set the language to LISP which will highlight keywords making it easier to read the code. See here: http://npp-community.tuxfamily.org/documentation/notepad-user-manual/languages ] ;; create a list ...
by steve
Tue Jun 12, 2012 4:36 pm
Forum: Nyquist
Topic: Label data to text file
Replies: 108
Views: 21011

Re: Label data to text file

So how would we loop through a list of lists?
For example, a list of lists like this:

Code: Select all

;; create a list
(setf list-of-lists
  (list 
    (list "first list" 1 2 3)
    (list "second list" 10 20 30)
    (list "third list" 101.1 102.2 103.3)))
by steve
Tue Jun 12, 2012 4:31 pm
Forum: Nyquist
Topic: Label data to text file
Replies: 108
Views: 21011

Re: Label data to text file

eddieRay wrote:Interesting, I see how that works better now. Will we use this to now process the file?
We'll use this to process the list before we send the data to the file.
by steve
Tue Jun 12, 2012 4:30 pm
Forum: Nyquist
Topic: Label data to text file
Replies: 108
Views: 21011

Re: Label data to text file

Reading individual items from a list [part 2] ;; create a list (setf mylist (list "apples" "oranges" "bananas" "grapes")) (setq number-of-items (length mylist)) ; how many items in the list (setq output "") ; initialise an empty string (dotimes (ite...
by steve
Tue Jun 12, 2012 4:16 pm
Forum: Nyquist
Topic: Label data to text file
Replies: 108
Views: 21011

Re: Label data to text file

Reading individual items from a list. (nth expr list-expr) http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/xlisp/xlisp-ref/xlisp-ref-182.htm Let's go back to the Nyquist Prompt for a bit and make a list: (list "apples" "oranges" "bananas" "grapes&q...
by steve
Tue Jun 12, 2012 4:02 pm
Forum: Nyquist
Topic: Label data to text file
Replies: 108
Views: 21011

Re: Label data to text file

eddieRay wrote:(9.01 10.02 3) label 3
(4.51 6.01 2) label 2
(2.01 3.01 1)) label 1
Yes, spot on.
We need to know that if we are going to use the data in any way.
by steve
Tue Jun 12, 2012 4:01 pm
Forum: Nyquist
Topic: Label data to text file
Replies: 108
Views: 21011

Re: Label data to text file

Time for some instant gratification. Let's output something to a text file :P We'll need to use some of the code from yesterday: ;;; find the home directory (defun home () (or (get-env "HOME") ; Mac / Linux (get-env "UserProfile"))) ; Windows ; file separator - the right sort of ...
by steve
Tue Jun 12, 2012 3:43 pm
Forum: Nyquist
Topic: Label data to text file
Replies: 108
Views: 21011

Re: Label data to text file

When I ran the plug-in on this audio track:

Image

it created new labels like this:
labels2.png
labels2.png (9.78 KiB) Viewed 1529 times
and the output in the debug window was:

Code: Select all

((9.01 10.02 3) (4.51 6.01 2) (2.01 3.01 1))
Which list is which label?