Minim - how do I pitch shift a sample?

I have a sound. I want it to play 1.5x as fast. How do I do that? Is there anything like this?:

import ddf.minim.*;
Minim minim=new Minim(this);
AudioPlayer test; 
void setup(){ 
  test=minim.loadFile("test.wav");
  test.play(); 
  test.setPitch(1.5);  //<<<<fake command
}
void draw(){}

Even with any synonyms of "pitch" that I could think of(frequency, tune, height, deepness), Google gives either stuff completely unrelated or a trillion of questions of how to detect the frequency instead. Minim documentation doesn't help either.

Tagged:

Answers

  • edited January 15 Answer ✓

    You are looking for tickrate. There is also an example in the examples folder called tickrate.

  • edited January 15

    Thank you! Minim is such a weird thing, trying to be simple and accessible... ._.

    edit: OH GOD there's a Minim examples folder! How did I not see it before!

  • edited January 17

    No problem. Most libraries come with examples. Always pays to check them out and see what's possible.

Sign In or Register to comment.