[audacity4blind] New plug-in: Regular interval labels [attached]

  • From: "David R. Sky" <davidsky@xxxxxxxxxxxxxx>
  • To: audacity4blind@xxxxxxxxxxxxx
  • Date: Sun, 24 Jun 2007 01:06:31 -0700 (PDT)

thanks again leland, your suggestion made me look more and more closely at my late-late-night [and incorrect] code. *smile.


David

equalabel.ny: Regular interval labels
[attached to this post]

thanks to Sami from the Audacity users group for suggesting this
plug-in: adding labels to the label track at regular intervals.

Copy equalabel.ny into your Audacity plug-ins folder, typically

c:\program files\audacity\plug-ins

Start a new session of Audacity. Load audio you want to add
regularly-spaced labels. Select audio [control+a]. Open analyze
menu [alt+a]. Open 'Regular interval labels'. use or change the
following three default variablees:

1. time interval between labels [seconds]
Default sixty seconds, from one second to six hundred seconds [ten
minutes].

2. Label text
Default is "label".

3. Prepend numbers to label text [0=no 1=yes]
Default is yes.

People using a screen reader can view the label track in the
current beta version of Audacity 1.3.3 by opening the track menu
[alt+t] and clicking on 'edit labels'. The labels and their time
positions can be read by cursoring up and down and left-right.
press alt+f4 to return to the main Audacity screen.

Written by David R. Sky  June 24, 2007.
http://www.shellworld.net/~davidsky/nyquist.htm
Thanks to Alex S. Brown for example code from his silencemarker.ny
plug-in for working with the label track.
Released under terms of the GNU Public License
http://www.opensource.org/licenses/gpl-license.php

--
David R. Sky
http://www.shellworld.net/~davidsky/
;nyquist plug-in

;version 2

;type analyze

;name "Regular interval labels..."

;action "Generating equally-spaced labels to the label track..."

;info "equalabel.ny by David R. Sky www.shellworld.net/~davidsky/nyquist.htm 
\nThanks to Alex S. Brown for example code from silencemarker.ny for working 
with label track.\nReleased under terms of the GNU Public License"



;control time "time interval between labels [seconds]" int "" 60 1 600

;control text "Label text" string "" "Label"

;control add-numbers "Prepend numbers to label text [0=no 1=yes]" int "" 1 0 1



; Regular interval label track by David R. Sky, June 24, 2007.

; http://www.shellworld.net/~davidsky/nyquist.htm

; Thanks to Sami from the Audacity users list for suggestion

; Thanks to Alex S. Brown's silencemarker.ny 

; for example code of setting labels on the label track

; Released under terms of the GNU Public License

; http://www.opensource.org/licenses/gpl-license.php 



#|

thanks to Sami from the Audacity users group for suggesting this

plug-in: adding labels to the label track at regular intervals.



Variables:



1. time interval between labels [seconds]

Default sixty seconds, from one second to six hundred seconds [ten

minutes].



2. Label text

Default is "label".



3. Prepend numbers to label text [0=no 1=yes]

Default is yes.



People using a screen reader can view the label track in the

current beta version of Audacity 1.3.3 by opening the track menu

[alt+t] and clicking on 'edit labels'. The labels and their time

positions can be read by cursoring up and down and left-right.

press alt+f4 to return to the main Audacity screen.



Written by David R. Sky  June 24, 2007.

http://www.shellworld.net/~davidsky/nyquist.htm

Thanks to Alex S. Brown for example code from his silencemarker.ny

plug-in for working with the label track.

Released under terms of the GNU Public License

http://www.opensource.org/licenses/gpl-license.php 

|#



; calculate samples per label interval

(setf samps (* time *sound-srate*))

; calculate number of labels in selection

; this includes label at start of selection

; which is label number 0 if numbers are prepended to label text

(setf labels (+ 1 (truncate (/ len samps))))





; function to add new items to the list of labels

; from silencemarker.ny by Alex S. Brown

(defun add-label (l-time l-text)

 (setq l (cons (list l-time l-text) l)))





; function to prepend label number before label text

(defun label-text (i text)

(format nil "~a~a" i text))





; initialize blank label track

(setq l nil)



; add the labels

(dotimes (i labels)

(if (= add-numbers 1) ; prepend numbers to label text?

(add-label (* i time) (label-text i text)) ; yes

(add-label (* i time) text) ; no

) ; end if

) ; end dotimes i



; return label track

l

Other related posts:

  • » [audacity4blind] New plug-in: Regular interval labels [attached]