| Author |
Message |
Dirk Bruere at Neopax
Guest
|
Posted:
Tue Nov 08, 2005 10:40 pm Post subject:
Re: Volume Control - digital |
|
|
dpierce@cartchunk.org wrote:
| Quote: | Scott Dorsey wrote:
Dirk Bruere at Neopax <dirk.bruere@gmail.com> wrote:
Right. Graham-Patten makes a box with an AES/EBU in, an AES/EBU out, and
a knob. It lets you scale input down by any factor.
Well, since it is going to be a PC storing and originating the digital signals I
was hoping for something in s/w.
So, write some software. All you need is to take your existing software
and modify it to multiply everything by a constant. Then you pop up
something on the screen that lets the user change that constant.
Well, it is, as I am sure Scott knows, a wee bit more complicated than
that.
You have a control object on the screen, say a slider control. It
outputs
an integer between some minimum and maximum value whenever it's
moved. Say it outputs a range from 0-127.
Take that value, and use it to look up a 15-bit gain coefficient in a
128
entry lookup table. This table is populated such that the linear range
of
0-127 is translated into an appropriate gain curve that "feels right",
i.e.
approximately logarithmic with lots of resolution where you need it
(upper
third), and lots of gain change where you need it (lower third).
Take the 15 bit gain coefficient (actually, it's really a 16 bit signed
integer coefficient limited to only the positive values: I'll explain
why in
a bit) and for each sample that comes flying by, multiply the two
together.
The result will be a 32-bit signed integer. TO get back to 16 bits, add
an
appropriate dither value (usually 16 bits) to the 32 bit result, then
take
the top 16 bits as the gain-adjusted sample. Repeat for all subsequent
samples.
If you want to get more sophisicated, hold on to the 16 lower bits and
feed
them back into the input stream after the multiply. Do it right, and
you can
add higher-order noise shaping to reduce the audible effect of the
dithering.
Always make sure your gain coefficients are positive, i.e., in the
range of
0x0000 to 0x7FFF (0 to 32767). If you don't, as soon as the top bit
gets
set, it' makes it a negative gain coefficient and you suddenly flip the
phase
of the resulting signal. Bad idea, especially when you run your volume
control up thourgh the transition from positive to negative gains. Bad
idea.
Oh, and you're likely to encounter some "fluttering" when you're
changing
volume often referred to as "zipper noise." Contrary to common belief,
it's
not because you only have a limited number of steps in your volume
control but because you aren't changing the gain OFTEN enough. The
RIGHT way to do it is to differentiate the steps coming from your
volume
control, thus getting effectively the SPEED of the knob, not its
position.
With that, you can make a prediction of how fast you have to change
your
gain. You're gain rampling algorithm then continuously ramps the gain
at fairly quick intervale (1000x a second, maybe), between the previous
value and the next value of the vaolume control. Do it right, and no
zipper noise, ever, no matter how many of few steps you have in your
volume control.
Basically, it's not a half-hour programming excercise.
|
And does MS Media Centre do it right?
As I implied, we have not made a final decision on this bit or even looked in
depth at the options. These NGs can no doubt expect some question on this topic
in the near future...
--
Dirk
The Consensus:-
The political party for the new millenium
http://www.theconsensus.org
|
|
| Back to top |
|
 |
Guest
|
Posted:
Tue Nov 08, 2005 11:03 pm Post subject:
Re: Volume Control - digital |
|
|
Dirk Bruere at Neopax wrote:
| Quote: |
Basically, it's not a half-hour programming excercise.
And does MS Media Centre do it right?
|
I do not know specifically, but having seen some of MS's other attempts
at audio, I'd bet good money that they pretty well f*cked it up.
Certainly
some of the details I spoke of regarding gain algorithms are not all
that common (e.g., gain trajectory for smooth gain ranging) amongst
professional products, so I'd doubt that they've found their way into
the
grossly low-end of the realm. And, too often, Microsoft media stuff is
worse than the worst |
|
| Back to top |
|
 |
Richard Crowley
Guest
|
Posted:
Tue Nov 08, 2005 11:58 pm Post subject:
Re: Volume Control - digital |
|
|
"Dirk Bruere at Neopax" wrote ...
| Quote: | Well, it's going to probably be MS Media Centre.
|
Doesn't that already have a volume control? |
|
| Back to top |
|
 |
Geoff@home
Guest
|
Posted:
Wed Nov 09, 2005 1:13 am Post subject:
Re: Volume Control - digital |
|
|
"Dirk Bruere at Neopax" <dirk.bruere@gmail.com> wrote in message
| Quote: | Well, since it is going to be a PC storing and originating the digital
signals I was hoping for something in s/w.
Or at least an explanation of why this is not possible.
Given the type of system we are developing the fewer boxes the better.
|
I hope this $20K (and rising) system is not ooutputting MP3s !
geoff |
|
| Back to top |
|
 |
Dirk Bruere at Neopax
Guest
|
Posted:
Wed Nov 09, 2005 1:35 am Post subject:
Re: Volume Control - digital |
|
|
Geoff@home wrote:
| Quote: | "Dirk Bruere at Neopax" <dirk.bruere@gmail.com> wrote in message
Well, since it is going to be a PC storing and originating the digital
signals I was hoping for something in s/w.
Or at least an explanation of why this is not possible.
Given the type of system we are developing the fewer boxes the better.
I hope this $20K (and rising) system is not ooutputting MP3s !
|
Only the Golden Oldies from a top of the range antique 8-Track:-)
Actually, most of the system cost so far in in the speakers which are
proprietory. They come in at around $16k for a 2+1. Throw in 3 Powersoft amps at
around 1kW each, and all the top of the range gear needed to drive them
(including a PC) and you can probably work out the final cost. More for surround.
--
Dirk
The Consensus:-
The political party for the new millenium
http://www.theconsensus.org |
|
| Back to top |
|
 |
