I used the code pasted below at home: (audio interface M-Audio Firewire) and at uni: (M-audio oxygen (usb)) on the mac osx vers.s above (5.8 & 6.8 respectively). On OSX.5.8 only P5: 1.5.1 will work, but at Uni i tried it in both 1.5.1 and 2.07b. It didn't work in either. Neither myself nor my tutor were able to work out why the sound didn't record. So, i bought a cheap minijack mic and tried using the same processing sketch file on our PC at home (Samson R519) running Windows 7. The audio recorded with no problem whatsoever. I have pasted the code below.
I have looked for a similar problem and to my surprise have found no other forum queries describing the same problem. I thought it may be a P5:1.5.1 issue but it didn't work on P5: 2.0 either unless the fact that both versions are running concurrently on the Uni machines is affecting this issue. But due to 3D graphics problems with 2.0 at Uni they will be uninstalling P5:2.0 anyway. Does anyone know if there is anything that i can do to code that works on 2.07b on Windows so that it will work on P5:1.5.1 on OSX; as i really wanted to use the record function for my final DSP project.
- i am a student, very new to Processing - thank you for taking the time to read my problem -
CODE:
import ddf.minim.*;
Minim minim;
AudioInput in;
AudioRecorder recorder;
void setup ()
{
size(512, 200);
minim = new Minim(this);
in = minim.getLineIn(Minim.MONO, 2048);
recorder = minim.createRecorder(in, "myrecording.aif", true);
}
void draw()
{
background(0);
if (recorder.isRecording() )
{
fill (255,0,0);
ellipse (100,100,30,30);
println("Currently recording...");
}
else
{
fill (0);
ellipse (100,100,30,30);
}
}
void keyReleased()
{
if (key == 'r')
{
if (recorder.isRecording () )
{
println("Stop recording...");
recorder.endRecord();
}
else
{
println("start recording...");
recorder.beginRecord() ;
}
}
if (key == 's' )
{
println("Done saving");
recorder.save();
}
}
void stop()
{
in.close();
minim.stop();
super.stop();
}