Re: [music-dsp] PCM audio amplitudes represent pressure or displacement?

2017-09-30 Thread Nigel Redmon
> I'm pretty sure an instantaneous [audio] voltage (or a number in a
> stream of PCM values) represents a pressure differential, and not
> displacement.

This is one of those point-of-view things…I used the “usually” caveat for that 
reason…

You strike a drum, you displace the head, create a pressure wave because the 
room has air, the pressure wave displaces the conducer capsule membrane 
resulting in a change of capacitance, which is converted to a change in 
voltage, it’s amplifier and used to displace a speaker, which creates a 
pressure wave, which displaces your ear drum…

So, whether the electrical signal is of the displacement of the capsule 
membrane, or the pressure differential over time hitting it…ultimately we’re 
normally recording sound as it exists in the air, so you could rightly say the 
electrical signal is an analog of the pressure changes over time—or you could 
look at it on the electro-mechanical level and say we use the pressure to 
displace and element and record that displacement.

I guess how firmly you stick to one or the other depends on conventions you're 
used to. As an engineer, I see it as representing the displacement. The reason 
I view it that way is because I’m intimately aware of the masses involved with 
dynamic or condenser mics, and their shortcomings. So, I think of it as the mic 
diaphragm trying its best to approximate the changes in pressure, and we 
convert that displacement approximation to an electrical signal.

It’s probably easier to view the flip side, the speaker—so many reasons for a 
bad approximation; you need a big surface to move a lot of air, particularly 
for low frequencies, but a big surface has enough mass that it sucks for 
quicker changes so we split up the audio band; all the while the surfaces are 
flexing and the cabinet and surface attachments are messing with the attempt, 
and you wonder how the heck we manage to put something out that’s listenable 
;-) Anyway, that’s why I view it as displacement; we’re trying like heck to 
make the displacement true, and the pressure changes follow (for speakers—the 
other way with a mic). It may be a different story with “plasma” approaches, 
I’m talking about our usual practical transducers.


