DAB integration?

Raspberry Pi related support

Re: DAB integration?

Postby Dohmar » 09 Apr 2016, 13:10

hondagx35 wrote:Hi Dohmar,

http://i65.tinypic.com/1scrvt.jpg
On Firefox it is easy to zoom in and out with the scroll wheel from your mouse.
CTRL + scroll.

I have an overall change to the GUI as it stands to present the user interface more like a typical hardware design (using the perks of a nice touchscreen lcd) while still remaining easy to use and configurable.-

At the moment there will be no change in the UI.
So let us do the integration on a separate page, you can change this later on.

Frank


Thanks! I've done that on my PC and the interface is much better! I do have other suggestions in regards to layering and declutterring but have already posted those in other threads ;)

-D
Dohmar
 
Posts: 79
Joined: 14 Mar 2016, 12:27

Re: DAB integration?

Postby daviestar » 09 Apr 2016, 13:43

Bear with me, I'm buying all the necessary hardware to get Rune Audio set up, new to RPI :o

Which RPI do you guys recommend? Will using an RPI3 unnecessarily complicate things (as 64-bit)? From my 'carputer' perspective, the extra power, and maybe not needing to power an external USB hub, is a plus.. but can easily work around it.

Once I'm up and running and figure out how get in and hack RuneUI, I'd suggest working towards a simple 'Hello World' view, where we can type in the FM frequency to an <input> and stream the audio from that frequency.. thoughts? Or if DAB would be a better starting point, type in the name of the DAB station to grab the correct stream.

If we can get to this point, we should be in good place :D
daviestar
 
Posts: 16
Joined: 31 Mar 2016, 13:42

Re: DAB integration?

Postby Dohmar » 09 Apr 2016, 14:10

RPI3 is the logical choice. It might not be 100% supported NOW but it will be.
Power is not an issue as the CPU scales its power determined by its load
Frank has already got FM working via command line for simple FM presets, its now a matter of extending that call and adding user interface stuff lime a freq search.

-D
Dohmar
 
Posts: 79
Joined: 14 Mar 2016, 12:27

Re: DAB integration?

Postby daviestar » 14 Apr 2016, 12:31

Hey guys, quick update. I started playing with the RPI3 last night.

Rune was utterly painless to get up and running following the quick start guide! Everything worked first time, and I got tracks playing through the headphone jack. I did a little digging, ssh'ing and console logging.

Next time I get a chance I'll Fork the RuneUI repository and figure out the best way to hack into the RPI3 live. Currently planning to add a bash script to Grunt which will deploy the assets after pre-compiling using ssh + rsync to /var/www on the pi.. does this sound like the best approach?

After this, I'll try to get the FM radio working as Frank has on the RTL2832U + R820T2.

Here's a brain dump of questions/thoughts:

@Frank / Dohmar can we start compiling a list of the parameters to pass between frontend and tuner, and the format of the values needed ie.
Code: Select all
fm_freq=96.9
dab_stationname=bbc_radio6

It'd be good to use this as a Spec for the frontend/MPD communication I can start with.

Dohmar wrote:Middle pane - View 2- Would have an option to do a scan, where the unit scans the frequencies (and lets say, 88Mhz to 108mhz) then analyze the peaks vs the troughs and report the frequency of those spikes as a menuitem.

Is this type of scan built into the tuner or are we going to have to make it?

Cheers
daviestar
 
Posts: 16
Joined: 31 Mar 2016, 13:42

Re: DAB integration?

Postby Dohmar » 14 Apr 2016, 13:31

I'm really not sure. On SDR-J, the guy who wrote it runs the backend on his raspberry pi headless, and runs a frontend with a gui on another machine. I think we'll probably have to get someone to write a command line frontend to the pi's backend, and I'm no coder and have no idea about that stuff. I would suggest that the SDR-J software would contain the code required to pass to the backend daemon. I have no idea how it would work thought, its a little bit beyond me.

I think the other items you'll need are
SampleRate=2000000
BitRate=?

Re tuning - there are command line scripts on rtl-sdr's main site that scan a set frequency and then generate histograms that show the signal strength - the histograms are generated from a csv file that the command line tool spits out. You can set the granularity of the scan as fine or as wide as you want - In the case of consumer radio you'd want to do a scan thats thorough enough to reliably be able to locate radio stations but not so long the user will get bored (ie I ran a scan for an hour and it generated a rather large csv). In the case of live software I think you could probably pipe the output to grep or some other parsing software and the spit out the radio stations.

-D
Dohmar
 
Posts: 79
Joined: 14 Mar 2016, 12:27

Re: DAB integration?

Postby daviestar » 14 Apr 2016, 19:51

Hey folks, I installed rtl-sdr with:
Code: Select all
pacman -Sy rtl-sdr


After a little debugging I've been able to get a sound output with:
Code: Select all
rtl_fm -f 99.5e6 -M wbfm -s 200000 -r 192000 - | aplay -D hw:0 -c 2 -r 48k -f S16_LE


But my output is really weird and sounds slowed down!! Not sure what's going on :D This is on vanilla install of Rune on RPI3 outputting to headphone jack until my Digi+ arrives.

Almost up to speed with you guys, and will make a start on the UI later tonight.

Cheers.
daviestar
 
Posts: 16
Joined: 31 Mar 2016, 13:42

Re: DAB integration?

Postby Dohmar » 14 Apr 2016, 23:23

The sample rate on the onboard hardware is much slower than a dac hat. You'll need to reduce the sample rate section of the command line. Its getting fed too many samples and is playing them as fast as it can but it cant keep up.

-D
Dohmar
 
Posts: 79
Joined: 14 Mar 2016, 12:27

Re: DAB integration?

Postby daviestar » 14 Apr 2016, 23:28

Thanks, this worked:
Code: Select all
rtl_fm -f 99.5e6 -M wbfm -s 200000 -r 96000 - | aplay -D hw:0 -c 2 -r 48k -f S16_LE
daviestar
 
Posts: 16
Joined: 31 Mar 2016, 13:42

Re: DAB integration?

Postby Dohmar » 15 Apr 2016, 00:07

Just a thought, but you might be able to quiz the RuneOS for what audio device is selected in the MPD config screen and then base the sample rate variable upon that. Ie is IQdacPI+ is selected, default to 192000, if its the onboard audio either 3.5mm or HDMI then you use 96000

-D
Dohmar
 
Posts: 79
Joined: 14 Mar 2016, 12:27

Re: DAB integration?

Postby daviestar » 15 Apr 2016, 02:35

Dohmar wrote:I've received some build instructions from the guy who writes sdr-j, so if I can compile that I should theoretically be able to do the same with DAB


Could you please post these build instructions?

Dohmar wrote:Not sure if its stereo, my speakers are currently close together - any way to verify? Can we pipe the audio to a command line 2 channel mixer to check it out?


Using the play command (sox) you can output a basic 2 channel display:
Code: Select all
rtl_fm -f 99.5e6 -M wbfm -s 200k -r 96k | play -r 96k -t raw -e s -b 16 -c 1 -V1 -

http://sox.sourceforge.net/sox.html
daviestar
 
Posts: 16
Joined: 31 Mar 2016, 13:42

support RuneAudio Donate with PayPal

PreviousNext

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 1 guest