Supplementary files for A Model of Melodic Affinity

This page contains supplementary files for "A Model of Melodic Affinity".

MATLAB Routines

The MATLAB routine Affinity_data_analysis_final.m contains the experimental data, the optimization routines, and statistical analyses of the data and the model's outputs and parameters. The MATLAB function Affinity_model_final.m is called by the above routine, and contains the affinity model itself, and calculates the discrepancy function with the data (negative log-likelihood). MATLAB's Optimization Toolbox and Statistics Toolbox are both required, as well as some additional third-party functions, which can be downloaded from http://www.mathworks.com/matlabcentral/fileexchange/ (convnfft by Bruno Luong, DERIVESTsuite by John D'Errico, myBinomTest.m by Matthew Nelson). The statistical values reported in the paper were obtained from the above MATLAB routines, with the exception of the Hosmer-Lemeshow value (calculated in SPSS) and the ordinal alpha value (calculated in R).

There is an additional MATLAB data file Affinity_CV_Results.mat, which contains the scores from the five runs of 10-fold cross-validation (these values take many hours to calculate). Loading this data enables the statistical test at the end of Affinity_data_analysis_final.m to be performed without running the cross-validations anew.

In the experiment, the Max/MSP patch Microtonal_Melodies_15.maxpat (I was running the Windows version of Max/MSP 5.1.9) was used to generate the MIDI data and send control messages to a specially adapted version of The Viking synthesizer (a Windows only .osm file which requires Synthmaker—I was running version 1.1.7). The Max/MSP patch also requires a JavaScript file generator2.js to be placed in the same directory.

The above files should allow for all aspects of the experiment and its modelling to be repeated.

Audio Examples

The following mp3 files are examples of the stimuli used in the experiment (more accurately, they were generated by the same stochastic processes). The underlying tuning is indicated by the first number, and the spectral tuning by the second number. For example, 5–5 indicates a 5-TET melody with a 5-TET (matched) spectral tuning, 5–13 indicates a 5-TET melody with a 13-TET (unmatched) spectral tuning. The files are paired—as in the experiment—so each melody is played in a matched and unmatched timbre.

13–16     13–13

17–17     17–15

12–12     12–3

3–11     3–3

5–5     5–12

4–16     4–4

11–13     11–11

7–17     7–7

10–10     10–11

15–15     15–12

13–13     13–7

17–17     17–16

16–5     16–16

5–5     5–15

3–13     3–3

13–10     13–13

4–3     4–4

5-13     5-5

11-10     11-11