WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Use arecord to capture and digitize analog sources with tinycore  (Read 1846 times)

Offline kappclark

  • Newbie
  • *
  • Posts: 6
    • Clark-Hart Genealogy
July 18, 2017

Recording analog audio using Tinycore Linux-- I also use this to record/digitize records).

Some of us have probably already done this , but it works great with my Rapsberry PI 2 running Tinycore (it is a PiCore player)

Assumes line signal coming from the Receiver/source into the DAC, connected with USB to Raspberry PI.

1. Mount the remote network folder.  The server Address is the Vortexbox on the LAN at   10.209.162.144 ...or mount the local device (32 GB SD Card) if mount.cifs does not work ..

sudo mkdir /mnt/vorty  (empty directory)
sudo mount /dev/mcblk0p2 /mnt/vorty
** This is the 32GB card which was resized to capture all of the extra space

2. at the command prompt, Use the arecord command to capture the signal from the FM tuner or your turntable, or any device sending out the line signal ..  (use arecord -L to see the capture devices .. I use a Behringer UCA222 DAC which gets listed as sysdefault:CARD=CODEC

Here is the code:

sudo arecord -D sysdefault:CARD=CODEC -f cd /mnt/vorty/ KOOL-FM.wav

I use winscp to transfer the WAV file to my music collection (I use Media Monkey).. I am thinking this can become a cron job to capture radio shows .. as long as the equipment is setup beforehand ..

** call the WAV file whatever you like -- I use this to digitize my LP's .. a fun project and very easy. I see occasional buffer overrun errors, which are maybe 0.014 seconds, so I do not worry..now I can play my records in the car !

Bill Clark
*************
*    Bill Clark     *
* Windham, VT *
*************

Offline kappclark

  • Newbie
  • *
  • Posts: 6
    • Clark-Hart Genealogy
Re: Use arecord to capture and digitize analog sources with tinycore
« Reply #1 on: November 12, 2017, 07:25:54 AM »
Update to this -

I am using lame to convert the FM to a 320K mp3. WJJR is radio station in this example.. Also using date strings to produce unique filename ... short script is currently working

Not sure how to set a timer to end recording after maybe 1 hour or so ...
----------------------------------

Code: [Select]
#!/bin/sh
#
# Script to use arecord to capture FM signal
#
# Signal gets saved to SD Card - use WinSCP to move to windows machine
#
# Look to some way to get cron to create several files at different times .
#
NOW=$(date +"%b-%d-%H:%M")
# Use date to index the file
#
arecord -D sysdefault:CARD=CODEC -f cd | lame -b 320 - /mnt/mmcblk0p2/fm/wjjr-$NOW.mp3
#
# Not sure how to end the recording (timer function)

    [EDIT] Added code tags.  Rich
« Last Edit: November 12, 2017, 08:59:11 AM by Rich »
*************
*    Bill Clark     *
* Windham, VT *
*************

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Use arecord to capture and digitize analog sources with tinycore
« Reply #2 on: November 12, 2017, 09:04:45 AM »
Hi kappclark
If you enter:
Code: [Select]
arecord --helpyou will get a list of all of the options  arecord  supports. One of them is  -d  which stands for duration in seconds. So try:
Code: [Select]
arecord -D sysdefault:CARD=CODEC -f cd -d 3600 | lame -b 320 - /mnt/mmcblk0p2/fm/wjjr-$NOW.mp3