hank alrich
Guest
|
Posted:
Wed Nov 09, 2005 1:47 am Post subject:
Re: Volume Control - digital |
|
|
Dirk Bruere at Neopax wrote:
| Quote: | Well, since it is going to be a PC storing and originating the digital
signals I was hoping for something in s/w.
|
You could do that with a Metric Halo MIO or ULN2, using the MH Console
app.
--
ha |
|
| Back to top |
|
 |
Arny Krueger
Guest
|
Posted:
Wed Nov 09, 2005 4:57 am Post subject:
Re: Volume Control - digital |
|
|
"Dirk Bruere at Neopax" <dirk.bruere@gmail.com> wrote in
message news:3tbot1FrthmjU1@individual.net
| Quote: | I'm trying for a wireless solution to get rid of some
cables. 'Obviously' the best is to use direct digital
stream from say a CD player, transport it wirelessly and
either convert it to analogue at the amp in the speaker,
or continue digitally into a digital amp eg Powersoft.
Problem is, how do I control the volume?
There are only two possible way that I can see:
a) Convert it to analogue at the CD end and redigitise.
|
OK, it can be messy.
| Quote: | b) Do the volume control digitally.
|
The trick is finding a digital volume control with digital
inputs and outputs that operates in real time.
| Quote: | I can see the drawbacks of a), but what about b)?
|
Two hardware alternatives would be a digital mixer or a
digital equalizer with digital I/O.
| Quote: | Any s/w available to do it simply in a PC for example?
|
What you are looking for would be a combination of hardware
and software since PCs don't by default have digital inputs
or outputs.
In order to obtain the real-time operation you see to need -
try an audio interface with an input monitoring facility
with level control that outputs through digital outputs. |
|
| Back to top |
|
 |
Dirk Bruere at Neopax
Guest
|
Posted:
Wed Nov 09, 2005 5:16 am Post subject:
Re: Volume Control - digital |
|
|
Arny Krueger wrote:
| Quote: | "Dirk Bruere at Neopax" <dirk.bruere@gmail.com> wrote in
message news:3tbot1FrthmjU1@individual.net
I'm trying for a wireless solution to get rid of some
cables. 'Obviously' the best is to use direct digital
stream from say a CD player, transport it wirelessly and
either convert it to analogue at the amp in the speaker,
or continue digitally into a digital amp eg Powersoft.
Problem is, how do I control the volume?
There are only two possible way that I can see:
a) Convert it to analogue at the CD end and redigitise.
OK, it can be messy.
b) Do the volume control digitally.
The trick is finding a digital volume control with digital
inputs and outputs that operates in real time.
I can see the drawbacks of a), but what about b)?
Two hardware alternatives would be a digital mixer or a
digital equalizer with digital I/O.
Any s/w available to do it simply in a PC for example?
What you are looking for would be a combination of hardware
and software since PCs don't by default have digital inputs
or outputs.
|
Well, putting in a sound card to handle that would be no problem.
| Quote: | In order to obtain the real-time operation you see to need -
try an audio interface with an input monitoring facility
with level control that outputs through digital outputs.
|
I suppose that means looking through soundcards and Media Centre stuff...
Anyway, I've still to source the wireless link. Failing that I'll have to design
some.
--
Dirk
The Consensus:-
The political party for the new millenium
http://www.theconsensus.org |
|
| Back to top |
|
 |
Michael R. Kesti
Guest
|
Posted:
Wed Nov 09, 2005 5:40 am Post subject:
Re: Volume Control - digital |
|
|
Arny Krueger wrote:
<snip>
| Quote: | The trick is finding a digital volume control with digital
inputs and outputs that operates in real time.
|
Scott Dorsey got it correct about 20 articles earlier.
http://www.gpsys.com/products/DFADE2.htm
But I must admit that I am prejudiced as these are manufactured only a
bit more than a stone's throw from where I live and some of the people
involved are friends and coworkers.
<snip>
--
========================================================================
Michael Kesti | "And like, one and one don't make
| two, one and one make one."
mrkesti at comcast dot net | - The Who, Bargain |
|
| Back to top |
|
 |
Joe Kesselman
Guest
|
Posted:
Wed Nov 09, 2005 5:42 am Post subject:
Re: Volume Control - digital |
|
|
| Quote: | Problem is, how do I control the volume?
|
Have you considered the other solution, remote control of the amp's volume? |
|
| Back to top |
|
 |
Dirk Bruere at Neopax
Guest
|
Posted:
Wed Nov 09, 2005 5:42 am Post subject:
Re: Volume Control - digital |
|
|
Joe Kesselman wrote:
| Quote: | Problem is, how do I control the volume?
Have you considered the other solution, remote control of the amp's volume?
|
At least 3 amps, one in each speaker.
More if surround sound is used.
--
Dirk
The Consensus:-
The political party for the new millenium
http://www.theconsensus.org |
|
| Back to top |
|
 |
Richard Crowley
Guest
|
Posted:
Wed Nov 09, 2005 12:09 pm Post subject:
Re: Volume Control - digital |
|
|
"Dirk Bruere at Neopax" wrote ...
| Quote: | I suppose that means looking through soundcards and Media Centre
stuff...
Anyway, I've still to source the wireless link. Failing that I'll have
to design some.
|
Both volume control and remote control support are built-
into Media Center. |
|
| Back to top |
|
 |
|
|
|
|