@prefix atom:    <http://lv2plug.in/ns/ext/atom#> .
@prefix bufsize: <http://lv2plug.in/ns/ext/buf-size#> .
@prefix doap:    <http://usefulinc.com/ns/doap#> .
@prefix foaf:    <http://xmlns.com/foaf/0.1/> .
@prefix lv2:     <http://lv2plug.in/ns/lv2core#> .
@prefix midi:    <http://lv2plug.in/ns/ext/midi#> .
@prefix opts:    <http://lv2plug.in/ns/ext/options#> .
@prefix patch: 	 <http://lv2plug.in/ns/ext/patch#> .
@prefix pg:      <http://lv2plug.in/ns/ext/port-groups#> .
@prefix pprop:   <http://lv2plug.in/ns/ext/port-props#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix state:   <http://lv2plug.in/ns/ext/state#> .
@prefix units:   <http://lv2plug.in/ns/extensions/units#> .
@prefix urid:    <http://lv2plug.in/ns/ext/urid#> .
@prefix work:    <http://lv2plug.in/ns/ext/worker#> .

<#config>
  a pg:Group ;
  lv2:symbol "config" ;
  lv2:name   "Configuration" .

<@LV2PLUGIN_URI@:sfzfile>
  a lv2:Parameter ;
  rdfs:label "SFZ file" ;
  rdfs:range atom:Path .

<@LV2PLUGIN_URI@:numvoices>
  a lv2:Parameter ;
  rdfs:label "Polyphony" ;
  rdfs:range atom:Int .

<@LV2PLUGIN_URI@:preload_size>
  a lv2:Parameter ;
  rdfs:label "Preload size" ;
  rdfs:range atom:Int .

<@LV2PLUGIN_URI@:oversampling>
  a lv2:Parameter ;
  rdfs:label "Oversampling" ;
  rdfs:range atom:Int .

