'Artificial' Synesthesia¶

"Synesthesia is a fancy name for when you experience one of your senses through another". When I was in high school I met a talented muscian who had synesthsia. She would describe how when she played the violin, she saw sparks of light moving in the air along with what she played. Because of this she was able to develop what muscians call 'perfect pitch'-- when you can identify a musical note by name just by listening to it.

The project I wanted to pursue relates to this-- I want to develop something that can take a song, read through its signals and return either a single color or a color palette that corresponds to the song. While this project isnt necessarily something that can outright solve an issue, its a project that more so explores the expression of creativity through machine learning.

The I plan on utilizing 2 datasets: Table of Musical Notes and Their Frequencies and Wavelengths which I converted into a csv, and a csv of HTML color codes, their RBG values and their english names.

Color codes¶

Some key features to note are the names, and the RBG values. These can be extremely helpful when determining how similar colors are, and how they may look based on the english description. Image of DF here

In [8]:
import pandas as pd
# reading in our colors.csv file 
df_colors = pd.read_csv("colors.csv")
df_colors
Out[8]:
name no space name html color code Red value Green value Blue value
0 air_force_blue_raf Air Force Blue (Raf) #5d8aa8 93 138 168
1 air_force_blue_usaf Air Force Blue (Usaf) #00308f 0 48 143
2 air_superiority_blue Air Superiority Blue #72a0c1 114 160 193
3 alabama_crimson Alabama Crimson #a32638 163 38 56
4 alice_blue Alice Blue #f0f8ff 240 248 255
... ... ... ... ... ... ...
860 yellow_orange Yellow Orange #ffae42 255 174 66
861 yellow_process Yellow (Process) #ffef00 255 239 0
862 yellow_ryb Yellow (Ryb) #fefe33 254 254 51
863 zaffre Zaffre #0014a8 0 20 168
864 zinnwaldite_brown Zinnwaldite Brown #2c1608 44 22 8

865 rows × 6 columns

Note Frequencies and wavelenths¶

The most notable features are the note names, and their frequencies. If there is more information that we need for our csv file like .wav signals, that would be looked into and added onto the csv immediately. Image of DF here

In [7]:
# reading in our note data
df_notes = pd.read_csv("notes_freqs.csv")
df_notes 
Out[7]:
Note Name Octave Frequency (Hz) Wavelength (M)*
0 C 0.0 16.351 20.812
1 C# / Db 0.0 17.324 19.643
2 D 0.0 18.354 18.540
3 D# / Eb 0.0 19.445 17.500
4 E 0.0 20.601 16.518
... ... ... ... ...
124 G 9.0 12543.856 0.027
125 G# / Ab 9.0 13289.752 0.026
126 A 9.0 14080.000 0.024
127 A# / Bb 9.0 14917.240 0.023
128 B 9.0 15804.264 0.022

129 rows × 4 columns

The logistics of this project would involve utilizing scipy.io similarly to how we modified .wav files in lab3. We could assign specific key words with specific chords or notes in songs and that could be cross referenced with the names of colors. Those colors could also include color families, or colors that have a large amount of a specific color value. For example, if we accociate the note Ab with the word 'melancholy', we could then assign 'Melancholy blue' to that note and include colors that have high blue values to that word as well.