Page 1 of 1

Getting filename from songs.

Posted: Mon Apr 06, 2009 7:25 am
by helblade
Hi. I'm new to audacity and i'm trying to make a beat analyzer that prints out the time of beats to an external file using a nyquist plugin.
So far i've been able to print stuff out but i cant seem to find any supporting documents that would enable me to print the filename of the sound file i am using. i'm using the ;type analyze plugin for this.
any help will be greatly appreciated.
thanks.

Re: Getting filename from songs.

Posted: Mon Apr 06, 2009 11:51 pm
by steve
helblade wrote:i cant seem to find any supporting documents that would enable me to print the filename of the sound file i am using.
You will need to do that from user input as Audacity does not pass that information to Nyquist.

Code: Select all

;nyquist plug-in
;version 2
;type analyze
;name "A-test"
;action "test"
;info "text input example..."

;; input for name
;; Note that for an empty input field, ther must be 2 spaces at the end of the line.
;control name "Enter Your Name" string "" ""  

;; input for message
;; input field is not empty, so spaces at end of the line are not required.
;control input-text "text before box" string "text after" "input"

;; concatenate (join) strings
(setq message (strcat "your name is: " name ".nYour message is: " input-text))

(print message)

Re: Getting filename from songs.

Posted: Tue Apr 07, 2009 5:42 am
by helblade
oh okay. thanks alot.