# sam/profile.ttl
#
# GENERATED by bin/write-profile.js. Do not edit: the digests are of the
# files on disk, and editing them by hand is how a profile comes to describe
# artefacts that no longer exist. Edit profile.json and run ./build.sh.

@base <https://strandz.it/jigdaw/plugins/sam/> .

@prefix jig:   <http://purl.org/stuff/jigdaw/> .
@prefix trn:   <http://purl.org/stuff/transmissions/> .
@prefix pu:    <http://purl.org/stuff/plugin-universe/> .
@prefix lv2:   <http://lv2plug.in/ns/lv2core#> .
@prefix midi:  <http://lv2plug.in/ns/ext/midi#> .
@prefix units: <http://lv2plug.in/ns/extensions/units#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix doap:  <http://usefulinc.com/ns/doap#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .

<>
    a jig:WebPlugin , trn:PluginProfile ;
    rdfs:label "Sam" ;
    rdfs:comment "Software Automatic Mouth, the 1982 Commodore 64 formant speech synthesiser, as an instrument: typed text is spoken either one word per MIDI note, sung at the pitch of the key, or one word per step from a start bar, locked to the host transport." ;
    trn:vendor "danja" ;
    doap:revision "1.0.0" ;
    doap:developer <http://danny.ayers.name> ;
    foaf:homepage <> ;
    trn:role trn:Instrument , trn:AudioInstrument ;
    trn:accepts trn:Midi ;
    trn:produces trn:Audio ;
    trn:genre "Chiptune" , "Experimental" , "Vocal" ;
    trn:caution "Transport mode is silent while the host is stopped (use Speak to audition) and when the host gives no beat position. Keys mode ignores the transport." ;
    trn:caution "The words are a jig:asset the person replaces with a plain text file of their own, up to 2000 printable ASCII characters and 512 words, and are saved with the session. A lone _ is a rest. Phonetic reads SAM phoneme codes, e.g. /HEH3LOW2 WER4LD." ;
    trn:caution "SAM's code is vendored in third_party/ and has no licence (abandonware; see third_party/SAM-LICENSE.md). Whether it may be redistributed with this plugin is the repository owner's decision, recorded in HUMANS.md." ;
    trn:caution "Ported from the Downspout VST3 of the same name. Not carried over: the six voice presets (set Speed, Pitch, Throat and Mouth by hand) and the Current Word read-out." ;
    trn:format trn:Jig ;
    trn:requires jig:MidiEvents ;
    trn:requires trn:HostTransport ;

    jig:audioInputs 0 ;
    jig:audioOutputs 1 ;
    jig:outputChannels 2 ;
    jig:renderQuantum 128 ;
    jig:latencyFrames 0 ;
    jig:tailFrames 48000 ;

    jig:module <#module> ;
    jig:processor <#processor> ;
    jig:asset <#text> ;

    lv2:port <#mode> , <#speed> , <#pitch> , <#mouth> , <#throat> , <#monotone> , <#phonetic> , <#midi_ch> , <#advance> , <#transpose> , <#release> , <#step> , <#start_bar> , <#loop> , <#speak> , <#tone> , <#level> .

<#module>
    a jig:Module ;
    jig:location <sam.wasm> ;
    jig:mediaType "application/wasm" ;
    jig:abi jig:Abi2 ;
    jig:integrity "sha384-41T0Z1ePoDBrebJXRi0cdO5QfEh8JdKuDV9KMn7phH+sftP8yfi0D1KKun0M56iG" .

<#processor>
    a jig:Processor ;
    jig:location <sam-processor.js> ;
    jig:mediaType "text/javascript" ;
    jig:registeredName "sam" ;
    jig:integrity "sha384-4WMudQYak1/2ByYe948/rBicToEyKEWlYsxMND0FMTmgYWp6vskPkSQe35/MTj7z" .

