# dynamix/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/dynamix/> .

@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 "Dynamix" ;
    rdfs:comment "Compressor/expander, limiter and clipper/soft distortion in series. A second stereo input on channels 3 and 4 is an external key: when it is connected, the compressor/expander stage reads its level from that instead of the main signal, for sidechain ducking. When nothing is connected there, the stage detects on the main signal itself." ;
    trn:vendor "danja" ;
    doap:revision "1.0.0" ;
    doap:developer <http://danny.ayers.name> ;
    foaf:homepage <> ;
    trn:role trn:AudioEffect ;
    trn:accepts trn:Audio ;
    trn:produces trn:Audio ;
    trn:genre "Dynamics" , "Mastering" ;
    trn:caution "The limiter has no lookahead: it reacts within a fraction of a millisecond rather than before the transient, so a very sharp attack can still touch the ceiling briefly before the gain catches up. Leave a little headroom below the ceiling for material with hard transients." ;
    trn:caution "The compressor/expander stage links its gain reduction across both channels from a single detected level, so it never shifts the stereo image, but it also means the side chain input's balance between its own two channels, not just its overall level, feeds the detector." ;
    trn:caution "Disconnecting the side chain input mid-session returns the compressor/expander to detecting on the main signal on the next block, not instantly at the sample the cable was pulled." ;
    trn:format trn:Jig , trn:WebAudio ;
    pu:licenceId "Apache-2.0" ;

    jig:stateless true ;
    jig:audioInputs 2 ;
    jig:sidechainInput 1 ;
    jig:inputChannels 2 ;
    jig:audioOutputs 1 ;
    jig:outputChannels 2 ;
    jig:renderQuantum 128 ;
    jig:latencyFrames 0 ;

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

    lv2:port <#comp_enable> , <#comp_mode> , <#threshold> , <#ratio> , <#attack> , <#release> , <#knee> , <#makeup> , <#limit_enable> , <#ceiling> , <#limit_release> , <#clip_enable> , <#drive> , <#shape> .

<#module>
    a jig:Module ;
    jig:location <dynamix.wasm> ;
    jig:mediaType "application/wasm" ;
    jig:abi jig:Abi1 ;
    jig:integrity "sha384-2UahciePbw9UdX79I6Cqg0FmJcv8rHzUnwtiwf4dZ+qna162GdqIOyt/UNerseoT" .

<#processor>
    a jig:Processor ;
    jig:location <dynamix-processor.js> ;
    jig:mediaType "text/javascript" ;
    jig:registeredName "dynamix" ;
    jig:integrity "sha384-mqg/vA9EacSXYT13/iQysJMxuBLfEuizLNMuudMWAjitk7/nKpmhstUpY3rVFrS3" .

<#comp_enable>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "comp_enable" ; lv2:name "Comp/Exp On" ;
    lv2:default 1 ; lv2:minimum 0 ; lv2:maximum 1 ;
    jig:paramIndex 0 ;
    lv2:portProperty lv2:toggled .

<#comp_mode>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "comp_mode" ; lv2:name "Comp/Exp Mode" ;
    lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 1 ;
    jig:paramIndex 1 ;
    lv2:portProperty lv2:enumeration ;
    lv2:scalePoint
        <#comp_mode-0> ,
        <#comp_mode-1> .

<#comp_mode-0> rdfs:label "Compressor" ; rdf:value 0 .

<#comp_mode-1> rdfs:label "Expander" ; rdf:value 1 .

<#threshold>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "threshold" ; lv2:name "Threshold" ;
    lv2:default -18 ; lv2:minimum -60 ; lv2:maximum 0 ;
    jig:paramIndex 2 ;
    units:unit units:db .

<#ratio>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "ratio" ; lv2:name "Ratio" ;
    lv2:default 4 ; lv2:minimum 1 ; lv2:maximum 20 ;
    jig:paramIndex 3 .

<#attack>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "attack" ; lv2:name "Attack" ;
    lv2:default 10 ; lv2:minimum 0.1 ; lv2:maximum 200 ;
    jig:paramIndex 4 ;
    units:unit units:ms .

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

<#knee>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "knee" ; lv2:name "Knee" ;
    lv2:default 6 ; lv2:minimum 0 ; lv2:maximum 24 ;
    jig:paramIndex 6 ;
    units:unit units:db .

<#makeup>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "makeup" ; lv2:name "Makeup" ;
    lv2:default 0 ; lv2:minimum -12 ; lv2:maximum 24 ;
    jig:paramIndex 7 ;
    units:unit units:db .

<#limit_enable>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "limit_enable" ; lv2:name "Limiter On" ;
    lv2:default 1 ; lv2:minimum 0 ; lv2:maximum 1 ;
    jig:paramIndex 8 ;
    lv2:portProperty lv2:toggled .

<#ceiling>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "ceiling" ; lv2:name "Ceiling" ;
    lv2:default -0.3 ; lv2:minimum -12 ; lv2:maximum 0 ;
    jig:paramIndex 9 ;
    units:unit units:db .

<#limit_release>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "limit_release" ; lv2:name "Limiter Release" ;
    lv2:default 50 ; lv2:minimum 5 ; lv2:maximum 500 ;
    jig:paramIndex 10 ;
    units:unit units:ms .

<#clip_enable>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "clip_enable" ; lv2:name "Clipper On" ;
    lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 1 ;
    jig:paramIndex 11 ;
    lv2:portProperty lv2:toggled .

<#drive>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "drive" ; lv2:name "Drive" ;
    lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 24 ;
    jig:paramIndex 12 ;
    units:unit units:db .

<#shape>
    a lv2:InputPort , lv2:ControlPort ;
    lv2:symbol "shape" ; lv2:name "Shape" ;
    lv2:default 0.3 ; lv2:minimum 0 ; lv2:maximum 1 ;
    jig:paramIndex 13 .
