Reply by jim August 13, 20042004-08-13

Fred Marshall wrote:
> > "jim" <"N0sp"@m.sjedging@mwt.net> wrote in message > news:411cc9b7_2@corp.newsgroups.com... > > Hi Jp, > > An unsharpen mask or filter is just a lowpass filter (usually gaussian > > or box) the result of which is then subtracted from the bitmap. This > > removes some of the low frequency content and sharpens the image. The > > gain is of course adjusted also so that overall brightness (DC level) is > > maintained. That would be fairly trivial to implement on audio or any 1d > > signal. Essentially you lowpass filter (should probably be linear phase > > FIR) and subtract that from an appropiately delayed and scaled version > > of the original signal. > > > > Good answer. I'd note that the process you describe is just another filter. >
Yes, of course and it would, in general, in an image editing program, be implemented as just another set of coefficients that are convolved with the image. But, it has historical reasons that it is usually describe as the difference of 2 images. In photography this technique was used long before the digital processing of images arrived on the scene. To apply sharpening to a photograph in the dark room the negative was exposed to slightly blurred positive image and the same effect was achieved. -jim
> If the output of the LPF is: > > N-1 > y(n) = sum[ai*x(n-i)] > i=0 > > and the delay of the filter is K (which may well be (N-1)/2), then the > output "z" of the process is: > > N-1 > z(n) = y(n) - x(n-K) = sum[ai*x(n-i)] - x(n-K) > i=0 > > N-1 > z(n) = sum[(ai-1)*x(n-i)] + (aK-1)*x(n-K) > i=0 > i~K > > If y is the output of a lowpass filter then this creates a highpass filter > which differs from the lowpass filter coefficients only at the center > coefficient (assuming the filter is of odd length). > > Fred
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Reply by Fred Marshall August 13, 20042004-08-13
"jim" <"N0sp"@m.sjedging@mwt.net> wrote in message
news:411cc9b7_2@corp.newsgroups.com...
> Hi Jp, > An unsharpen mask or filter is just a lowpass filter (usually gaussian > or box) the result of which is then subtracted from the bitmap. This > removes some of the low frequency content and sharpens the image. The > gain is of course adjusted also so that overall brightness (DC level) is > maintained. That would be fairly trivial to implement on audio or any 1d > signal. Essentially you lowpass filter (should probably be linear phase > FIR) and subtract that from an appropiately delayed and scaled version > of the original signal. >
Good answer. I'd note that the process you describe is just another filter. If the output of the LPF is: N-1 y(n) = sum[ai*x(n-i)] i=0 and the delay of the filter is K (which may well be (N-1)/2), then the output "z" of the process is: N-1 z(n) = y(n) - x(n-K) = sum[ai*x(n-i)] - x(n-K) i=0 N-1 z(n) = sum[(ai-1)*x(n-i)] + (aK-1)*x(n-K) i=0 i~K If y is the output of a lowpass filter then this creates a highpass filter which differs from the lowpass filter coefficients only at the center coefficient (assuming the filter is of odd length). Fred
Reply by Jerry Avins August 13, 20042004-08-13
JP wrote:

> I'm a (very) novice C++ programmer who occasionally likes to play around > with audio DSP concepts. Could someone please help me find the name and/or > an implementation of the filtering algorithm I have in mind? > > What I'm looking for is the equivalent of a graphics programs' "sharpen" or > "unsharp mask" but performed on a time vs. frequency spectrogram of a > digitally sampled audio signal. (I'm not assuming you actually have to > compute FFTs first, just making an analogy. Presumably the filter would act > upon samples in the time domain.) > > If a time-frequency "pixel" has more power than its neighbors, its power is > increased while theirs is reduced. In other words, sounds begin and end > faster, and the dominant frequencies in a window are emphasized over weaker > ones. > > So what would this filter be called, and what would be some (relatively) > simple ways to implement it? Thanks! > > (For those of you who only do audio DSP, a description of a sharpening > filter with regard to graphics: http://www.scantips.com/simple6.html)
I'm not clear about what you want to do. It's easy to assume that you want to manipulate the sound, but you seem to write that you want to sharpen the image of the spectrogram. Do you want to make its details more evident to the eye? Jerry -- ... the worst possible design that just meets the specification - almost a definition of practical engineering. .. Chris Bore &#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;&#4294967295;
Reply by jim August 13, 20042004-08-13
Hi Jp,
	An unsharpen mask or filter is just a lowpass filter (usually gaussian
or box) the result of which is then subtracted from the bitmap. This
removes some of the low frequency content and sharpens the image. The
gain is of course adjusted also so that overall brightness (DC level) is
maintained. That would be fairly trivial to implement on audio or any 1d
signal. Essentially you lowpass filter (should probably be linear phase
FIR) and subtract that from an appropiately delayed and scaled version
of the original signal.

-jim

JP wrote:
> > I'm a (very) novice C++ programmer who occasionally likes to play around > with audio DSP concepts. Could someone please help me find the name and/or > an implementation of the filtering algorithm I have in mind? > > What I'm looking for is the equivalent of a graphics programs' "sharpen" or > "unsharp mask" but performed on a time vs. frequency spectrogram of a > digitally sampled audio signal. (I'm not assuming you actually have to > compute FFTs first, just making an analogy. Presumably the filter would act > upon samples in the time domain.) > > If a time-frequency "pixel" has more power than its neighbors, its power is > increased while theirs is reduced. In other words, sounds begin and end > faster, and the dominant frequencies in a window are emphasized over weaker > ones. > > So what would this filter be called, and what would be some (relatively) > simple ways to implement it? Thanks! > > (For those of you who only do audio DSP, a description of a sharpening > filter with regard to graphics: http://www.scantips.com/simple6.html)
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Reply by Rob Vermeulen August 13, 20042004-08-13
JP,

I have done these modifications to images every day using convolution
kernels. I don't know if such a method can also apply on 1 dimensional audio
information.

Perhaps a search on google with "audio convolution kernels" helps. :-)

