This Jupyter notebook provides a basic framework for Oddball Experimentation using the Pygame package. It presents participants with a sequence of repetitive stimuli, which are infrequently interrupted by a deviant stimulus, so that the participant's reaction to this "oddball" stimulus can be recorded and analyzed.
The motivation for this repo came when I was setting up real-life neuroscience experiments for my DL-EEG-TES thesis, and I couldn't find any good Python package to design an auditory oddball paradigm. So I built my own and open-sourced for the neuroscientific community, hope it helps some of you. :)
Ensure that you have correctly installed the Pygame module, and simply run the src/auditory_oddball.ipynb
notebook. You will be prompted to introduce the Participant ID once at the beginning of the session. After that you can start, pause, stop, or resume it as needed to run your Oddball Experiment. A number of parameters can be specified to achieve any desired paradigm:
n_beeps=30
— Total number of auditory stimuli, per runn_runs=10
— Total number of runs, per experimental sessionbeep_duration=50
— Sound duration, in millisecondssilence_duration=1000
— Interval between sounds, in millisecondsstandard_freq=400
— Main frequency of normal sounds, in Hzoddball_freq=1000
— Main frequency of odd sounds, in Hzratio_oddball=0.2
— Proportion of oddball/standard sounds