> On Sep 30, 2017, at 1:37 PM, Ben Bradley  wrote:
> 
> I'm pretty sure an instantaneous [audio] voltage (or a number in a
> stream of PCM values) represents a pressure differential, and not
> displacement. A loudspeaker driver in air (within its rated response)
> is constrained by the air, above its resonant frequency (at the low
> end of its frequency range - for a woofer, this would be near the
> resonant frequency of a ported bass cabinet). Below its resonant
> frequency the output is a position proportional to voltage or current,
> but the coupling efficiency to the air goes down with frequency, so
> this isn't a good operating range. A woofer with a 1Hz input is going
> to have the same displacement as with a 0.1Hz input at the same
> voltage, because it doesn't have good coupling to the air at such low
> frequencies.
> 
> A speaker in air (operating within its intended frequency range) is
> like an oar in water. You can move it back and forth very far of
> you're doing it at a slow enough rate (low enough frequency). If you
> do it at a higher frequency, it takes more force to move it back and
> forth the same distance. If you use the same force, you end up moving
> back and forth a smaller distance due to the "strong coupling" of the
> oar to the water. This is how a speaker cone sees the air, and shows
> how cone displacement goes down as frequency goes up, even though the
> acoustic energy is the same. The voltage is proportional to
> [differential] pressure, and not (as one might easily believe, and
> probably some books say!) displacement.
> 
> Regarding phase, as displacement is the integral of pressure,
> displacement goes down with an increase in frequency, and there's a
> phase shift between pressure and displacement. I vaguely recall that
> the integral of a cosine is a sine, so there's a 90 degree (or pi/2,
> not pi/4 - you're perhaps thinking of 1/4 of a complete wave) phase
> shift between these two. But a dynamic microphone does the exact
> inverse of a speaker, so the sound-to-sound conversion actually works
> out without a phase shift. Even presuming a condenser mic does this
> phase shift (I can't quite visualize how or whether it does offhand),
> human ears are almost completely insensitive to phase shift vs.
> frequency, so in practice it doesn't matter.
> 
> 
> On Sat, Sep 30, 2017 at 3:39 PM, Stefan Sullivan
>  wrote:
>> 
>> so there might be a phase
>> offset between the recorded
>> and the reproduced sound.
>> 
>> 
>> Ah, I think I might be understanding your question more intuitively. Is your
>> question about positive voltages from microphones being represented as one
>> direction of displacement, whereas the positive voltages 

Re: [music-dsp] Reverb, magic numbers and random generators #2 the Go approach

2017-09-30 Thread Stefan Sullivan
Sometimes the simplest approach is the best approach. Sounds like a good
reverb paper to me. Some user evaluation and references to standard papers
and 

On Sep 29, 2017 8:51 AM, "gm"  wrote:

> It's a totally naive laymans approach
> I hope the formatting stays in place.
>
> The feedback delay in the loop folds the signal back
> so we have periods of a comb filter.
> |  |  |  |
> |__|__|__|___
>
> Now we want to fill the period densly with impulses:
>
> First bad idea is to place a first impulse exactly in the middle
>
> that would be a ratio for the allpass delay of 0.5 in respect to the comb
> filter.
> It means that the second next impulse falls on the period.
>
> | |
> |||___
>
>
> The next idea is to place the impulse so that after the second cycle
> it exactly fills the free space between the first pulse and the period
> like this,
> exactly in the middle between the first impulse and the period:
>
> |   |   |
> | | |  ||
> |_|_|__|__|_|___
>
> this means we need a ratio "a" for the allpass delay in respect to the
> combfilter loop that fulfills:
>
> 2a - 1 = a/2
>
> Where 1 is the period of the combfilter.
> Alternativly, to place it on the other side, we need
>
> 2a - 1 = 1 - a/2;
>
>
> |   |   |
> |   |   | | |
> |___|___|___|_|_|___
>
> This gives ratios of 0.5. 0.7 and 0.8
>
> These are bad ratios since they have very small common multiples with the
> loop period.
> So we detune them slightly so they are never in synch with the loop period
> or each other.
> That was my very naive approach, and surprisingly it worked.
>
>
> The next idea is to place the second impulse not in the middle of the free
> space
> but in a golden ratio in respect to the first impulse
>
> |||
> |   |||   |
> |___|||__||
>
> 2a - 1 = a*0.618...
>
> or
>
> N*a mod 1 = a*0.618..
>
> or if you prefer the exact solution:
>
> a = (1 + SQRT(5)) / ( SQRT(5)*N + N - 2)
>
> wich is ~ 0.723607  and the same as 1/ (1+ 0.382...) or 1/ (N + 0.382)
>
> where N is the number of impulses, that means instead of placing the 2nd
> impulse on a*0.618
> we can also place the 3rd, 4th etc for shorter AP diffusors.
>
> (And again we can also fill the other side of the first impulse with
> 0.839643
> And the solution for N = 1 is 2.618.. and we can use the reciprocal 0.381
> to place a first impusle)
>
> The pattern this gives for 0.72.. is both regular but evenly distributed
> so that each pulse
> falls an a free space, just like on a Fibonaccy flower pattern each petal
> falls an a free space,
> forever.
> (I have only estimated the first few periods manually, and it appeared
> like that
> Its hard to identify in the impulse response since I test a loop with 3
> APs )
>
> The regularity is a bad thing, but the even distribution seems like a good
> thing (?).
> I assume it doesn't even make a huge difference to using 0.618.. for a
> ratio though it seemed to sound better.
> (And if you use 0.618, what do you use for the other APs?)
>
> So it's not the solution I am looking for but interesting never the less.
>
> I believe that instant and well distributed echo density is a desired
> property
> and I assume that the more noise like the response is as a time series
> the better it works also in the frequency/phase domain.
>
> For instance you can make noise loops with randomizing all phases by FFT
> in circular convolution
> that sound very reverberated.
>
>
>
>
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] PCM audio amplitudes represent pressure or displacement?

2017-09-30 Thread Ben Bradley
I'm pretty sure an instantaneous [audio] voltage (or a number in a
stream of PCM values) represents a pressure differential, and not
displacement. A loudspeaker driver in air (within its rated response)
is constrained by the air, above its resonant frequency (at the low
end of its frequency range - for a woofer, this would be near the
resonant frequency of a ported bass cabinet). Below its resonant
frequency the output is a position proportional to voltage or current,
but the coupling efficiency to the air goes down with frequency, so
this isn't a good operating range. A woofer with a 1Hz input is going
to have the same displacement as with a 0.1Hz input at the same
voltage, because it doesn't have good coupling to the air at such low
frequencies.