g.l.
Rob.

"JP" <newtonunderscorejeremy@greekwordforwolf.com> wrote in message
news:10hog1gng2m2of1@corp.supernews.com...
> I'm a (very) novice C++ programmer who occasionally likes to play around > with audio DSP concepts. Could someone please help me find the name and/or > an implementation of the filtering algorithm I have in mind? > > What I'm looking for is the equivalent of a graphics programs' "sharpen"
or
> "unsharp mask" but performed on a time vs. frequency spectrogram of a > digitally sampled audio signal. (I'm not assuming you actually have to > compute FFTs first, just making an analogy. Presumably the filter would
act
> upon samples in the time domain.) > > If a time-frequency "pixel" has more power than its neighbors, its power
is
> increased while theirs is reduced. In other words, sounds begin and end > faster, and the dominant frequencies in a window are emphasized over
weaker
> ones. > > So what would this filter be called, and what would be some (relatively) > simple ways to implement it? Thanks! > > (For those of you who only do audio DSP, a description of a sharpening > filter with regard to graphics: http://www.scantips.com/simple6.html) > >
Reply by Toynbee Jupiter August 13, 20042004-08-13
JP wrote:
> I'm a (very) novice C++ programmer who occasionally likes to play around > with audio DSP concepts. Could someone please help me find the name and/or > an implementation of the filtering algorithm I have in mind? > > What I'm looking for is the equivalent of a graphics programs' "sharpen" or > "unsharp mask" but performed on a time vs. frequency spectrogram of a > digitally sampled audio signal. (I'm not assuming you actually have to > compute FFTs first, just making an analogy. Presumably the filter would act > upon samples in the time domain.) > > If a time-frequency "pixel" has more power than its neighbors, its power is > increased while theirs is reduced. In other words, sounds begin and end > faster, and the dominant frequencies in a window are emphasized over weaker > ones. > > So what would this filter be called, and what would be some (relatively) > simple ways to implement it? Thanks! > > (For those of you who only do audio DSP, a description of a sharpening > filter with regard to graphics: http://www.scantips.com/simple6.html) > >
It looks like they are locally applied low and highpass filters. However, detecting and enhancing edges like in pictures would introduce clicks in sound.
Reply by JP August 13, 20042004-08-13
I'm a (very) novice C++ programmer who occasionally likes to play around
with audio DSP concepts. Could someone please help me find the name and/or
an implementation of the filtering algorithm I have in mind?

What I'm looking for is the equivalent of a graphics programs' "sharpen" or
"unsharp mask" but performed on a time vs. frequency spectrogram of a
digitally sampled audio signal. (I'm not assuming you actually have to
compute FFTs first, just making an analogy. Presumably the filter would act
upon samples in the time domain.)

If a time-frequency "pixel" has more power than its neighbors, its power is
increased while theirs is reduced. In other words, sounds begin and end
faster, and the dominant frequencies in a window are emphasized over weaker
ones.

So what would this filter be called, and what would be some (relatively)
simple ways to implement it? Thanks!

(For those of you who only do audio DSP, a description of a sharpening
filter with regard to graphics: http://www.scantips.com/simple6.html)