<#text>
    a jig:Resource ;
    jig:location <text.txt> ;
    jig:mediaType "text/plain" ;
    jig:userReplaceable true ;
    jig:maxBytes 2000 ;
    jig:integrity "sha384-XxknJfigrQ7OsZYyMCE7QAwWxLdsmLUHDXbB973KGYNMAuBq434z2mfwadXC6bqt" .

<#mode>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "mode" ; lv2:name "Mode" ;
    lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 1 ;
    jig:paramIndex 0 ;
    jig:controlGroup "Source" ;
    lv2:portProperty lv2:enumeration ;
    lv2:scalePoint
        <#mode-0> ,
        <#mode-1> .

<#mode-0> rdfs:label "Keys" ; rdf:value 0 .

<#mode-1> rdfs:label "Transport" ; rdf:value 1 .

<#speed>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "speed" ; lv2:name "Speed" ;
    lv2:default 72 ; lv2:minimum 20 ; lv2:maximum 200 ;
    jig:paramIndex 1 ;
    jig:controlGroup "Voice" .

<#pitch>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "pitch" ; lv2:name "Pitch" ;
    lv2:default 64 ; lv2:minimum 16 ; lv2:maximum 255 ;
    jig:paramIndex 2 ;
    jig:controlGroup "Voice" .

<#mouth>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "mouth" ; lv2:name "Mouth" ;
    lv2:default 128 ; lv2:minimum 0 ; lv2:maximum 255 ;
    jig:paramIndex 3 ;
    jig:controlGroup "Voice" .

<#throat>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "throat" ; lv2:name "Throat" ;
    lv2:default 128 ; lv2:minimum 0 ; lv2:maximum 255 ;
    jig:paramIndex 4 ;
    jig:controlGroup "Voice" .

<#monotone>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "monotone" ; lv2:name "Monotone" ;
    lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 1 ;
    jig:paramIndex 5 ;
    jig:controlGroup "Voice" ;
    lv2:portProperty lv2:toggled .

<#phonetic>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "phonetic" ; lv2:name "Phonetic" ;
    lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 1 ;
    jig:paramIndex 6 ;
    jig:controlGroup "Voice" ;
    lv2:portProperty lv2:toggled .

<#midi_ch>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "midi_ch" ; lv2:name "MIDI In" ;
    lv2:default 17 ; lv2:minimum 0 ; lv2:maximum 17 ;
    jig:paramIndex 7 ;
    jig:controlGroup "Keys mode" ;
    lv2:portProperty lv2:enumeration ;
    lv2:scalePoint
        <#midi_ch-0> ,
        <#midi_ch-1> ,
        <#midi_ch-2> ,
        <#midi_ch-3> ,
        <#midi_ch-4> ,
        <#midi_ch-5> ,
        <#midi_ch-6> ,
        <#midi_ch-7> ,
        <#midi_ch-8> ,
        <#midi_ch-9> ,
        <#midi_ch-10> ,
        <#midi_ch-11> ,
        <#midi_ch-12> ,
        <#midi_ch-13> ,
        <#midi_ch-14> ,
        <#midi_ch-15> ,
        <#midi_ch-16> ,
        <#midi_ch-17> .

<#midi_ch-0> rdfs:label "Off" ; rdf:value 0 .

<#midi_ch-1> rdfs:label "Ch 1" ; rdf:value 1 .

<#midi_ch-2> rdfs:label "Ch 2" ; rdf:value 2 .

<#midi_ch-3> rdfs:label "Ch 3" ; rdf:value 3 .

<#midi_ch-4> rdfs:label "Ch 4" ; rdf:value 4 .

<#midi_ch-5> rdfs:label "Ch 5" ; rdf:value 5 .

<#midi_ch-6> rdfs:label "Ch 6" ; rdf:value 6 .

<#midi_ch-7> rdfs:label "Ch 7" ; rdf:value 7 .

<#midi_ch-8> rdfs:label "Ch 8" ; rdf:value 8 .

<#midi_ch-9> rdfs:label "Ch 9" ; rdf:value 9 .

<#midi_ch-10> rdfs:label "Ch 10" ; rdf:value 10 .

