Cirrus / Wolfson sound card power supply noise sensitivity

I had a chance to do some quick measurements on the Wolfson card, I was curious as to how well it measured and also to see if the power supply sensitivity, referred to in the HiFi World review was visible at all.

Continue reading

Posted in Engineering, Music | 2 Comments

Connecting the Wolfson Sound Card to the Raspberry Pi3

I’m quite a fan of the Wolfson (later Cirrus) sound cards for the Raspberry Pi – they offer great value for money compared to some of the competition.

Most of the audio cards available for Pi’s offer a DAC only option, with maybe one or two outputs (e.g. Line Out / SPDIF or Headphones).

The Wolfson card offers a DAC and an ADC, SPDIF In and Out, Line In, Line Out, Headphones Out, two on-board stereo Digital Microphones and a 2W Class D amplifier for driving loudspeakers.

I also happen to think it sounds rather good, in particular I like it’s headphone driving capabilities.

The DAC has a 113dB dynamic range, which is much better than CD and the ADC has a 96dB dynamic range. The best HiFi DAC’s can achieve 122dB but the price difference between these and the Wolfson card are significant! The board can exploit 24bit HD audio up to 192kHz sample rate and it also features some very advanced and very complex DSP and mixing capabilities, if you need it.

It’s also worth noting that when Hifi World tested the card with an external DAC, the Wolfson board was capable of utilising the full 121dB dynamic range of a Chord 2Qute external DAC, so as the basis for an upgradeable music streamer, it’s great.

Continue reading

Posted in Engineering, Linux, Music, Streaming | Leave a comment

Ripping BluRay Audio discs to FLAC, part III

Just a quick update to the previous script, I’ve added a user input to select the audio track you want to rip, in the event you want to rip multiple audio tracks.

The workflow is to rip using MakeMKV as before, but now you can select mutliple audio tracks to embed into the output file.

The script will then display the audio tracks available and you can choose the track by it’s number.

If anyone can show me how to parse the output of the section that shows the tracks so that the user input can be validated better (at present it just checks it’s a number, it is posible to input a number outside of the number of tracks available) I’d be grateful for the tutorial and can publish the update here.


SCRIPT=`basename "$0"`
MKVMERGE=`which mkvmerge`
METAFLAC=`which metaflac`
FLAC=`which flac`
MKVEXTRACT=`which mkvextract`
startime=`date +%s`

#Set output directory to current

#Check if arguments given, offer help
if [ "$1" == "" ] || [ "$1" == "--help" ] || [ "$1" == "-h" ]; then
    echo "$SCRIPT: Give MKV to chapter-split as an argument"
    echo "$SCRIPT: e.g.:  title00.mkv"
    echo "$SCRIPT: e.g.:  title01.mkv"
    exit 1

#Check MKV file passed exists
if [ ! -f "$1" ]; then
    echo "$SCRIPT: MKV file not found [$1]"
    exit 1

#Set output directory to file name without extension
echo "$SCRIPT: Output folder is "${outdir}""

#Check if folder already exists, create if not
if [ ! -d "$outdir" ]; then
       echo "$SCRIPT: The output directory ($outdir) does not exist, creating"
       mkdir "$outdir"

#Check mkvtoonix is installed, offer help if not
if [ "$MKVMERGE" == "" ] || [ ! -x "$MKVMERGE" ]; then
    echo "$SCRIPT: 'mkvmerge' seems to be missing"
    echo "$SCRIPT: Is mkvtoolnix Installed?"
    echo "$SCRIPT: sudo apt-get install mkvtoolnix"
    exit 2

#Check if flac is installed, offer help if not
if [ "$METAFLAC" == "" ] || [ ! -x "$METAFLAC" ]; then
    echo "$SCRIPT: 'metaflac' seems to be missing"
    echo "$SCRIPT: Is flac installed?"
    echo "$SCRIPT: sudo apt-get install flac"
    exit 2


#List audio streams from input file
"$MKVMERGE" -i "${infile}" | grep Track

#Ask user for track number to rip
unset get_track

while [[ ! ${get_track} =~ ^[0-9]+$ ]]; do
    echo "$SCRIPT: Enter number of track ID to rip"
    read get_track
echo "$SCRIPT: You selected track" ${get_track}

#Split MKV file into chapters
echo "$SCRIPT: Splitting video file into chapters"

"$MKVMERGE" --split chapters:all "${infile}" -o "${outdir}/${infile%.mkv}_%02d.mkv"

cd "${outdir}"

#Extract LPCM audio from renamed MKV chapter files

echo "$SCRIPT: Demuxing LPCM audio from MKV files"

for file in *.mkv
"$MKVEXTRACT" tracks "$file" $get_track:"${file%.*}".wav;

echo "$SCRIPT: Deleting source MKV file"

rm "${file}"

#Convert WAV files to FLAC
for file in *.wav
"$FLAC" --delete-input-file --best "$file";

echo "$SCRIPT: Converting WAV file to FLAC and deleting source file"

#Ask user for metadata for tagging with metaflac
echo "$SCRIPT: Please enter Artist name for tagging"
read artist
    while [ -z "$artist" ]; do
        echo "$SCRIPT: Entry was blank, please type an Artist name"
        read artist
echo "$SCRIPT: Please enter Album name for tagging"
read album
    while [ -z "$album" ]; do
        echo "$SCRIPT: Entry was blank, please type an Album name"
        read album
echo "$SCRIPT: Please enter Album year for tagging"
read year
    while [ -z "$year" ]; do
        echo "$SCRIPT: Entry was blank, please type an Album year"
        read year
echo "$SCRIPT: Please enter Genre for tagging"
read genre
    while [ -z "$genre" ]; do
        echo "$SCRIPT: Entry was blank, please type a Genre"
        read genre

#Reset track counter

#For each flac file, ask user for track name, rename file,
#add track number and add tags using metaflac
for file in *.flac
        echo "$SCRIPT: Current file name: "${file%.*}""
        echo "$SCRIPT: Please enter new name"
        read newname
            while [ -z "$newname" ]; do
                echo "$SCRIPT: Entry was blank, please type a new name"
                read newname
            echo "$SCRIPT: Renaming and tagging file"
            echo "$SCRIPT: $artist - $album - $track - $newname"
            mv "${file}" "$track - ${newname}.flac"
            #Remove all existing tags, just as a precaution, then add new ones
            "$METAFLAC" --remove-all-tags \
            --set-tag="ARTIST=$artist" \
            --set-tag="ALBUM=$album" \
            --set-tag="TITLE=$newname" \
            --set-tag="TRACKNUMBER=$track" \
            --set-tag="DATE=$year" \
            --set-tag="GENRE=$genre" \
            "$track - ${newname}.flac"

#Calculate and display script runtime 
endtime=`date +%s`
runtime=$((endtime - startime))
echo "$SCRIPT: All complete in $runtime seconds"

Posted in Uncategorized | Leave a comment