A script to analyze wav files generated by Song Analysis Pro 2011, using GPU if available, and return the syntax variability of a bird selected. The return will be in the form of an SVG file that can easily be edited in adobe illustrator for publishing purposes.
It is reccomended to run on Matlab 2024a or later. Please install and have in your matlab environment the zftftb package. All data should be in wav format, not mp3 or otherwise. Comments were generated with the help of CHATGPT.
Your filing system should follow the below template, for General Syntax to run properly.
BirdID--->mic--->folder(s) containing a days worth of recording(s).
Either using SAP or listening to bird recordings, find a wav file that contains a recording of your zebrafinch performing its motif multiple times in one bout. Preferably a 30 second recording, or less. Place that file into the mic folder, and rename it to "fortemplate".
Go into the script using matlab editor, and in the first section change the working directory address to where you have stored your bird files, specifically the mic folder of the bird.
You will have to make several inputs, such as wanting to reanalyze all the days, resetting clustering information, selecting the motif from the fortemplate, selecting region of detected motifs to use for creating clusters based on similiarity to others, and classifying clusters.
Cluster_Index, Syntax_Clustered, mic_template and ID_Motif_Syntax_Summary. Read the script for more info.