Python Audio Programming

haze1er

n00b
Joined
Aug 31, 2009
Messages
22
I am trying to make a game where the waves in an audio file represents letters of the alphabet. What I want to do is create a different sound wave when a certain letter is entered. So lets say I enter in the string "hello world", ten sound waves would be created each wave representing a letter from the string.

Example:
kMGfq6S.png


Then I would like to be able to read the the audio file created and extract the string. The problem is I have no experience with audio programming and really don't know what to look for. Can anyone with experience in this field point in the right direction? I prefer to do this in Python but if it would be easier in another language that's ok with me. Any bit of information is welcome.
 
I'm still a bit unclear as to the larger goal here.

Are you actually going to use the sound file as a sound file? As in, play it back to the user or ever listen to it? If so, the example image you posted is far too small to sound like anything other than a super-short burst.

What is the purpose of using an audio file at all?

The clip you showed with your letters overlaid is just a short clip of the superposition of two frequencies.

Here's the problem with your overlaid letter example: You don't actually have any information in the audio file that corresponds to those letters you put on the image. In fact, the frequency-domain spectrum of that clip is totally constant from start to finish. If you extended it out and played it back, it would sound like two constant, unchanging tones. It only looks to be changing in the time domain because your eyes are picking out the beat frequency envelope of the superposition of those two tones. You can't encode letters on something that doesn't change.


So taking a step back here and pretending this file isn't actually an audio file that's meant to be listened to: If you're just interested in translating a string into a waveform, then you can define a short waveform that corresponds to each letter. Then just concatenate all of the waveforms that correspond to the letters in your string. It would be full of jumps and discontinuities between letters unless you specifically return to zero at the beginning and end of each letter. So each of your letters would have to be a waveform that starts at zero and ends at zero. You could even extend the per-letter waveform to be a verbal reading of the letter, as long as they're all exactly the same length so you know where to read and write them from.

Decoding would just be the reverse. Read out chunks of pre-defined length from the 'audio file' and decode them to their corresponding string patterns.


Unless I'm missing something, what you're doing here doesn't actually correspond to audio programming unless you have the requirement that the waveform needs to be played back at some point. Just treat the 'waveform' as a file where each byte represents a signed integer corresponding to the waveform amplitude at that time slice.

If, on the other hand, you want to actually play this file back to the user then you'll need to look into audio libraries. You'll also need to spend some time coming up with a better scheme for encoding the letters such that it actually sounds good and isn't just noise.
 
I have no experience with audio programming
Before you even get into the programming aspect, do you
1) understand the physical mechanics of sound?
2) how sound is represented digitally?

The diagram you posted, if supposed to be traditional compression wave, would not be intelligible.
 
Before you even get into the programming aspect, do you
1) understand the physical mechanics of sound?
2) how sound is represented digitally?

The diagram you posted, if supposed to be traditional compression wave, would not be intelligible.

What? The diagram he posted is just a superposition of two tones. If you extended it to be long enough to listen to, you would just hear two similar tones. It's totally intelligible.

Perhaps this diagram will help you understand (f3 = f1 + f2): http://www.uq.edu.au/_School_Science_Lessons/26.8.4.4.GIF
 
I am trying to make a game where the waves in an audio file represents letters of the alphabet. What I want to do is create a different sound wave when a certain letter is entered. So lets say I enter in the string "hello world", ten sound waves would be created each wave representing a letter from the string.

Example:
kMGfq6S.png


Then I would like to be able to read the the audio file created and extract the string. The problem is I have no experience with audio programming and really don't know what to look for. Can anyone with experience in this field point in the right direction? I prefer to do this in Python but if it would be easier in another language that's ok with me. Any bit of information is welcome.

What you're probably going to want to do is assign a certain frequency to each 'letter' of the alphabet. For a given letter, you'll create a sine wave with that frequency. There is most likely a good FFT library for python which you could use to decompose your created signal into it's different frequencies.

FFT, or fast-fourier transform will decompose a signal into the various frequencies of sine-waves that make up the signal. So if you associate your signals by frequency, it will be easy for you to pick out the individual values.
http://www.george-smart.co.uk/w/images/thumb/3/3d/Dissertation_FFT.png/800px-Dissertation_FFT.png

