We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello!
I hope anybody here can help me. I am trying to write an application for decoding AM-Signals and SSB-Signals on shortwave delivered by an Direct Conversion Receiver. The library which I use for analyse the soundcards frequency spectrum is minim's fft-library. I now how to get the amplitude of any frequency band an I know how to set the amplitude of any frequency band. I also know who to get the middle frequency of any frequency band, but I' am not able to move down some particular frequency bands in the sound spectrum.
This is what I tried, but it doesn't sound really good.
class InputOutputBind implements AudioSignal, AudioListener{
private float[] leftChannel ;
private float[] rightChannel;
InputOutputBind(int sample){
leftChannel = new float[sample];
rightChannel= new float[sample];
}
// This part is implementing AudioSignal interface, see Minim reference
void generate(float[] samp){
arraycopy(leftChannel,samp);
}
void generate(float[] left, float[] right){
arraycopy(leftChannel,left);
arraycopy(rightChannel,right);
}
// This part is implementing AudioListener interface, see Minim reference
synchronized void samples(float[] samp){
int index_band = 0;
fft.forward(samp);
for(int i = 0; i < 1024; i++){
if ((i >= index_lsb) && (i < index_usb)){float bandanteil = fft.getBand(i); fft1.setBand(index_band, bandanteil * 10.0); index_band += 1;}
else if (i > index_usb){fft1.setBand(index_band, 0.0); index_band += 1;}
}
fft.inverse(samp);
arraycopy(samp,leftChannel);
}
synchronized void samples(float[] sampL, float[] sampR){
arraycopy(sampL,leftChannel);
arraycopy(sampR,rightChannel);
}
}
Answers
You'll get a better response if you format your code. Here's how:
http://forum.processing.org/two/discussion/8045/how-to-format-code-and-text
Thank you, I think you are right! So this should look better.
Hello!
I hope anybody here can help me. I am trying to write an application for decoding AM-Signals and SSB-Signals on shortwave delivered by an Direct Conversion Receiver. The library which I use for analyse the soundcards frequency spectrum is minim's fft-library. I now how to get the amplitude of any frequency band an I know how to set the amplitude of any frequency band. I also know who to get the middle frequency of any frequency band, but I' am not able to move down some particular frequency bands in the sound spectrum.
This is my newest code:
`
`
Thank you, I think you are right! So this should look better.
Hello!
I hope anybody here can help me. I am trying to write an application for decoding AM-Signals and SSB-Signals on shortwave delivered by an Direct Conversion Receiver. The library which I use for analyse the soundcards frequency spectrum is minim's fft-library. I now how to get the amplitude of any frequency band an I know how to set the amplitude of any frequency band. I also know who to get the middle frequency of any frequency band, but I' am not able to move down some particular frequency bands in the sound spectrum.
This is my newest code:
`
`