[LV2] Specifying a file extension (or mime-type) for atom:path parameters.

Robin Davies rerdavies at gmail.com
Wed Apr 12 15:40:29 PDT 2023


I'm looking for a way to specify the file extension, or Mime type of files
that can be sent to an lv2:Parameter of atom:path type.

I'm hoping to borrow an extension for doing that, if there is one. Or
creating my own. Or propose new standard URIs.

It's easy enough to provide my own private extensions for use by Pipedal's
host. But it seems like the sort of functionality that should be
standardized, if possible.

Informally, I'm look for something like this:


<http://github.com/mikeoliphant/neural-amp-modeler-lv2#model>
>         a lv2:Parameter;
>         rdfs:label "Model";
>         rdfs:range atom:Path;
>         lv2:FileType [
>               rdfsLabel "NAM Model",
>               lv2:FileExtensions: ".nam
>               ].


or

toobConvolutionReverb#impulseFile>
>         a lv2:Parameter;
>         rdfs:label "Impulse File";
>         rdfs:range atom:Path;
>         lv2:FileType [
>               rdfsLabel "Audio files";
>               lv2:FileExtension: .wav,.flac";
>               ],
>
 or

>         lv2:FileType [
>               rdfsLabel "FLAC files";
>               lv2:MimeType: "audio/x-flac";
>               ].



If there's not an existing convention, and if there's interest, I'd be
willing to pitch an extension in a more formal way.

I considered use of Dublin Core's
    http://purl.org/dc/terms/FileFormat

But it doesn't really serve well, when applications are using file formats
that aren't registered.

     application/x-<your-file-extension here>,

perhaps? (Also there aren't readily portable MIME databases available
for LV2 hosts).

Context:

I'm working on implementing support for lv2:Parameters of atom:Path type,
using the existing convention, for the PiPedal project (
https://github.com/rerdavies/pipedal). PiPedal runs on a raspberry pi, but
is controlled through a web interface. To select a file, the user browses a
list of existing files, either provided by the plugin, or previously
uploaded. The user can optionally upload files from the client system via
the browser. Given that the consequences of feeding a plugin a file of the
wrong type could be unpleasant, it would be nice to give the user some
guidance as to what type of file the plugin wants.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lv2plug.in/pipermail/devel-lv2plug.in/attachments/20230412/416161ea/attachment.htm>


More information about the Devel mailing list