<@LV2PLUGIN_URI@>
  a doap:Project, lv2:Plugin, lv2:InstrumentPlugin ;

  doap:name "@LV2PLUGIN_NAME@" ;
  doap:license <https://spdx.org/licenses/@LV2PLUGIN_SPDX_LICENSE_ID@> ;
  doap:maintainer [
    foaf:name     "@LV2PLUGIN_AUTHOR@" ;
    foaf:homepage <@LV2PLUGIN_URI@> ;
  ] ;
  rdfs:comment "@LV2PLUGIN_COMMENT@" ;

  lv2:minorVersion @LV2PLUGIN_VERSION_MINOR@ ;
  lv2:microVersion @LV2PLUGIN_VERSION_MICRO@ ;

  lv2:requiredFeature urid:map, bufsize:boundedBlockLength, work:schedule ;
  lv2:optionalFeature lv2:hardRTCapable, opts:options ;
  lv2:extensionData opts:interface, state:interface, work:interface ;

  patch:writable <@LV2PLUGIN_URI@:sfzfile> ;

  lv2:port [
    a lv2:InputPort, atom:AtomPort ;
    atom:bufferType atom:Sequence ;
    atom:supports patch:Message, midi:MidiEvent ;
    lv2:designation lv2:control ;
    lv2:index 0 ;
    lv2:symbol "control" ;
    lv2:name "Control"
  ] , [
    a lv2:OutputPort, atom:AtomPort ;
    atom:bufferType atom:Sequence ;
    atom:supports patch:Message ;
    lv2:designation lv2:control ;
    lv2:index 1 ;
    lv2:symbol "notify" ;
    lv2:name "Notify" ;
  ] , [
    a lv2:AudioPort , lv2:OutputPort ;
    lv2:index 2 ;
    lv2:symbol "out_left" ;
    lv2:name "Left Output"
  ] , [
    a lv2:AudioPort , lv2:OutputPort ;
    lv2:index 3 ;
    lv2:symbol "out_right" ;
    lv2:name "Right Output"
  ] , [
    a lv2:InputPort, lv2:ControlPort ;
    lv2:index 4 ;
    lv2:symbol "volume" ;
    lv2:name "Volume" ;
    lv2:default 0.0 ;
    lv2:minimum -80.0 ;
    lv2:maximum 6.0 ;
    lv2:portProperty pprop:notAutomatic ;
    units:unit units:db
  ] , [
    a lv2:InputPort, lv2:ControlPort ;
    lv2:index 5 ;
    lv2:symbol "num_voices" ;
    lv2:name "Polyphony" ;
    pg:group <#config> ;
    lv2:portProperty pprop:notAutomatic ;
    lv2:portProperty pprop:expensive ;
    lv2:portProperty lv2:integer ;
    lv2:portProperty lv2:enumeration ;
    lv2:default 64 ;
    lv2:minimum 8 ;
    lv2:maximum 256 ;
    lv2:scalePoint [ rdfs:label "8 voices"; rdf:value 8 ] ;
    lv2:scalePoint [ rdfs:label "16 voices"; rdf:value 16 ] ;
    lv2:scalePoint [ rdfs:label "32 voices"; rdf:value 32 ] ;
    lv2:scalePoint [ rdfs:label "64 voices"; rdf:value 64 ] ;
    lv2:scalePoint [ rdfs:label "128 voices"; rdf:value 128 ] ;
    lv2:scalePoint [ rdfs:label "256 voices"; rdf:value 256 ] ;
  ] , [
    a lv2:InputPort, lv2:ControlPort ;
    lv2:index 6 ;
    lv2:symbol "oversampling" ;
    lv2:name "Internal oversampling factor" ;
    pg:group <#config> ;
    lv2:portProperty pprop:notAutomatic ;
    lv2:portProperty pprop:expensive ;
    lv2:portProperty lv2:integer ;
    lv2:portProperty lv2:enumeration ;
    lv2:default 1 ;
    lv2:minimum 1 ;
    lv2:maximum 8 ;
    lv2:scalePoint [ rdfs:label "x1 oversampling"; rdf:value 1 ] ;
    lv2:scalePoint [ rdfs:label "x2 oversampling"; rdf:value 2 ] ;
    lv2:scalePoint [ rdfs:label "x4 oversampling"; rdf:value 4 ] ;
    lv2:scalePoint [ rdfs:label "x8 oversampling"; rdf:value 8 ] ;
  ], [
    a lv2:InputPort, lv2:ControlPort ;
    lv2:index 7 ;
    lv2:symbol "preload_size" ;
    lv2:name "Preload size" ;
    pg:group <#config> ;
    lv2:portProperty pprop:notAutomatic ;
    lv2:portProperty pprop:expensive ;
    lv2:portProperty lv2:integer ;
    lv2:portProperty lv2:enumeration ;
    lv2:default 8192 ;
    lv2:minimum 1024 ;
    lv2:maximum 65536 ;
    lv2:scalePoint [ rdfs:label "4 Ko"; rdf:value 1024 ] ;
    lv2:scalePoint [ rdfs:label "8 Ko"; rdf:value 2048 ] ;
    lv2:scalePoint [ rdfs:label "16 Ko"; rdf:value 4096 ] ;
    lv2:scalePoint [ rdfs:label "32 Ko"; rdf:value 8192 ] ;
    lv2:scalePoint [ rdfs:label "64 Ko"; rdf:value 16384 ] ;
    lv2:scalePoint [ rdfs:label "128 Ko"; rdf:value 32768 ] ;
    lv2:scalePoint [ rdfs:label "256 Ko"; rdf:value 65536 ] ;
  ], [
    a lv2:InputPort, lv2:ControlPort ;
    lv2:index 8 ;
    lv2:symbol "freewheeling" ;
    lv2:name "Freewheeling" ;
    lv2:designation lv2:freeWheeling ;
    lv2:portProperty lv2:toggled ;
    lv2:default 0 ;
    lv2:minimum 0 ;
    lv2:maximum 1 ;
  ].
