Skip to content

adiyoss/Chroma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chroma

A pitch and chroma implementation in written Java

The implementation is based on http://resources.mpi-inf.mpg.de/MIR/chromatoolbox/

Usage

After loading the .wav file using the Wave class, we can use the Chroma class to generate the chroma.

The signal2Chroma function gets as input a wave file and returns a 2D matrix which represents the chroma.

Usage Example

    String filename = "data/piano.wav"; // THE PATH TO THE WAV FILE
    Wave wave = new Wave(filename);
    Chroma chromaGenerator = new Chroma();
    double [][] chroma;
    chroma = chromaGenerator.signal2Chroma(wave.getNormalizedAmplitudes());
    DataAccess dal = new DataAccess();
    dal.writeMatrixToFile(chroma,"src/test/resources/data/chroma.txt");

Visualize

In order to visualize the chroma, you can use the python script inside the python folder.

cd into the python folder and type:

    python plot_matrix.py --chroma 'src/test/resources/data/chroma.txt'

chroma

About

Pitch and chroma implementation in java

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published