-
Jul 19th, 2015, 05:11 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] How to obtain buffer data from live audio?
I'm working with audio and I've a question about how can I obtain the wave audio information from the buffer.
As you know, in the *.wav file the audio information starts (usually) from the byte #45. Before byte #45 there are other kind of informations about the file as the number of channels, bits per sample, etc...
I want to obtain from the live audio the same information (like in the #45 byte and following ones of the *.wav file), but I don't know how to obtain those bytes from the live audio. So I ask you.
I'm using this structure to obtain live audio from the wave input device (I've just only one in my system, so its ID will be 0).
Note: I'll use 8 bits, Mono because is the easiest case.
I use the apis
- waveInGetNumDevs
- waveInGetDevCaps
- waveInOpen
- waveInStart
- waveInPrepareHeader
- waveInAddBuffer
- waveInUnprepareHeader
- waveInReset
- waveInClose
I think it's inside the sub Visualize and I've to read the InData matrix, but I'm not sure.
vbforums.zip
Last edited by Jose_VB; Jul 19th, 2015 at 05:14 AM.
-
Jul 19th, 2015, 12:00 PM
#2
Re: How to obtain buffer data from live audio?
Are you doing real time audio
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jul 19th, 2015, 12:53 PM
#3
Thread Starter
Hyperactive Member
Re: How to obtain buffer data from live audio?
Originally Posted by jmsrickland
Are you doing real time audio
Well, I call it 'real time audio' but I'm refering to manipulate audio without saving it in a file. I mean to get the input from the michrophone and work directly with it. I don't know if that is called live audio.
-
Jul 19th, 2015, 02:08 PM
#4
Re: How to obtain buffer data from live audio?
I think I have an app that you use a mic - let me see if I can find it
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jul 20th, 2015, 04:10 AM
#5
Thread Starter
Hyperactive Member
Re: How to obtain buffer data from live audio?
Originally Posted by jmsrickland
I think I have an app that you use a mic - let me see if I can find it
Ok, tell me the result when you know it.
-
Jul 20th, 2015, 07:35 PM
#6
Re: How to obtain buffer data from live audio?
It turns out I don't have what I thought I had. I have an app that uses the mic but it is just records the incoming voice into an array but it does not do anything with it until you stop recording then it shows the waveform but what you are asking for is to show the waveform as the voice is coming in (live)
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jul 21st, 2015, 12:01 AM
#7
Re: How to obtain buffer data from live audio?
The vocoder, which change voice in realtime, allow to do "robotic", "synth" voice.
The spectrum visualizer, which allow to view spectum of input sound and draw circular spectrogram (turn per octave).
-
Jul 21st, 2015, 12:26 AM
#8
Re: How to obtain buffer data from live audio?
I have no idea how to use your spectrum visualizer. It also freezes up.
Also do you have a .zip version of vocoder
Last edited by jmsrickland; Jul 21st, 2015 at 12:29 AM.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jul 21st, 2015, 03:06 AM
#9
Thread Starter
Hyperactive Member
Re: How to obtain buffer data from live audio?
Originally Posted by jmsrickland
It turns out I don't have what I thought I had. I have an app that uses the mic but it is just records the incoming voice into an array but it does not do anything with it until you stop recording then it shows the waveform but what you are asking for is to show the waveform as the voice is coming in (live)
I've found a code in planet source code where I can see waveform of live audio and get the information, in byte form, of the audio.
http://www.planet-source-code.com/vb...=8314&lngWId=1
-
Jul 21st, 2015, 03:09 AM
#10
Thread Starter
Hyperactive Member
Re: How to obtain buffer data from live audio?
Originally Posted by The trick
The vocoder, which change voice in realtime, allow to do "robotic", "synth" voice.
The spectrum visualizer, which allow to view spectum of input sound and draw circular spectrogram (turn per octave).
Thank you very much. You always show very interesting projects.
-
Jul 21st, 2015, 01:07 PM
#11
Re: [RESOLVED] How to obtain buffer data from live audio?
I have no idea how to use your spectrum visualizer. It also freezes up
If you have slowly computer then you should compile code, and run exe.
-
Jul 21st, 2015, 01:24 PM
#12
Re: [RESOLVED] How to obtain buffer data from live audio?
Vocoder contained a useful class - clsTrickSound which has event that being called when either data in the buffers is needed (if you will using calss as playback) or data in the buffer done (if you will using class as recording).
-
Jul 21st, 2015, 02:02 PM
#13
Re: [RESOLVED] How to obtain buffer data from live audio?
Originally Posted by The trick
If you have slowly computer then you should compile code, and run exe.
I was using your TrickSpectrum.exe already compiled from zip
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jul 28th, 2015, 12:12 PM
#14
Re: [RESOLVED] How to obtain buffer data from live audio?
I was using your TrickSpectrum.exe already compiled from zip
Try to run code in IDE.
-
Jul 28th, 2015, 12:19 PM
#15
Re: [RESOLVED] How to obtain buffer data from live audio?
I can't because the file I downloaded .RAR and I can only unzip .ZIP files
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jul 28th, 2015, 01:43 PM
#16
Re: [RESOLVED] How to obtain buffer data from live audio?
Here are the ZIP-archive.
-
Jul 29th, 2015, 05:29 PM
#17
Re: [RESOLVED] How to obtain buffer data from live audio?
I have TrickSpectrum.zip. What I need is TrickVocoder.zip which I have as a .rar and cannot open it
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|