Here's the Matlab code used for EEG data (pre)processing and R code used for behavioral data statistical analysis, from my bachelor thesis project on mode processing in music.
Some of the code may be underdocumented.
For a detailed description of the data processing and analysis procedures, as well as the study design and findings, take a look at my bachelor thesis (contact me at [email protected])