The Wayback Machine - https://web.archive.org/web/20210402153307/https://github.com/adiyoss/Chroma
Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

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

Releases

No releases published

Packages

No packages published