Created
September 2, 2019 20:51
-
-
Save Demiu/6af800f45a7db67b1a30a1f8d4f9b470 to your computer and use it in GitHub Desktop.
Simple labeling by clips for audacity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;nyquist plug-in | |
;version 4 | |
;type tool analyze | |
;name "Simple Clips Label" | |
;get data from audacity | |
(setf clips | |
(get '*TRACK* 'CLIPS)) | |
(setf time | |
(get '*SELECTION* 'START)) | |
(setf iterator 0) | |
(defun label-clip | |
(clip) | |
(setf clip | |
(list | |
(first clip) | |
(first (rest clip)) | |
(format nil "~a" iterator))) | |
(setf iterator | |
(+ iterator 1)) | |
clip | |
) | |
(defun fix-time-values | |
(clip) | |
(setf (nth 0 clip) | |
(- | |
(nth 0 clip) | |
time)) | |
(setf (nth 1 clip) | |
(- | |
(nth 1 clip) | |
time)) | |
clip | |
) | |
(if | |
(arrayp clips) | |
(mapcar #'fix-time-values | |
(mapcar #'label-clip | |
(aref clips 0))) | |
(mapcar #'fix-time-values | |
(mapcar #'label-clip | |
(first clips))) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment