Wizzabeck
Posts: 40
Joined: Wed Dec 09, 2015 3:13 pm
Location: Cumbria

Audio recording

Wed Apr 11, 2018 10:46 am

Radio ignoramus here hoping for enlightenment.

My wife's old Sony Radio with minidisc recorder has stopped recording. She's an avid BBC Radio 3 follower and is distraught. Having replaced it with working units from ebay which quickly failed with the same error I'm looking for an alternative. It must have timer preset. I've found a script using Alsamixer which would run on a Raspberry Pi and the Sony has line-out sockets. I'm thinking in terms of leaving the radio permanently on and using a small screen for her to set the timer in the script so that she can record onto a USB stick or SD card. What I need to know is how to connect the line-out to the Pi. Help would be gratefully received.

TIA Ken

SteveSpencer
Posts: 344
Joined: Thu Mar 28, 2013 9:19 am
Location: Nottingham, UK

Re: Audio recording

Wed Apr 11, 2018 11:13 am

The pi (all models) does not have a line-in built in. Your easiest option is to acquire a USB audio device, from Amazon or other sites. These will generally plug in to the Pi and be automatically recognized as an audio device, typically with line in (or mic) and line out. This is recognized by ALSA, and you can then record from the device.

Any software supporting ALSA should work with it.

Regards
Steve S
No, I can't think of anything funny that won't offend someone if they want it to...

tvjon
Posts: 627
Joined: Mon Jan 07, 2013 9:11 am

Re: Audio recording

Wed Apr 11, 2018 11:36 am

Wizzabeck wrote:
Wed Apr 11, 2018 10:46 am
... I'm looking for an alternative. It must have timer preset. I've found a script using Alsamixer which would run on a Raspberry Pi .... Help would be gratefully received.

TIA Ken
Ken,

if you have decent internet access, you can dispense with the radio, & just use your RPi.

BBC has some good quality feeds now, & you can easily test if RPi's audio meets your wife's standards by plugging in headphones (or an amplifier & speakers) into RPi's audio out jack. If your Sony has audio in, you could do the reverse of what you ask, & take audio out from RPi into in on the Sony.

Next open a terminal window, & run the attached script (or unzip it & paste it directly into the terminal).

If that's acceptable to her, you can use

crontab

to set times to record, perhaps using your mentioned script.

HTH


R3-play-stream.txt.zip
(297 Bytes) Downloaded 26 times

Man in a van
Posts: 87
Joined: Sat Dec 27, 2014 2:41 pm
Location: Staffordshire, UK.

Re: Audio recording

Thu Apr 12, 2018 3:33 pm

@Wizzabeck

Ken,
There used to be this hat for a pi

https://www.element14.com/community/com ... audio_card

you might be able to find one second hand, the driver is now, apparently, included in Raspbian.

As another listening only device, you might want to consider piCorePlayer OS with LogitechmediaServer installed (on a standalone pi). There is a BBC iPlayer Radio plugin in which allows access to most of the available last thirty day content. For the last two years the flac stream for the Radio 3 Proms has been made available.

@tvjon

Thanks for that link. I was not aware of OMXPlayer.

I will say that running the latest Raspbian ( 2018-03-13) I'm much impressed by the SQ available now from the headphone jack

viewtopic.php?f=29&t=195178

Ronnie

Edit:
Here is a link to other BBC urls
http://steveseear.org/high-quality-bbc-radio-streams/

Wizzabeck
Posts: 40
Joined: Wed Dec 09, 2015 3:13 pm
Location: Cumbria

Re: Audio recording

Sun Apr 15, 2018 5:43 pm

My thanks to Man in a van, tvjon and Steve for your suggestions and my apologies for taking so long to respond. Our internet connection here is dire, often little better than I had in dial-up days. We've had fibre optic cables installed under the road for over two years now but they don't connect two anything. With BT having to hive-off Open Reach the County Council is beginning to question what it's had for the government grant it gave BT control over.
I had a look at usb recording devices a couple of weeks ago when I found that they had been available with timer recording in the past but now the only model is supposed to be from a USA company which pushes all inquiries to a Dutch company which simply displays the USA blurb with no indication of performance or cost - most frustrating. I've asked element 14 if they expect to have any more of the Cirrus audio phats but no response yet. My trusty Denon equipment has lots of blanking off plugs on its optical digital inputs and outputs whereas our Panasonic Video recorder has an irremovable plastic cover on its optical out and for three years I've assumed we didn't pay enough to have optical transfer. But now I find that the cover in fact pushes in and allows an optical connection to be made to the Sony MD recorder and of course can be preset and the recording starts when the MD senses an input. So all is not lost, but setting up for more than a few hours ahead is a pain and my wife has in the past set the timer to record all the programmes for the week when the Radio times arrives and then simply has to change the discs. I still favour a dedicated Pi solution, it just seems a natural.
What is OMX please? I thought it was a VGA to HDMI converter. The R3 txt.zip doesn't work on Linux:((

