{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Sonification: Convert data to MIDI (Part 1)\n",
"This is a simple example of parameter mapping sonification in which discrete data points are mapped to musical notes. You can think of this as a musical scatter plot with time being the x-axis and musical pitch being the y-axis. This technique will likely be more intuitive when applied to time series data (since the 'x-axis' already indicates time) but it can be used no matter what the data on each axis represent. This is very similar to what can be done with software like [TwoTone](https://twotone.io) but of course it will be much more flexible when you do it yourself! \n",
"\n",
"As an example, we will recreate a version of the sonification method used in [Moon Impacts](www.system-sounds.com/moon-impacts/). We will start with a list of the lunar impact craters that are bigger than 10km across that have age estimates. This data comes from a paper by our friend Sara who discovered an interesting uptick in the impact rate about 290 million years ago [(Mazrouei et al 2019)](https://www.science.org/doi/10.1126/science.aar4058). The sonification will allow us to hear the rhythm of these large impacts over the last billion years. We'll map the crater diameters to pitch and velocity (a combinaiton of volume and intensity) so we can hear the distribution of impact sizes over time.\n",
"\n",
"
\n",
"
\n", " | names | \n", "longitude | \n", "latitude | \n", "diameter | \n", "age | \n", "
---|---|---|---|---|---|
60 | \n", "Mosting A | \n", "354.80469 | \n", "-3.22070 | \n", "12.7 | \n", "1324 | \n", "
50 | \n", "NaN | \n", "262.67029 | \n", "43.65850 | \n", "13.6 | \n", "1026 | \n", "
45 | \n", "NaN | \n", "79.73330 | \n", "22.83180 | \n", "14.3 | \n", "993 | \n", "
2 | \n", "King | \n", "120.49220 | \n", "4.93750 | \n", "76.2 | \n", "992 | \n", "
41 | \n", "Hume Z | \n", "90.41211 | \n", "-3.62497 | \n", "15.0 | \n", "981 | \n", "