Request/suggestion: automount usb-storage (soundfonts etc) for offloading sdcard read/writes

Hello!
New on the forum, tried the latest image and it works great, im using it “headless” no screen, no knobs etc. My plan is to use the rpi with a planned homemade keyboardenclosure. It will mainly be used to play epiano and aucoustic piano. I initially used a HDMI display to setup a default snapshot, once done the rpi can be hidden inside the chassi.

What i came to think of was that it would be quite great if usbstorage (where i would like to place soundfonts and other samples) was automounted and that fluidsynth + linuxsampler knew where to read this directory. Or even cooler if there was and added ui for this in the webconf.

Big thanks to the developers! Take care
/B

Edit: clarification

1 Like

This looks like a job for autofs.

1 Like

AAah but we need to see hardware pictures, inputs, outputs and . . . :face_with_monocle:

What platform are you observing the zynth from ? and how do you access the GUI?

I will provide some pictures when the wooden build is done :slight_smile: I initially used a HDMI display to set up a default snapshot. Now i don’t use the interface, it might change later(and the I might add a display) but the primary sound will still be epiano.
For output I use a USB sabrent with a 3.5mm to 6.3mm converter.
The actual keyboard will be a salvage from and Old digital keyboard.

Good idea! If I assume right the program would autostart and run in the background waiting for a usbstorage to connect, I would only need to ad a link from where fluidsynth or linuxsampler reads soundfonts. Would a symbolic link work? Regards

A symbolic link should work fine. But you could configure autofs to mount the USB over the existing directory.

Ah great! And it wouldn’t change the files already there? It would only add the mounted content?

Also, I tried to copy the files (before I thought of the idea) from my USB to the zynthian directory where the wiki says it looks, but none of the programs found any soundfonts. Do I need to set permissions for the files copied?

Note that I only have some knowledge about the Linux system

Thank you

If you mount over an existing directory then you can’t access the existing files. Zynthian has a system dir and a usr dir to read soundfonts from so you could pick one of them to mount over and place the ones you want to keep in the other.

Ah i see, will try it and report back.
Thanks heaps!

Currently, automount is installed and configured in zynthian. When you plug-in a pen-drive, it should be mounted automatically on “/media/usb0”.

For getting FluidSynth & LinuxSampler to read the soundfonts from the pendrive, you should create a “soundfont” folder in the pendrive and copy to it the soundfonts you want to use. You have to use a very strict directory structure, that is different for SF2 and SFZ/GIG. Take a look to “/zynthian/zynthian-data/soundfonts” and use it as a reference.

After that, you should create a “soft link” from “/zynthian/zynthian-my-data/”:

mv /zynthian/zynthian-my-data/soundfonts /zynthian/zynthian-my-data/soundfonts.bak
ln -s /media/usb0/soundfonts /zynthian/zynthian-my-data/soundfonts

Of course, if enough people find useful this trick and start to use it, i would consider to modify the engine code for looking at the pendrive without needing a soft-link …

Kind Regards,

2 Likes

Ah i see! Thank you for explaining. Will look into it further tomorrow.

If enough ppl find this useful, an Idea would be to have the system look in a document for places to look. Kinda like sources.list

Regards

Also since the rpi 4 have the USB 3 and seems to be superior over the microsd controller in speeds, it should load soundfonts faster than when on sdcards, if the soundfonts are big :slight_smile:

Best regards

1 Like

I can’t try it for now but this would definitely be usefull for me :slight_smile:

I would implement like that:
When a zynthian folder is found in the usb mount, link everything in that folder as symbolic link.
@jofemodo, tell me where and and try something…

1 Like

Let me think about it … and please, open a task in our wonderful Tracking System :wink:

1 Like
2 Likes

Hi @zynthianers!

I just commited an implementation of this. Now you can access presets & soundfonts stored in a USB drive. Simply plug the drive and that’s all. The presets & soundfonts from the external USB-drive will be shown in the zynthian UI with “EX” prefix (external).

You have to use this directory structure:

  • soundfonts

    • GIG
      • bank-1
        • soundfont-1 (file)
        • soundfont-n (file)
      • bank-n
    • SF2
      + soundfont-1 (file)
      + …
      + soundfont-n (file)
    • SFZ
      • bank-1
        • soundfont-1 (directory)
        • soundfont-n (directory)
      • bank-n
  • presets

    • zynaddsubfx
      • bank-1
        • preset-1
        • preset-n
      • bank-n
    • puredata
      • bank-1
        • patch-1 (directory)
        • patch-n (directory)
      • bank-n
    • etc.

Some volunteer to write a brief explanation on the wiki? :wink:

Enjoy!

3 Likes

11 posts were split to a new topic: Zynthian + Vintage Keyboard build

I’m writing the wiki page for external storage right now. Does the presets search path get expanded only to /media/usb0, or to every usb mass storage device connected? (Or does the automounter only mount one in the case of multiples?)

Edit: Here’s the page. Can you check it for correctness, esp. with regards to multiple drives? External storage - ZynthianWiki

Only one: /media/usb0

1 Like