Regards, Ken

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5563
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Audio recording

Mon Apr 16, 2018 6:44 am

A totally different approach would be to use a dvb-t (Freeview) tuner and record the streams directly. Something like tvheadend will download the full epg and allow you to set timers for the programmes you want. It'll save them all as mp3 or similar audio files that can be played back on any normal player.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Man in a van
Posts: 87
Joined: Sat Dec 27, 2014 2:41 pm
Location: Staffordshire, UK.

Re: Audio recording

Mon Apr 16, 2018 10:25 am

@Wizzabeck

Ken,

The OMXPlayer (so I learned) comes in the full Raspbian-Stretch of 2018-03-13.

From the suggestion by tvjon I tried it with an rpi3B running Raspbian Stretch-Lite, but it is not installed.

So, in a Terminal

Code: Select all

sudo apt-get update

sudo apt-get install omxplayer.
Then download the file kindly provided by tvjon and just paste it into the same terminal, voilà non-stop Radio 3.

If you want to use a different output (I used a USB DAC-Hat, but there are hats available with SPDIF outputs) you change the output from local to hw:1,0, and apparently one can make it open in a window, see the last post in this thread.

viewtopic.php?t=23875
Last edited by Man in a van on Tue Apr 17, 2018 7:19 am, edited 1 time in total.

Wizzabeck
Posts: 40
Joined: Wed Dec 09, 2015 3:13 pm
Location: Cumbria

Re: Audio recording

Mon Apr 16, 2018 7:14 pm

Thanks for that Ronnie, will do. And 6by9 I was looking at Freeview tuners this morning and musing. Element 14 have responded with the information that their purchasing department may be persuaded to stock the Cirrus but they would require a minimum one line order of £500. I believe they sold originally for about twenty pounds so I would have to drum up a lot of interest - will think about it.

Ken

Man in a van
Posts: 87
Joined: Sat Dec 27, 2014 2:41 pm
Location: Staffordshire, UK.

Re: Audio recording

Tue Apr 17, 2018 11:10 am

Ken, I was just over on pfm and loooked in the DIY thread (which I hardly ever do) and found this

https://www.pinkfishmedia.net/forum/thr ... d.214004/

I followed the link and one got added to the basket

http://uk.farnell.com/wolfson-microelec ... w%2Fsearch

I'm not sure which version these are, or even if the sale would go through.

Just thought you might like to be aware of the possibility ;) :)

ronnie

Edit: just ordered one, bit cheeky with the price (£27.50) but might be fun to play with on the new rpi3B+.

just noticed these are only for the original pi 1 :o ( fortunately I have one still) so be careful.
Last edited by Man in a van on Tue Apr 17, 2018 11:33 am, edited 1 time in total.

fruitoftheloom
Posts: 17300
Joined: Tue Mar 25, 2014 12:40 pm

Re: Audio recording

Tue Apr 17, 2018 11:32 am

Man in a van wrote:
Tue Apr 17, 2018 11:10 am
Ken, I was just over on pfm and loooked in the DIY thread (which I hardly ever do) and found this

https://www.pinkfishmedia.net/forum/thr ... d.214004/

I followed the link and one got added to the basket

http://uk.farnell.com/wolfson-microelec ... w%2Fsearch

I'm not sure which version these are, or even if the sale would go through.

Just thought you might like to be aware of the possibility ;) :)

ronnie

Edit: just ordered one, bit cheeky with the price (£27.50) but might be fun to play with on the new rpi3B+.

It states:

Raspberry Pi 1 Model A
Raspberry Pi 1 Model B


There WAS a newer card for the A+ / B+

https://www.element14.com/community/doc ... -techspecs

viewtopic.php?t=169314
Adieu

Man in a van
Posts: 87
Joined: Sat Dec 27, 2014 2:41 pm
Location: Staffordshire, UK.

Re: Audio recording