A speaker in air (operating within its intended frequency range) is
like an oar in water. You can move it back and forth very far of
you're doing it at a slow enough rate (low enough frequency). If you
do it at a higher frequency, it takes more force to move it back and
forth the same distance. If you use the same force, you end up moving
back and forth a smaller distance due to the "strong coupling" of the
oar to the water. This is how a speaker cone sees the air, and shows
how cone displacement goes down as frequency goes up, even though the
acoustic energy is the same. The voltage is proportional to
[differential] pressure, and not (as one might easily believe, and
probably some books say!) displacement.

Regarding phase, as displacement is the integral of pressure,
displacement goes down with an increase in frequency, and there's a
phase shift between pressure and displacement. I vaguely recall that
the integral of a cosine is a sine, so there's a 90 degree (or pi/2,
not pi/4 - you're perhaps thinking of 1/4 of a complete wave) phase
shift between these two. But a dynamic microphone does the exact
inverse of a speaker, so the sound-to-sound conversion actually works
out without a phase shift. Even presuming a condenser mic does this
phase shift (I can't quite visualize how or whether it does offhand),
human ears are almost completely insensitive to phase shift vs.
frequency, so in practice it doesn't matter.


On Sat, Sep 30, 2017 at 3:39 PM, Stefan Sullivan
 wrote:
>
> so there might be a phase
> offset between the recorded
> and the reproduced sound.
>
>
> Ah, I think I might be understanding your question more intuitively. Is your
> question about positive voltages from microphones being represented as one
> direction of displacement, whereas the positive voltages from speakers being
> represented as the opposite displacement? To be honest I'm not sure what the
> convention is here, but there must be an industry-wide convention or even
> one speaker manufacturer to the next might be phase incoherent? I actually
> don't know the answer here, but maybe somebody else on the list does?
>
> It is worth pointing out that Nigel is right about phase being frequency
> dependent. Even the mechanical system has dynamic components that have a
> frequency response, which means their phase response could be nonlinear,
> which transducer engineers would either need to compensate for with other
> reactive mechanical components, or with the electrical components, or DSP.
>
> Interestingly, the acoustical and mechanical systems of transducers can be
> modeled as electrical circuit complements themselves. I assume that all
> speaker/microphone manufacturers model their systems this way, but again
> it's not actually my industry so I can't speak to what actually happens.
> Marshall Leach has a really good book on the subject:
> https://he.kendallhunt.com/product/introduction-electroacoustics-and-audio-amplifier-design
>
> Stefan
>
>
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] PCM audio amplitudes represent pressure or displacement?

2017-09-30 Thread Stefan Sullivan
so there might be a phase
offset between the recorded
and the reproduced sound.


Ah, I think I might be understanding your question more intuitively. Is
your question about positive voltages from microphones being represented as
one direction of displacement, whereas the positive voltages from speakers
being represented as the opposite displacement? To be honest I'm not sure
what the convention is here, but there must be an industry-wide convention
or even one speaker manufacturer to the next might be phase incoherent? I
actually don't know the answer here, but maybe somebody else on the list
does?

It is worth pointing out that Nigel is right about phase being frequency
dependent. Even the mechanical system has dynamic components that have a
frequency response, which means their phase response could be nonlinear,
which transducer engineers would either need to compensate for with other
reactive mechanical components, or with the electrical components, or DSP.

Interestingly, the acoustical and mechanical systems of transducers can be
modeled as electrical circuit complements themselves. I assume that all
speaker/microphone manufacturers model their systems this way, but again
it's not actually my industry so I can't speak to what actually happens.
Marshall Leach has a really good book on the subject:
https://he.kendallhunt.com/product/introduction-electroacoustics-and-audio-amplifier-design

Stefan
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] PCM audio amplitudes represent pressure or displacement?

2017-09-30 Thread Richard Dobson
There are two basic types: pressure tranducers (omni, cardioid) and 
velocity or pressure-gradient (ribbon, figure-of-eight). The (bipolar) 
output signal is the electrical analogue of the changing acoustic 
pressure. There are also more exotic particle velocity transducers such 
as the Microflown.


Richard Dobson

On 30/09/2017 17:03, Renato Fabbri wrote:

I am not finding this information clearly.

BTW. microphones capture amplitude or displacement
or it depends?

--
Renato Fabbri
GNU/Linux User #479299
labmacambira.sourceforge.net 


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] PCM audio amplitudes represent pressure or displacement?

