The Cracked Bassoon

Sam Mathias

I'm a psychoacoustician. I mainly post code for making interesting sounds.

  1. Bayesian hierarchical model of working-memory capacity

    13. September 2016 1983 words ~10 minutes read Comment

    Working memory (WM) is the name of the memory system that stores information for time periods in the order of seconds (see Baddeley & Hitch, 1974; Cowan, 2001). WM is considered to be limited both in terms of duration (how long information is stored) and capacity (how much information is stored). The nature of WM ...

  2. Running psychological experiments on a Raspberry Pi

    22. July 2016 842 words ~6 minutes read Comment

    The Raspberry Pi is a credit-card sized, single-board computer developed for hobbyists and educational purposes. Despite its low price (around $35 in the USA), the most recent version of the Pi — the Raspberry Pi 3 Model B — is surprisingly capable. It has a quad-core, 64-bit processor, 4 USB ports, HDMI output, and onboard Bluetooth and ...

  3. Bayesian signal detection theory, part III: hierarchical generalised linear models

    12. February 2016 2419 words ~13 minutes read 2 Comments

    In the first post in this series, I discussed the basic assumptions of signal detection theory (SDT), and implemented simple Bayesian model that estimated sensitivity and bias for a single observer in a yes-no (YN) experiment. Here, I consider a slightly more realistic situation, where multiple observers participated in the same experiment, and present a ...

  4. Python for psychophysics on OS X Yosemite

    27. May 2015 815 words ~6 minutes read 3 Comments

    Apple Macs and Python are, of course, both generally fabulous, but make an especially formidable hardware/software combination for psychological or psychophysical research. Apple uses pretty high-quality internals for audio and video that should be adequate for running most experiments. Python is a highly readable, free and open-source language, promoting replicability. Moreover, Python has extensive data-analysis ...

  5. Equal-loudness contours

    9. April 2015 254 words ~2 minutes read 3 Comments

    Two tones with different frequencies presented at the same sound pressure level (SPL) may not sound equally loud. Equal-loudness contours represent these variations in perceived loudness across frequencies for the average human ear. The basis of the equal-loudness contour is the phon, the dB SPL necessary for a tone to sound as loud as a ...

  6. Bayesian signal detection theory, part II: 2AFC

    31. January 2015 1275 words ~7 minutes read Comment

    In my last post, I described how to use signal detection theory (SDT) to analyse data from a single observer in a yes-no experiment. In the real world, not all experiments conform to the yes-no paradigm, so the basic SDT model must be extended in various ways. Here, I'm going to apply SDT to data from ...

  7. Signal detection theory with Bayesian inference in PyMC

    7. December 2014 2387 words ~11 minutes read 3 Comments

    Signal detection theory (SDT) is a framework for modelling the decision processes of observers in psychological experiments (see Green & Swets, 1966). One of the primary uses of SDT is to transform observed data (counts of trials and responses in an experiment) into psychologically meaningful variables, the most well known of which are the index ...

  8. Ripple sounds

    13. November 2014 1190 words ~7 minutes read Comment

    Ripples are synthetic sounds that have sinusoidal spectral or spectro-temporal profiles. They are commonly used to measure the response properties of neurons in the auditory system, and are frequently compared with visual gratings (see Shamma, 2001). They have also been used to study auditory short-term memory (e.g., Visscher et al., 2007). To create a ripple, we first need ...

  9. Image filtering

    8. September 2014 438 words ~4 minutes read Comment

    Below is some code for filtering out certain spatial frequencies from a grayscale image using python. The process is rather straightforward in theory. First, perform the two-dimensional discrete Fourier transform (using numpy's fft2 function) on the data from the original image. This produces a new representation of the image in which each pixel represents a spatial frequency and ...

  10. Speech-shaped noise

    3. July 2014 327 words ~3 minutes read 2 Comments

    Speech-shaped noise (SSN) is noise whose long-term average spectrum is similar to that of speech. It is primarily used as a masker in studies of speech perception (e.g., Nelson et al., 2003; Qin & Oxenham, 2003). Recently, I had to generate some SSN in python. After some googling, it seemed that the most straightforward approach was to ...