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

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

<http://sfztools.github.io/sfizz:sfzfile>
      a lv2:Parameter ; 
      rdfs:label "SFZ file" ; 
      rdfs:range atom:Path .

<http://sfztools.github.io/sfizz:numvoices>
      a lv2:Parameter ; 
      rdfs:label "Polyphony" ;
      rdfs:range atom:Int . 

<http://sfztools.github.io/sfizz>
	a doap:Project, lv2:Plugin, lv2:InstrumentPlugin;
	doap:name "Sfizz" ;
	lv2:requiredFeature urid:map, bufsize:boundedBlockLength, work:schedule;
	rdfs:comment "SFZ sampler" ;
	lv2:optionalFeature lv2:hardRTCapable, opts:options;
	lv2:extensionData opts:interface, state:interface, work:interface ;
	patch:writable <http://sfztools.github.io/sfizz: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 ] ;
    ].
