tarsosDSP_presentation

Post on 14-Oct-2014

16 views 0 download

Tags:

transcript

Outline and Goal Basics TarsosDSP Conclusion

Audio Processing Joren Six

25 March 2011

Outline and Goal Basics TarsosDSP Conclusion

Goal

Cover the basic principles of doing stuff with audio.

Outline and Goal Basics TarsosDSP Conclusion

Outline

Outline and Goal

BasicsAnalog AudioDigital Audio

TarsosDSPExamplesContact

Conclusion

Outline and Goal Basics TarsosDSP Conclusion Analog Audio Digital Audio

Basics - Analog Audio

f (x)

x

Figure: Continuous wave

Outline and Goal Basics TarsosDSP Conclusion Analog Audio Digital Audio

Basics - Digital Audio

f (x)

x

Figure: Sampled wave

Outline and Goal Basics TarsosDSP Conclusion Analog Audio Digital Audio

Basics - Digital Audio - Samplerate

Listing 1: A sampled sine wave buffer

1 double sampleRate = 44100.0;

double frequency = 440.0;

double seconds = 2.0;

float[] b = new float[seconds * sampleRate ];

for (int sample = 0; sample < b.length; sample ++) {

6 double time = sample / sampleRate;

b[sample] = 0.8 * Math.sin(twoPiF0 * time);

}

Outline and Goal Basics TarsosDSP Conclusion Analog Audio Digital Audio

Basics- Digital Audio - Bit depth

Listing 2: A sampled sine wave buffer

final byte[] byteBuffer = new byte[b.length * 2];

2 int bIndex = 0;

for (int i = 0; i < byteBuffer.length; i++) {

final int x = (int) (b[bIndex ++] * 32767.0);

byteBuffer[i] = (byte) x;

i++;

7 // unsigned right shift

byteBuffer[i] = (byte) (x >>> 8);

}

float in [−1.0, 1.0] to 16bit signed little endian PCM.Multiply each sample with b(216 − 1)/2c = 32767

Outline and Goal Basics TarsosDSP Conclusion Examples Contact

TarsosDSP - What

TarsosDSP is a collection of JAVA classes to do simple audioprocessing. Bascially chainable operations on float or byte buffers.

Outline and Goal Basics TarsosDSP Conclusion Examples Contact

TarsosDSP - Contents

I Filters: low pass, high pass

I Pitch detectors: YIN and MPM

I FFT

I WAV file writer

I . . .

Outline and Goal Basics TarsosDSP Conclusion Examples Contact

TarsosDSP - Sound Detection

Demo

Outline and Goal Basics TarsosDSP Conclusion Examples Contact

TarsosDSP - Pitch Detection

Figure: Pitch detection

Outline and Goal Basics TarsosDSP Conclusion Examples Contact

TarsosDSP - Percussion Detection

Figure: Percussion onset detection

Outline and Goal Basics TarsosDSP Conclusion Examples Contact

TarsosDSP - FFT to MIDI

Demo

Outline and Goal Basics TarsosDSP Conclusion Examples Contact

TarsosDSP - Contact

Figure: https://github.com/JorenSix/TarsosDSP

Outline and Goal Basics TarsosDSP Conclusion

Conclusion and Questions

joren.six@hogent.be