Music Information Retrieval Systems
by William Birmingham, Colin Meek, Kevin O'Malley, Bryan Pardo, Jonah Shifrin

Listing One
on run_viterbi()
    set args to UNIX_VS_PATH & UNIX_FILE_DELIM & PT_FILE & " " & 
        VETERBI_UNIX_PATH & UNIX_FILE_DELIM & "dirBeatles.txt" & 
        " " & DEFAULT_PLAYLIST & " " & VETERBI_UNIX_PATH
    set cmd to VETERBI_UNIX_PATH & UNIX_FILE_DELIM & VETERBI_APP & " " & args
    my my_log(cmd)

    tell application "Terminal"
        set theResult to do shell script cmd
    end tell
    my my_log(theResult)
    
    if the 1st word of theResult is equal to "error" then
        handle_error(theResult, VITERBI)
    end if
    
    set aList to theResult
    return aList
end run_viterbi


1


