Recording a mix of sounds AudioPlayer
in
Core Library Questions
•
1 month ago
I'm using the minim library to make a project which the user trigger sounds (AudioPlayer) from the keyboard and this sound keep playing in loop until
the user press another key to stop it.
My problem is that I'm not able to record a mix of this sounds produced by the user during the program execution.
I realized that AudioRecord is not able to record sounds like AudioPlayer.
There is any way to record a mix of sounds like AudioPlayer?
-
import ddf.minim.*;
Minim minim;AudioOutput out;AudioRecorder recorder;
AudioPlayer som1,som2;
void setup() {size(512, 200);
minim = new Minim(this);som1=minim.loadFile("teste 2 - bateria.mp3",1024);som2=minim.loadFile("teste 2 - guitarra.mp3",1024);out = minim.getLineOut();recorder = minim.createRecorder(out, "myrecording.wav", true);}
void keyReleased() {switch(key){case 'r':recorder.beginRecord();break;case 's':recorder.endRecord();recorder.save();break;case 'a':som1.loop();break;case 'q':som1.pause();break;case 'k':som2.loop();break;case 'i':som2.pause();}}
1