<#midi_ch-11> rdfs:label "Ch 11" ; rdf:value 11 .

<#midi_ch-12> rdfs:label "Ch 12" ; rdf:value 12 .

<#midi_ch-13> rdfs:label "Ch 13" ; rdf:value 13 .

<#midi_ch-14> rdfs:label "Ch 14" ; rdf:value 14 .

<#midi_ch-15> rdfs:label "Ch 15" ; rdf:value 15 .

<#midi_ch-16> rdfs:label "Ch 16" ; rdf:value 16 .

<#midi_ch-17> rdfs:label "All" ; rdf:value 17 .

<#advance>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "advance" ; lv2:name "Advance" ;
    lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 1 ;
    jig:paramIndex 8 ;
    jig:controlGroup "Keys mode" ;
    lv2:portProperty lv2:enumeration ;
    lv2:scalePoint
        <#advance-0> ,
        <#advance-1> .

<#advance-0> rdfs:label "Next word" ; rdf:value 0 .

<#advance-1> rdfs:label "Key = word" ; rdf:value 1 .

<#transpose>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "transpose" ; lv2:name "Transpose" ;
    lv2:default 0 ; lv2:minimum -24 ; lv2:maximum 24 ;
    jig:paramIndex 9 ;
    jig:controlGroup "Keys mode" ;
    units:unit units:semitone12TET .

<#release>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "release" ; lv2:name "Release" ;
    lv2:default 60 ; lv2:minimum 5 ; lv2:maximum 1000 ;
    jig:paramIndex 10 ;
    jig:controlGroup "Keys mode" ;
    units:unit units:ms .

<#step>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "step" ; lv2:name "Step" ;
    lv2:default 2 ; lv2:minimum 0 ; lv2:maximum 7 ;
    jig:paramIndex 11 ;
    jig:controlGroup "Transport mode" ;
    lv2:portProperty lv2:enumeration ;
    lv2:scalePoint
        <#step-0> ,
        <#step-1> ,
        <#step-2> ,
        <#step-3> ,
        <#step-4> ,
        <#step-5> ,
        <#step-6> ,
        <#step-7> .

<#step-0> rdfs:label "1/16" ; rdf:value 0 .

<#step-1> rdfs:label "1/8" ; rdf:value 1 .

<#step-2> rdfs:label "1/4" ; rdf:value 2 .

<#step-3> rdfs:label "1/2" ; rdf:value 3 .

<#step-4> rdfs:label "1/1" ; rdf:value 4 .

<#step-5> rdfs:label "1 bar" ; rdf:value 5 .

<#step-6> rdfs:label "2 bars" ; rdf:value 6 .

<#step-7> rdfs:label "4 bars" ; rdf:value 7 .

<#start_bar>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "start_bar" ; lv2:name "Start Bar" ;
    lv2:default 1 ; lv2:minimum 1 ; lv2:maximum 256 ;
    jig:paramIndex 12 ;
    jig:controlGroup "Transport mode" .

<#loop>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "loop" ; lv2:name "Loop" ;
    lv2:default 1 ; lv2:minimum 0 ; lv2:maximum 1 ;
    jig:paramIndex 13 ;
    jig:controlGroup "Transport mode" ;
    lv2:portProperty lv2:toggled .

<#speak>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "speak" ; lv2:name "Speak" ;
    lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 1 ;
    jig:paramIndex 14 ;
    jig:controlGroup "Transport mode" ;
    lv2:portProperty lv2:toggled .

<#tone>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "tone" ; lv2:name "Tone" ;
    lv2:default 8000 ; lv2:minimum 1000 ; lv2:maximum 12000 ;
    jig:paramIndex 15 ;
    jig:controlGroup "Output" ;
    units:unit units:hz .

<#level>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "level" ; lv2:name "Level" ;
    lv2:default 0.7 ; lv2:minimum 0 ; lv2:maximum 1 ;
    jig:paramIndex 16 ;
    jig:controlGroup "Output" .
