Sonification of IR Spectra

 

F. Pereira et al. J. Chem. Educ. 2013

 

PT

Tutorial for generating sonified infrared spectra (SIRS)

 

For this tutorial the programs JDXview v0.2 and CSV to MIDI converter were used in the Windows operating system. The tutorial is divided in four sections:

 

Section A. Processing of the IR spectra in JCAMP-DX format to tab-separated XY values in a TXT format.

 

Section B. Getting a CSV file from IR data.

 

Section C. Generating a SIRS from a CSV file.

 

Section D. Training set for SIRS-assisted identification of organic compounds.

 

 

A. Processing the IR spectra in JCAMP-DX format to tab-separated XY values in a TXT format

 

A.1. With a graphical user interface (GUI)

Open the IR spectrum of an organic compound in JCAMP-DX format using the JDXview program.

 

The NIST database contains thousands of IR spectra in JCAMP-DX format.

 

Save the IR spectrum (e.g. cholesterol_IR_spectrum.jdx) as tab-separated XY values in a TXT format (e.g. cholesterol_IR_spectrum.txt).

 

A.2. With a command-line interface

With the jdx2dx tool you can process the spectra in JCAMP-DX format to tab-separated XY values in a TXT format.

 

Create a directory (e.g. “spectra”). Put in this directory the jdx2jdx-0.1-win32 tool and the IR spectrum of an organic compound.

Open an MS-DOS window and go to the directory “spectra” by typing:

 

“C:\” and Press [Enter];

“cd c:\spectra” and Press [Enter];

 

Then, run jdx2dx with the command

“jdx2jdx-0.1-win32 --encoding=pac --columns=2  <infile.jdx  > outfile.txt” and Press [Enter].

 

The output file is saved on the same directory.

 

B. Getting a CSV file from IR data

 

B.1. Converting the transmittance (T) data into (1-T).

Open the tab-separated XY values file (e.g.   cholesterol_IR_spectrum.txt) with a text editor, select the data and paste it into a spreadsheet. Convert the transmittance (T) column into (1-T) by implementing the respective formula, name this column as (1-T), and save (e.g. cholesterol_IR_spectrum_B_1.xls).

 

B.2. Converting the spectral frequency into a time indicator.

Add a new column (labeled “Time”) and fill it with consecutive integer numbers starting with 1 for the first spectral frequency (e.g. cholesterol_IR_spectrum_B_2.xls).

 

B.3. Correlating the intensity of the absorption in % with the range of musical instrument frequency.

Firstly, convert the (1-T) column into (100-%T) by implementing the respective formula, name this column as (100-%T).  Format each cell of this column in integer numbers (e.g. cholesterol_IR_spectrum_B_3.xls).

 

B.4. Adding seven time markers (ring bells).

Set the first ten points to the 127 value (the maximum value) in column (100-%T). Then, do the same for each of the ten points centered respectively to 3000, 2500, 2000, 1500, 1000 cm-1, and for the last ten points. Add a new column corresponding to the volume of the sound with the maximum value, name this column as V (e.g. cholesterol_IR_spectrum_B_4.xls).

 

B.5. Setting the speed and the instrument.

Copy the three column values [Time, (100-%T), and V] to a text editor file. Replace all tabs with commas.

 

On the first line set the speed in pulses per quarter note of the SIRS. The speed is set to 32 pulses per quarter note in order to obtain a SIRS with about one minute of duration. However, you may change this value in order to obtain a shorter or longer SIRS.

 

On the second line set the instrument number from the Java MIDI Instruments list. It is set to 13, to choose marimba.

 

Save the file with the .CSV extension in the same directory of the CSV to MIDI converter program, (e.g. cholesterol_IR_spectrum.csv).

 

 

C. Generating a SIRS from a CSV file

 

Open an MS-DOS window and go to the directory "spectra" by typing:

 

C:\” and Press [Enter];

“cd c:\spectra” and Press [Enter];

 

Then, run CSV2MIDI with the command

“java CSV2MIDI  cholesterol_IR_spectrum.csv  cholesterol_SIRS.midi” and Press [Enter].

 

The output file is saved on the same directory. You can listen to the MIDI file (e.g. cholesterol_SIRS.midi) with a common media player. Listen now.

 

You can also listen the cholesterol SIRS generated in this tutorial by cliking the play button.

 

D. Training set for SIRS-assisted identification of organic compounds

For the successful interpretation of an SIRS an audio training is required. For this purpose is essential to listen first to the characteristic functional groups. After becoming familiar with the sound of functional groups, the next step is to listen a complete SIRS from an organic compound. For tutored learning an IR spectra is also provided (convert the scale to Absorbance if you want to visually follow the SIRS).

 

Functional group

 

Training sample

 

IR spectrum

 

Alcohol

 

3-Methyl-1-butanol  

 

  IR

 

Amine

 

N-Allyl-isopropylamine

 

 IR

 

Imine

 

p-Tolualdehyde

 

  IR

 

Hydrazine

 

n.a.

 

n.a.

 

Aldehyde

 

Benzaldehyde

 

  IR

 

Ketone

 

Cyclohexanone

 

  IR

 

Carboxylic acid

 

(E)-Cinnamic acid

 

 IR

 

Ester

 

Methyl salicylate

 

 IR

 

Amide

 

 

N,N-Diphenylacetamide

 

 

  IR

 

 

MOLinsight

 

 

Webmaster: Vasco Bonifácio

last update: 14.08.2013