Question about Zynthian audio recording of a snapshot's output

Hello everyone!

I have a query, about the way the Z manages its internal audio flow, when it is requested to offload it to a mass storage archive as an audio file.

I have found nowhere to select an audio saving device different from the built-in SD card, which is notoriously unreliable for writing large audio files in real-time. Of course, the problem is sort of self-solved when/if one transfers the stabilised OS (i.e. the coming Vangelis Stable) to an nvme drive.

It seems that Vangelis refuses to auto-mount a formatted, empty and sizeable USB-3 stick, that I’m trying to feed to it.

I surmise that, once detected, the USB dongle should become the default audio storage device, right? Should I perform any specific actions, for the Zynth to see and use the stick? Should I format it and mount it manually specifically for Trixie from a terminal?

Thanks for any clarification on the matter.

Cheers :rainbow:

I’d verify the stick is really mounted and writable before expecting the recorder to use it. From a terminal, lsblk -f and findmnt should show the device, filesystem and mount point; a quick test file will also catch a read-only mount. I would not mount it over an existing Zynthian path or assume detection changes the recording target automatically. If the snapshot recorder only exposes the SD location, the safe workflow is to record there and copy the finished WAV to the USB device afterward. For direct recording, check the current Vangelis/webconf storage settings and use a fixed mount point, then test with a short file first so a large write does not fail mid-session.

Hi @HelenMarsh,

Thanks for chiming in. I had planned indeed to get back to the subject, checking via terminal the correct mounting of the USB stick, with:

mount | grep /media/usb0

lsblk -o NAME,MOUNTPOINT,FSTYPE,TRAN | grep usb -A2
findmnt -t vfat

touch /media/usb0/test.txt && echo “OK” && rm /media/usb0/test.txt

Since it is a quality pendrive, it would also make sense to reset it and format it from scratch, directly on Trixie:

sudo umount /dev/sdX* 2>/dev/null

sudo wipefs -a /dev/sdX
sudo parted /dev/sdX --script mklabel msdos
sudo parted /dev/sdX --script mkpart primary fat32 0% 100%

sudo mkfs.vfat -F 32 -n ZYNUSB /dev/sdX1

sudo udevadm trigger

I will try the full route, because it seems that, as usual, there isn’t a specific setting for the choice of the audio storage media, except the insertion of a working and mounted USB dongle.

I know by experience that writing multi-channel audio directly to SD can be prone to failures and artifacts, while saving only the stereo main mix is generally safer.

This is temporary anyway, because I usually transfer the stable OS to nvme drives, which are perfectly reliable for synced live audio recording.

Cheers

The expected behaviour is to use USB storage for audio recording if available. If this is not working then please raise an issue in the tracker.

2 Likes

That mount check should make the next step clearer. I’d run mount | grep /media/usb0 first, then lsblk -o NAME,MOUNTPOINT,FSTYPE,TRAN and compare the USB device’s mountpoint and filesystem. If /media/usb0 is absent, the stick is not mounted there even if lsblk sees the block device. If it is present, test touch /media/usb0/test.txt && echo OK && rm /media/usb0/test.txt and check that the mount is not read-only.

I’d avoid reformatting until those outputs are captured; the recorder may simply be waiting for the expected mount path.

Hi @HelenMarsh,

Yesterday evening I performed the sequence of commands as per my previous post, essentially similar to your latest message, and found that the stick required a full erasure of the existing sda1 and sda2 partitions, in order to accept the right formatting formula.

As of this, it seems that the ideal format for Zynthian USB operation is a single sda1 FAT32 partition RW enabled, with 100% of the available storage space. (is this maybe worth mentioning in the documentation?)

Now the USB dongle works as expected, and is recognised as the audio storage destination media once inserted.

Thanks for your further feedback anyway.

As a side note, I noticed that Vangelis runs in a segfault (1) error each time the audio recorder is stopped, irrespective of the snapshot and audio content. The system then reloads the current snapshot and works apparently nominal, with no detectable artifacts in the exported audio file. I will report on this in the Vangelis Beta progress thread.