| View previous topic :: View next topic |
| Author |
Message |
PeterLeRoi
Joined: 16 May 2007 Posts: 31
|
Posted: Sat May 26, 2007 4:07 am Post subject: Help with Audio Mechanica |
|
|
I´m working with Audio Mechanica´s source code and I´ve realized that in every function there are many:
for(nux=0; nux<55; nux++){ // delay
sceDisplayWaitVblankStart();
}
What are they for? This only "freezes" the screen, no?
Thanks ;) |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Sat May 26, 2007 2:12 pm Post subject: |
|
|
it pauses program execution for some reason.
In most cases it's to force a delay between working with two different files.
I don't know if it's realy needed in those cases.
Art. |
|
| Back to top |
|
 |
PeterLeRoi
Joined: 16 May 2007 Posts: 31
|
Posted: Wed May 30, 2007 8:48 am Post subject: And another question |
|
|
Other question: I need to separate the part of the source code which affects the Yackback option. I´ve seen, inside audioInputLoopCallback();
| Code: |
if (monitor == 4){
if (vox != 0){
vox--; // decrement voice activation delay to zero
}
pspDebugScreenSetXY(1, sensb);
printf(" ");
pspDebugScreenSetTextColor(0x00EFDDCA);
pspDebugScreenSetBackColor(0x00000000);
pspDebugScreenSetXY(1, sens);
printf("VOX >");
if (k != 33){ // basic high sensitivity
if (scan < sens){ // experimental industrial sensitivity
vox = 45; // set small yakback delay
if (voxon == 0){
if (recordindex > 20479){
replaystart = recordindex - 20480;
}
else{
indexbuf = 20480 - recordindex;
replaystart = 11534336 - indexbuf;
}
}
voxon = 1;
scan = 33;
}
}
else{ //si k == 33
if (voxon == 1){
if (vox < 1){
mode = 1;
voxon = 0;
yak = recordindex;
recordindex = replaystart;
pspDebugScreenSetTextColor(0x00EFDDCA);
pspDebugScreenSetBackColor(0x00000000);
pspDebugScreenSetXY(1, sens);
printf(" ");
}
}
}
} // monitor = 4
|
but don´t know what exactly it does. What are k, vox, voxon and scan for? And which sample frequency is yackback using?
Thanks ;)
PD: I´m trying to implement a voice recognition using Audio Mechanica, has anybody already worked on it? |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Thu May 31, 2007 4:23 pm Post subject: |
|
|
I haven't tried voice recognition yet.
Still getting around to it.
That is why that Yakback feature was really done though.
voxon is 0 or 1 depending if voice activation is set in tape recorder mode.
vox is the level of sensitivity represented by the "VOX >" cursor graphic
on the screen when VOX mode is on.
scan is a variable that is used to seek across a horizontal line to detect the wave.
Art. |
|
| Back to top |
|
 |
PeterLeRoi
Joined: 16 May 2007 Posts: 31
|
Posted: Fri Jun 01, 2007 6:51 am Post subject: |
|
|
Thanks for your help Art :D I´m still trying to understand the code... I think the level of sensitivity is determined by "sens"
[/quote]voxon is 0 or 1 depending if voice activation is set in tape recorder mode. [quote]
One question: why there is an if(voxon) inside an if(monitor ==4)? How is monitor == 4 (yakback mode) affected by changes in voxon?
Other thing... what does (k != 33) mean?
Thanks for your help :) |
|
| Back to top |
|
 |
PeterLeRoi
Joined: 16 May 2007 Posts: 31
|
Posted: Wed Jul 04, 2007 3:12 am Post subject: |
|
|
I´ve improved a few things on voice recognition using Audio Mechanica´s source code... but there´s one thing can´t understand. "k"... what is it for? I think k contains one sample, next we take the 2º byte... and then nothing :(
Why it makes k = 0, when k is < 0 or > 33? Why
| Code: |
if (k != 33){ // basic high sensitivity
if (scan < sens){ // experimental industrial sensitivity
|
Does anybody have any hint?
Thanks ;) |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Wed Jul 04, 2007 6:11 pm Post subject: |
|
|
because in debug screen mode, that is how many lines are on the display.
No less than zero, no more than 33.
From the wave drawing routine:
| Code: |
if (k < scan) {
scan = k;
}
|
Which actually checks if the wave graphic on the screen went higher
(closer to the top line) than the value in scan.
If ever I started voice recogntion with it, I was planning to use the wave
display as shown on the screen to lower the resolution to something workable.
Art. |
|
| Back to top |
|
 |
PeterLeRoi
Joined: 16 May 2007 Posts: 31
|
Posted: Fri Jul 06, 2007 9:01 am Post subject: |
|
|
| Thanks for your help Art ;) |
|
| Back to top |
|
 |
|