Sample rate display

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi all !

I would like to build a custom music server, and I got the idea that it would be nice to have a big alphanumeric display to show the actual sample rate of the soundcard digital output. :p

I guess I should have a look to some Digital Interface Receivers. Ideally it should "show" the incoming sample rate with some pins beeing set to one or zero logical level, and then these binary numbers should be "treated" by a microcontroller to drive the alphanumeric display.

Anyone got an idea about which device to use ? :confused:
 
It should be a lot easier to use an alphanumeric LCD display and just get the rate from the player software. You can hook some cheap displays directly to a parallel port, or build (or buy) a USB adapter, or get one ready to go from Matrix Orbital and other sources. Google HD44780 and you'll find stuff.

On the other hand, a receiver chip and microcontroller is a pretty low part count. Or, if you happen to find a Behringer SRC2496 languishing in a thrift store, it has indicators for most of that stuff (bit rate, etc).

As for chips... the TI DIR9001 is available from Digikey, and can operate without a microcontroller to configure it. An AKM chip (forget the number) I looked at today is smart enough to recognize non-PCM content (like DTS bitstreams). Another thing (apart from bit rate) is to check for clipping... there's an old Elektor project for that. It just detects when two or more samples are full-scale (positive or negative). It is based on an obsolete DIP digital receiver chip, but allegedly newer chips could be subbed if you piggyback an adapter board. I'm pretty sure that project is on the Elektor Audio Collection CDROM, if you can get your hands on that somehow...
 
Last edited:
Wow, thanks dangus for all these good ideas ! :)

For the first one the problem is that I don't know how to get the sample rate from the player and send it to the parallel or usb port.
I don't have any knowledge in computer programming languages...... :eek:

The Behringer src2496 is an other good idea, although it shows the sample rate with leds and not with an alphanumeric display......maybe I could tweak it......

I will have a closer look on the TI DIR9001, and on the Elektor clipping project.

In any case thank you very much dangus ! ;)
 
I've had a look on the DIR9001 specs. It uses 2 pins to show the actual sampling frequency, but unfortunately only 32, 44.1 and 48 KHz, although the DIR9001 can handle frequencies up to 96 KHz. :(
Sad, as I would like to be able to show at least 96 KHz...... :eek:

Now I have to look to some other DIRs, even if I have to use software control with a microcontroller.
 
Last edited:
I think those pins on the DIR9001 are for setting the sample rate, not displaying it; if you want other (higher) rates, those are set via the microprocessor interface.

Running the display off the computer may not need any programming. If you're using a common player, there's bound to be some display driver already that supports an LCD display, and hopefully it can be configured to display whatever you need.

LCDinfo and LCD Smartie can display sample rate and bitrate from Winamp.

All I could find for Foobar was a component for it that feeds a Logitech LCD display. And, that's a display that's built into expensive gamer keyboards, not (as I first assumed) a standalone display. Wait a sec... there's this Foobar2000 & LastFM plugin for LCD Studio, but it looks like that only supports the Logitech display and some USB Matrix Orbital display.

Under Linux, there's LCDproc which supports parallel port alphanumeric LCDs.
 
@ dangus : I think you are right for the DIR9001.

So I have to go with the parallel port of the PC. I usually use foobar2k, but I also can try Linux, with MPD (Music Player Daemon) for example, and try to use LCDproc.

Once again many thanks for the good advice ! ;)
 
If you only want to know the sampling rate. It is unnecessary to use DIR chips(DIR9001, CS8416 etc). U can use some 74 device to recovery LRCLK from the incomming SPDIF stream. BTW twice the LRCLK. With this clock, then build a counter with an steady reference clock, u will easily get the sampling rate afterwards.
 
@ MiracleZZ : Thanks for the tip, but I am not sure to understand very well. How do I make to recover the spdif stream with the 74 device without using a DIR ? And how do I recover the LRCLK ?
Please excuse my ignorance, but I am not so familiar with digital audio......:eek:
 
Here come the sch~:cool:
 

Attachments

  • 1.GIF
    1.GIF
    13.4 KB · Views: 239
Maybe a PLL (phase locked loop)? [edit] Yes, and you've explained the part I wasn't sure about: how to clean it up so the PLL would have something easier to digest.

If you don't need to measure the sample rate precisely, but just want to know if it's 32/44.1/48k, consider exploiting the VCO control voltage (from the PLL) rather than doing it all digital. That could (after some filtering and buffering) run a moving coil meter. (Get a cool vintage one from a ham radio swap meet.) Or, for a more "modern" (as in 1960s/'70s) look, use a linear scale bar graph display driver in dot mode to turn on lamps or LEDs for each rate of interest.
 
Last edited:
If you don't need to measure the sample rate precisely, but just want to know if it's 32/44.1/48k, consider exploiting the VCO control voltage (from the PLL) rather than doing it all digital. That could (after some filtering and buffering) run a moving coil meter. (Get a cool vintage one from a ham radio swap meet.) Or, for a more "modern" (as in 1960s/'70s) look, use a linear scale bar graph display driver in dot mode to turn on lamps or LEDs for each rate of interest.

That's funny indeed ! :)
For something even funnier I could convert this voltage with an internal ADC from a PIC, and display it on a LCD.......;)
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.