Tonality Model Comparison

This webpage accompanies the following paper:

Please cite the paper if you use/adapt this code in your own work. For questions regarding running of the code described below, and/or setup of the supporting toolbox, you are welcome to contact Tom Collins (tom.collins*, Fred Barrett (fsbarrett*, or Petr Janata (pjanata*

In the test folder of the Janata Lab Music Toolbox (jlmt), there is a subfolder called ‘CollinsEtAl’, which contains six matlab files. Once you have the jlmt up and running, the script ‘CollinsEtAl_analysis.m’ can be used to experiment with our models of tonal perception/cognition. The script sets parameters and iterates over the datasets defined in the function ‘CollinsEtAl_datasets.m’, defining path and variable names of audio files for subsequent analysis.

You can place your own audio files in the jlmt data folder and have these analyzed as well/instead. Conforming to our existing folder structure when placing audio will help to avoid errors, and it will also be necessary to extend/modify the function ‘CollinsEtAl_datasets.m’ to include the paths to your audio files. Event onsets (or at least the time of the target event) need to be specified there in order to run the function ‘CollinsEtAl_calc_attributes.m’. The audio files we provide correspond to the figures in the paper as follows:

  1. Tillmann, Janata, and Bharucha (2003).
    1RCinCB.wav, 3UCinCB.wav, 1RCinBB.wav, and 3UCinBB.wav (Figure S1, also Figure 4 for 3UCinCB.wav).
  2. Bigand, Poulin, Tillmann, Madurell, & D'Adamo (2003).
    B_I_NTC.wav and B_IV_NTC.wav (Figure S2).
  3. Marmel, Tillmann, and Dowling (2008).
    Gi.wav and Giv.wav (Figure S3A).
  4. Marmel and Tillmann (2009).
    Riii0.mp3 and Rvii0.mp3 (Figure S3B).
  5. Marmel, Tillmann, & Delbé (2010).
    piano1MiF.wav, pure1AiF.wav, piano2MivF.wav, and pure2AivF.wav (Figure S3C, also Figure 3).
  6. Tillmann, Janata, and Bharucha (2003).
    L_I_cons.wav and L_I_baseline_cons.wav (Figure S4A), and L_IV_cons.wav and L_IV_baseline_cons.wav (Figure S4B).
  7. Tillmann, Janata, Birk, & Bharucha (2008).
    LT.wav and LTb.wav (Figure S4A), LS.wav and LSb.wav (Figure S4B), LD.wav and LDb.wav (Figure S4C).

After these audio files have been specified in the script ‘CollinsEtAl_analysis.m’, the function ‘jlmt_proc_series.m’ is called. This creates the representations of audio that are discussed in the paper (periodicity pitch, chroma vector, and tonal space). The function ‘CollinsEtAl_calc_attributes.m’ iterates over the output of ‘jlmt_proc_series.m’, and calculates attributes of the representations in a temporal region of target events. For example, one attribute calculates the correlation between short- and long-term tonal space activations, averaged over a 0-200 ms post-target window. Please see the above paper and the code in ‘CollinsEtAl_calc_attributes.m’ for more details. In particular, at the top of the function ‘CollinsEtAl_calc_attributes.m’ it is possible to alter the default parameter values.

This material is based upon work supported in part by the National Science Foundation under Grant No. 1025310. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

bottom corner