Tue Apr 17, 2018 2:47 pm

fruitoftheloom wrote:
Tue Apr 17, 2018 11:32 am
Man in a van wrote:
Tue Apr 17, 2018 11:10 am



It states:

Raspberry Pi 1 Model A
Raspberry Pi 1 Model B


yep, it was a case of "wood for trees" :oops:

Well I have just dug out my first pi and loaded Stretch-lite.

Sounds very good through the headphone jack,

Code: Select all

[email protected]:~ $ omxplayer --timeout 30 -o local http://199.189.87.9:10999/flac
Error: Unable to open font
Audio codec flac channels 2 samplerate 192000 bitspersample 16
Subtitle count: 0, state: off, index: 1, delay: 0
Should be fun when the Wolfson arrives.
I found the info about converting the card to use on a rpi3B which I might try :roll: or not ;)

Ronnie in a dull and cloudy Staffordshire :(

fruitoftheloom
Posts: 17300
Joined: Tue Mar 25, 2014 12:40 pm

Re: Audio recording

Tue Apr 17, 2018 4:07 pm

Man in a van wrote:
Tue Apr 17, 2018 2:47 pm
fruitoftheloom wrote:
Tue Apr 17, 2018 11:32 am
Man in a van wrote:
Tue Apr 17, 2018 11:10 am



It states:

Raspberry Pi 1 Model A
Raspberry Pi 1 Model B


yep, it was a case of "wood for trees" :oops:

Well I have just dug out my first pi and loaded Stretch-lite.

Sounds very good through the headphone jack,

Code: Select all

[email protected]:~ $ omxplayer --timeout 30 -o local http://199.189.87.9:10999/flac
Error: Unable to open font
Audio codec flac channels 2 samplerate 192000 bitspersample 16
Subtitle count: 0, state: off, index: 1, delay: 0
Should be fun when the Wolfson arrives.
I found the info about converting the card to use on a rpi3B which I might try :roll: or not ;)

Ronnie in a dull and cloudy Staffordshire :(




http://www.audioinjector.net/rpi-hat
Adieu

Wizzabeck
Posts: 40
Joined: Wed Dec 09, 2015 3:13 pm
Location: Cumbria

Re: Audio recording

Sat Apr 21, 2018 7:56 pm

Quote Man in a van

Post by Man in a van » Tue Apr 17, 2018 11:10 am
Ken, I was just over on pfm and loooked in the DIY thread (which I hardly ever do) and found this

https://www.pinkfishmedia.net/forum/thr ... d.214004/

Yes thank you I had seen that but I only have Four Zeros and a Pi3. All right for you early birds. It was the fact that element 14 were still selling the Wolfson that made me contact them . Making do with recording Radio3 via the Videorecorder optical out for now but keeps going off air, or rather. switching from channel 703 to 803 without warning.

Ken

Man in a van
Posts: 87
Joined: Sat Dec 27, 2014 2:41 pm
Location: Staffordshire, UK.

Re: Audio recording

Sun Apr 22, 2018 3:47 pm

Ken

Here is an example of a SPDIF hat for the pi (I have the previous version).

http://iqaudio.co.uk/hats/48-pi-digi.html

It would give you an Optical and Co-ax output to use.

Depending on how you are using your rpi 3B, you would be able to install LogitechMediaServer and playback BBC iPlayer Radio Three (and other stations) using either Raspbian (if you are running the full Stretch already) or piCorePlayer OS (which has a very small footprint and runs in Ram).

If you would like to try this idea out, drop me a pm with your address and I can pop an old HiFiBerry Digi+ up to you.

https://thepihut.com/products/hifiberry ... o_s=gplauk


Ronnie

Wizzabeck
Posts: 40
Joined: Wed Dec 09, 2015 3:13 pm
Location: Cumbria

Re: Audio recording

Wed Apr 25, 2018 10:34 am

man in a van wrote:

If you would like to try this idea out, drop me a pm with your address and I can pop an old HiFiBerry Digi+ up to you.

https://thepihut.com/products/hifiberry ... o_s=gplauk

That's very generous of you Ronnie. But now the pressure is off via the videorecorder I've decided to order the IQaudio hat you point to and do a hands on in the radio audio world. It's time I got to grips with it. Thanks for everyone's help. Will let you know how I get on/come groveling back on my knees.

Ken

Return to “Advanced users”

Who is online

Users browsing this forum: messypotamia and 17 guests