22 May '13 - 15:27 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  Developments / BASS / Re: record and fft question on: 27 Mar '12 - 05:49
thanks to you, i can get fft data and peak frequency.

thank you very much~
ReplyReply Reply with quoteQuote
2  Developments / BASS / Re: record and fft question on: 26 Mar '12 - 19:40
very very thank you~ gnag. thanks to you, i understand fft array's meaning.

and i still wonder about q1, q2, q4.

score is music score.(band score?)

music -> mic -> frequency analysis -> fft -> get note(tune? key?) -> make score.

but that code's return array with all value is zero. so i can't get any data.

i think

BASS_channelplay(record start) -> immediately BASS_channelgetdata -> immediately veryfy arrays value.
in this procedure when record? recording need time. but BASS_channelgetdata immediately return. so not record.
BASS_channelgetdata function call is one time. isn't it? if no, push in the loop?

please correct my wrong idea. thank you!
ReplyReply Reply with quoteQuote
3  Developments / BASS / Re: record and fft question on: 26 Mar '12 - 10:42
console.writeline(fft); -> fft with square brackets i
ReplyReply Reply with quoteQuote
4  Developments / BASS / record and fft question on: 26 Mar '12 - 10:36
hello im beginner programmer. and im not good at english... really... so please understand me.

language: c#

i want recording with mic. and get frequency data. mic is on the notebook computer.

so my code is:

Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero));
if (!Bass.BASS_RecordInit(-1)) {
                Console.WriteLine("Can't initialize device");
                return;
}
int handle = Bass.BASS_RecordStart(44100, 2, BASSFlag.BASS_RECORD_PAUSE, null, IntPtr.Zero);
Bass.BASS_ChannelPlay(handle, false);
float[] fft = new float[512];
Bass.BASS_ChannelGetData(handle, fft, (int)BASSDATA.Bass_DATA_FFT1024));
q1:
i guess data is stored fft array. with only this code. so
for (int i = 0; i < fft.length; ++i) {
console.writeline(fft [i]);
}

but fft's every element is 0. maybe there are problems... T.T

q2:
i think record is running on thread.. but this program is terminated in 1 second.
when recording? i think record takes time. but this program is immediately terminated.

q3:
if data is stored, i don't understand data's meaning.
what is array's index? and value?
and BASSDATA.Bass_DATA_FFT1024 -> what is 1024? i want mic input -> fft -> make score
what number i have to use?

g4:
Bass.BASS_ChannelGetData function is called 1 per music. -> right?


--------------
i read api document... with my not good english skill.
and Bass.BASS_ErrorGetCode result is all BASS_OK
and windows inner program <recorder> is well excuted.

please help me. im beginner. so detail explanation please. thank you~
ReplyReply Reply with quoteQuote
Pages: [1]
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines