We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I am using minim to create sounds in processing and now want to transfer this to an android device. All i require is a sound that lasts for a max of about 0.5 seconds. See the code snippet below:
import ddf.minim.*;
import ddf.minim.ugens.*;
Minim minim;
AudioOutput out;
Oscil wave;
void setup()
{
size(512, 200, P3D);
minim = new Minim(this);
// use the getLineOut method of the Minim object to get an AudioOutput object
out = minim.getLineOut();
// create a sine wave Oscil, set to 440 Hz, at 0.5 amplitude
wave = new Oscil( 440, 0.5f, Waves.SINE );
// patch the Oscil to the output
wave.patch( out );
}
In fact all i really require is the android beep sound. What is the easiest way to do this in android.
Any help is much appreciated.
Cheers.
Answers
Perhaps your answer can be found on StackOverflow. A translated version of one answer would be as follows:
I haven't tested this code. I picked it because it was the shortest.
If you want a Processing library that supports sound and works on Android, try APWidgets.