Telephones use a similar technique to store which button you pressed as a sound signal, send it across the lines, and then figure out from that sound signal what the number was. Read the first part of this document, that is, the part about 'touch tone'.
http://www.mathworks.com/moler/fourier.pdf
 
Sure, if it was a different waveform than what he showed it might be audible.

The waveform he showed would be audible, assuming it falls within the audible frequency range and was loud enough. Even the short version would still sound like something.
 
The waveform he showed would be audible, assuming it falls within the audible frequency range and was loud enough. Even the short version would still sound like something.

I agree completely. There's nothing unintelligible about the signal the thread starter posted at all, and I definitely think he's on the right track. If he figures out a good scheme for representing characters and order, it's just a matter of finding the right tools to make implementing the necessary logic easy, and there's definitely good Python based tools for what he wants to do.
 
The waveform he showed would be audible, assuming it falls within the audible frequency range and was loud enough. Even the short version would still sound like something.

That's borderline. You might be able to get a tick or pop out of what's shown in the diagram, at best.

The lowest frequency component has about 3 oscillations, assuming the timescale is such that this component is 20Hz then it is 150ms long. If we assume it is higher frequency (so that not just a fraction of the population can hear it) then the length of audio starts to become even less perceptible.

edit: it's actually 2 oscillations so only 100ms long at 20Hz.
 
Last edited:
The waveform he showed is just a single frequency, with the amplitude varied. It would be a pure tone that gets louder or quieter. :p

This page shows a way that should do what you want: http://zacharydenton.com/generate-audio-with-python/

Extracting the data in one way could require using a FFT library, but there's actually easier ways to do what you're attempting.

For example, if your letter A is 440Hz, just generate one cycle of the wave and repeat it when pressed. When you save it out and later read it back in, you can just compare the bytes in the file to a list of tone values since that would match (there are nice algorithms for matching these types of data comparisons). There are all kinds of possible problems with the encoding, since strings like A, AA and AAA would have the same data and vary only on length of time played back. However, just saving a single cycle of the wave, regardless of how long it's actually played, makes decoding easier.
 
Last edited:
The waveform he showed is just a single frequency, with the amplitude varied.[/url]

All continuous time signals can be represented by a sum of complex sinusoids.

In this case it is the sum of two.
 
Last edited:
If both components are in the audible spectrum it will sound like two tones. If the lower frequency component is not in the audible spectrum it will sound like a single tone with varying amplitude.
 
That's borderline. You might be able to get a tick or pop out of what's shown in the diagram, at best.

I didn't say it would be intelligible. But you will definitely hear something if the volume is turned up enough and the frequencies fall within the range of human hearing.

The lowest frequency component has about 3 oscillations, assuming the timescale is such that this component is 20Hz then it is 150ms long. If we assume it is higher frequency (so that not just a fraction of the population can hear it) then the length of audio starts to become even less perceptible.

edit: it's actually 2 oscillations so only 100ms long at 20Hz.

Even if it's just a click or pop, you'll hear something.

Think of it this way: Imagine running that signal in to a speaker cone with a lot of power. The speaker cone is going to move in and out, naturally. That movement will make sound waves, and you will perceive those sound waves as long as they fall within the range of your hearing. There is no minimum length for a sound to be perceptible as long as it's played loud enough to rise significantly above the noise floor.
 
@JimmyB and AgentQ. I think you to are getting into a stupid argument about details which haven't been specified and therefore aren't relevant at all.

It's abysmally stupid to assume that just because the plot he showed only has two cycles, the signal will only carry two cycles. Otherwise, it would be impossible to plot a period signal. Please focus on actually helping the thread starter, rather than wasting thread space.

The waveform he showed is just a single frequency, with the amplitude varied.

No, actually. It's multiple frequencies added together, which is how the amplitude gets varied. There are various ways in which the thread starter can describe the contents of his signal. He could try to do something like amplitude modulation, but I think the easiest approach would be to represent characters as frequencies.

The only signal that is a single frequency signal (in the context of signals) is a sine wave or a cosine wave. Anything other than that (square waves, saw waves, the wave the thread starter showed) is composed of multiple frequencies.
 
Last edited:
The only signal that is a single frequency signal is a sine wave or a cosine wave.
That is true under the conventions of Fourier analysis, but Fourier has no monopoly on the word frequency.

You could, for example, transform into some other base function that is not a sinosoid.
 
You could, for example, transform into some other base function that is not a sinosoid.

Yes, as is often done with things like Bessel functions.

People working with audio signals, though, generally don't do that.
 
It's abysmally stupid to assume that just because the plot he showed only has two cycles, the signal will only carry two cycles. Otherwise, it would be impossible to plot a period signal. Please focus on actually helping the thread starter, rather than wasting thread space.
The diagram and his description don't give a clear and/or plausible idea of what he is trying to achieve.

He has labelled four local peaks in the time domain as letters - what does that mean? Are we supposed to recognize those peaks and correlate them with letters? Even if we assume the waveform is extended and played back all the listener could recognize is zero, one, or two tones (depending on what frequencies the components are).

This is why I asked if he had the fundamentals of sound and digital representations figured out - because reading the OP suggests otherwise.
 
People working with audio signals, though, generally don't do that.
Sure, but let's not conflate frequency and sinosoids just because that's the common technique of analysis. "The only signal that is a single frequency signal (in the context of signals) is a sine wave or a cosine wave."
 
The diagram and his description don't give a clear and/or plausible idea of what he is trying to achieve.

It is very clear what he is trying to achieve....He wants to represent character strings as audio signals. He never committed to any specific technique. Arguing over whether or not someone would be able to hear a 2 cycle long signal brings him no closer to that goal.
 
It is very clear what he is trying to achieve....He wants to represent character strings as audio signals.
That's about all that is clear. The diagram suggests he doesn't understand the fundamentals.

Arguing over whether or not someone would be able to hear a 2 cycle long signal brings him no closer to that goal.
No, but suggesting he bone up on audio fundamentals before he jump into programming does.
 
It is very clear what he is trying to achieve....He wants to represent character strings as audio signals. He never committed to any specific technique. Arguing over whether or not someone would be able to hear a 2 cycle long signal brings him no closer to that goal.

Really, we need an answer from the OP as to whether or not he actually wants to ever listen to the waveform or if he just wants the string converted to a waveform for visual display.

If he's never listening to it and instead just wants to display it somewhere, then he's probably going to want a totally different solution.


As for the bizarre side argument that the 10-20 cycles in the original clip would somehow be inaudible :rolleyes:: Any impulse that excites the human ear within the range of audible frequencies is perceptible given enough power.

As for citations: This one is more common sense than anything, so I'm not even sure it would be mentioned in the literature. However, for the inverse you could search for "gap detection threshold". In short, humans can usually discern a gap in a constant tone down to about 3ms. That's for a gap which is much harder to pick out than an impulse noise over silence, which we're discussing here. (See http://clas.mq.edu.au/speech/perception/gap_detection/ for example). It should be noted that threshold of hearing perception increases as the duration of a sound pulse decreases, because temporal summation in the ear occurs over a critical duration on the order of 150ms to 200ms. The net effect is that going from 200ms to 20ms may require 10dB more volume to perceive, and going from 20ms to 2ms may require an additional 2ms of volume to perceive. Hence my earlier comments about short pulses being perceptible given sufficient volume.
 
Last edited:
Any impulse that excites the human ear within the range of audible frequencies is perceptible given enough power.
[...]
This one is more common sense than anything, so I'm not even sure it would be mentioned in the literature.
I don't believe this, and you're lack of any citation isn't very convincing. Also your link is premised on the existence of a temporal threshold of perceptibility.

Do you really believe that you could hear a 20Hz tone played for 1fs given sufficient power? That sounds pretty ludicrous to me. Are you sure you're not considering the the side-effects of generating such a powerful and brief impulse, as well as the acoustic functions of the environment (both of which will generate other frequencies)?

Also let's note that dumping a huge amount of energy into the environment like that may simply burst the listeners ear drums or even kill them.
 
I am sorry for all the confusion. As I said in my original post I have no experience in this field so it's a bit difficult for me to express what I want to do because of my lack of understanding. Basically I just want to be able to do this:

string->audio file->string

I believe @Dogs got what I want to do. @AgentQ, I originally wanted just to listen to it but since you mention it I would like to be able to display it as well if for nothing more than a learning experience. Thanks to everyone that provided links and information you all help narrow the field so I'm no longer searching for a needle in a haystack.
 
I don't believe this, and you're lack of any citation isn't very convincing. Also your link is premised on the existence of a temporal threshold of perceptibility.

Do you really believe that you could hear a 20Hz tone played for 1fs given sufficient power? That sounds pretty ludicrous to me. Are you sure you're not considering the the side-effects of generating such a powerful and brief impulse, as well as the acoustic functions of the environment (both of which will generate other frequencies)?

Also let's note that dumping a huge amount of energy into the environment like that may simply burst the listeners ear drums or even kill them.

Okay, now you're just ignoring what I'm saying and moving the goal posts. Somehow you went from hearing the tone in the original post to hearing a 20Hz tone played for 1fs and you're suggesting that I might be bursting the listener's eardrums or killing them? :rolleyes:

You're straight up trolling at this point, so I'm not interested in wasting my time to help you understand. Wikipedia has a great, succinct summary of why you need to be thinking in terms of energy instead of number of cycles anyway:
For example the most quiet sound a subject can hear is 16 dB if the sound is presented at a duration of 200 ms. If the same sound at 16 dB is then presented for a duration of 20 ms only the most quiet sound that can now be heard by the subject goes up to 26 dB. In other words if a signal is shortened by a factor of 10 then the level of that signal must be increased by as much as 10 dB to be heard by the subject.

The ear operates as an energy detector that samples the amount of energy present within a certain time frame. A certain amount of energy is needed within a time frame to reach the threshold. This can be done by using a higher intensity for less time or by using a lower intensity for more time. Sensitivity to sound improves as the signal duration increases up to about 200 to 300 ms, after that the threshold remains constant.[2]

Emphasis on the bolded section. There's no minimum amount of time or cycles that a sound must play to be perceptible. Just a minimum amount of energy during the temporal summation duration, which is around 200 to 300ms.

That's it. Below 200 to 300 ms, you need to add 10db for every order of magnitude you decrease the signal duration for it to be audible. This compensates for the shorter duration in terms of auditory threshold. Going from 200ms to 2ms, for example, only requires 20dB more volume (roughly) to be perceptible. That's not going to kill anyone or burst anyone's eardrums. :rolleyes:
 
Last edited:
I am sorry for all the confusion. As I said in my original post I have no experience in this field so it's a bit difficult for me to express what I want to do because of my lack of understanding. Basically I just want to be able to do this:

string->audio file->string

I believe @Dogs got what I want to do. @AgentQ, I originally wanted just to listen to it but since you mention it I would like to be able to display it as well if for nothing more than a learning experience. Thanks to everyone that provided links and information you all help narrow the field so I'm no longer searching for a needle in a haystack.

A couple things to consider:

If you're just interested in making it into a waveform file for fun, you could consider treating it as a dictionary lookup. Each letter could correspond to a short waveform. Keep each waveform the same length, and make them return to zero at the beginning and end. To encode, just build the waveform from your dictionary. Decoding is just the inverse.

The above scenario only works in this very narrow application, though. If you ever wanted to transmit and receive your audio file and still be able to decode it, you need to consider a more advanced encoding.

The earlier comment about doing something similar to what phones use to encode your number press is probably the easiest solution. See the wikipedia article on DTMF for a basic introduction: http://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling

For DTMF and any other realistic encoding scheme, you'll want to start thinking in terms of frequency domain instead of the time domain. The FFT is used to convert a time-domain signal (like you showed in your first post) to the frequency domain. From there, you can pick out the frequencies that appear in your signal. To get started with the FFT and frequency domain processing in general, considering looking into NumPy and SciPy. They both come with a lot of great mathematical functions that you can string together.

Let us know if you have any more questions! Sounds like a fun project.
 
Okay, now you're just ignoring what I'm saying and moving the goal posts. Somehow you went from hearing the tone in the original post to hearing a 20Hz tone played for 1fs and you're suggesting that I might be bursting the listener's eardrums or killing them? :rolleyes:
I'm not moving the goal posts. Your claim:
Any impulse that excites the human ear within the range of audible frequencies is perceptible given enough power.
A 20Hz tone for 1fs falls within that criteria. It's your claim not mine.

You also claim that it is sufficient to simply dump more energy into the impulse to make it audible, as if your ears continue to function up to infinite pressures.

From your very own post:
This compensates for the shorter duration in terms of auditory threshold. Going from 200ms to 2ms, for example, only requires 20dB more volume (roughly) to be perceptible.:
lol "only" 20dB more pressure on the ears. Shorten that time a couple more orders of magnitude and very soon your ears will fail to function and you won't be hearing anything ever again. You'd basically be shooting a blast wave into your ears.
 
I'm not moving the goal posts. Your claim:

A 20Hz tone for 1fs falls within that criteria. It's your claim not mine.

You also claim that it is sufficient to simply dump more energy into the impulse to make it audible, as if your ears continue to function up to infinite pressures.

This is where you're confused. Your ears are measuring the energy over a period of time. Thus you don't "dump more energy" in to your ears. You raise the amplitude to compensate for the shorter duration so the total energy is roughly the same. Does that make sense? Twice the amplitude for half the time is the same energy. Think energy, not cycles.

From your very own post:

lol "only" 20dB more pressure on the ears. Shorten that time a couple more orders of magnitude and very soon your ears will fail to function and you won't be hearing anything ever again. You'd basically be shooting a blast wave into your ears.
Forgive me, I assumed you were familiar with the decibel scale, but apparently not.

The threshold of hearing depends on frequency, but it's roughly 16dB in the most sensitive areas. 20dB more would put us at 36dB. For reference, your computer is probably putting out 36dB or more right now.

A very loud rock concert is 120dB. We can shorten the duration many, many times before you reach the level of a rock concert. And it's nowhere near a "blast wave".

Consider this: Are you really suggesting that you'd reach a power level at which your eardrums burst before you reach a sound level that you perceive? Think about that one for a second.

Why don't you do us all a favor and download Audacity, make some half-cycle waves, and listen to them. I promise yours eardrums won't explode and you won't die. ;)
 
Last edited:
This is where you're confused. Your ears are measuring the energy over a period of time. Thus you don't "dump more energy" in to your ears. You raise the amplitude to compensate for the shorter duration so the total energy is roughly the same. Does that make sense? Twice the amplitude for half the time is the same energy. Think energy, not cycles.
The energy density increases; more importantly it is the pressure differential that is going to rupture the ear drum

Forgive me, I assumed you were familiar with the decibel scale, but apparently not.
I'm not accusing you of being ignorant, so please spare me the same courtesy.

I'm quite familiar with the decibel scale. I am a mixed-signal and digital integrated circuit designer - My focus is on both continuous and discrete time signal processing; I have personally designed hardware to perform a variety of audio processing functions (among many other things).

A very loud rock concert is 120dB. [...] And it's nowhere near a "blast wave".
I'm not claiming 120db is a blast wave. 200dB on the other hand is, and will probably kill someone.

Consider this: Are you really suggesting that you'd reach a power level at which your eardrums burst before you reach a sound level that you perceive? Think about that one for a second.
I didn't make that claim. I am disagreeing with your assertion that:
Any impulse that excites the human ear within the range of audible frequencies is perceptible given enough power.
 
The energy density increases; more importantly it is the pressure differential that is going to rupture the ear drum

Irrelevant because there is no need to get anywhere near these pressure levels to make it perceptible. The whole eardrum rupture line of reasoning is just a distraction here, so let's drop it.

I'm not accusing you of being ignorant, so please spare me the same courtesy.

I'm quite familiar with the decibel scale. I am a mixed-signal and digital integrated circuit designer - My focus is on both continuous and discrete time signal processing; I have personally designed hardware to perform a variety of audio processing functions (among many other things).

Great! But then why did you make this claim:

lol "only" 20dB more pressure on the ears. Shorten that time a couple more orders of magnitude and very soon your ears will fail to function and you won't be hearing anything ever again. You'd basically be shooting a blast wave into your ears.

10dB per order of magnitude. You said a couple more orders of magnitude and your ears would fail to function. You should know that your ears will work well past 100dB, so you'd have to go 10+ orders of magnitude down in duration before you have to increase the amplitude enough to get into dangerous amplitudes.

I'm not claiming 120db is a blast wave. 200dB on the other hand is, and will probably kill someone.

Why are you talking about 200dB? We're discussing the threshold of hearing here. There's no need to go to 200dB to hear something.

Let's walk through an example. Let's assume the hearing threshold for a constant 5kHz tone is 35dB. It's actually substantially less than that unless you're 60 years old, but we'll take a worst case scenario. ( http://en.wikipedia.org/wiki/File:Ath-byage.png ) Let's also use 200ms for the critical duration for temporal summation and go with the 10dB increase in threshold for every order of magnitude decrease in tone duration, which is the number in the literature I cited above. Now let's drop the duration down by an order of magnitude at a time. The hearing threshold will then go up 10dB at each step.

200ms - 35dB (1000 full cycles at 5kHz)
20ms - 45dB (100 full cycles at 5kHz)
2ms - 55dB (10 full cycles at 5kHz)
0.2ms - 65dB (1 full cycle at 5kHz)
0.02ms - 75dB (1/10 cycle at 5kHz)
0.002ms - 85dB (1/100 cycle at 5kHz)

Now do you see why all this talk of 200dB and eardrum rupture and blast waves and death by sound is totally irrelevant? The threshold of perception is always going to be less than the threshold of eardrum rupture for any meaningful definition of a sound wave. Good luck producing 1/100th of a cycle of a 5kHz tone.

I didn't make that claim. I am disagreeing with your assertion that:

Yes, I know you're disagreeing with that assertion. But I've outlined, with sources and math, why your objections are wrong and/or irrelevant. At this point, I can't even tell what you're basing your objections on, other than your gut feeling. Please help me understand where you're coming from, because none of what you're saying matches the math or the literature or even common sense at this point.

Hopefully the information in this thread was useful to someone. Sorry for such a massive thread hijack.:(
 
Yes major hijack.

10dB per order of magnitude. You said a couple more orders of magnitude and your ears would fail to function. You should know that your ears will work well past 100dB, so you'd have to go 10+ orders of magnitude down in duration before you have to increase the amplitude enough to get into dangerous amplitudes.

Agreed. Let's note that you said:

Any impulse that excites the human ear within the range of audible frequencies is perceptible given enough power.

But clearly there are impulses short enough that the ear is not capable of hearing them, which was my point of contention (for the last several posts).
 
But clearly there are impulses short enough that the ear is not capable of hearing them, which was my point of contention (for the last several posts).

This is why I said you were moving the goalposts here. You started by arguing that the 10+ cycles in the original post would be inaudible, and I clearly showed that was not the case. I then showed you that the ear is more than capable of registering even a half-cycle of an audible frequency at totally reasonable volumes.

Now you're moving the goalpost to sounds much shorter than even half a cycle? Reproducing such a tone is impossible without infinite bandwidth anyway, otherwise we couldn't have abrupt beginnings and ends of the half cycle. Even then, your ear would act as a low-pass filter on the wave, so it doesn't matter anyway.

So now we're deep in the throes of pedantry here, and yet you're still not actually giving any evidence, citations, math, or support for your claim. You're just throwing it out there.

So here's my claim that you disagreed with per your own post above:

Any impulse that excites the human ear within the range of audible frequencies is perceptible given enough power.

Please tell me how you would make sound short enough that the ear couldn't hear it and make the sound fall within the range of audible frequencies of the human ear and structure it such that it would be imperceptible no matter how much power we apply to it. If you're thinking of a very short cycle time then it's going be too high of a frequency for human hearing. Which is why I included the qualifier "within the range of audible frequencies" in the first place.

But I'll humor you even more: It's possible to produce an acoustical Dirac impulse of exceeding short duration. 15usec, for example, containing a wide range of frequencies. Such an impulse still excites the ear and produces an impulse response. See http://link.springer.com/chapter/10.1007/978-3-642-50038-1_3 for example

Acoustical Dirac impulses (15 μsec duration, sound energy from 600 Hz to 25 kHz) are used under free field conditions for evoking impulse responses in the tympanic membranes of awake, unrestrained human volunteers. The impulse responses are analysed in the time- and frequency domains. The impulse responses within different frequency bands add to a total impulse response of complex shape (Fig. 3). The frequency spectrum of the vibration velocity of the mallear handle (umbo) shows several maxima in amplitude and corresponding deflections of phase, but the maxima are mainly caused by changes in the spectrum of the sound travelling to the ear drum. In contrast, the transfer function of the umbo (sound pressure to vibration) is smooth with only little variation in amplitude and a gradual development of phase. It is argued that the common notion of the middle ear as a low-pass filter is misleading.

As a DSP engineer, you should know a thing or two about impulse response and a Dirac (or in this case, pseudo-Dirac) impulse. Right? As I said many times already, you need to stop thinking in terms of duration and start thinking in terms of energy imparted to the ear. It doesn't matter how short the impulse is as long as it has sufficient energy to excite the ear in a way that activates your hearing nerves.
 
Last edited:
This is why I said you were moving the goalposts here. You started by arguing that the 10+ cycles in the original post would be inaudible

I'm not moving the goalposts. I'm specifically addressing *this* claim of yours:
Any impulse that excites the human ear within the range of audible frequencies is perceptible given enough power.
In post #17 I questioned this and only this claim, from which this conversation has followed.

There is lower a lower limit on the timeframe that can be heard for both logistical (producing it) and physiological reasons discussed.

Reproducing such a tone is impossible without infinite bandwidth anyway, otherwise we couldn't have abrupt beginnings and ends of the half cycle.
I agree with this; however we can still consider the sound during the open interval which it can be produced.


If you'd like to discuss the waveform shown in the OP instead , I did generate it yesterday assuming 100ms duration, and it was audible. Initially I said unintelligible, and then later inaudible; the former of which I stand by in the context of the OP, the latter of which is incorrect.
 
There is lower a lower limit on the timeframe that can be heard for both logistical (producing it) and physiological reasons discussed.

This is false. I've shown why this is false. I even linked a paper which used pseudo-Dirac impulses to excite the human ear in actual human volunteers. Basic DSP concepts demonstrate that an infinitely short pulse will still excited the ear system, if you were able to generate such a Dirac impulse. You're just choosing to ignore all of this without providing any evidence, science, citations, math, or even basic logic to back up your claim. :rolleyes:
 
This is false. I've shown why this is false. I even linked a paper which used pseudo-Dirac impulses to excite the human ear in actual human volunteers.
I haven't looked at the most recent paper you linked. I will take a look.

The earlier link you produced indicating that one has to increase power certainly does not support the claim as we know the ear will fail at certain pressure levels.


Edit: just looking at the abstract (not sure if I can get full access from my current location) it is obviously a pseudo-dirac as you mentioned at 15us, and they make no mentioned of shorter timescales - it doesn't speak to my point as far as I can tell. Will try to get the full paper...
 
I haven't looked at the most recent paper you linked. I will take a look.

Really? :rolleyes:

In short, they used a 15usec impulse to excite human ears and measured the response.

The earlier link you produced indicating that one has to increase power certainly does not support the claim as we know the ear will fail at certain pressure levels.

I already debunked this claim. You're still thinking about this wrong.

Consider this: There is a sound pressure threshold at which the ear will fail. There is also a sound pressure level at which the ear will perceive a sound. For your claim to be true, the threshold at which the ear will fail for a sufficiently short pulse must be higher than the threshold at which the ear will perceive the sound.

Think about that. Are you really suggesting that there is a point at which the nerves within the ear aren't sensitive enough to sense the energy in a short sound pulse yet that same pulse would have enough energy to destroy the ear?



At this point, I've disproved every one of your claims. You're digging deep into pedantry now to come up with something to argue. :rolleyes:
 
Think about that. Are you really suggesting that there is a point at which the nerves within the ear aren't sensitive enough to sense the energy in a short sound pulse yet that same pulse would have enough energy to destroy the ear?
You were the one who said the power must increase 10dB per 10x shrink in timescale.

By this claim a 1fs tone requires 150dB amplification over a 1s tone to be perceptible, and therefore a 1fs pulse at 140dB amplification will not be audible - it will however damage your ears.
 
Back
Top