[BlindRUG] Sonification of plots in R - an experiment

Williams, Robin R.M.Williams at exeter.ac.uk
Tue Apr 5 15:48:04 UTC 2016


Dear all,

In collaboration with a colleague here at the University of Exeter, I've started to experiment with the idea of producing sound scapes of plots. The idea was motivated by my current work, which requires me to look at lines of best fit (often using polynomial smoothers) through many datapoints. Essentially, we can produce a soundscape of a plotted function, or plotted data points. The idea is similar to the Mathtrax software produced by NASA some years ago, except we can now harness the power of R. The code is based on the tuner package. Essentially, we create a signal that represents the value of a plotted function using Fourier series, and output the wave to a .wav file. This can be played from within R, using a software such as Windows Media Player under Windows, or mplayer under linux. You can choose from four forms of wave which all sound quite different to me. Datapoints can be indicated with pulses, and tick marks on the x axis are indicated with a short blast of the distinctive sawtooth wave. The soundscape moves from left to write, in order to mimic moving along the x axis. So far, I've used the sonify() function to examine distributions whose PDF I was unfamiliar with, and to look at a nonparametric approximation to a line of best fit estimated from data. I've had to look at many of these plots over the years, which have often required sighted assistance, and so this represents quite a breakthrough in terms of working efficiency.
The code can be obtained from here:

https://raw.githubusercontent.com/sieste/sonic-plot/master/Rsonify/sonify.R
For example, you could try
X=seq(-5,-5,.01)
Y=sin(x)
Sonify(y,x,ticks=seq(-4,4,1),pulse_len=0) # without pulses for the datapoints
Sonify(y,x,ticks=seq(-4,4,1),pulse_len=0.2) # to hear pulses at the datapoints

At this stage I would like to gather any feedback, and suggestions as to how the script could be made more useful still. Please send me any bugs you find in the code.

Best wishes
Robin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nfbnet.org/pipermail/blindrug_nfbnet.org/attachments/20160405/8cf7499a/attachment.html>


More information about the BlindRUG mailing list