2017-09-30 Thread Nigel Redmon
> I think mics usually converts
> pressure into voltage,

A Stefan pointed out, it’s really pressure to displacement to voltage (usually 
via capacitance or induction). A dynamic mic is basically a backwards speaker. 
It’s easy enough to see that a speaker converts voltage to deflection, which 
converts to pressure in the presence of air. You can shout into a speak (the 
smaller the better), and it will convert those air pressure waves to 
deflection, which will induce a small voltage that you’d want to run into a 
preamp—that’s a dynamic mic. With a condenser (another name for a capacitor) 
mic, the deflection of a membrane changes capacitance, which in turn changes a 
voltage.

> so there might be a phase
> offset between the recorded
> and the reproduced sound. 

Not 100% sure what you’re getting at, but it would really be a time offset. 
Phase is frequency-relative thing. I might be misunderstanding your point.


> On Sep 30, 2017, at 11:11 AM, Renato Fabbri  wrote:
> 
> I thinks I get it.
> But, as the samples are converted to analog signal
> and then sent to speakers,
> it seems reasonable to assume that there
> is a convention.
> 
> Probably displacement?
> 
> At the same time,
> I think mics usually converts
> pressure into voltage,
> which would lead to PCM samples
> that represent pressure.
> 
> One is proportional to the other,
> with a pi/4 phase difference,
> so there might be a phase
> offset between the recorded
> and the reproduced sound. (?? yes?)
> 
> My motivation is to know the fundamentals
> as I often read and write about audio and music
> (as an academic).
> 
> tx.
> R.
> 
> 
> 
> On Sat, Sep 30, 2017 at 2:24 PM, Nigel Redmon  > wrote:
> PCM audio samples usually represent an analog voltage, so, whatever the 
> analog voltage represents.
> 
> A mic usually converts pressure into displacement, and the displacement into 
> an analog voltage.
> 
> Sorry if I’m missing something, due to not understanding your motivation for 
> the questions.
> 
> The PCM samples themselves are a Pulse Code Modulated representation of the 
> analog voltage over time. If you want to understand that part better,
> 
> http://www.earlevel.com/main/tag/sampling-theory-series/?order=ASC 
> 
> 
> 
>> On Sep 30, 2017, at 9:03 AM, Renato Fabbri > > wrote:
>> 
>> I am not finding this information clearly.
>> 
>> BTW. microphones capture amplitude or displacement
>> or it depends?
>> 
>> -- 
>> Renato Fabbri
>> GNU/Linux User #479299
>> labmacambira.sourceforge.net 
> 
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu 
> https://lists.columbia.edu/mailman/listinfo/music-dsp 
> 
> 
> 
> 
> -- 
> Renato Fabbri
> GNU/Linux User #479299
> labmacambira.sourceforge.net 
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp

___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] PCM audio amplitudes represent pressure or displacement?

2017-09-30 Thread Stefan Sullivan
Acoustic transducers (aka microphones and speakers) would be a good keyword
for finding more technical information. They convert pressure differentials
(not pressure per se) to +/- voltage. The pressure is change relative to a
baseline, which is usually right around 1 atmosphere (although it doesn't
matter to the functioning of the transducer). The means of doing so depends
on the type of microphone/speaker. The ADC/DAC converts between whatever
digital representation (usually LPCM iiuc) and analog voltages.

I guess it's a pedantic distinction between pressure and pressure
differentials, but I think understanding the flow of changes in
representation is intuitively meaningful. Each component is responsible for
understanding both representations.

Acoustic pressure waves <=> mechanical motion <=> electrical signal <=>
digitally sampled signal

The microphone diaphragm or speaker come converts between mechanical motion
and acoustic pressure waves. The electrical components, usually either
capacitive or inductive components, convert to an electrical signal. The
ADC/DAC converts between a sampled digital signal and an electrical signal.

Hopefully that's actually helpful to your question.

Stefan


On Sep 30, 2017 11:12, "Renato Fabbri"  wrote:

> I thinks I get it.
> But, as the samples are converted to analog signal
> and then sent to speakers,
> it seems reasonable to assume that there
> is a convention.
>
> Probably displacement?
>
> At the same time,
> I think mics usually converts
> pressure into voltage,
> which would lead to PCM samples
> that represent pressure.
>
> One is proportional to the other,
> with a pi/4 phase difference,
> so there might be a phase
> offset between the recorded
> and the reproduced sound. (?? yes?)
>
> My motivation is to know the fundamentals
> as I often read and write about audio and music
> (as an academic).
>
> tx.
> R.
>
>
>
> On Sat, Sep 30, 2017 at 2:24 PM, Nigel Redmon 
> wrote:
>
>> PCM audio samples usually represent an analog voltage, so, whatever the
>> analog voltage represents.
>>
>> A mic usually converts pressure into displacement, and the displacement
>> into an analog voltage.
>>
>> Sorry if I’m missing something, due to not understanding your motivation
>> for the questions.
>>
>> The PCM samples themselves are a Pulse Code Modulated representation of
>> the analog voltage over time. If you want to understand that part better,
>>
>> http://www.earlevel.com/main/tag/sampling-theory-series/?order=ASC
>>
>>
>> On Sep 30, 2017, at 9:03 AM, Renato Fabbri 
>> wrote:
>>
>> I am not finding this information clearly.
>>
>> BTW. microphones capture amplitude or displacement
>> or it depends?
>>
>> --
>> Renato Fabbri
>> GNU/Linux User #479299
>> labmacambira.sourceforge.net
>>
>>
>>
>> ___
>> dupswapdrop: music-dsp mailing list
>> music-dsp@music.columbia.edu
>> https://lists.columbia.edu/mailman/listinfo/music-dsp
>>
>
>
>
> --
> Renato Fabbri
> GNU/Linux User #479299
> labmacambira.sourceforge.net
>
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
>
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] PCM audio amplitudes represent pressure or displacement?

2017-09-30 Thread Renato Fabbri
I thinks I get it.
But, as the samples are converted to analog signal
and then sent to speakers,
it seems reasonable to assume that there
is a convention.

Probably displacement?

At the same time,
I think mics usually converts
pressure into voltage,
which would lead to PCM samples
that represent pressure.

One is proportional to the other,
with a pi/4 phase difference,
so there might be a phase
offset between the recorded
and the reproduced sound. (?? yes?)

My motivation is to know the fundamentals
as I often read and write about audio and music
(as an academic).

tx.
R.



On Sat, Sep 30, 2017 at 2:24 PM, Nigel Redmon  wrote:

> PCM audio samples usually represent an analog voltage, so, whatever the
> analog voltage represents.
>
> A mic usually converts pressure into displacement, and the displacement
> into an analog voltage.
>
> Sorry if I’m missing something, due to not understanding your motivation
> for the questions.
>
> The PCM samples themselves are a Pulse Code Modulated representation of
> the analog voltage over time. If you want to understand that part better,
>
> http://www.earlevel.com/main/tag/sampling-theory-series/?order=ASC
>
>
> On Sep 30, 2017, at 9:03 AM, Renato Fabbri 
> wrote:
>
> I am not finding this information clearly.
>
> BTW. microphones capture amplitude or displacement
> or it depends?
>
> --
> Renato Fabbri
> GNU/Linux User #479299
> labmacambira.sourceforge.net
>
>
>
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
>



-- 
Renato Fabbri
GNU/Linux User #479299
labmacambira.sourceforge.net
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] PCM audio amplitudes represent pressure or displacement?

2017-09-30 Thread Nigel Redmon
PCM audio samples usually represent an analog voltage, so, whatever the analog 
voltage represents.

A mic usually converts pressure into displacement, and the displacement into an 
analog voltage.

Sorry if I’m missing something, due to not understanding your motivation for 
the questions.

The PCM samples themselves are a Pulse Code Modulated representation of the 
analog voltage over time. If you want to understand that part better,

http://www.earlevel.com/main/tag/sampling-theory-series/?order=ASC 



> On Sep 30, 2017, at 9:03 AM, Renato Fabbri  wrote:
> 
> I am not finding this information clearly.
> 
> BTW. microphones capture amplitude or displacement
> or it depends?
> 
> -- 
> Renato Fabbri
> GNU/Linux User #479299
> labmacambira.sourceforge.net 
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

[music-dsp] PCM audio amplitudes represent pressure or displacement?

2017-09-30 Thread Renato Fabbri
I am not finding this information clearly.

BTW. microphones capture amplitude or displacement
or it depends?

-- 
Renato Fabbri
GNU/Linux User #479299
labmacambira.sourceforge.net
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp