![JAR search and dependency download from the Maven repository](/logo.png)
com.musicg.demo.PitchDemo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of musicg Show documentation
Show all versions of musicg Show documentation
Musicg is a lightweight audio analysis library, written in Java, with the purpose of extracting both high level and low level audio features.
package com.musicg.demo;
import com.musicg.processor.TopManyPointsProcessorChain;
import com.musicg.wave.Wave;
import com.musicg.wave.extension.Spectrogram;
public class PitchDemo{
public static void main(String[] args){
String filename = DemoHelper.getDemoDirectory() + "/cock_a_1.wav";
// create a wave object
Wave wave = new Wave(filename);
Spectrogram spectrogram = new Spectrogram(wave);
TopManyPointsProcessorChain processorChain=new TopManyPointsProcessorChain(spectrogram.getNormalizedSpectrogramData(),1);
double[][] processedIntensities=processorChain.getIntensities();
for (int i=0; i0){
System.out.println(i+": "+processedIntensities[i][j]);
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy