Hi,
for my project we would like to prototype a TU Interface based on simple sheet of paper, where you can add audio content with each sheet of paper.
I printed A4 paper with each has an unique fiducial marker on it, an then I create two tokens (fiducial 7 and 9) for recording and playback of the contents.
we would like that when a paper is visible, and I introduce the REC token, and audio file is recorded, and stored when the token desappear. after that an audio file is recorded on that paper, when I add the PLAY token, the audio file stored within that paper start to playback, and when it's removed the the audio stops.
i.e. when the system see my fiducial traker 0, this means that there is the paper 0 is visible, and if I want to record an audio file on that paper I introduce the token (fiducial 9). Each paper can receive more than one audio file, and it can playback them all if the token (fiducial 7) is visible.
the code I maked can record and play audio files, but the audio file are not coupled with a specific paper (fiducial from 0 to 6).
// marker
import TUIO.*;
TuioProcessing tuioClient;
int id;
int countname, recountname; //change the name
int name = 000000; //set the number in key's' function
int rename = 000000;
// change the file name
void newFile()
{
countname =( name + 1);
recorder = minim.createRecorder(in, countname + ".wav", true);
// println(countname + ".wav");
}
void newFilePlay()
{
recountname =( rename + 1);
song = minim.loadFile(recountname + ".wav", 2048);
}
void setup (){
tuioClient = new TuioProcessing(this);
minim = new Minim(this);
in = minim.getLineIn(Minim.STEREO, 512);
newFile();
newFilePlay();
}