DSPRelated.com
Forums

amplify frequencies

Started by wijesijp May 6, 2010
I am new to audio processing. What I wanted to do is amplify certain
frequencies in my data. 

I have written an application in c++ with a callback function that gets the
audio data to a buffer.  Now I need to apply some function to this data to
amplify my frequencies.

Can I do this using a filter? 

Is there an existing code I can use?

Can someone point me in the right direction ?



On 6 Mai, 14:43, "wijesijp" <wijesena@n_o_s_p_a_m.gmail.com> wrote:
> I am new to audio processing. What I wanted to do is amplify certain > frequencies in my data. > > I have written an application in c++ with a callback function that gets the > audio data to a buffer. &#4294967295;Now I need to apply some function to this data to > amplify my frequencies. > > Can I do this using a filter?
Yes. Rune
On 5/6/2010 8:43 AM, wijesijp wrote:
> I am new to audio processing. What I wanted to do is amplify certain > frequencies in my data. > > I have written an application in c++ with a callback function that gets the > audio data to a buffer. Now I need to apply some function to this data to > amplify my frequencies. > > Can I do this using a filter?
Yes. That's what filters do.
> Is there an existing code I can use?
Depends. What environment do you work in?
> Can someone point me in the right direction ?
You need to review the basics. Do you have time to read a book? Jerry -- "I view the progress of science as ... the slow erosion of the tendency to dichotomize." --Barbara Smuts, U. Mich. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On May 6, 8:43&#4294967295;am, "wijesijp" <wijesena@n_o_s_p_a_m.gmail.com> wrote:
> I am new to audio processing. What I wanted to do is amplify certain > frequencies in my data. > > I have written an application in c++ with a callback function that gets the > audio data to a buffer. &#4294967295;Now I need to apply some function to this data to > amplify my frequencies. > > Can I do this using a filter? > > Is there an existing code I can use? > > Can someone point me in the right direction ?
there are existing PROGRAMS that do this, i.e. audio editing programs called digital audio workstations (DAW). N-track studio for example allows you to basically draw the shape of the filter you would like and it will process a .wav file with that filter. You can even drag /change the filter shape while you listen to the playback in real time. Mark
>On 5/6/2010 8:43 AM, wijesijp wrote: >> I am new to audio processing. What I wanted to do is amplify certain >> frequencies in my data. >> >> I have written an application in c++ with a callback function that gets
the
>> audio data to a buffer. Now I need to apply some function to this data
to
>> amplify my frequencies. >> >> Can I do this using a filter? > >Yes. That's what filters do. > >> Is there an existing code I can use? > >Depends. What environment do you work in?
I wrote this program for iPhone. I guess I should be able to get a standard c/c++ code to work.
> >> Can someone point me in the right direction ? > >You need to review the basics. Do you have time to read a book?
I don&rsquo;t think I have time to read a book. Anyway my area is Human Computer Interaction. So I would prefer to use some existing code and get the program working. What I like to do is amplify 250Hz, 500Hz, 1000Hz, 2000Hz, 4000Hz, 8000Hz based on uses input.
> >Jerry >-- >"I view the progress of science as ... the slow erosion of the tendency > to dichotomize." --Barbara Smuts, U. Mich. >&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; >
>On May 6, 8:43=A0am, "wijesijp" <wijesena@n_o_s_p_a_m.gmail.com> wrote: >> I am new to audio processing. What I wanted to do is amplify certain >> frequencies in my data. >> >> I have written an application in c++ with a callback function that gets
t=
>he >> audio data to a buffer. =A0Now I need to apply some function to this
data=
> to >> amplify my frequencies. >> >> Can I do this using a filter? >> >> Is there an existing code I can use? >> >> Can someone point me in the right direction ? > >there are existing PROGRAMS that do this, i.e. audio editing programs >called digital audio workstations (DAW). > >N-track studio for example allows you to basically draw the shape of >the filter you would like and it will process a .wav file with that >filter. You can even drag /change the filter shape while you listen >to the playback in real time. > >Mark > > >
I am developing this as an iPhone application. Is there some sample code or free plug-in I can use?
On 06/05/2010 17:47, wijesijp wrote:
> > I am developing this as an iPhone application. Is there some sample code or > free plug-in I can use?
Try the musicdsp code archive: http://www.musicdsp.org I think it is pretty much understood that that code is in the public domain (but note it is not necessarily uber-optimised; much will depend on what you want to do). The filters are coded in floating-point; that is OK on the iPhone (but double precision is probably fairly demanding in CPU terms) so long as the final audio output is in the allowed format - wither 16bit int or 8.24 fixed-point. Make sure that "Thumb" mode (16bit arithmetic mode) is turned off in the compiler. If your filtering is not more intense than, say, a simple multiband equaliser, you can manage with 2nd-order filters (e.g. the RBJ set, very widely used in both OS and commercial applications); but if you want the filters as used in analog synths, you will need 3rd or 4th order filters (mood emulations etc), which will tax the CPU that much more. The previous advice to do some background reading is very well given. For audio programming look for "Elements of Computer Music" by F.R. Moore, which covers the basic theory of filters (and much else besides) but has lots of code too. The "Csound Book" will also give you lots of ideas, and Csound itself is a very good environment for trying out processes before porting to the iPhone. Richard Dobson
On May 7, 12:43&#4294967295;am, "wijesijp" <wijesena@n_o_s_p_a_m.gmail.com> wrote:
> I am new to audio processing. What I wanted to do is amplify certain > frequencies in my data. > > I have written an application in c++ with a callback function that gets the > audio data to a buffer. &#4294967295;Now I need to apply some function to this data to > amplify my frequencies. > > Can I do this using a filter? > > Is there an existing code I can use? > > Can someone point me in the right direction ?
Go and do an Elec End Major and find out... Amateurs... Hardy
On 5/6/2010 3:08 PM, HardySpicer wrote:

   ...

> Go and do an Elec End Major and find out... > Amateurs...
Noah was an amateur. The Titanic and the Andrea Doria were built by professionals. Jerry -- "I view the progress of science as ... the slow erosion of the tendency to dichotomize." --Barbara Smuts, U. Mich. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On May 6, 11:21&#4294967295;pm, Jerry Avins <j...@ieee.org> wrote:
> On 5/6/2010 3:08 PM, HardySpicer wrote: > > &#4294967295; &#4294967295;... > > > Go and do an Elec End Major and find out... > > Amateurs... > > Noah was an amateur. The Titanic and the Andrea Doria were built by > professionals. >
Well with the Titanic and the Andrea Doria, the main problem seems to be not how they were built but how they were captained. They each ran into a large object. You know that more scuba divers have died on the wreck of the Andrea Doria than passengers died on the ship when it sank? I've been on some deep wrecks but not that deep - it is too dangerous. Clay