pax_global_header00006660000000000000000000000064141166301320014507gustar00rootroot0000000000000052 comment=d576487c36b32ca36ce0539b4c73fd76e7737349 BChoppr-1.10.10/000077500000000000000000000000001411663013200132045ustar00rootroot00000000000000BChoppr-1.10.10/.gitignore000066400000000000000000000000261411663013200151720ustar00rootroot00000000000000/BChoppr.lv2/** .tags BChoppr-1.10.10/BChoppr.ttl000066400000000000000000000401001411663013200152610ustar00rootroot00000000000000@prefix atom: . @prefix doap: . @prefix foaf: . @prefix rdf: . @prefix rdfs: . @prefix lv2: . @prefix time: . @prefix urid: . @prefix ui: . @prefix state: . @prefix rsz: . @prefix pset: . a foaf:Person; foaf:name "Sven Jaehnichen"; # foaf:mbox ; foaf:homepage . a ui:X11UI; ui:binary ; lv2:extensionData ui:idleInterface , ui:resize ; lv2:optionalFeature ui:resize ; lv2:requiredFeature ui:idleInterface . a lv2:Plugin, lv2:DynamicsPlugin, doap:Project; doap:name "B.Choppr" ; rdfs:comment "An audio stream chopping LV2 plugin. B.Choppr cuts the audio input stream into a repeated sequence of up to 16 chops. Each chop can be leveled up or down (gating)." ; doap:maintainer ; doap:license ; lv2:microVersion 10 ; lv2:minorVersion 10 ; lv2:optionalFeature lv2:hardRTCapable ; lv2:binary ; lv2:requiredFeature urid:map ; lv2:extensionData state:interface; ui:ui ; lv2:port [ a lv2:InputPort , atom:AtomPort ; atom:bufferType atom:Sequence ; atom:supports time:Position ; lv2:index 0 ; lv2:symbol "control_1" ; lv2:name "Control_1" ; ] , [ a lv2:InputPort , atom:AtomPort ; atom:bufferType atom:Sequence ; lv2:designation lv2:control; lv2:index 1 ; lv2:symbol "control_2" ; lv2:name "Control_2" ; ] , [ a lv2:OutputPort , atom:AtomPort ; atom:bufferType atom:Sequence ; lv2:designation lv2:control; lv2:index 2 ; lv2:symbol "notify" ; lv2:name "Notify" ; rsz:minimumSize 73000; ] ,[ a lv2:AudioPort , lv2:InputPort ; lv2:index 3 ; lv2:symbol "lv2_audio_in_1" ; lv2:name "Audio Input 1" ; ] , [ a lv2:AudioPort , lv2:InputPort ; lv2:index 4 ; lv2:symbol "lv2_audio_in_2" ; lv2:name "Audio Input 2" ; ] , [ a lv2:AudioPort , lv2:OutputPort ; lv2:index 5 ; lv2:symbol "lv2_audio_out_1" ; lv2:name "Audio Output 1" ; ] , [ a lv2:AudioPort , lv2:OutputPort ; lv2:index 6 ; lv2:symbol "lv2_audio_out_2" ; lv2:name "Audio Output 2" ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 7 ; lv2:symbol "bypass" ; lv2:name "Bypass" ; lv2:portProperty lv2:integer, lv2:enumeration ; lv2:scalePoint [ rdfs:label "Off"; rdf:value 0 ] ; lv2:scalePoint [ rdfs:label "On"; rdf:value 1 ] ; lv2:default 0 ; lv2:minimum 0 ; lv2:maximum 1 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 8 ; lv2:symbol "dry_wet" ; lv2:name "Dry / wet" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 9 ; lv2:symbol "blend" ; lv2:name "Blend type" ; lv2:portProperty lv2:integer, lv2:enumeration ; lv2:scalePoint [ rdfs:label "Linear"; rdf:value 1 ] ; lv2:scalePoint [ rdfs:label "Sinusoidal"; rdf:value 2 ] ; lv2:default 1 ; lv2:minimum 1 ; lv2:maximum 2 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 10 ; lv2:symbol "attack" ; lv2:name "Attack" ; lv2:default 0.2 ; lv2:minimum 0.01 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 11 ; lv2:symbol "release" ; lv2:name "Release" ; lv2:default 0.2 ; lv2:minimum 0.01 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 12 ; lv2:symbol "sequences_per_bar" ; lv2:name "Sequences per bar" ; lv2:portProperty lv2:integer ; lv2:default 4 ; lv2:minimum 1 ; lv2:maximum 8 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 13 ; lv2:symbol "amp_swing" ; lv2:name "Step amplification swing" ; lv2:portProperty lv2:connectionOptional ; lv2:default 1.0 ; lv2:minimum 0.001 ; lv2:maximum 1000.0 ; rdfs:comment "Values lower than 1 (down to 0.001) mean reduction of odd step level. Values higher than 1 (up to 1000) mean reduction of even step level." ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 14 ; lv2:symbol "swing" ; lv2:name "Steps swing" ; lv2:default 1.0 ; lv2:minimum 0.333333 ; lv2:maximum 3.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 15 ; lv2:symbol "number_steps" ; lv2:name "Number_Steps" ; lv2:portProperty lv2:integer ; lv2:default 16 ; lv2:minimum 1 ; lv2:maximum 16 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 16 ; lv2:symbol "position_01" ; lv2:name "Position 01" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 17 ; lv2:symbol "position_02" ; lv2:name "Position 02" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 18 ; lv2:symbol "position_03" ; lv2:name "Position 03" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 19 ; lv2:symbol "position_04" ; lv2:name "Position 04" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 20 ; lv2:symbol "position_05" ; lv2:name "Position 05" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 21 ; lv2:symbol "position_06" ; lv2:name "Position 06" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 22 ; lv2:symbol "position_07" ; lv2:name "Position 07" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 23 ; lv2:symbol "position_08" ; lv2:name "Position 08" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 24 ; lv2:symbol "position_09" ; lv2:name "Position 09" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 25 ; lv2:symbol "position_10" ; lv2:name "Position 10" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 26 ; lv2:symbol "position_11" ; lv2:name "Position 11" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 27 ; lv2:symbol "position_12" ; lv2:name "Position 12" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 28 ; lv2:symbol "position_13" ; lv2:name "Position 13" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 29 ; lv2:symbol "position_14" ; lv2:name "Position 14" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 30 ; lv2:symbol "position_15" ; lv2:name "Position 15" ; lv2:default 0.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 31 ; lv2:symbol "level_01" ; lv2:name "Level 01" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 32 ; lv2:symbol "level_02" ; lv2:name "Level 02" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 33 ; lv2:symbol "level_03" ; lv2:name "Level 03" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 34 ; lv2:symbol "level_04" ; lv2:name "Level 04" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 35 ; lv2:symbol "level_05" ; lv2:name "Level 05" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 36 ; lv2:symbol "level_06" ; lv2:name "Level 06" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 37 ; lv2:symbol "level_07" ; lv2:name "Level 07" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 38 ; lv2:symbol "level_08" ; lv2:name "Level 08" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 39 ; lv2:symbol "level_09" ; lv2:name "Level 09" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 40 ; lv2:symbol "level_10" ; lv2:name "Level 10" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 41 ; lv2:symbol "level_11" ; lv2:name "Level 11" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 42 ; lv2:symbol "level_12" ; lv2:name "Level 12" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 43 ; lv2:symbol "level_13" ; lv2:name "Level 13" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 44 ; lv2:symbol "level_14" ; lv2:name "Level 14" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 45 ; lv2:symbol "level_15" ; lv2:name "Level 15" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] , [ a lv2:InputPort , lv2:ControlPort ; lv2:index 46 ; lv2:symbol "level_16" ; lv2:name "Level 16" ; lv2:default 1.0 ; lv2:minimum 0.0 ; lv2:maximum 1.0 ; ] . a pset:Preset ; lv2:appliesTo ; rdfs:label "Basic Tremolo" ; rdfs:seeAlso . a pset:Preset ; lv2:appliesTo ; rdfs:label "Faster, louder, chopper!" ; rdfs:seeAlso . a pset:Preset ; lv2:appliesTo ; rdfs:label "Jittery Jim" ; rdfs:seeAlso . a pset:Preset ; lv2:appliesTo ; rdfs:label "Raving loony" ; rdfs:seeAlso . a pset:Preset ; lv2:appliesTo ; rdfs:label "Stall the engine" ; rdfs:seeAlso . a pset:Preset ; lv2:appliesTo ; rdfs:label "Waltz through Vienna" ; rdfs:seeAlso . BChoppr-1.10.10/BChoppr_Basic_tremolo.ttl000066400000000000000000000052211411663013200201300ustar00rootroot00000000000000@prefix atom: . @prefix lv2: . @prefix pset: . @prefix rdf: . @prefix rdfs: . @prefix state: . @prefix xsd: . a pset:Preset ; lv2:appliesTo ; rdfs:label "Basic tremolo" ; lv2:port [ lv2:symbol "amp_swing" ; pset:value 1000.0 ] , [ lv2:symbol "attack" ; pset:value 0.2 ] , [ lv2:symbol "blend" ; pset:value 1.0 ] , [ lv2:symbol "bypass" ; pset:value 0.0 ] , [ lv2:symbol "dry_wet" ; pset:value 1.0 ] , [ lv2:symbol "level_01" ; pset:value 1.0 ] , [ lv2:symbol "level_02" ; pset:value 1.0 ] , [ lv2:symbol "level_03" ; pset:value 1.0 ] , [ lv2:symbol "level_04" ; pset:value 1.0 ] , [ lv2:symbol "level_05" ; pset:value 1.0 ] , [ lv2:symbol "level_06" ; pset:value 1.0 ] , [ lv2:symbol "level_07" ; pset:value 1.0 ] , [ lv2:symbol "level_08" ; pset:value 1.0 ] , [ lv2:symbol "level_09" ; pset:value 1.0 ] , [ lv2:symbol "level_10" ; pset:value 1.0 ] , [ lv2:symbol "level_11" ; pset:value 1.0 ] , [ lv2:symbol "level_12" ; pset:value 1.0 ] , [ lv2:symbol "level_13" ; pset:value 1.0 ] , [ lv2:symbol "level_14" ; pset:value 1.0 ] , [ lv2:symbol "level_15" ; pset:value 1.0 ] , [ lv2:symbol "level_16" ; pset:value 1.0 ] , [ lv2:symbol "number_steps" ; pset:value 16.0 ] , [ lv2:symbol "position_01" ; pset:value 0.0 ] , [ lv2:symbol "position_02" ; pset:value 0.0 ] , [ lv2:symbol "position_03" ; pset:value 0.0 ] , [ lv2:symbol "position_04" ; pset:value 0.0 ] , [ lv2:symbol "position_05" ; pset:value 0.0 ] , [ lv2:symbol "position_06" ; pset:value 0.0 ] , [ lv2:symbol "position_07" ; pset:value 0.0 ] , [ lv2:symbol "position_08" ; pset:value 0.0 ] , [ lv2:symbol "position_09" ; pset:value 0.0 ] , [ lv2:symbol "position_10" ; pset:value 0.0 ] , [ lv2:symbol "position_11" ; pset:value 0.0 ] , [ lv2:symbol "position_12" ; pset:value 0.0 ] , [ lv2:symbol "position_13" ; pset:value 0.0 ] , [ lv2:symbol "position_14" ; pset:value 0.0 ] , [ lv2:symbol "position_15" ; pset:value 0.0 ] , [ lv2:symbol "release" ; pset:value 0.2 ] , [ lv2:symbol "sequences_per_bar" ; pset:value 4.0 ] , [ lv2:symbol "swing" ; pset:value 1.0 ] ; state:state [ "0"^^xsd:int ] . BChoppr-1.10.10/BChoppr_Faster_louder_chopper.ttl000066400000000000000000000054171411663013200216730ustar00rootroot00000000000000@prefix atom: . @prefix lv2: . @prefix pset: . @prefix rdf: . @prefix rdfs: . @prefix state: . @prefix xsd: . a pset:Preset ; lv2:appliesTo ; rdfs:label "Faster, louder, chopper!" ; lv2:port [ lv2:symbol "amp_swing" ; pset:value 1.0 ] , [ lv2:symbol "attack" ; pset:value 0.2 ] , [ lv2:symbol "blend" ; pset:value 2.0 ] , [ lv2:symbol "bypass" ; pset:value 0.0 ] , [ lv2:symbol "dry_wet" ; pset:value 1.0 ] , [ lv2:symbol "level_01" ; pset:value 0.65 ] , [ lv2:symbol "level_02" ; pset:value 0.0 ] , [ lv2:symbol "level_03" ; pset:value 0.7 ] , [ lv2:symbol "level_04" ; pset:value 0.05 ] , [ lv2:symbol "level_05" ; pset:value 0.75 ] , [ lv2:symbol "level_06" ; pset:value 0.1 ] , [ lv2:symbol "level_07" ; pset:value 0.8 ] , [ lv2:symbol "level_08" ; pset:value 0.15 ] , [ lv2:symbol "level_09" ; pset:value 0.85 ] , [ lv2:symbol "level_10" ; pset:value 0.2 ] , [ lv2:symbol "level_11" ; pset:value 0.9 ] , [ lv2:symbol "level_12" ; pset:value 0.25 ] , [ lv2:symbol "level_13" ; pset:value 0.95 ] , [ lv2:symbol "level_14" ; pset:value 0.30 ] , [ lv2:symbol "level_15" ; pset:value 1.0 ] , [ lv2:symbol "level_16" ; pset:value 0.35 ] , [ lv2:symbol "number_steps" ; pset:value 16.0 ] , [ lv2:symbol "position_01" ; pset:value 0.3125 ] , [ lv2:symbol "position_02" ; pset:value 0.35864979 ] , [ lv2:symbol "position_03" ; pset:value 0.52531648 ] , [ lv2:symbol "position_04" ; pset:value 0.56118143 ] , [ lv2:symbol "position_05" ; pset:value 0.68143457 ] , [ lv2:symbol "position_06" ; pset:value 0.71518987 ] , [ lv2:symbol "position_07" ; pset:value 0.78059071 ] , [ lv2:symbol "position_08" ; pset:value 0.80590719 ] , [ lv2:symbol "position_09" ; pset:value 0.85232067 ] , [ lv2:symbol "position_10" ; pset:value 0.87341774 ] , [ lv2:symbol "position_11" ; pset:value 0.90506327 ] , [ lv2:symbol "position_12" ; pset:value 0.92194092 ] , [ lv2:symbol "position_13" ; pset:value 0.94936711 ] , [ lv2:symbol "position_14" ; pset:value 0.96413505 ] , [ lv2:symbol "position_15" ; pset:value 0.98945147 ] , [ lv2:symbol "release" ; pset:value 0.2 ] , [ lv2:symbol "sequences_per_bar" ; pset:value 1.0 ] , [ lv2:symbol "swing" ; pset:value 1.0 ] ; state:state [ "0"^^xsd:int ] . BChoppr-1.10.10/BChoppr_Jittery_Jim.ttl000066400000000000000000000054401411663013200176020ustar00rootroot00000000000000@prefix atom: . @prefix lv2: . @prefix pset: . @prefix rdf: . @prefix rdfs: . @prefix state: . @prefix xsd: . a pset:Preset ; lv2:appliesTo ; rdfs:label "Jittery Jim" ; lv2:port [ lv2:symbol "amp_swing" ; pset:value 1.0 ] , [ lv2:symbol "attack" ; pset:value 0.2 ] , [ lv2:symbol "blend" ; pset:value 1.0 ] , [ lv2:symbol "bypass" ; pset:value 0.0 ] , [ lv2:symbol "dry_wet" ; pset:value 1.0 ] , [ lv2:symbol "level_01" ; pset:value 0.86000001 ] , [ lv2:symbol "level_02" ; pset:value 0.05 ] , [ lv2:symbol "level_03" ; pset:value 0.58999997 ] , [ lv2:symbol "level_04" ; pset:value 0.01 ] , [ lv2:symbol "level_05" ; pset:value 0.87 ] , [ lv2:symbol "level_06" ; pset:value 0.13 ] , [ lv2:symbol "level_07" ; pset:value 0.54000002 ] , [ lv2:symbol "level_08" ; pset:value 0.02 ] , [ lv2:symbol "level_09" ; pset:value 0.67000002 ] , [ lv2:symbol "level_10" ; pset:value 0.07 ] , [ lv2:symbol "level_11" ; pset:value 0.43000001 ] , [ lv2:symbol "level_12" ; pset:value 0.02 ] , [ lv2:symbol "level_13" ; pset:value 0.81999999 ] , [ lv2:symbol "level_14" ; pset:value 0.25999999 ] , [ lv2:symbol "level_15" ; pset:value 0.62 ] , [ lv2:symbol "level_16" ; pset:value 0.08 ] , [ lv2:symbol "number_steps" ; pset:value 16.0 ] , [ lv2:symbol "position_01" ; pset:value 0.04852321 ] , [ lv2:symbol "position_02" ; pset:value 0.12447257 ] , [ lv2:symbol "position_03" ; pset:value 0.15822785 ] , [ lv2:symbol "position_04" ; pset:value 0.275 ] , [ lv2:symbol "position_05" ; pset:value 0.3 ] , [ lv2:symbol "position_06" ; pset:value 0.35654008 ] , [ lv2:symbol "position_07" ; pset:value 0.39873418 ] , [ lv2:symbol "position_08" ; pset:value 0.48101267 ] , [ lv2:symbol "position_09" ; pset:value 0.51898736 ] , [ lv2:symbol "position_10" ; pset:value 0.60970461 ] , [ lv2:symbol "position_11" ; pset:value 0.65189874 ] , [ lv2:symbol "position_12" ; pset:value 0.74894518 ] , [ lv2:symbol "position_13" ; pset:value 0.8101266 ] , [ lv2:symbol "position_14" ; pset:value 0.86497891 ] , [ lv2:symbol "position_15" ; pset:value 0.90717298 ] , [ lv2:symbol "release" ; pset:value 0.2 ] , [ lv2:symbol "sequences_per_bar" ; pset:value 4.0 ] , [ lv2:symbol "swing" ; pset:value 1.0 ] ; state:state [ "0"^^xsd:int ] . BChoppr-1.10.10/BChoppr_Raving_loony.ttl000066400000000000000000000052141411663013200200160ustar00rootroot00000000000000@prefix atom: . @prefix lv2: . @prefix pset: . @prefix rdf: . @prefix rdfs: . @prefix state: . @prefix xsd: . a pset:Preset ; lv2:appliesTo ; rdfs:label "Raving loony" ; lv2:port [ lv2:symbol "amp_swing" ; pset:value 1.0 ] , [ lv2:symbol "attack" ; pset:value 0.2 ] , [ lv2:symbol "blend" ; pset:value 1.0 ] , [ lv2:symbol "bypass" ; pset:value 0.0 ] , [ lv2:symbol "dry_wet" ; pset:value 1.0 ] , [ lv2:symbol "level_01" ; pset:value 1.0 ] , [ lv2:symbol "level_02" ; pset:value 1.0 ] , [ lv2:symbol "level_03" ; pset:value 1.0 ] , [ lv2:symbol "level_04" ; pset:value 1.0 ] , [ lv2:symbol "level_05" ; pset:value 0.1 ] , [ lv2:symbol "level_06" ; pset:value 1.0 ] , [ lv2:symbol "level_07" ; pset:value 0.1 ] , [ lv2:symbol "level_08" ; pset:value 1.0 ] , [ lv2:symbol "level_09" ; pset:value 0.1 ] , [ lv2:symbol "level_10" ; pset:value 1.0 ] , [ lv2:symbol "level_11" ; pset:value 1.0 ] , [ lv2:symbol "level_12" ; pset:value 0.1 ] , [ lv2:symbol "level_13" ; pset:value 1.0 ] , [ lv2:symbol "level_14" ; pset:value 1.0 ] , [ lv2:symbol "level_15" ; pset:value 0.1 ] , [ lv2:symbol "level_16" ; pset:value 0.1 ] , [ lv2:symbol "number_steps" ; pset:value 16.0 ] , [ lv2:symbol "position_01" ; pset:value 0.0 ] , [ lv2:symbol "position_02" ; pset:value 0.0 ] , [ lv2:symbol "position_03" ; pset:value 0.0 ] , [ lv2:symbol "position_04" ; pset:value 0.0 ] , [ lv2:symbol "position_05" ; pset:value 0.0 ] , [ lv2:symbol "position_06" ; pset:value 0.0 ] , [ lv2:symbol "position_07" ; pset:value 0.0 ] , [ lv2:symbol "position_08" ; pset:value 0.0 ] , [ lv2:symbol "position_09" ; pset:value 0.0 ] , [ lv2:symbol "position_10" ; pset:value 0.0 ] , [ lv2:symbol "position_11" ; pset:value 0.0 ] , [ lv2:symbol "position_12" ; pset:value 0.0 ] , [ lv2:symbol "position_13" ; pset:value 0.0 ] , [ lv2:symbol "position_14" ; pset:value 0.0 ] , [ lv2:symbol "position_15" ; pset:value 0.0 ] , [ lv2:symbol "release" ; pset:value 0.2 ] , [ lv2:symbol "sequences_per_bar" ; pset:value 4.0 ] , [ lv2:symbol "swing" ; pset:value 1.0 ] ; state:state [ "0"^^xsd:int ] . BChoppr-1.10.10/BChoppr_Stall_the_engine.ttl000066400000000000000000000054051411663013200206160ustar00rootroot00000000000000@prefix atom: . @prefix lv2: . @prefix pset: . @prefix rdf: . @prefix rdfs: . @prefix state: . @prefix xsd: . a pset:Preset ; lv2:appliesTo ; rdfs:label "Stall the engine" ; lv2:port [ lv2:symbol "amp_swing" ; pset:value 1.0 ] , [ lv2:symbol "attack" ; pset:value 0.2 ] , [ lv2:symbol "blend" ; pset:value 2.0 ] , [ lv2:symbol "bypass" ; pset:value 0.0 ] , [ lv2:symbol "dry_wet" ; pset:value 1.0 ] , [ lv2:symbol "level_01" ; pset:value 1.0 ] , [ lv2:symbol "level_02" ; pset:value 0.2 ] , [ lv2:symbol "level_03" ; pset:value 0.8 ] , [ lv2:symbol "level_04" ; pset:value 0.16 ] , [ lv2:symbol "level_05" ; pset:value 0.6 ] , [ lv2:symbol "level_06" ; pset:value 0.12 ] , [ lv2:symbol "level_07" ; pset:value 0.4 ] , [ lv2:symbol "level_08" ; pset:value 0.08 ] , [ lv2:symbol "level_09" ; pset:value 0.2 ] , [ lv2:symbol "level_10" ; pset:value 0.04 ] , [ lv2:symbol "level_11" ; pset:value 0.1 ] , [ lv2:symbol "level_12" ; pset:value 0.02 ] , [ lv2:symbol "level_13" ; pset:value 0.05 ] , [ lv2:symbol "level_14" ; pset:value 0.01 ] , [ lv2:symbol "level_15" ; pset:value 0.025 ] , [ lv2:symbol "level_16" ; pset:value 0.0 ] , [ lv2:symbol "number_steps" ; pset:value 16.0 ] , [ lv2:symbol "position_01" ; pset:value 0.25527427 ] , [ lv2:symbol "position_02" ; pset:value 0.28691983 ] , [ lv2:symbol "position_03" ; pset:value 0.43670887 ] , [ lv2:symbol "position_04" ; pset:value 0.47046414 ] , [ lv2:symbol "position_05" ; pset:value 0.56329113 ] , [ lv2:symbol "position_06" ; pset:value 0.59071732 ] , [ lv2:symbol "position_07" ; pset:value 0.65822786 ] , [ lv2:symbol "position_08" ; pset:value 0.68565398 ] , [ lv2:symbol "position_09" ; pset:value 0.71729958 ] , [ lv2:symbol "position_10" ; pset:value 0.73628694 ] , [ lv2:symbol "position_11" ; pset:value 0.75949365 ] , [ lv2:symbol "position_12" ; pset:value 0.78059071 ] , [ lv2:symbol "position_13" ; pset:value 0.79535866 ] , [ lv2:symbol "position_14" ; pset:value 0.8101266 ] , [ lv2:symbol "position_15" ; pset:value 0.82489449 ] , [ lv2:symbol "release" ; pset:value 0.2 ] , [ lv2:symbol "sequences_per_bar" ; pset:value 1.0 ] , [ lv2:symbol "swing" ; pset:value 1.0 ] ; state:state [ "0"^^xsd:int ] . BChoppr-1.10.10/BChoppr_Waltz_through_Vienna.ttl000066400000000000000000000052431411663013200215130ustar00rootroot00000000000000@prefix atom: . @prefix lv2: . @prefix pset: . @prefix rdf: . @prefix rdfs: . @prefix state: . @prefix xsd: . a pset:Preset ; lv2:appliesTo ; rdfs:label "Waltz through Vienna" ; lv2:port [ lv2:symbol "amp_swing" ; pset:value 1.0 ] , [ lv2:symbol "attack" ; pset:value 0.2 ] , [ lv2:symbol "blend" ; pset:value 1.0 ] , [ lv2:symbol "bypass" ; pset:value 0.0 ] , [ lv2:symbol "dry_wet" ; pset:value 1.0 ] , [ lv2:symbol "level_01" ; pset:value 1.0 ] , [ lv2:symbol "level_02" ; pset:value 0.1 ] , [ lv2:symbol "level_03" ; pset:value 0.5 ] , [ lv2:symbol "level_04" ; pset:value 0.1 ] , [ lv2:symbol "level_05" ; pset:value 0.5 ] , [ lv2:symbol "level_06" ; pset:value 0.1 ] , [ lv2:symbol "level_07" ; pset:value 1.0 ] , [ lv2:symbol "level_08" ; pset:value 1.0 ] , [ lv2:symbol "level_09" ; pset:value 1.0 ] , [ lv2:symbol "level_10" ; pset:value 1.0 ] , [ lv2:symbol "level_11" ; pset:value 1.0 ] , [ lv2:symbol "level_12" ; pset:value 1.0 ] , [ lv2:symbol "level_13" ; pset:value 1.0 ] , [ lv2:symbol "level_14" ; pset:value 1.0 ] , [ lv2:symbol "level_15" ; pset:value 1.0 ] , [ lv2:symbol "level_16" ; pset:value 1.0 ] , [ lv2:symbol "number_steps" ; pset:value 6.0 ] , [ lv2:symbol "position_01" ; pset:value 0.345 ] , [ lv2:symbol "position_02" ; pset:value 0.36 ] , [ lv2:symbol "position_03" ; pset:value 0.665 ] , [ lv2:symbol "position_04" ; pset:value 0.68 ] , [ lv2:symbol "position_05" ; pset:value 0.985 ] , [ lv2:symbol "position_06" ; pset:value 0.0 ] , [ lv2:symbol "position_07" ; pset:value 0.0 ] , [ lv2:symbol "position_08" ; pset:value 0.0 ] , [ lv2:symbol "position_09" ; pset:value 0.0 ] , [ lv2:symbol "position_10" ; pset:value 0.0 ] , [ lv2:symbol "position_11" ; pset:value 0.0 ] , [ lv2:symbol "position_12" ; pset:value 0.0 ] , [ lv2:symbol "position_13" ; pset:value 0.0 ] , [ lv2:symbol "position_14" ; pset:value 0.0 ] , [ lv2:symbol "position_15" ; pset:value 0.0 ] , [ lv2:symbol "release" ; pset:value 0.2 ] , [ lv2:symbol "sequences_per_bar" ; pset:value 1.0 ] , [ lv2:symbol "swing" ; pset:value 1.0 ] ; state:state [ "0"^^xsd:int ] . BChoppr-1.10.10/LICENSE000066400000000000000000001045131411663013200142150ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . BChoppr-1.10.10/README.md000066400000000000000000000142411411663013200144650ustar00rootroot00000000000000# B.Choppr An audio stream chopping LV2 plugin. Description: B.Choppr cuts the audio input stream into a repeated sequence of up to 16 chops. Each chop can be leveled up or down (gating). B.Choppr is the successor of B.Slizr. ![screenshot](https://raw.githubusercontent.com/sjaehn/BChoppr/master/doc/screenshot.png "Screenshot from B.Choppr") ## Installation a) Install the bchoppr package for your system * [Arch](https://archlinux.org/packages/community/x86_64/bchoppr/) by dvzrv * [FreeBSD](https://www.freshports.org/audio/bchoppr-lv2) by Yuri * [Guix](https://guix.gnu.org/packages/bchoppr-1.8.0/) * [NixOS](https://github.com/NixOS/nixpkgs/blob/release-20.09/pkgs/applications/audio/bchoppr/default.nix#L23) by magnetophon * [Parabola](https://www.parabola.nu/packages/?q=bchoppr) by Erich Eckner * [openSUSE](https://software.opensuse.org/package/BChoppr) * [Ubuntu](https://launchpad.net/ubuntu/+source/bchoppr) by Erich Eickmeyer * Check https://repology.org/project/bchoppr/versions for other systems Note: This will NOT necessarily install the latest version of B.Choppr. The version provided depends on the packagers. b) Use the latest provided binaries Unpack the provided bchoppr-\*.zip or bchoppr-\*.tar.xz from the latest release and copy the BChoppr.lv2 folder to your lv2 directory (depending on your system settings, ~/.lv2/, /usr/lib/lv2/, /usr/local/lib/lv2/, or ...). c) Build your own binaries in the following three steps. Step 1: [Download the latest published version](https://github.com/sjaehn/BChoppr/releases) of B.Choppr. Or clone or [download the master](https://github.com/sjaehn/BChoppr/archive/master.zip) of this repository. Step 2: Install pkg-config and the development packages for x11, cairo, and lv2 if not done yet. If you don't have already got the build tools (compilers, make, libraries) then install them too. On Debian-based systems you may run: ``` sudo apt-get install build-essential sudo apt-get install pkg-config libx11-dev libcairo2-dev lv2-dev ``` On Arch-based systems you may run: ``` sudo pacman -S base-devel sudo pacman -S pkg-config libx11 cairo lv2 ``` Step 3: Building and installing into the default lv2 directory (/usr/local/lib/lv2/) is easy using `make` and `make install`. Simply call: ``` make sudo make install ``` **Optional:** Standard `make` and `make install` parameters are supported. Alternatively, you may build a debugging version using `make CXXFLAGS+=-g`. For installation into an alternative directory (e.g., /usr/lib/lv2/), change the variable `PREFIX` while installing: `sudo make install PREFIX=/usr`. If you want to freely choose the install target directory, change the variable `LV2DIR` (e.g., `make install LV2DIR=~/.lv2`) or even define `DESTDIR`. **Optional:** Further supported parameters include `LANGUAGE` (usually two letters code) to change the GUI language (see customize). ## Running After the installation Ardour, Carla, and any other LV2 host should automatically detect B.Choppr. If jalv is installed, you can also call it ``` jalv.gtk https://www.jahnichen.de/plugins/lv2/BChoppr ``` to run it (pseudo) stand-alone and connect it to the JACK system. Note: **Jack transport is required to get information about beat / position** ## Usage The plugin slices a stereo input stream, amplifies or silences the individual slices and send the whole sequence to the output. Although this affects only the audio signal, it needs a playback running (Jack transport). In addition to the global controllers, the interface is divided into three parts: step controls, monitor and step shape. ### Global * **Bypass** : Bypass B.Choppr * **Dry/wet** : Dry / wet mixing ### Step controls * **Step markers** : Defines the size of each step. Drag markers to relocate. Right click to switch between automatic and manual placement * **Step level control** : Sound level for each individual step * **Sequences per bar** : Number of sequences in one bar (1..8) * **Amp swing** : Sets all level sliders to a swing pattern (0.001 .. 1000.0). Values lower than 1 mean reduction of odd step level. Values higher than 1 mean reduction of even step level. * **Steps swing** : Sets all automatic markers to a swing pattern (1:3..3:1) * **Auto markers** : Sets all markers to automatic placement * **Number of steps** : Number of steps in one sequence (1..16) ### Monitor * **On/Off switch** : Switches monitor and monitor <-> plugin communication on/off. Reduces CPU load. * **Monitor** : Visualization (l + r signal) the input / output signal for a whole sequence. Use mouse wheel or drag to zoom in or out. ### Step shape * **Blend** : Select between linear (for trapezoid shapes) and sinusoidal blend between the steps * **Attack** : Time (fraction of the respective step length) to increase the level at the begin of each step * **Decay** : Time (fraction of the respective step length) to decrease the level at the end of each step * **Monitor** : Visualization of a single step ### 🔗 Shared data If you use multiple instances of B.Choppr you may be interested in sharing the plugin settings between the instances. Click on one of the four shared data fields and the respective plugin instance is linked to the shared data. The plugin instance data are copied to the shared data field if no other plugin instance is linked to this shared data field before (otherwise *vise versa*). If you now click on the same shared data box in another plugin instance, both plugin instances get the same data. Click again on the selected box to unlink the plugin instance from shared data. The plugin now shows the host-provided data. Note: Shared data are unlinked from host automation. ## Customize You can create customized builds of B.Choppr using the parameter `LANGUAGE` (e.g., `make LANGUAGE=DE`). To create a new language pack, copy `src/Locale_EN.hpp` and edit the text for the respective definitions. But do not change or delete any definition symbol! ## What's new * Faster * Optimized DSP code * Compiler optimizations (`-O3 -ffast-math`) * Presets, just a few * Binary compatibility improved * Static libs * Strip symbols by default * Binary packages provided ## Acknowledgments * Thanks to LAM for translation ## Links * Tutorial video: https://youtu.be/PuzoxiAs-h8 BChoppr-1.10.10/doc/000077500000000000000000000000001411663013200137515ustar00rootroot00000000000000BChoppr-1.10.10/doc/screenshot.png000066400000000000000000004670711411663013200166530ustar00rootroot00000000000000PNG  IHDR-/sBIT|dtEXtSoftwaregnome-screenshot>*tEXtCreation TimeFr 10 Sep 2021 12:13:56 CESTeh IDATxw`eǿ̶$! GQ:H"Dņ;vSO<Ӡ9Nq4̝;7B2 醒~Q8YJRHuہ*" } 77E`߅ZN hE?ƅ*va&$$K.طobbbW_w_d0 F}ҁQy}2v/A^y8n[,4mW+}W1F<ڵbߏ̙3U[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nx>6&B, 5W%*!-_c\呭p8΃erxY$l]?1A}U_P.B!DFS?fB!b =B!EJ]!FG!B 'AB!.oB!eKZB!p !BQ$B!IP/B!D^!B 'AB!Nz!B!*B!BToIENDB`BChoppr-1.10.10/makefile000066400000000000000000000107231411663013200147070ustar00rootroot00000000000000SHELL = /bin/sh PKG_CONFIG ?= pkg-config GUI_LIBS += x11 cairo LV2_LIBS += lv2 ifneq ($(shell $(PKG_CONFIG) --exists fontconfig || echo no), no) override GUI_LIBS += fontconfig override GUIPPFLAGS += -DPKG_HAVE_FONTCONFIG endif CC ?= gcc CXX ?= g++ INSTALL ?= install INSTALL_PROGRAM ?= $(INSTALL) INSTALL_DATA ?= $(INSTALL) -m644 STRIP ?= strip PREFIX ?= /usr/local LV2DIR ?= $(PREFIX)/lib/lv2 OPTIMIZATIONS ?=-O3 -ffast-math CFLAGS ?=-Wall CXXFLAGS ?=-Wall STRIPFLAGS ?=-s LDFLAGS ?=-Wl,-Bstatic -Wl,-Bdynamic -Wl,--as-needed override CFLAGS += -std=c99 -fvisibility=hidden -fPIC override CXXFLAGS += -std=c++11 -fvisibility=hidden -fPIC override LDFLAGS += -shared -pthread override GUIPPFLAGS += -DPUGL_HAVE_CAIRO DSPCFLAGS += `$(PKG_CONFIG) --cflags $(LV2_LIBS)` GUICFLAGS += `$(PKG_CONFIG) --cflags $(GUI_LIBS)` DSPLIBS += -lm `$(PKG_CONFIG) --libs $(LV2_LIBS)` GUILIBS += -lm `$(PKG_CONFIG) --libs $(GUI_LIBS)` ifeq ($(shell test -e src/Locale_$(LANGUAGE).hpp && echo -n yes),yes) override GUIPPFLAGS += -DLOCALEFILE=\"Locale_$(LANGUAGE).hpp\" endif ifdef WWW_BROWSER_CMD override GUIPPFLAGS += -DWWW_BROWSER_CMD=\"$(WWW_BROWSER_CMD)\" endif BUNDLE = BChoppr.lv2 DSP = BChoppr DSP_SRC = ./src/BChoppr.cpp GUI = BChoppr_GUI GUI_SRC = ./src/BChoppr_GUI.cpp OBJ_EXT = .so DSP_OBJ = $(DSP)$(OBJ_EXT) GUI_OBJ = $(GUI)$(OBJ_EXT) B_OBJECTS = $(addprefix $(BUNDLE)/, $(DSP_OBJ) $(GUI_OBJ)) FILES = *.ttl surface.png LICENSE B_FILES = $(addprefix $(BUNDLE)/, $(FILES)) DSP_INCL = src/Message.cpp GUI_CXX_INCL = \ src/BWidgets/BItems.cpp \ src/BWidgets/UpButton.cpp \ src/BWidgets/DownButton.cpp \ src/BWidgets/ToggleButton.cpp \ src/BWidgets/TextButton.cpp \ src/BWidgets/Button.cpp \ src/BWidgets/ChoiceBox.cpp \ src/BWidgets/ListBox.cpp \ src/BWidgets/DrawingSurface.cpp \ src/BWidgets/DialValue.cpp \ src/BWidgets/Dial.cpp \ src/BWidgets/VSliderValue.cpp \ src/BWidgets/VSlider.cpp \ src/BWidgets/VScale.cpp \ src/BWidgets/HSwitch.cpp \ src/BWidgets/HSliderValue.cpp \ src/BWidgets/HSlider.cpp \ src/BWidgets/HScale.cpp \ src/BWidgets/RangeWidget.cpp \ src/BWidgets/ValueWidget.cpp \ src/BWidgets/Knob.cpp \ src/BWidgets/Label.cpp \ src/BWidgets/Window.cpp \ src/BWidgets/Widget.cpp \ src/BWidgets/BStyles.cpp \ src/BWidgets/BColors.cpp \ src/BUtilities/to_string.cpp \ src/BUtilities/stof.cpp \ src/BUtilities/vsystem.cpp GUI_C_INCL = \ src/screen.c \ src/BWidgets/cairoplus.c \ src/BWidgets/pugl/implementation.c \ src/BWidgets/pugl/x11_stub.c \ src/BWidgets/pugl/x11_cairo.c \ src/BWidgets/pugl/x11.c ifeq ($(shell $(PKG_CONFIG) --exists 'lv2 >= 1.12.4' || echo no), no) $(error lv2 >= 1.12.4 not found. Please install lv2 >= 1.12.4 first.) endif ifeq ($(shell $(PKG_CONFIG) --exists 'x11 >= 1.6.0' || echo no), no) $(error x11 >= 1.6.0 not found. Please install x11 >= 1.6.0 first.) endif ifeq ($(shell $(PKG_CONFIG) --exists 'cairo >= 1.12.0' || echo no), no) $(error cairo >= 1.12.0 not found. Please install cairo >= 1.12.0 first.) endif $(BUNDLE): clean $(DSP_OBJ) $(GUI_OBJ) @cp $(FILES) $(BUNDLE) all: $(BUNDLE) $(DSP_OBJ): $(DSP_SRC) @echo -n Build $(BUNDLE) DSP... @mkdir -p $(BUNDLE) @$(CXX) $(CPPFLAGS) $(OPTIMIZATIONS) $(CXXFLAGS) $(LDFLAGS) $(DSPCFLAGS) -Wl,--start-group $(DSPLIBS) $< $(DSP_INCL) -Wl,--end-group -o $(BUNDLE)/$@ @$(STRIP) $(STRIPFLAGS) $(BUNDLE)/$@ @echo \ done. $(GUI_OBJ): $(GUI_SRC) @echo -n Build $(BUNDLE) GUI... @mkdir -p $(BUNDLE) @mkdir -p $(BUNDLE)/tmp @cd $(BUNDLE)/tmp; $(CC) $(CPPFLAGS) $(GUIPPFLAGS) $(CFLAGS) $(GUICFLAGS) $(addprefix ../../, $(GUI_C_INCL)) -c @cd $(BUNDLE)/tmp; $(CXX) $(CPPFLAGS) $(GUIPPFLAGS) $(CXXFLAGS) $(GUICFLAGS) $(addprefix ../../, $< $(GUI_CXX_INCL)) -c @$(CXX) $(CPPFLAGS) $(GUIPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(GUICFLAGS) -Wl,--start-group $(GUILIBS) $(BUNDLE)/tmp/*.o -Wl,--end-group -o $(BUNDLE)/$@ @$(STRIP) $(STRIPFLAGS) $(BUNDLE)/$@ @rm -rf $(BUNDLE)/tmp @echo \ done. install: @echo -n Install $(BUNDLE) to $(DESTDIR)$(LV2DIR)... @$(INSTALL) -d $(DESTDIR)$(LV2DIR)/$(BUNDLE) @$(INSTALL_PROGRAM) -m755 $(B_OBJECTS) $(DESTDIR)$(LV2DIR)/$(BUNDLE) @$(INSTALL_DATA) $(B_FILES) $(DESTDIR)$(LV2DIR)/$(BUNDLE) @cp -R $(BUNDLE) $(DESTDIR)$(LV2DIR) @echo \ done. uninstall: @echo -n Uninstall $(BUNDLE)... @rm -f $(addprefix $(DESTDIR)$(LV2DIR)/$(BUNDLE)/, $(FILES)) @rm -f $(DESTDIR)$(LV2DIR)/$(BUNDLE)/$(GUI_OBJ) @rm -f $(DESTDIR)$(LV2DIR)/$(BUNDLE)/$(DSP_OBJ) -@rmdir $(DESTDIR)$(LV2DIR)/$(BUNDLE) @echo \ done. clean: @rm -rf $(BUNDLE) .PHONY: all install uninstall clean .NOTPARALLEL: BChoppr-1.10.10/manifest.ttl000066400000000000000000000006551411663013200155450ustar00rootroot00000000000000@prefix lv2: . @prefix rdfs: . @prefix ui: . a lv2:Plugin ; lv2:binary ; rdfs:seeAlso . a ui:X11UI; ui:binary ; rdfs:seeAlso . BChoppr-1.10.10/src/000077500000000000000000000000001411663013200137735ustar00rootroot00000000000000BChoppr-1.10.10/src/BChoppr.cpp000066400000000000000000000541521411663013200160430ustar00rootroot00000000000000/* B.Choppr * Step Sequencer Effect Plugin * * Copyright (C) 2018, 2019 by Sven Jähnichen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "BChoppr.hpp" #include #include #include #include #include "SharedData.hpp" #define LIM(g , min, max) ((g) > (max) ? (max) : ((g) < (min) ? (min) : (g))) static SharedData sharedData[4] = {SharedData(), SharedData(), SharedData(), SharedData()}; BChoppr::BChoppr (double samplerate, const LV2_Feature* const* features) : map(NULL), rate(samplerate), bpm(120.0f), speed(1), position(0), beatsPerBar (4), beatUnit (4), refFrame(0), prevStep(0), actStep(0), nextStep(1), pos (0), audioInput1(NULL), audioInput2(NULL), audioOutput1(NULL), audioOutput2(NULL), sharedDataNr (0), controlPtrs {nullptr}, controllers {0.0f}, stepPositions {0.0}, controlPort1(NULL), controlPort2(NULL), notifyPort(NULL), record_on(false), notify_sharedData (false), notify_controllers {false}, monitorpos(-1), message () { // Init array members notifications.fill (defaultNotification); monitor.fill (defaultMonitorData); std::fill (stepAutoPositions, stepAutoPositions + MAXSTEPS - 1, true); //Scan host features for URID map LV2_URID_Map* m = NULL; for (int i = 0; features[i]; ++i) { if (strcmp(features[i]->URI, LV2_URID__map) == 0) { m = (LV2_URID_Map*) features[i]->data; } } if (!m) throw std::invalid_argument ("Host does not support urid:map"); //Map URIS map = m; getURIs (m, &uris); // Initialize forge lv2_atom_forge_init (&forge,map); recalculateAutoPositions (); } BChoppr::~BChoppr () { if ((sharedDataNr > 0) && (sharedDataNr <= 4)) sharedData[sharedDataNr - 1].unlink (this); } void BChoppr::connect_port(uint32_t port, void *data) { switch (port) { case Control_1: controlPort1 = (LV2_Atom_Sequence*) data; break; case Control_2: controlPort2 = (LV2_Atom_Sequence*) data; break; case Notify: notifyPort = (LV2_Atom_Sequence*) data; break; case AudioIn_1: audioInput1 = (float*) data; break; case AudioIn_2: audioInput2 = (float*) data; break; case AudioOut_1: audioOutput1 = (float*) data; break; case AudioOut_2: audioOutput2 = (float*) data; break; default: if ((port >= Controllers) && (port < Controllers + NrControllers)) controlPtrs[port - Controllers] = (float*) data; } } void BChoppr::run (uint32_t n_samples) { // Check ports if ((!controlPort1) || (!controlPort2) || (!notifyPort) || (!audioInput1) || (!audioInput2) || (!audioOutput1) || (!audioOutput2)) return; for (int i = 0; i < NrControllers; ++i) { if (!controlPtrs[i]) return; } // Update controller values for (int i = 0; i < NrControllers; ++i) { float newValue = readController (i); if (newValue != controllers[i]) { setController (i, newValue); if ((sharedDataNr >= 1) && (sharedDataNr <= 4)) notify_controllers[i] = true; } } // Process GUI data const LV2_Atom_Event* ev2 = lv2_atom_sequence_begin(&(controlPort2)->body); while (!lv2_atom_sequence_is_end (&controlPort2->body, controlPort2->atom.size, ev2)) { if (lv2_atom_forge_is_object_type(&forge, ev2->body.type)) { const LV2_Atom_Object* obj2 = (const LV2_Atom_Object*)&ev2->body; // UI on if (obj2->body.otype == uris.ui_on) { record_on = true; notify_sharedData = true; std::fill (notify_controllers, notify_controllers + NrControllers, true); } // UI off else if (obj2->body.otype == uris.ui_off) record_on = false; // Linked / unlinked to shared data else if (obj2->body.otype == uris.notify_sharedDataLinkEvent) { LV2_Atom *oNr = NULL; lv2_atom_object_get ( obj2, uris.notify_sharedDataNr, &oNr, NULL ); if (oNr && (oNr->type == uris.atom_Int)) { const int nr = ((LV2_Atom_Int*)oNr)->body; if ((nr >= 0) && (nr <= 4) && (nr != sharedDataNr)) { if (sharedDataNr != 0) sharedData[sharedDataNr - 1].unlink (this); if ((nr != 0) && sharedData[nr - 1].empty()) { for (int i = 0; i < NrControllers; ++i) sharedData[nr - 1].set (i, controllers[i]); } if (nr != 0) sharedData[nr - 1].link (this); sharedDataNr = nr; notify_sharedData = true; for (int i = 0; i < NrControllers; ++i) { float newValue = readController (i); if (newValue != controllers[i]) { setController (i, newValue); notify_controllers[i] = true; } } } } } // Controller changed else if ((obj2->body.otype == uris.notify_controllerEvent) && (sharedDataNr != 0)) { LV2_Atom *oNr = NULL, *oVal = NULL; lv2_atom_object_get ( obj2, uris.notify_controllerNr, &oNr, uris.notify_controllerValue, &oVal, NULL ); if (oNr && (oNr->type == uris.atom_Int) && oVal && (oVal->type == uris.atom_Float)) { const int nr = ((LV2_Atom_Int*)oNr)->body; if ((nr >= 0) && (nr < NrControllers)) { const float val = controllerLimits[nr].validate(((LV2_Atom_Float*)oVal)->body); if ((sharedDataNr > 0) && (sharedDataNr <= 4)) sharedData[sharedDataNr - 1].set (nr, val); setController (nr, val); } } } } ev2 = lv2_atom_sequence_next(ev2); } // Prepare forge buffer and initialize atom sequence const uint32_t space = notifyPort->atom.size; lv2_atom_forge_set_buffer(&forge, (uint8_t*) notifyPort, space); lv2_atom_forge_sequence_head(&forge, ¬ify_frame, 0); const LV2_Atom_Sequence* in = controlPort1; uint32_t last_t =0; // Process audio data for (const LV2_Atom_Event* ev1 = lv2_atom_sequence_begin(&in->body); !lv2_atom_sequence_is_end(&in->body, in->atom.size, ev1); ev1 = lv2_atom_sequence_next(ev1)) { if ((ev1->body.type == uris.atom_Object) || (ev1->body.type == uris.atom_Blank)) { //update bpm, speed, position LV2_Atom *oBbeat = NULL, *oBpm = NULL, *oSpeed = NULL, *oBpb = NULL, *oBu = NULL; const LV2_Atom_Object* obj = (const LV2_Atom_Object*)&ev1->body; lv2_atom_object_get (obj, uris.time_barBeat, &oBbeat, uris.time_beatsPerMinute, &oBpm, uris.time_beatsPerBar, &oBpb, uris.time_beatUnit, &oBu, uris.time_speed, &oSpeed, NULL); // BPM changed? if (oBpm && (oBpm->type == uris.atom_Float)) { float nbpm = ((LV2_Atom_Float*)oBpm)->body; if (bpm != nbpm) { bpm = nbpm; if (nbpm < 1.0) message.setMessage (JACK_STOP_MSG); else message.deleteMessage (JACK_STOP_MSG); } } // Beats per bar changed? if (oBpb && (oBpb->type == uris.atom_Float) && (((LV2_Atom_Float*)oBpb)->body > 0)) beatsPerBar = ((LV2_Atom_Float*)oBpb)->body; // BeatUnit changed? if (oBu && (oBu->type == uris.atom_Int) && (((LV2_Atom_Int*)oBu)->body > 0)) beatUnit = ((LV2_Atom_Int*)oBu)->body; // Speed changed? if (oSpeed && (oSpeed->type == uris.atom_Float)) { float nspeed = ((LV2_Atom_Float*)oSpeed)->body; if (speed != nspeed) { speed = nspeed; if (nspeed == 0.0) message.setMessage (JACK_STOP_MSG); else message.deleteMessage (JACK_STOP_MSG); } } // Beat position changed (during playing) ? if (oBbeat && (oBbeat->type == uris.atom_Float)) { // Get position within a sequence (0..1) float barsequencepos = ((LV2_Atom_Float*)oBbeat)->body * controllers[SequencesPerBar - Controllers] / beatsPerBar; // Position within a bar (0..sequencesperbar) position = MODFL (barsequencepos); // Position within a sequence refFrame = ev1->time.frames; // Reference frame } } play(last_t, ev1->time.frames); last_t = ev1->time.frames; } if (last_t < n_samples) play(last_t, n_samples); // Play remaining samples // Update position in case of no new barBeat submitted on next call const float relpos = float (n_samples - refFrame) * speed / (float (rate) / (bpm / 60)) * controllers[SequencesPerBar - Controllers] / beatsPerBar; // Position relative to reference frame position = MODFL (position + relpos); refFrame = 0; // Send collected data to GUI if (record_on) { notifyGUI(); if (notify_sharedData) notifySharedDataNrToGui(); for (int i = 0; i < NrControllers; ++i) if (notify_controllers[i]) notifyControllerToGui (i); if (message.isScheduled ()) notifyMessageToGui (); } // Close off sequence lv2_atom_forge_pop(&forge, ¬ify_frame); } float BChoppr::readController (const int ctrlNr) { // Sync with control ports if ((sharedDataNr == 0) && controlPtrs[ctrlNr]) return controllerLimits[ctrlNr].validate (*controlPtrs[ctrlNr]); // Otherwise sync with globally shared data if (sharedDataNr <= 4) return controllerLimits[ctrlNr].validate (sharedData[sharedDataNr - 1].get (ctrlNr)); return controllerLimits[ctrlNr].min; } void BChoppr::setController (const int ctrlNr, const float value) { controllers[ctrlNr] = value; if (ctrlNr == Swing - Controllers) recalculateAutoPositions(); else if (ctrlNr == NrSteps - Controllers) recalculateAutoPositions(); else if ((ctrlNr >= StepPositions - Controllers) && (ctrlNr < StepPositions - Controllers + MAXSTEPS - 1)) { const int step = ctrlNr - (StepPositions - Controllers); if (value == 0.0f) { if (!stepAutoPositions[step]) { stepAutoPositions[step] = true; recalculateAutoPositions(); } } else if (stepPositions[step] != value) { stepAutoPositions[step] = false; stepPositions[step] = value; recalculateAutoPositions(); } } } void BChoppr::recalculateAutoPositions () { const int nrMarkers = controllers[NrSteps - Controllers] - 1; int start = 0; for (int i = 0; i < nrMarkers; ++i) { if (stepAutoPositions[i]) { if ((i == nrMarkers - 1) || (!stepAutoPositions[i + 1])) { const float swing = controllers[Swing - Controllers]; const float s = 2.0f * swing / (swing + 1.0f); float anc = (start == 0 ? 0 : stepPositions[start - 1]); const float suc = (i == nrMarkers - 1 ? 1.0f : stepPositions[i + 1]); const float diff = suc - anc; const float dist = float (i - start) + 1.0f + (int (i - start) & 1 ? ((start & 1) ? 2.0f - s : s) : 1.0f); const float step = (diff < 0.0f ? 0.0f : diff / dist); for (int j = start; j <= i; ++j) { const float f = ((j & 1) ? 2.0f - s : s); anc += f * step; stepPositions[j] = anc; } } } else start = i + 1; } } void BChoppr::notifyControllerToGui (const int nr) { // Send notifications LV2_Atom_Forge_Frame frame; lv2_atom_forge_frame_time (&forge, 0); lv2_atom_forge_object (&forge, &frame, 0, uris.notify_controllerEvent); lv2_atom_forge_key (&forge, uris.notify_controllerNr); lv2_atom_forge_int (&forge, nr); lv2_atom_forge_key (&forge, uris.notify_controllerValue); lv2_atom_forge_float (&forge, controllers[nr]); lv2_atom_forge_pop (&forge, &frame); notify_controllers[nr] = false; } void BChoppr::notifySharedDataNrToGui () { // Send notifications LV2_Atom_Forge_Frame frame; lv2_atom_forge_frame_time (&forge, 0); lv2_atom_forge_object (&forge, &frame, 0, uris.notify_sharedDataLinkEvent); lv2_atom_forge_key (&forge, uris.notify_sharedDataNr); lv2_atom_forge_int (&forge, sharedDataNr); lv2_atom_forge_pop (&forge, &frame); notify_sharedData = false; } void BChoppr::notifyGUI() { if (record_on) { int notificationsCount = 0; // Scan monitor and build notifications for (int i = 0; i < MONITORBUFFERSIZE; ++i) { if (monitor[i].ready) { // Copy data monitor -> notifications if (notificationsCount < NOTIFYBUFFERSIZE - 1) { notifications[notificationsCount].position = i; notifications[notificationsCount].inputMin = monitor[i].inputMin; notifications[notificationsCount].inputMax = monitor[i].inputMax; notifications[notificationsCount].outputMin = monitor[i].outputMin; notifications[notificationsCount].outputMax = monitor[i].outputMax; notificationsCount++; } // Reset monitor data monitor[i].ready = false; monitor[i].inputMin = 0.0; monitor[i].inputMax = 0.0; monitor[i].outputMin = 0.0; monitor[i].outputMax = 0.0; } } // And build one closing notification block for submission of current position (horizon) notifications[notificationsCount].position = monitorpos; notifications[notificationsCount].inputMin = monitor[monitorpos].inputMin; notifications[notificationsCount].inputMax = monitor[monitorpos].inputMax; notifications[notificationsCount].outputMin = monitor[monitorpos].outputMin; notifications[notificationsCount].outputMax = monitor[monitorpos].outputMax; // Send notifications LV2_Atom_Forge_Frame frame; lv2_atom_forge_frame_time(&forge, 0); lv2_atom_forge_object(&forge, &frame, 0, uris.notify_event); lv2_atom_forge_key(&forge, uris.notify_key); lv2_atom_forge_vector(&forge, sizeof(float), uris.atom_Float, (uint32_t) (5 * notificationsCount), ¬ifications); lv2_atom_forge_pop(&forge, &frame); notificationsCount = 0; } } void BChoppr::notifyMessageToGui() { uint32_t messageNr = message.loadMessage (); // Send notifications LV2_Atom_Forge_Frame frame; lv2_atom_forge_frame_time(&forge, 0); lv2_atom_forge_object(&forge, &frame, 0, uris.notify_messageEvent); lv2_atom_forge_key(&forge, uris.notify_message); lv2_atom_forge_int(&forge, messageNr); lv2_atom_forge_pop(&forge, &frame); } void BChoppr::play(uint32_t start, uint32_t end) { const int steps = controllers[NrSteps - Controllers]; for (uint32_t i = start; i < end; ++i) { float effect1 = audioInput1[i]; float effect2 = audioInput2[i]; // Interpolate position within the loop if ((speed != 0.0f) && (bpm >= 1.0f)) { const float relpos = float (i - refFrame) * speed / (float (rate) / (bpm / 60)) * controllers[SequencesPerBar - Controllers] / beatsPerBar; // Position relative to reference frame pos = MODFL (position + relpos); } if (!controllers[Bypass - Controllers]) { // Calculate step number int iStep; for (iStep = 0; (iStep < steps - 1) && (stepPositions[iStep] < pos); ++iStep) {} // Calculate fraction of active step const float steppos = (iStep == 0 ? 0.0f : stepPositions[iStep - 1]); const float nextpos = (iStep == steps - 1 ? 1.0f : stepPositions[iStep]); const float stepsize = nextpos - steppos; const float iStepFrac = (stepsize <= 0.0f ? 0.0f : (pos - steppos) / stepsize); // Move to the next step? if (actStep != uint32_t (iStep)) { prevStep = actStep; actStep = iStep; nextStep = (iStep < steps - 1 ? iStep + 1 : 0); } // Calculate effect (vol) for the position const float ampSwing = controllers[AmpSwing - Controllers]; const float* stepLevels = &controllers[StepLevels - Controllers]; const float act = stepLevels[actStep] * LIM ((actStep % 2 == 0 ? ampSwing : 1.0f / ampSwing), 0.0f, 1.0f); const float prev = stepLevels[prevStep] * LIM ((prevStep % 2 == 0 ? ampSwing : 1.0f / ampSwing), 0.0f, 1.0f); const float next = stepLevels[nextStep] * LIM ((nextStep % 2 == 0 ? ampSwing : 1.0f / ampSwing), 0.0f, 1.0f); float vol = stepLevels[actStep] * LIM ((actStep % 2 == 0 ? ampSwing : 1.0f / ampSwing), 0.0f, 1.0f); // On attack if (iStepFrac < controllers[Attack - Controllers]) { if (prev < act) { if (controllers[Blend - Controllers] == 1.0f) vol = prev + (iStepFrac / controllers[Attack - Controllers]) * (vol - prev); else if (controllers[Blend - Controllers] == 2.0f) vol = prev + 0.5f * (sinf (M_PI * (iStepFrac / controllers[Attack - Controllers] - 0.5f)) + 1.0f) * (vol - prev); } } // On release if (iStepFrac > (1.0f - controllers[Release - Controllers])) { if (next < act) { if (controllers[Blend - Controllers] == 1.0f) vol = next + (((1.0f - iStepFrac)) / controllers[Release - Controllers]) * (vol - next); else if (controllers[Blend - Controllers] == 2.0f) vol = next + 0.5f * (sinf (M_PI * ((1.0f - iStepFrac) / controllers[Release - Controllers] - 0.5f)) + 1.0f) * (vol - next); } } // Apply effect on input effect1 = audioInput1[i] * vol; effect2 = audioInput2[i] * vol; } // Analyze input and output data for GUI notification if (record_on) { // Calculate position in monitor int newmonitorpos = (int) (pos * MONITORBUFFERSIZE); if (newmonitorpos >= MONITORBUFFERSIZE) newmonitorpos = MONITORBUFFERSIZE; if (newmonitorpos < 0) newmonitorpos = 0; // Position changed? => Ready to send if (newmonitorpos != monitorpos) { if (monitorpos >= 0) monitor[monitorpos].ready = true; monitorpos = newmonitorpos; } // Get max input and output values for a block if (effect1 < monitor[monitorpos].outputMin) monitor[monitorpos].outputMin = effect1; if (effect1 > monitor[monitorpos].outputMax) monitor[monitorpos].outputMax = effect1; if (effect2 < monitor[monitorpos].outputMin) monitor[monitorpos].outputMin = effect2; if (effect2 > monitor[monitorpos].outputMax) monitor[monitorpos].outputMax = effect2; if (audioInput1[i] < monitor[monitorpos].inputMin) monitor[monitorpos].inputMin = audioInput1[i]; if (audioInput1[i] > monitor[monitorpos].inputMax) monitor[monitorpos].inputMax = audioInput1[i]; if (audioInput2[i] < monitor[monitorpos].inputMin) monitor[monitorpos].inputMin = audioInput2[i]; if (audioInput2[i] > monitor[monitorpos].inputMax) monitor[monitorpos].inputMax = audioInput2[i]; monitor[monitorpos].ready = false; } // Send effect to audio output const float drywet = controllers[DryWet - Controllers]; audioOutput1[i] = audioInput1[i] * (1.0f - drywet) + effect1 * drywet; audioOutput2[i] = audioInput1[i] * (1.0f - drywet) + effect2 * drywet; } } LV2_State_Status BChoppr::state_save (LV2_State_Store_Function store, LV2_State_Handle handle, uint32_t flags, const LV2_Feature* const* features) { // Save shared data store (handle, uris.notify_sharedDataNr, &sharedDataNr, sizeof(sharedDataNr), uris.atom_Int, LV2_STATE_IS_POD); if (sharedDataNr != 0) { Atom_Controllers atom; for (int i = 0; i < NrControllers; ++i) atom.data[i] = sharedData[sharedDataNr - 1].get (i); atom.body.child_type = uris.atom_Float; atom.body.child_size = sizeof(float); store (handle, uris.notify_controllers, &atom, NrControllers * sizeof (float) + sizeof(LV2_Atom_Vector_Body), uris.atom_Vector, LV2_STATE_IS_POD); } return LV2_STATE_SUCCESS; } LV2_State_Status BChoppr::state_restore (LV2_State_Retrieve_Function retrieve, LV2_State_Handle handle, uint32_t flags, const LV2_Feature* const* features) { size_t size; uint32_t type; uint32_t valflags; // Restore sharedDataNr if (sharedDataNr != 0) sharedData[sharedDataNr - 1].unlink (this); sharedDataNr = 0; const void* sharedDataNrData = retrieve (handle, uris.notify_sharedDataNr, &size, &type, &valflags); if (sharedDataNrData && (type == uris.atom_Int)) { const int nr = *(int*)sharedDataNrData; if (nr != 0) sharedData[nr - 1].link (this); sharedDataNr = nr; } // Restore sharedData if ((sharedDataNr >= 0) && (sharedDataNr <= 4)) { const void* controllersData = retrieve (handle, uris.notify_controllers, &size, &type, &valflags); if (controllersData && (type == uris.atom_Vector) && (sharedDataNr > 0)) { const Atom_Controllers* atom = (const Atom_Controllers*) controllersData; if (atom->body.child_type == uris.atom_Float) { for (int i = 0; i < NrControllers; ++i) sharedData[sharedDataNr - 1].set (i, atom->data[i]); } } } notify_sharedData = true; // Load controllers for (int i = 0; i < NrControllers; ++i) { float newValue = readController (i); if (newValue != controllers[i]) { setController (i, newValue); notify_controllers[i] = true; } } return LV2_STATE_SUCCESS; } static LV2_Handle instantiate (const LV2_Descriptor* descriptor, double samplerate, const char* bundle_path, const LV2_Feature* const* features) { // New instance BChoppr* instance; try {instance = new BChoppr(samplerate, features);} catch (std::exception& exc) { fprintf (stderr, "BChoppr.lv2: Plugin instantiation failed. %s\n", exc.what ()); return NULL; } if (!instance) { fprintf(stderr, "BChoppr.lv2: Plugin instantiation failed.\n"); return NULL; } if (!instance->map) { fprintf(stderr, "BChoppr.lv2: Host does not support urid:map.\n"); delete (instance); return NULL; } return (LV2_Handle)instance; } static void connect_port (LV2_Handle instance, uint32_t port, void *data) { BChoppr* inst = (BChoppr*) instance; if (inst) inst->connect_port (port, data); } static void run (LV2_Handle instance, uint32_t n_samples) { BChoppr* inst = (BChoppr*) instance; if (inst) inst->run (n_samples); } static LV2_State_Status state_save(LV2_Handle instance, LV2_State_Store_Function store, LV2_State_Handle handle, uint32_t flags, const LV2_Feature* const* features) { BChoppr* inst = (BChoppr*)instance; if (!inst) return LV2_STATE_SUCCESS; return inst->state_save (store, handle, flags, features); } static LV2_State_Status state_restore(LV2_Handle instance, LV2_State_Retrieve_Function retrieve, LV2_State_Handle handle, uint32_t flags, const LV2_Feature* const* features) { BChoppr* inst = (BChoppr*)instance; if (!inst) return LV2_STATE_SUCCESS; return inst->state_restore (retrieve, handle, flags, features); } static void cleanup (LV2_Handle instance) { BChoppr* inst = (BChoppr*) instance; if (inst) delete inst; } static const void* extension_data(const char* uri) { static const LV2_State_Interface state = {state_save, state_restore}; if (!strcmp(uri, LV2_STATE__interface)) return &state; return NULL; } static const LV2_Descriptor descriptor = { BCHOPPR_URI, instantiate, connect_port, NULL, //activate, run, NULL, //deactivate, cleanup, extension_data }; // LV2 Symbol Export LV2_SYMBOL_EXPORT const LV2_Descriptor* lv2_descriptor(uint32_t index) { switch (index) { case 0: return &descriptor; default: return NULL; } } BChoppr-1.10.10/src/BChoppr.hpp000066400000000000000000000102241411663013200160400ustar00rootroot00000000000000/* B.Choppr * Step Sequencer Effect Plugin * * Copyright (C) 2018, 2019 by Sven Jähnichen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef BCHOPPR_H_ #define BCHOPPR_H_ #define MODFL(x) (x - floorf (x)) #include #include #include #include #include #include "definitions.hpp" #include "Limit.hpp" #include "Urids.hpp" #include "Ports.hpp" #include "Message.hpp" struct BChopprMonitor_t { int count; bool ready; double inputMin; double inputMax; double outputMin; double outputMax; }; const BChopprMonitor_t defaultMonitorData = {0, false, 0.0, 0.0, 0.0, 0.0}; struct Atom_Controllers { LV2_Atom_Vector_Body body; float data[NrControllers]; }; const Limit controllerLimits [NrControllers] = { {0.0f, 1.0f, 1.0f}, // Bypass {0.0f, 1.0f, 0.0f}, // DryWet {1.0f, 2.0f, 1.0f}, // Blend {0.01f, 1.0f, 0.0f}, // Attack {0.01f, 1.0f, 0.0f}, // Release {1.0f, 8.0f, 1.0f}, // SequencesPerBar {0.001f, 1000.0f, 0.0f},// AmpSwing {0.333333f, 3.0f, 0.0f},// Swing {1.0f, 16.0f, 1.0f}, // NrSteps {0.0f, 1.0f, 0.0f}, // StepPositions {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, // StepLevels {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f} }; class BChoppr { public: BChoppr (double samplerate, const LV2_Feature* const* features); ~BChoppr(); void connect_port (uint32_t port, void *data); void run (uint32_t n_samples); LV2_State_Status state_save(LV2_State_Store_Function store, LV2_State_Handle handle, uint32_t flags, const LV2_Feature* const* features); LV2_State_Status state_restore(LV2_State_Retrieve_Function retrieve, LV2_State_Handle handle, uint32_t flags, const LV2_Feature* const* features); LV2_URID_Map* map; private: double rate; float bpm; float speed; float position; float beatsPerBar; uint32_t beatUnit; uint32_t refFrame; uint32_t prevStep; uint32_t actStep; uint32_t nextStep; float pos; // Audio buffers float* audioInput1; float* audioInput2; float* audioOutput1; float* audioOutput2; // Controllers int sharedDataNr; float* controlPtrs[NrControllers]; float controllers[NrControllers]; float stepPositions[MAXSTEPS - 1]; bool stepAutoPositions[MAXSTEPS - 1]; // Atom port BChopprURIs uris; LV2_Atom_Sequence* controlPort1; LV2_Atom_Sequence* controlPort2; LV2_Atom_Sequence* notifyPort; LV2_Atom_Forge forge; LV2_Atom_Forge_Frame notify_frame; bool record_on; bool notify_sharedData; bool notify_controllers[NrControllers]; int monitorpos; Message message; std::array notifications; std::array monitor; float readController (const int ctrlNr); void setController (const int ctrlNr, const float value); void recalculateAutoPositions (); void play(uint32_t start, uint32_t end); void notifyGUI(); void notifyMessageToGui (); void notifyControllerToGui (const int nr); void notifySharedDataNrToGui (); }; #endif /* BCHOPPR_H_ */ BChoppr-1.10.10/src/BChoppr_GUI.cpp000066400000000000000000001420031411663013200165400ustar00rootroot00000000000000/* B.Choppr * Step Sequencer Effect Plugin * * Copyright (C) 2018, 2019 by Sven Jähnichen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "BChoppr_GUI.hpp" #include "Ports.hpp" #include "screen.h" #include "BUtilities/stof.hpp" #include "BUtilities/vsystem.hpp" BChoppr_GUI::BChoppr_GUI (const char *bundle_path, const LV2_Feature *const *features, PuglNativeView parentWindow) : Window (760, 560, "B.Choppr", parentWindow, true, PUGL_MODULE, 0), controller (NULL), write_function (NULL), mContainer (0, 0, 760, 560, "main"), rContainer (260, 80, 480, 350, "rcontainer"), sContainer (3, 210, 474, 137, "scontainer"), monitorSwitch (600, 15, 40, 16, "switch", 0.0), monitorLabel (600, 35, 40, 20, "smlabel", BCHOPPR_LABEL_MONITOR), bypassButton (662, 15, 16, 16, "redbutton"), bypassLabel (650, 35, 40, 20, "smlabel", BCHOPPR_LABEL_BYPASS), drywetDial (703, 5, 33, 40, "dial", 1.0, 0.0, 1.0, 0.0, "%1.2f"), drywetLabel (690, 35, 60, 20, "smlabel", BCHOPPR_LABEL_DRY_WET), helpButton (20, 80, 24, 24, "halobutton", BCHOPPR_LABEL_HELP), ytButton (50, 80, 24, 24, "halobutton", BCHOPPR_LABEL_TUTORIAL), monitorDisplay (3, 3, 474, 207, "mmonitor"), blendControl (0, 0, 0, 0, "widget", 1, 1, 2, 1), rectButton (40, 240, 60, 40, "abutton"), sinButton (140, 240, 60, 40, "nbutton"), stepshapeDisplay (30, 290, 180, 140, "smonitor"), attackControl (40, 445, 50, 60, "dial", 0.2, 0.01, 1.0, 0.01, "%1.2f"), attackLabel (20, 500, 90, 20, "label", BCHOPPR_LABEL_ATTACK), releaseControl (150, 445, 50, 60, "dial", 0.2, 0.01, 1.0, -0.01, "%1.2f"), releaseLabel (130, 500, 90, 20, "label", BCHOPPR_LABEL_DECAY), sequencesperbarControl (260, 442, 120, 28, "slider", 1.0, 1.0, 8.0, 1.0, "%1.0f"), sequencesperbarLabel (260, 470, 120, 20, "label", BCHOPPR_LABEL_SEQUENCES_PER_BAR), ampSwingControl ( 400, 442, 110, 28, "slider", 1.0, 0.001, 1000.0, 0.0, "%4.1f", [] (const double val, const double min, const double max) {return (val >= 1.0 ? 1.0 - 0.5 / LIMIT (sqrt(val), sqrt(min), sqrt(max)) : 0.5 * LIMIT (sqrt(val), sqrt(min), sqrt(max)));}, [] (const double frac, const double min, const double max) {return (frac >= 0.5 ? pow (0.5 / (1.0 - LIMIT (frac, 0, 1)), 2) : pow (2 * LIMIT (frac, 0, 1), 2));} ), ampSwingLabel (400, 470, 110, 20, "label", BCHOPPR_LABEL_AMP_SWING), swingControl (525, 442, 110, 28, "slider", 1.0, 1.0 / 3.0, 3.0, 0.0), swingLabel (525, 470, 110, 20, "label", BCHOPPR_LABEL_STEPS_SWING), markersAutoButton (655, 450, 80, 20, "button", BCHOPPR_LABEL_AUTO), markersAutoLabel (655, 470, 80, 20, "label", BCHOPPR_LABEL_MARKER), nrStepsControl (260, 502, 480, 28, "slider", 1.0, 1.0, MAXSTEPS, 1.0, "%2.0f"), nrStepsLabel (260, 530, 480, 20, "label", BCHOPPR_LABEL_NUMBER_OF_STEPS), stepshapeLabel (33, 293, 120, 20, "llabel", BCHOPPR_LABEL_STEP_SHAPE), sequencemonitorLabel (263, 83, 120, 20, "llabel", BCHOPPR_LABEL_SEQUENCE_MONITOR), messageLabel (420, 83, 280, 20, "hilabel", ""), markerListBox (12, -68, 86, 66, "listbox", BItems::ItemList ({BCHOPPR_LABEL_MARKER, BCHOPPR_LABEL_MANUAL})), sharedDataSelection (28, 528, 194, 24, "widget", 0, 0, 4, 1), surface (NULL), cr1 (NULL), cr2 (NULL), cr3 (NULL), cr4 (NULL), pat1 (NULL), pat2 (NULL), pat3 (NULL), pat4 (NULL), pat5 (NULL), pluginPath (bundle_path ? std::string (bundle_path) : std::string ("")), sz (1.0), bgImageSurface (nullptr), scale (DB_CO(0.0)), map (NULL) { if (!init_mainMonitor () || !init_Stepshape ()) { std::cerr << "BChoppr.lv2#GUI: Failed to init monitor." << std::endl; destroy_mainMonitor (); destroy_Stepshape (); throw std::bad_alloc (); } //Initialialize and configure stepControllers double sw = sContainer.getEffectiveWidth(); double sx = sContainer.getXOffset(); for (int i = 0; i < MAXSTEPS; ++i) { stepControl[i] = BWidgets::VSlider ((i + 0.5) * sw / MAXSTEPS + sx - 7, 60, 14, 80, "slider", 1.0, 0.0, 1.0, 0.01); stepControl[i].setHardChangeable (false); stepControl[i].setScrollable (true); stepControl[i].applyTheme (theme, "slider"); sContainer.add (stepControl[i]); stepControlLabel[i] = BWidgets::Label ((i + 0.5) * sw / MAXSTEPS + sx - 14, 40, 28, 20, "mlabel", "1.00"); stepControlLabel[i].applyTheme (theme, "mlabel"); stepControlLabel[i].setState (BColors::ACTIVE); stepControlLabel[i].setEditable (true); stepControlLabel[i].setCallbackFunction(BEvents::EventType::MESSAGE_EVENT, stepControlLabelMessageCallback); sContainer.add (stepControlLabel[i]); } //Initialialize and configure markers for (int i = 0; i < MAXSTEPS - 1; ++i) { markerWidgets[i] = Marker ((i + 1) * sw / MAXSTEPS + sx - 5, 10, 10, 16, "marker", (double(i) + 1.0) / MAXSTEPS, 0.0, 1.0, 0.0); markerWidgets[i].setHasValue (false); markerWidgets[i].setDraggable (true); markerWidgets[i].setCallbackFunction (BEvents::EventType::BUTTON_PRESS_EVENT, BChoppr_GUI::markerClickedCallback); markerWidgets[i].setCallbackFunction (BEvents::EventType::POINTER_DRAG_EVENT, BChoppr_GUI::markerDraggedCallback); markerWidgets[i].applyTheme (theme, "slider"); sContainer.add (markerWidgets[i]); } for (int i = 0; i < 4; ++i) sharedDataButtons[i] = HaloToggleButton (50 * i, 0, 44, 24, "halobutton", BCHOPPR_LABEL_SHARED_DATA " " + std::to_string (i + 1)); // Link controllers controllers[Bypass - Controllers] = &bypassButton; controllers[DryWet - Controllers] = &drywetDial; controllers[Blend - Controllers] = &blendControl; controllers[Attack - Controllers] = &attackControl; controllers[Release - Controllers] = &releaseControl; controllers[SequencesPerBar - Controllers] = &sequencesperbarControl; controllers[AmpSwing - Controllers] = &SwingControl; controllers[Swing - Controllers] = &swingControl; controllers[NrSteps - Controllers] = &nrStepsControl; for (int i = 0; i < MAXSTEPS - 1; ++i) controllers[StepPositions + i - Controllers] = &markerWidgets[i]; for (int i = 0; i < MAXSTEPS; ++i) controllers[StepLevels + i - Controllers] = &stepControl[i]; // Set callbacks for (int i = 0; i < NrControllers; ++i) controllers[i]->setCallbackFunction (BEvents::EventType::VALUE_CHANGED_EVENT, BChoppr_GUI::valueChangedCallback); monitorSwitch.setCallbackFunction (BEvents::EventType::VALUE_CHANGED_EVENT, BChoppr_GUI::valueChangedCallback); monitorDisplay.setCallbackFunction (BEvents::EventType::WHEEL_SCROLL_EVENT, BChoppr_GUI::monitorScrolledCallback); monitorDisplay.setCallbackFunction (BEvents::EventType::POINTER_DRAG_EVENT, BChoppr_GUI::monitorDraggedCallback); markerListBox.setCallbackFunction (BEvents::EventType::VALUE_CHANGED_EVENT, BChoppr_GUI::listBoxChangedCallback); markersAutoButton.setCallbackFunction (BEvents::EventType::VALUE_CHANGED_EVENT, BChoppr_GUI::markersAutoClickedCallback); rectButton.setCallbackFunction (BEvents::EventType::BUTTON_PRESS_EVENT, BChoppr_GUI::buttonClickedCallback); sinButton.setCallbackFunction (BEvents::EventType::BUTTON_PRESS_EVENT, BChoppr_GUI::buttonClickedCallback); helpButton.setCallbackFunction(BEvents::BUTTON_PRESS_EVENT, helpButtonClickedCallback); ytButton.setCallbackFunction(BEvents::BUTTON_PRESS_EVENT, ytButtonClickedCallback); for (HaloToggleButton& s: sharedDataButtons) s.setCallbackFunction (BEvents::EventType::BUTTON_PRESS_EVENT, BChoppr_GUI::sharedDataClickedCallback); sharedDataSelection.setCallbackFunction (BEvents::EventType::VALUE_CHANGED_EVENT, BChoppr_GUI::valueChangedCallback); // Configure widgets bgImageSurface = cairo_image_surface_create_from_png ((pluginPath + BG_FILE).c_str()); widgetBg.loadFillFromCairoSurface (bgImageSurface); drywetDial.setScrollable (true); drywetDial.setHardChangeable (false); attackControl.setScrollable (true); attackControl.setHardChangeable (false); releaseControl.setScrollable (true); releaseControl.setHardChangeable (false); sequencesperbarControl.setScrollable (true); ampSwingControl.setHardChangeable (false); swingControl.setHardChangeable (false); nrStepsControl.setScrollable (true); monitorDisplay.setScrollable (true); monitorDisplay.setDraggable (true); markerListBox.setStacking (BWidgets::STACKING_OVERSIZE); applyTheme (theme); setAutoMarkers (); rearrange_controllers (); redrawMainMonitor (); redrawSContainer (); redrawButtons (); // Pack widgets mContainer.add (rContainer); rContainer.add (monitorDisplay); rContainer.add (sContainer); mContainer.add (blendControl); mContainer.add (monitorSwitch); mContainer.add (monitorLabel); mContainer.add (bypassButton); mContainer.add (bypassLabel); mContainer.add (drywetDial); mContainer.add (drywetLabel); mContainer.add (helpButton); mContainer.add (ytButton); mContainer.add (rectButton); mContainer.add (sinButton); mContainer.add (stepshapeDisplay); mContainer.add (attackControl); mContainer.add (attackLabel); mContainer.add (releaseControl); mContainer.add (releaseLabel); mContainer.add (sequencesperbarControl); mContainer.add (sequencesperbarLabel); mContainer.add (ampSwingControl); mContainer.add (ampSwingLabel); mContainer.add (swingControl); mContainer.add (swingLabel); mContainer.add (markersAutoButton); mContainer.add (markersAutoLabel); mContainer.add (nrStepsControl); mContainer.add (nrStepsLabel); mContainer.add (stepshapeLabel); mContainer.add (sequencemonitorLabel); mContainer.add (messageLabel); for (HaloToggleButton& s : sharedDataButtons) sharedDataSelection.add (s); mContainer.add (sharedDataSelection); add (mContainer); //Scan host features for URID map LV2_URID_Map* m = NULL; for (int i = 0; features[i]; ++i) { if (strcmp(features[i]->URI, LV2_URID__map) == 0) m = (LV2_URID_Map*) features[i]->data; } if (!m) throw std::invalid_argument ("Host does not support urid:map"); //Map URIS map = m; getURIs (map, &uris); // Initialize forge lv2_atom_forge_init (&forge,map); } BChoppr_GUI::~BChoppr_GUI() { send_record_off (); destroy_mainMonitor (); destroy_Stepshape (); } void BChoppr_GUI::portEvent(uint32_t port_index, uint32_t buffer_size, uint32_t format, const void* buffer) { // Notify port if ((format == uris.atom_eventTransfer) && (port_index == Notify)) { const LV2_Atom* atom = (const LV2_Atom*) buffer; if ((atom->type == uris.atom_Blank) || (atom->type == uris.atom_Object)) { const LV2_Atom_Object* obj = (const LV2_Atom_Object*) atom; // Linked / unlinked to shared data if (obj->body.otype == uris.notify_sharedDataLinkEvent) { LV2_Atom *oNr = NULL; lv2_atom_object_get ( obj, uris.notify_sharedDataNr, &oNr, NULL ); if (oNr && (oNr->type == uris.atom_Int)) { const int nr = ((LV2_Atom_Int*)oNr)->body; if ((nr >= 0) && (nr <= 4) && (nr != sharedDataSelection.getValue())) { sharedDataSelection.setValueable (false); sharedDataSelection.setValue (nr); sharedDataSelection.setValueable (true); for (int i = 0; i < 4; ++i) { sharedDataButtons[i].setValueable (false); sharedDataButtons[i].setValue (i == nr - 1 ? 1 : 0); sharedDataButtons[i].setValueable (true); } } } } // Controller changed else if (obj->body.otype == uris.notify_controllerEvent) { LV2_Atom *oNr = NULL, *oVal = NULL; lv2_atom_object_get ( obj, uris.notify_controllerNr, &oNr, uris.notify_controllerValue, &oVal, NULL ); if (oNr && (oNr->type == uris.atom_Int) && oVal && (oVal->type == uris.atom_Float)) { const int nr = ((LV2_Atom_Int*)oNr)->body; const float val = ((LV2_Atom_Float*)oVal)->body; if ((nr >= StepPositions - Controllers) && (nr < StepPositions - Controllers + MAXSTEPS - 1)) { setMarker (nr - (StepPositions - Controllers), val); setAutoMarkers (); rearrange_controllers (); redrawSContainer (); redrawMainMonitor (); } else setController (nr, val); } } // Monitor notification else if (obj->body.otype == uris.notify_event) { const LV2_Atom* data = NULL; lv2_atom_object_get(obj, uris.notify_key, &data, 0); if (data && (data->type == uris.atom_Vector)) { const LV2_Atom_Vector* vec = (const LV2_Atom_Vector*) data; if (vec->body.child_type == uris.atom_Float) { uint32_t notificationsCount = (uint32_t) ((data->size - sizeof(LV2_Atom_Vector_Body)) / sizeof (BChopprNotifications)); BChopprNotifications* notifications = (BChopprNotifications*) (&vec->body + 1); if (notificationsCount > 0) { add_monitor_data (notifications, notificationsCount, mainMonitor.horizonPos); redrawMainMonitor (); } } } else std::cerr << "BChoppr.lv2#GUI: Corrupt audio message." << std::endl; } // Message notification else if (obj->body.otype == uris.notify_messageEvent) { const LV2_Atom* data = NULL; lv2_atom_object_get(obj, uris.notify_message, &data, 0); if (data && (data->type == uris.atom_Int)) { const int messageNr = ((LV2_Atom_Int*)data)->body; std::string msg = ((messageNr >= NO_MSG) && (messageNr <= MAX_MSG) ? messageStrings[messageNr] : ""); messageLabel.setText (msg); } } } } // Scan remaining ports else if ((format == 0) && (port_index >= Controllers) && (port_index < Controllers + NrControllers) && (sharedDataSelection.getValue() == 0)) { int nr = port_index - Controllers; float val = *(float*) buffer; if ((nr >= StepPositions - Controllers) && (nr < StepPositions - Controllers + MAXSTEPS - 1)) { setMarker (nr - (StepPositions - Controllers), val); setAutoMarkers (); rearrange_controllers (); redrawSContainer (); redrawMainMonitor(); } else setController (nr, val); } } void BChoppr_GUI::resizeGUI() { hide (); // Resize Fonts defaultFont.setFontSize (12 * sz); leftFont.setFontSize (12 * sz); mdFont.setFontSize (10 * sz); smFont.setFontSize (8 * sz); // Resize Background cairo_surface_t* surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 760 * sz, 560 * sz); cairo_t* cr = cairo_create (surface); cairo_scale (cr, sz, sz); cairo_set_source_surface(cr, bgImageSurface, 0, 0); cairo_paint(cr); widgetBg.loadFillFromCairoSurface(surface); cairo_destroy (cr); cairo_surface_destroy (surface); // Resize widgets RESIZE (mContainer, 0, 0, 760, 560, sz); RESIZE (rContainer, 260, 80, 480, 350, sz); RESIZE (monitorSwitch, 600, 15, 40, 16, sz); RESIZE (monitorLabel, 600, 35, 40, 20, sz); RESIZE (bypassButton, 662, 15, 16, 16, sz); RESIZE (bypassLabel, 650, 35, 40, 20, sz); RESIZE (drywetDial, 703, 5, 33, 40, sz); RESIZE (drywetLabel, 690, 35, 60, 20, sz); RESIZE (helpButton, 20, 80, 24, 24, sz); RESIZE (ytButton, 50, 80, 24, 24, sz); RESIZE (monitorDisplay, 3, 3, 474, 207, sz); RESIZE (blendControl, 0, 0, 0, 0, sz); RESIZE (rectButton, 40, 240, 60, 40, sz); RESIZE (sinButton, 140, 240, 60, 40, sz); RESIZE (stepshapeDisplay, 30, 290, 180, 140, sz); RESIZE (attackControl, 40, 445, 50, 60, sz); RESIZE (attackLabel, 20, 500, 90, 20, sz); RESIZE (releaseControl, 150, 445, 50, 60, sz); RESIZE (releaseLabel, 130, 500, 90, 20, sz); RESIZE (sequencesperbarControl, 260, 442, 120, 28, sz); RESIZE (sequencesperbarLabel, 260, 470, 120, 20, sz); RESIZE (ampSwingControl, 400, 442, 110, 28, sz); RESIZE (ampSwingLabel, 400, 470, 110, 20, sz); RESIZE (swingControl, 525, 442, 110, 28, sz); RESIZE (swingLabel, 525, 470, 110, 20, sz); RESIZE (markersAutoButton, 655, 450, 80, 20, sz); RESIZE (markersAutoLabel, 655, 470, 80, 20, sz); RESIZE (nrStepsControl, 260, 502, 480, 28, sz); RESIZE (nrStepsLabel, 260, 530, 480, 20, sz); RESIZE (stepshapeLabel, 33, 293, 120, 20, sz); RESIZE (sequencemonitorLabel, 263, 83, 120, 20, sz); RESIZE (messageLabel, 420, 83, 280, 20,sz); RESIZE (sContainer, 3, 210, 474, 137, sz); RESIZE (markerListBox, 12, -68, 86, 66, sz); markerListBox.resizeItems (BUtilities::Point (80 * sz, 20 * sz)); RESIZE (sharedDataSelection, 28, 528, 194, 24, sz); for (int i = 0; i < 4; ++i) {RESIZE (sharedDataButtons[i], 50 * i, 0, 44, 24, sz);} // Update monitors destroy_Stepshape (); init_Stepshape (); redrawStepshape (); destroy_mainMonitor (); init_mainMonitor (); redrawMainMonitor (); redrawSContainer (); rearrange_controllers (); redrawButtons (); // Apply changes applyTheme (theme); show (); } void BChoppr_GUI::applyTheme (BStyles::Theme& theme) { mContainer.applyTheme (theme); rContainer.applyTheme (theme); monitorSwitch.applyTheme (theme); monitorLabel.applyTheme (theme); bypassButton.applyTheme (theme); bypassLabel.applyTheme (theme); drywetDial.applyTheme (theme); drywetLabel.applyTheme (theme); helpButton.applyTheme (theme); ytButton.applyTheme (theme); monitorDisplay.applyTheme (theme); blendControl.applyTheme (theme); rectButton.applyTheme (theme); sinButton.applyTheme (theme); stepshapeDisplay.applyTheme (theme); attackControl.applyTheme (theme); attackLabel.applyTheme (theme); releaseControl.applyTheme (theme); releaseLabel.applyTheme (theme); sequencesperbarControl.applyTheme (theme); sequencesperbarLabel.applyTheme (theme); ampSwingControl.applyTheme (theme); ampSwingLabel.applyTheme (theme); swingControl.applyTheme (theme); swingLabel.applyTheme (theme); markersAutoButton.applyTheme (theme); markersAutoLabel.applyTheme (theme); nrStepsControl.applyTheme (theme); nrStepsLabel.applyTheme (theme); stepshapeLabel.applyTheme (theme); sequencemonitorLabel.applyTheme (theme); messageLabel.applyTheme (theme); sContainer.applyTheme (theme); markerListBox.applyTheme (theme); for (int i = 0; i < MAXSTEPS; ++i) { stepControl[i].applyTheme (theme); stepControlLabel[i].applyTheme (theme); } sharedDataSelection.applyTheme (theme); for (HaloToggleButton& s : sharedDataButtons) s.applyTheme (theme); } void BChoppr_GUI::onConfigureRequest (BEvents::ExposeEvent* event) { Window::onConfigureRequest (event); sz = (getWidth() / 760 > getHeight() / 560 ? getHeight() / 560 : getWidth() / 760); resizeGUI (); } void BChoppr_GUI::send_record_on () { uint8_t obj_buf[64]; lv2_atom_forge_set_buffer(&forge, obj_buf, sizeof(obj_buf)); LV2_Atom_Forge_Frame frame; LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_object(&forge, &frame, 0, uris.ui_on); lv2_atom_forge_pop(&forge, &frame); write_function(controller, Control_2, lv2_atom_total_size(msg), uris.atom_eventTransfer, msg); monitorSwitch.setValue (1.0); } void BChoppr_GUI::send_record_off () { uint8_t obj_buf[64]; lv2_atom_forge_set_buffer(&forge, obj_buf, sizeof(obj_buf)); LV2_Atom_Forge_Frame frame; LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_object(&forge, &frame, 0, uris.ui_off); lv2_atom_forge_pop(&forge, &frame); write_function(controller, Control_2, lv2_atom_total_size(msg), uris.atom_eventTransfer, msg); monitorSwitch.setValue (0.0); } void BChoppr_GUI::sendSharedDataNr () { uint8_t obj_buf[64]; lv2_atom_forge_set_buffer(&forge, obj_buf, sizeof(obj_buf)); LV2_Atom_Forge_Frame frame; LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_object(&forge, &frame, 0, uris.notify_sharedDataLinkEvent); lv2_atom_forge_key (&forge, uris.notify_sharedDataNr); lv2_atom_forge_int (&forge, sharedDataSelection.getValue()); lv2_atom_forge_pop(&forge, &frame); write_function(controller, Control_2, lv2_atom_total_size(msg), uris.atom_eventTransfer, msg); } void BChoppr_GUI::sendController (const int nr, const float value) { uint8_t obj_buf[64]; lv2_atom_forge_set_buffer(&forge, obj_buf, sizeof(obj_buf)); LV2_Atom_Forge_Frame frame; LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_object(&forge, &frame, 0, uris.notify_controllerEvent); lv2_atom_forge_key (&forge, uris.notify_controllerNr); lv2_atom_forge_int (&forge, nr); lv2_atom_forge_key (&forge, uris.notify_controllerValue); lv2_atom_forge_float (&forge, value); lv2_atom_forge_pop(&forge, &frame); write_function(controller, Control_2, lv2_atom_total_size(msg), uris.atom_eventTransfer, msg); } float BChoppr_GUI::setController (const int nr, const double value) { controllers[nr]->setValueable (false); controllers[nr]->setValue (value); controllers[nr]->setValueable (true); if (nr == Blend - Controllers) { if (value == 1) {rectButton.rename ("abutton"); sinButton.rename ("nbutton");} else if (value == 2) {sinButton.rename ("abutton"); rectButton.rename ("nbutton");} rectButton.applyTheme (theme); sinButton.applyTheme (theme); redrawButtons (); redrawStepshape (); } else if ((nr == Attack - Controllers) || (nr == Release - Controllers)) redrawStepshape (); else if (nr == AmpSwing - Controllers) rearrange_controllers(); else if (nr == Swing - Controllers) { setAutoMarkers(); rearrange_controllers(); redrawSContainer(); redrawMainMonitor(); } else if (nr == NrSteps - Controllers) { setAutoMarkers(); rearrange_controllers(); redrawSContainer(); redrawMainMonitor(); } else if ((nr >= StepPositions - Controllers) and (nr < StepPositions - Controllers + MAXSTEPS - 1)) { return (((Marker*)controllers[nr])->hasValue() ? value : 0.0f); } else if ((nr >= StepLevels - Controllers) and (nr < StepLevels - Controllers + MAXSTEPS)) { stepControlLabel[nr - (StepLevels - Controllers)].setText (BUtilities::to_string (value, "%1.2f")); } return value; } void BChoppr_GUI::setMarker (const int markerNr, double value) { if ((markerNr < 0) || (markerNr >= MAXSTEPS - 1)) return; // Value 0.0: Automatic if (value == 0.0) { markerWidgets[markerNr].setHasValue (false); } else { // Set value and switch off automatic value = LIMIT (value, MINMARKERVALUE, 1.0); markerWidgets[markerNr].setHasValue (true); markerWidgets[markerNr].setValue (value); // Validate ancessors for (int i = markerNr - 1; i >= 0; --i) { if (markerWidgets[i].hasValue()) { if (markerWidgets[i].getValue() > value) markerWidgets[i].setValue (value); else break; } } // Validate successors for (int i = markerNr + 1; i < MAXSTEPS - 1; ++i) { if (markerWidgets[i].hasValue()) { if (markerWidgets[i].getValue() < value) markerWidgets[i].setValue (value); else break; } } } } void BChoppr_GUI::setAutoMarkers () { int nrMarkers = nrStepsControl.getValue() - 1; int start = 0; for (int i = 0; i < nrMarkers; ++i) { if (!markerWidgets[i].hasValue()) { if ((i == nrMarkers - 1) || (markerWidgets[i + 1].hasValue())) { double swing = 2.0 * swingControl.getValue() / (swingControl.getValue() + 1.0); double anc = (start == 0 ? 0 : markerWidgets[start - 1].getValue()); double suc = (i == nrMarkers - 1 ? 1 : markerWidgets[i + 1].getValue()); double diff = suc - anc; double dist = i - start + 1.0 + (int (i - start) & 1 ? ((start & 1) ? 2.0 - swing : swing) : 1.0); double step = (diff < 0 ? 0 : diff / dist); for (int j = start; j <= i; ++j) { double f = ((j & 1) ? 2.0 - swing : swing); anc += f * step; markerWidgets[j].setValue (anc); } } } else start = i + 1; } } void BChoppr_GUI::rearrange_controllers () { int nrStepsi = INT (nrStepsControl.getValue()); if ((nrStepsi < 1) || (nrStepsi > MAXSTEPS)) return; double sw = sContainer.getEffectiveWidth(); double sx = sContainer.getXOffset(); const double oddf = (ampSwingControl.getValue() >= 1.0 ? 1.0 : ampSwingControl.getValue()); const double evenf = (ampSwingControl.getValue() >= 1.0 ? 1.0 / ampSwingControl.getValue() : 1.0); for (int i = 0; i < MAXSTEPS; ++i) { if (i < nrStepsi) { stepControl[i].resize (14 * sz, (14 + LIMIT (66 * ((i % 2) == 0 ? oddf : evenf), 0, 66 )) * sz); stepControl[i].moveTo ((i + 0.5) * sw / nrStepsi + sx - 7 * sz, 140 * sz - stepControl[i].getHeight()); stepControl[i].show(); if (i < nrStepsi - 1) markerWidgets[i].resize (10 * sz, 16 * sz); stepControlLabel[i].moveTo ((i + 0.5) * sw / nrStepsi + sx - 14 * sz, 40 * sz); stepControlLabel[i].resize (28 * sz, 20 * sz); stepControlLabel[i].show(); } else { stepControl[i].hide (); stepControlLabel[i].hide(); } } for (int i = 0; i < MAXSTEPS - 1; ++i) { if (i < nrStepsi - 1) { markerWidgets[i].moveTo (markerWidgets[i].getValue() * sw + sx - 5 * sz, 10 * sz); markerWidgets[i].show (); } else markerWidgets[i].hide (); } } void BChoppr_GUI::valueChangedCallback (BEvents::Event* event) { if ((event) && (event->getWidget ())) { BWidgets::ValueWidget* widget = (BWidgets::ValueWidget*) event->getWidget (); const double value = widget->getValue(); if (widget->getMainWindow ()) { BChoppr_GUI* ui = (BChoppr_GUI*) widget->getMainWindow (); // Get controller nr int controllerNr = -1; for (int i = 0; i < NrControllers; ++i) { if (widget == ui->controllers[i]) { controllerNr = i; break; } } if (controllerNr >= 0) { const float v = ui->setController (controllerNr, value); if (ui->sharedDataSelection.getValue()) ui->sendController (controllerNr, v); else ui->write_function (ui->controller, Controllers + controllerNr, sizeof (float), 0, &v); } else if (widget == &ui->sharedDataSelection) { const int val = ui->sharedDataSelection.getValue() - 1; for (int i = 0; i < 4; ++i) { ui->sharedDataButtons[i].setValueable (false); ui->sharedDataButtons[i].setValue (i == val ? 1 : 0); ui->sharedDataButtons[i].setValueable (true); } ui->sendSharedDataNr(); } // monitor on/off changed else if (widget == &ui->monitorSwitch) { int value = INT (widget->getValue ()); if (value == 1) { ui->mainMonitor.record_on = true; ui->send_record_on (); } else { ui->mainMonitor.record_on = false; ui->send_record_off (); } return; } } } } void BChoppr_GUI::markerClickedCallback (BEvents::Event* event) { if (!event) return; BEvents::PointerEvent* pev = (BEvents::PointerEvent*) event; if (pev->getButton() != BDevices::RIGHT_BUTTON) return; Marker* marker = (Marker*)event->getWidget(); if (!marker) return; marker->raiseToTop(); BChoppr_GUI* ui = (BChoppr_GUI*)marker->getMainWindow(); if (!ui) return; const int nrSteps = ui->nrStepsControl.getValue(); for (int i = 0; i < nrSteps - 1; ++i) { if (marker == &ui->markerWidgets[i]) { Marker* oldMarker = (Marker*) ui->markerListBox.getParent(); ui->markerListBox.setValue (UNSELECTED); if (oldMarker && (oldMarker == marker)) { if (ui->markerListBox.isVisible()) ui->markerListBox.hide(); else ui->markerListBox.show (); } else if (oldMarker && (oldMarker != marker)) { oldMarker->release (&ui->markerListBox); marker->add (ui->markerListBox); ui->markerListBox.show(); } else { marker->add (ui->markerListBox); ui->markerListBox.show(); } } } } void BChoppr_GUI::markerDraggedCallback (BEvents::Event* event) { if (!event) return; BEvents::PointerEvent* pev = (BEvents::PointerEvent*) event; if (pev->getButton() != BDevices::LEFT_BUTTON) return; Marker* marker = (Marker*)event->getWidget(); if (!marker) return; marker->raiseToTop(); BChoppr_GUI* ui = (BChoppr_GUI*)marker->getMainWindow(); if (!ui) return; const int nrSteps = ui->nrStepsControl.getValue(); for (int i = 0; i < nrSteps - 1; ++i) { if (marker == &ui->markerWidgets[i]) { double x0 = ui->sContainer.getXOffset(); double w = ui->sContainer. getEffectiveWidth(); double frac = (w > 0 ? (pev->getPosition().x + marker->getPosition().x - x0) / w : MINMARKERVALUE); frac = LIMIT (frac, MINMARKERVALUE, 1.0); // Limit to antecessors value for (int j = i - 1; j >= 0; --j) { if (ui->markerWidgets[j].hasValue()) { if (frac < ui->markerWidgets[j].getValue()) frac = ui->markerWidgets[j].getValue(); break; } } // Limit to successors value for (int j = i + 1; j < nrSteps - 1; ++j) { if (ui->markerWidgets[j].hasValue()) { if (frac > ui->markerWidgets[j].getValue()) frac = ui->markerWidgets[j].getValue(); break; } } ui->setMarker (i, frac); ui->setAutoMarkers(); ui->rearrange_controllers(); ui->redrawSContainer(); ui->redrawMainMonitor(); break; } } } void BChoppr_GUI::monitorScrolledCallback (BEvents::Event* event) { if (!event) return; BEvents::WheelEvent* wev = (BEvents::WheelEvent*) event; BWidgets::Widget* widget = event->getWidget(); if (!widget) return; BChoppr_GUI* ui = (BChoppr_GUI*)widget->getMainWindow(); if (!ui) return; ui->scale += 0.1 * wev->getDelta().y * ui->scale; if (ui->scale < 0.0001f) ui->scale = 0.0001f; ui->redrawMainMonitor (); } void BChoppr_GUI::monitorDraggedCallback (BEvents::Event* event) { if (!event) return; BEvents::PointerEvent* wev = (BEvents::PointerEvent*) event; BWidgets::Widget* widget = event->getWidget(); if (!widget) return; BChoppr_GUI* ui = (BChoppr_GUI*)widget->getMainWindow(); if (!ui) return; ui->scale += 0.01 * wev->getDelta().y * ui->scale; if (ui->scale < 0.0001f) ui->scale = 0.0001f; ui->redrawMainMonitor (); } void BChoppr_GUI::listBoxChangedCallback (BEvents::Event* event) { if (!event) return; BEvents::ValueChangedEvent* vev = (BEvents::ValueChangedEvent*) event; BWidgets::ListBox* lb = (BWidgets::ListBox*) vev->getWidget(); if (!lb) return; Marker* m = (Marker*) lb->getParent(); if (!m) return; BChoppr_GUI* ui = (BChoppr_GUI*)m->getMainWindow(); if (!ui) return; double value = vev->getValue(); if (value == 1.0) m->setHasValue (false); else if (value == 2.0) m->setHasValue (true); else return; lb->hide(); ui->setAutoMarkers(); ui->rearrange_controllers(); ui->redrawSContainer(); ui->redrawMainMonitor(); } void BChoppr_GUI::markersAutoClickedCallback (BEvents::Event* event) { if (!event) return; BEvents::ValueChangedEvent* vev = (BEvents::ValueChangedEvent*) event; if (vev->getValue() == 0.0) return; BWidgets::TextButton* tb = (BWidgets::TextButton*) vev->getWidget(); if (!tb) return; BChoppr_GUI* ui = (BChoppr_GUI*)tb->getMainWindow(); if (!ui) return; for (Marker& m : ui->markerWidgets) m.setHasValue (false); ui->setAutoMarkers(); ui->rearrange_controllers(); ui->redrawSContainer(); ui->redrawMainMonitor(); } void BChoppr_GUI::buttonClickedCallback (BEvents::Event* event) { if (!event) return; BWidgets::DrawingSurface* w = (BWidgets::DrawingSurface*) event->getWidget(); if (!w) return; BChoppr_GUI* ui = (BChoppr_GUI*) w->getMainWindow(); if (!ui) return; if (w == &ui->rectButton) ui->blendControl.setValue (1); else if (w == &ui->sinButton) ui->blendControl.setValue (2); } void BChoppr_GUI::sharedDataClickedCallback (BEvents::Event* event) { if (!event) return; HaloToggleButton* widget = (HaloToggleButton*) event->getWidget (); if (!widget) return; double value = widget->getValue(); BChoppr_GUI* ui = (BChoppr_GUI*) widget->getMainWindow(); if (!ui) return; if (value) { for (int i = 0; i < 4; ++i) { if (widget == &ui->sharedDataButtons[i]) { ui->sharedDataSelection.setValue (i + 1); return; } } } ui->sharedDataSelection.setValue (0); } void BChoppr_GUI::helpButtonClickedCallback (BEvents::Event* event) { char cmd[] = WWW_BROWSER_CMD; char param[] = HELP_URL; char* argv[] = {cmd, param, NULL}; std::cerr << "BChoppr.lv2#GUI: Call " << HELP_URL << " for help.\n"; if (BUtilities::vsystem (argv) == -1) std::cerr << "BChoppr.lv2#GUI: Couldn't fork.\n"; } void BChoppr_GUI::ytButtonClickedCallback (BEvents::Event* event) { char cmd[] = WWW_BROWSER_CMD; char param[] = YT_URL; char* argv[] = {cmd, param, NULL}; std::cerr << "BChoppr.lv2#GUI: Call " << YT_URL << " for tutorial video.\n"; if (BUtilities::vsystem (argv) == -1) std::cerr << "BChoppr.lv2#GUI: Couldn't fork.\n"; } void BChoppr_GUI::stepControlLabelMessageCallback (BEvents::Event* event) { if (event && event->getWidget()) { BWidgets::Label* l = (BWidgets::Label*)event->getWidget(); BChoppr_GUI* ui = (BChoppr_GUI*)l->getMainWindow(); if (ui) { for (int i = 0; i < MAXSTEPS; ++i) { if (l == &ui->stepControlLabel[i]) { double val = ui->stepControl[i].getValue(); try {val = BUtilities::stof (l->getText());} catch (std::invalid_argument &ia) { fprintf (stderr, "%s\n", ia.what()); l->setText (BUtilities::to_string (val, "%1.2f")); return; } ui->stepControl[i].setValue (val); l->setText (BUtilities::to_string (ui->stepControl[i].getValue(), "%1.2f")); break; } } } } } bool BChoppr_GUI::init_Stepshape () { double height = stepshapeDisplay.getEffectiveHeight (); pat5 = cairo_pattern_create_linear (0, 0, 0, height); return (pat5 && (cairo_pattern_status (pat5) == CAIRO_STATUS_SUCCESS)); } void BChoppr_GUI::destroy_Stepshape () { //Destroy also mainMonitors cairo data if (pat5 && (cairo_pattern_status (pat5) == CAIRO_STATUS_SUCCESS)) cairo_pattern_destroy (pat5); } void BChoppr_GUI::redrawStepshape () { double width = stepshapeDisplay.getEffectiveWidth (); double height = stepshapeDisplay.getEffectiveHeight (); cairo_t* cr = cairo_create (stepshapeDisplay.getDrawingSurface ()); if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) return; // Draw background cairo_set_source_rgba (cr, CAIRO_BG_COLOR); cairo_rectangle (cr, 0.0, 0.0, width, height); cairo_fill (cr); cairo_set_source_rgba (cr, CAIRO_RGBA (BColors::grey)); cairo_set_line_width (cr, 1); cairo_move_to (cr, 0, 0.2 * height); cairo_line_to (cr, width, 0.2 * height); cairo_move_to (cr, 0, 0.55 * height); cairo_line_to (cr, width, 0.55 * height); cairo_move_to (cr, 0, 0.9 * height); cairo_line_to (cr, width, 0.9 * height); cairo_move_to (cr, 0.25 * width, 0); cairo_line_to (cr, 0.25 * width, height); cairo_move_to (cr, 0.5 * width, 0); cairo_line_to (cr, 0.5 * width, height); cairo_move_to (cr, 0.75 * width, 0); cairo_line_to (cr, 0.75 * width, height); cairo_stroke (cr); // Draw step shape cairo_set_source_rgba (cr, CAIRO_INK1, 1.0); cairo_set_line_width (cr, 3); cairo_move_to (cr, 0, 0.9 * height); cairo_line_to (cr, width * 0.25, 0.9 * height); const float attack = attackControl.getValue(); const float release = releaseControl.getValue(); if (blendControl.getValue() == 1) { if ((attack + release) > 1) { float crosspointX = attack / (attack + release); float crosspointY = crosspointX / attack - (crosspointX - (1 - release)) / release; cairo_line_to (cr, width * 0.25 + crosspointX * width * 0.5, 0.9 * height - 0.7 * height * crosspointY); } else { cairo_line_to (cr, width * 0.25 + attack * width * 0.5, 0.2 * height); cairo_line_to (cr, width * 0.75 - release * width * 0.5, 0.2 * height); } } else if (blendControl.getValue() == 2) { for (double i = 0.0; i <= 1.0; i += 0.025) { double vol = 1.0; if (i < attack) vol = sin (M_PI * (i / attack - 0.5)); if (i > (1 - release)) vol = vol * sin (M_PI * ((1 - i) / release - 0.5)); cairo_line_to (cr, width * (0.25 + 0.5 * i), height * (0.55 - 0.35 * vol)); } } cairo_line_to (cr, width * 0.75, 0.9 * height); cairo_line_to (cr, width, 0.9 * height); cairo_stroke_preserve (cr); cairo_pattern_add_color_stop_rgba (pat5, 0.1, CAIRO_INK1, 1); cairo_pattern_add_color_stop_rgba (pat5, 0.9, CAIRO_INK1, 0); cairo_set_source (cr, pat5); cairo_line_to(cr, 0, 0.9 * height); cairo_set_line_width (cr, 0); cairo_fill (cr); cairo_destroy (cr); stepshapeDisplay.update (); } bool BChoppr_GUI::init_mainMonitor () { //Initialize mainMonitor mainMonitor.record_on = true; mainMonitor.width = 0; mainMonitor.height = 0; mainMonitor.data.fill (defaultNotification); mainMonitor.horizonPos = 0; //Initialize mainMonitors cairo data double width = monitorDisplay.getEffectiveWidth (); double height = monitorDisplay.getEffectiveHeight (); surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); cr1 = cairo_create (surface); cr2 = cairo_create (surface); cr3 = cairo_create (surface); cr4 = cairo_create (surface); pat1 = cairo_pattern_create_linear (0, 0, 0, height); cairo_pattern_add_color_stop_rgba (pat1, 0.1, CAIRO_INK1, 1); cairo_pattern_add_color_stop_rgba (pat1, 0.6, CAIRO_INK1, 0); pat2 = cairo_pattern_create_linear (0, 0, 0, height); cairo_pattern_add_color_stop_rgba (pat2, 0.1, CAIRO_INK2, 1); cairo_pattern_add_color_stop_rgba (pat2, 0.6, CAIRO_INK2, 0); pat3 = cairo_pattern_create_linear (0, height, 0, 0); cairo_pattern_add_color_stop_rgba (pat3, 0.1, CAIRO_INK1, 1); cairo_pattern_add_color_stop_rgba (pat3, 0.6, CAIRO_INK1, 0); pat4 = cairo_pattern_create_linear (0, height, 0, 0); cairo_pattern_add_color_stop_rgba (pat4, 0.1, CAIRO_INK2, 1); cairo_pattern_add_color_stop_rgba (pat4, 0.6, CAIRO_INK2, 0); return (pat4 && (cairo_pattern_status (pat4) == CAIRO_STATUS_SUCCESS) && pat3 && (cairo_pattern_status (pat3) == CAIRO_STATUS_SUCCESS) && pat2 && (cairo_pattern_status (pat2) == CAIRO_STATUS_SUCCESS) && pat1 && (cairo_pattern_status (pat1) == CAIRO_STATUS_SUCCESS) && cr4 && (cairo_status (cr4) == CAIRO_STATUS_SUCCESS) && cr3 && (cairo_status (cr3) == CAIRO_STATUS_SUCCESS)&& cr2 && (cairo_status (cr2) == CAIRO_STATUS_SUCCESS) && cr1 && (cairo_status (cr1) == CAIRO_STATUS_SUCCESS) && surface && (cairo_surface_status (surface) == CAIRO_STATUS_SUCCESS)); } void BChoppr_GUI::destroy_mainMonitor () { //Destroy also mainMonitors cairo data if (pat4 && (cairo_pattern_status (pat4) == CAIRO_STATUS_SUCCESS)) cairo_pattern_destroy (pat4); if (pat3 && (cairo_pattern_status (pat3) == CAIRO_STATUS_SUCCESS)) cairo_pattern_destroy (pat3); if (pat2 && (cairo_pattern_status (pat2) == CAIRO_STATUS_SUCCESS)) cairo_pattern_destroy (pat2); if (pat1 && (cairo_pattern_status (pat1) == CAIRO_STATUS_SUCCESS)) cairo_pattern_destroy (pat1); if (cr4 && (cairo_status (cr4) == CAIRO_STATUS_SUCCESS)) cairo_destroy (cr4); if (cr3 && (cairo_status (cr3) == CAIRO_STATUS_SUCCESS)) cairo_destroy (cr3); if (cr2 && (cairo_status (cr2) == CAIRO_STATUS_SUCCESS)) cairo_destroy (cr2); if (cr1 && (cairo_status (cr1) == CAIRO_STATUS_SUCCESS)) cairo_destroy (cr1); if (surface && (cairo_surface_status (surface) == CAIRO_STATUS_SUCCESS)) cairo_surface_destroy (surface); } void BChoppr_GUI::add_monitor_data (BChopprNotifications* notifications, uint32_t notificationsCount, uint32_t& end) { for (uint32_t i = 0; i < notificationsCount; ++i) { int monitorpos = notifications[i].position; if (monitorpos >= MONITORBUFFERSIZE) monitorpos = MONITORBUFFERSIZE; if (monitorpos < 0) monitorpos = 0; mainMonitor.data[monitorpos].inputMin = notifications[i].inputMin; mainMonitor.data[monitorpos].inputMax = notifications[i].inputMax; mainMonitor.data[monitorpos].outputMin = notifications[i].outputMin; mainMonitor.data[monitorpos].outputMax = notifications[i].outputMax; mainMonitor.horizonPos = monitorpos; } } void BChoppr_GUI::redrawMainMonitor () { double width = monitorDisplay.getEffectiveWidth (); double height = monitorDisplay.getEffectiveHeight (); cairo_t* cr = cairo_create (monitorDisplay.getDrawingSurface ()); if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) return; // Draw background cairo_set_source_rgba (cr, CAIRO_BG_COLOR); cairo_rectangle (cr, 0, 0, width, height); cairo_fill (cr); cairo_set_source_rgba (cr, CAIRO_RGBA (BColors::grey)); cairo_set_line_width (cr, 1); cairo_move_to (cr, 0, 0.1 * height); cairo_line_to (cr, width, 0.1 * height); cairo_move_to (cr, 0, 0.5 * height); cairo_line_to (cr, width, 0.5 * height); cairo_move_to (cr, 0, 0.9 * height); cairo_line_to (cr, width, 0.9 * height); uint32_t steps = (uint32_t) nrStepsControl.getValue() - 1; for (uint32_t i = 0; i < steps; ++i) { cairo_move_to (cr, markerWidgets[i].getValue() * width, 0); cairo_rel_line_to (cr, 0, height); } cairo_stroke (cr); if (mainMonitor.record_on) { cairo_surface_clear (surface); // Draw input (cr, cr3) and output (cr2, cr4) curves cairo_move_to (cr1, 0, height * (0.5 - (0.4 * LIM ((mainMonitor.data[0].inputMax / scale), 0.0f, 1.0f)))); cairo_move_to (cr2, 0, height * (0.5 - (0.4 * LIM ((mainMonitor.data[0].outputMax / scale), 0.0f, 1.0f)))); cairo_move_to (cr3, 0, height * (0.5 + (0.4 * LIM (-(mainMonitor.data[0].inputMin / scale), 0.0f, 1.0f)))); cairo_move_to (cr4, 0, height * (0.5 + (0.4 * LIM (-(mainMonitor.data[0].outputMin / scale), 0.0f, 1.0f)))); for (int i = 0; i < MONITORBUFFERSIZE; ++i) { double pos = ((double) i) / (MONITORBUFFERSIZE - 1.0f); cairo_line_to (cr1, pos * width, height * (0.5 - (0.4 * LIM ((mainMonitor.data[i].inputMax / scale), 0.0f, 1.0f)))); cairo_line_to (cr2, pos * width, height * (0.5 - (0.4 * LIM ((mainMonitor.data[i].outputMax / scale), 0.0f, 1.0f)))); cairo_line_to (cr3, pos * width, height * (0.5 + (0.4 * LIM (-(mainMonitor.data[i].inputMin / scale), 0.0f, 1.0f)))); cairo_line_to (cr4, pos * width, height * (0.5 + (0.4 * LIM (-(mainMonitor.data[i].outputMin / scale), 0.0f, 1.0f)))); } // Visualize input (cr, cr3) and output (cr2, cr4) curves cairo_set_source_rgba (cr1, CAIRO_INK1, 1.0); cairo_set_line_width (cr1, 3); cairo_set_source_rgba (cr2, CAIRO_INK2, 1.0); cairo_set_line_width (cr2, 3); cairo_stroke_preserve (cr1); cairo_stroke_preserve (cr2); cairo_set_source_rgba (cr3, CAIRO_INK1, 1.0); cairo_set_line_width (cr3, 3); cairo_set_source_rgba (cr4, CAIRO_INK2, 1.0); cairo_set_line_width (cr4, 3); cairo_stroke_preserve (cr3); cairo_stroke_preserve (cr4); // Visualize input (cr, cr3) and output (cr2, cr4) areas under the curves cairo_line_to (cr1, width, height * 0.5); cairo_line_to (cr1, 0, height * 0.5); cairo_close_path (cr1); cairo_line_to (cr2, width, height * 0.5); cairo_line_to (cr2, 0, height * 0.5); cairo_close_path (cr2); cairo_set_source (cr1, pat1); cairo_set_line_width (cr1, 0); cairo_set_source (cr2, pat2); cairo_set_line_width (cr2, 0); cairo_fill (cr1); cairo_fill (cr2); cairo_line_to (cr3, width, height * 0.5); cairo_line_to (cr3, 0, height * 0.5); cairo_close_path (cr3); cairo_line_to (cr4, width, height * 0.5); cairo_line_to (cr4, 0, height * 0.5); cairo_close_path (cr4); cairo_set_source (cr3, pat3); cairo_set_line_width (cr3, 0); cairo_set_source (cr4, pat4); cairo_set_line_width (cr4, 0); cairo_fill (cr3); cairo_fill (cr4); // Draw fade out double horizon = ((double) mainMonitor.horizonPos) / (MONITORBUFFERSIZE - 1.0f); cairo_pattern_t* pat6 = cairo_pattern_create_linear (horizon * width, 0, horizon * width + 63, 0); if (cairo_pattern_status (pat6) == CAIRO_STATUS_SUCCESS) { cairo_pattern_add_color_stop_rgba (pat6, 0.0, CAIRO_BG_COLOR); cairo_pattern_add_color_stop_rgba (pat6, 1.0, CAIRO_TRANSPARENT); cairo_set_line_width (cr1, 0.0); cairo_set_source (cr1, pat6); cairo_rectangle (cr1, horizon * width, 0, 63, height); cairo_fill (cr1); cairo_pattern_destroy (pat6); } if (horizon * width > width - 63) { cairo_pattern_t* pat6 = cairo_pattern_create_linear ((horizon - 1) * width, 0, (horizon - 1) * width + 63, 0); if (cairo_pattern_status (pat6) == CAIRO_STATUS_SUCCESS) { cairo_pattern_add_color_stop_rgba (pat6, 0.0, CAIRO_BG_COLOR); cairo_pattern_add_color_stop_rgba (pat6, 1.0, CAIRO_TRANSPARENT); cairo_set_line_width (cr1, 0.0); cairo_set_source (cr1, pat6); cairo_rectangle (cr1, (horizon - 1) * width, 0, 63, height); cairo_fill (cr1); cairo_pattern_destroy (pat6); } } // Draw horizon line cairo_set_source_rgba (cr1, CAIRO_FG_COLOR); cairo_set_line_width (cr1, 1); cairo_move_to (cr1, horizon * width, 0); cairo_line_to (cr1, horizon * width, height); cairo_stroke (cr1); } cairo_set_source_surface (cr, surface, 0, 0); cairo_paint (cr); cairo_destroy (cr); monitorDisplay.update (); } void BChoppr_GUI::redrawSContainer () { double width = sContainer.getEffectiveWidth (); double height = sContainer.getEffectiveHeight (); cairo_surface_clear (sContainer.getDrawingSurface ()); cairo_t* cr = cairo_create (sContainer.getDrawingSurface ()); if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) return; cairo_pattern_t* pat = cairo_pattern_create_linear (0, 0, 0, height); cairo_pattern_add_color_stop_rgba (pat, 0.0, CAIRO_RGBA (BColors::black)); cairo_pattern_add_color_stop_rgba (pat, 1.0, 0.0, 0.0, 0.0, 0.5); cairo_rectangle (cr, 0, 0, width, height); cairo_set_source (cr, pat); cairo_fill (cr); cairo_pattern_destroy (pat); for (int i = 0; i < nrStepsControl.getValue() - 1; ++i) { cairo_set_line_width (cr, 1.0); cairo_set_source_rgba (cr, CAIRO_RGBA (BColors::grey)); cairo_move_to (cr, markerWidgets[i].getValue() * width, 0); cairo_rel_line_to (cr, 0, 30 * sz); cairo_line_to (cr, (i + 1) / nrStepsControl.getValue() * width, 40 * sz); cairo_rel_line_to (cr, 0, 100 * sz); cairo_stroke (cr); } cairo_destroy (cr); sContainer.update(); } void BChoppr_GUI::redrawButtons () { // rectButton double width = rectButton.getEffectiveWidth (); double height = rectButton.getEffectiveHeight (); cairo_surface_clear (rectButton.getDrawingSurface ()); cairo_t* cr = cairo_create (rectButton.getDrawingSurface ()); if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) return; cairo_set_source_rgba (cr, CAIRO_RGBA (*rectButton.getBorder()->getLine()->getColor())); cairo_set_line_width (cr, 2.0); cairo_move_to (cr, 0.05 * width, 0.9 * height); cairo_line_to (cr, 0.25 * width, 0.9 * height); cairo_line_to (cr, 0.3 * width, 0.1 * height); cairo_line_to (cr, 0.7 * width, 0.1 * height); cairo_line_to (cr, 0.75 * width, 0.9 * height); cairo_line_to (cr, 0.95 * width, 0.9 * height); cairo_stroke (cr); cairo_destroy (cr); // sinButton width = sinButton.getEffectiveWidth (); height = sinButton.getEffectiveHeight (); cairo_surface_clear (sinButton.getDrawingSurface ()); cr = cairo_create (sinButton.getDrawingSurface ()); if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) return; cairo_set_source_rgba (cr, CAIRO_RGBA (*sinButton.getBorder()->getLine()->getColor())); cairo_set_line_width (cr, 2.0); cairo_move_to (cr, 0.05 * width, 0.9 * height); cairo_line_to (cr, 0.15 * width, 0.9 * height); for (int i = 0; i <= 10; ++i) cairo_line_to (cr, (0.15 + i * 0.03) * width, (0.5 - 0.4 * sin (double (i - 5) * M_PI / 10)) * height); cairo_line_to (cr, 0.55 * width, 0.1 * height); for (int i = 0; i <= 10; ++i) cairo_line_to (cr, (0.55 + i * 0.03) * width, (0.5 - 0.4 * sin (double (i + 5) * M_PI / 10)) * height); cairo_line_to (cr, 0.95 * width, 0.9 * height); cairo_stroke (cr); cairo_destroy (cr); } static LV2UI_Handle instantiate (const LV2UI_Descriptor *descriptor, const char *plugin_uri, const char *bundle_path, LV2UI_Write_Function write_function, LV2UI_Controller controller, LV2UI_Widget *widget, const LV2_Feature *const *features) { PuglNativeView parentWindow = 0; LV2UI_Resize* resize = NULL; if (strcmp(plugin_uri, BCHOPPR_URI) != 0) { std::cerr << "BChoppr.lv2#GUI: GUI does not support plugin with URI " << plugin_uri << std::endl; return NULL; } for (int i = 0; features[i]; ++i) { if (!strcmp(features[i]->URI, LV2_UI__parent)) parentWindow = (PuglNativeView) features[i]->data; else if (!strcmp(features[i]->URI, LV2_UI__resize)) resize = (LV2UI_Resize*)features[i]->data; } if (parentWindow == 0) std::cerr << "BChoppr.lv2#GUI: No parent window.\n"; // New instance BChoppr_GUI* ui; try {ui = new BChoppr_GUI (bundle_path, features, parentWindow);} catch (std::exception& exc) { std::cerr << "BChoppr.lv2#GUI: Instantiation failed. " << exc.what () << std::endl; return NULL; } ui->controller = controller; ui->write_function = write_function; // Reduce min GUI size for small displays double sz = 1.0; int screenWidth = getScreenWidth (); int screenHeight = getScreenHeight (); if ((screenWidth < 820) || (screenHeight < 600)) sz = 0.66; if (resize) resize->ui_resize(resize->handle, 760 * sz, 560 * sz); *widget = (LV2UI_Widget) puglGetNativeWindow (ui->getPuglView ()); ui->send_record_on(); return (LV2UI_Handle) ui; } static void cleanup(LV2UI_Handle ui) { BChoppr_GUI* pluginGui = (BChoppr_GUI*) ui; if (pluginGui) delete pluginGui; } static void portEvent(LV2UI_Handle ui, uint32_t port_index, uint32_t buffer_size, uint32_t format, const void* buffer) { BChoppr_GUI* pluginGui = (BChoppr_GUI*) ui; if (pluginGui) pluginGui->portEvent(port_index, buffer_size, format, buffer); } static int callIdle (LV2UI_Handle ui) { BChoppr_GUI* pluginGui = (BChoppr_GUI*) ui; if (pluginGui) pluginGui->handleEvents (); return 0; } static int callResize (LV2UI_Handle ui, int width, int height) { BChoppr_GUI* self = (BChoppr_GUI*) ui; if (!self) return 0; BEvents::ExposeEvent* ev = new BEvents::ExposeEvent (self, self, BEvents::CONFIGURE_REQUEST_EVENT, self->getPosition().x, self->getPosition().y, width, height); self->addEventToQueue (ev); return 0; } static const LV2UI_Idle_Interface idle = {callIdle}; static const LV2UI_Resize resize = {nullptr, callResize} ; static const void* extensionData(const char* uri) { if (!strcmp(uri, LV2_UI__idleInterface)) return &idle; else if(!strcmp(uri, LV2_UI__resize)) return &resize; else return NULL; } static const LV2UI_Descriptor guiDescriptor = { BCHOPPR_GUI_URI, instantiate, cleanup, portEvent, extensionData }; // LV2 Symbol Export LV2_SYMBOL_EXPORT const LV2UI_Descriptor *lv2ui_descriptor(uint32_t index) { switch (index) { case 0: return &guiDescriptor; default:return NULL; } } BChoppr-1.10.10/src/BChoppr_GUI.hpp000066400000000000000000000332161411663013200165520ustar00rootroot00000000000000/* B.Choppr * Step Sequencer Effect Plugin * * Copyright (C) 2018, 2019 by Sven Jähnichen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef BCHOPPR_GUI_HPP_ #define BCHOPPR_GUI_HPP_ #include #include #include #include "BWidgets/Widget.hpp" #include "BWidgets/Window.hpp" #include "BWidgets/Label.hpp" #include "BWidgets/DrawingSurface.hpp" #include "BWidgets/HSwitch.hpp" #include "BWidgets/VSlider.hpp" #include "BWidgets/VSliderValue.hpp" #include "BWidgets/HSliderValue.hpp" #include "BWidgets/DialValue.hpp" #include "BWidgets/ListBox.hpp" #include "BWidgets/ToggleButton.hpp" #include "BWidgets/TextButton.hpp" #include "Ports.hpp" #include "Marker.hpp" #include "LightButton.hpp" #include "SwingHSlider.hpp" #include "HaloButton.hpp" #include "HaloToggleButton.hpp" #include "definitions.hpp" #include "Urids.hpp" #ifdef LOCALEFILE #include LOCALEFILE #else #include "Locale_EN.hpp" #endif #ifndef MESSAGENR_ #define MESSAGENR_ enum MessageNr { NO_MSG = 0, JACK_STOP_MSG = 1, MAX_MSG = 1 }; #endif /* MESSAGENR_ */ #define SCALEMIN -60 #define SCALEMAX 30 #define CAIRO_BG_COLOR 0.0, 0.0, 0.0, 1.0 #define CAIRO_BG_COLOR2 0.2, 0.2, 0.2, 1.0 #define CAIRO_TRANSPARENT 0.0, 0.0, 0.0, 0.0 #define CAIRO_FG_COLOR 1.0, 1.0, 1.0, 1.0 #define CAIRO_INK1 0.0, 1.0, 0.4 #define CAIRO_INK2 0.8, 0.6, 0.2 #define BG_FILE "surface.png" #define HELP_URL "https://github.com/sjaehn/BChoppr/blob/master/README.md" #define YT_URL " https://youtu.be/PuzoxiAs-h8" #define WWW_BROWSER_CMD "x-www-browser" #define DB_CO(g) ((g) > -90.0f ? powf(10.0f, (g) * 0.05f) : 0.0f) #define CO_DB(g) ((g) > 0.0001f ? logf((g)) / 0.05f : -90.0f) #define LIM(g , min, max) ((g) > (max) ? (max) : ((g) < (min) ? (min) : (g))) #define INT(g) (int) (g + 0.5) #define RESIZE(widget, x, y, w, h, sz) (widget).moveTo ((x) * (sz), (y) * (sz)); (widget).resize ((w) * (sz), (h) * (sz)); const std::string messageStrings[MAX_MSG + 1] = { "", "*** " BCHOPPR_LABEL_JACK_STOP " ***" }; class BChoppr_GUI : public BWidgets::Window { public: BChoppr_GUI (const char *bundle_path, const LV2_Feature *const *features, PuglNativeView parentWindow); ~BChoppr_GUI (); void portEvent (uint32_t port_index, uint32_t buffer_size, uint32_t format, const void *buffer); void send_record_on (); void send_record_off (); void sendSharedDataNr (); void sendController (const int nr, const float value); virtual void onConfigureRequest (BEvents::ExposeEvent* event) override; void applyTheme (BStyles::Theme& theme) override; LV2UI_Controller controller; LV2UI_Write_Function write_function; private: void resizeGUI (); float setController (const int nr, const double value); void setMarker (const int markerNr, double value); void setAutoMarkers (); void rearrange_controllers (); static void valueChangedCallback (BEvents::Event* event); static void markerClickedCallback (BEvents::Event* event); static void markerDraggedCallback (BEvents::Event* event); static void monitorScrolledCallback (BEvents::Event* event); static void monitorDraggedCallback (BEvents::Event* event); static void listBoxChangedCallback (BEvents::Event* event); static void markersAutoClickedCallback (BEvents::Event* event); static void buttonClickedCallback (BEvents::Event* event); static void sharedDataClickedCallback (BEvents::Event* event); static void helpButtonClickedCallback (BEvents::Event* event); static void ytButtonClickedCallback (BEvents::Event* event); static void stepControlLabelMessageCallback (BEvents::Event* event); bool init_Stepshape (); void destroy_Stepshape (); void redrawStepshape (); bool init_mainMonitor (); void destroy_mainMonitor (); void add_monitor_data (BChopprNotifications* notifications, uint32_t notificationsCount, uint32_t& end); void redrawMainMonitor (); void redrawSContainer (); void redrawButtons (); BWidgets::Widget mContainer; BWidgets::Widget rContainer; BWidgets::DrawingSurface sContainer; BWidgets::HSwitch monitorSwitch; BWidgets::Label monitorLabel; LightButton bypassButton; BWidgets::Label bypassLabel; BWidgets::DialValue drywetDial; BWidgets::Label drywetLabel; HaloButton helpButton; HaloButton ytButton; BWidgets::DrawingSurface monitorDisplay; BWidgets::RangeWidget blendControl; BWidgets::DrawingSurface rectButton; BWidgets::DrawingSurface sinButton; BWidgets::DrawingSurface stepshapeDisplay; BWidgets::DialValue attackControl; BWidgets::Label attackLabel; BWidgets::DialValue releaseControl; BWidgets::Label releaseLabel; BWidgets::HSliderValue sequencesperbarControl; BWidgets::Label sequencesperbarLabel; SwingHSlider ampSwingControl; BWidgets::Label ampSwingLabel; SwingHSlider swingControl; BWidgets::Label swingLabel; BWidgets::TextButton markersAutoButton; BWidgets::Label markersAutoLabel; BWidgets::HSliderValue nrStepsControl; BWidgets::Label nrStepsLabel; BWidgets::Label stepshapeLabel; BWidgets::Label sequencemonitorLabel; BWidgets::Label messageLabel; std::array stepControl; std::array stepControlLabel; std::array markerWidgets; BWidgets::ListBox markerListBox; BWidgets::RangeWidget sharedDataSelection; std::array sharedDataButtons; cairo_surface_t* surface; cairo_t* cr1; cairo_t* cr2; cairo_t* cr3; cairo_t* cr4; cairo_pattern_t* pat1; cairo_pattern_t* pat2; cairo_pattern_t* pat3; cairo_pattern_t* pat4; cairo_pattern_t* pat5; struct { bool record_on; uint32_t width; uint32_t height; std::array data; uint32_t horizonPos; } mainMonitor; std::string pluginPath; double sz; cairo_surface_t* bgImageSurface; std::array controllers; float scale; LV2_Atom_Forge forge; BChopprURIs uris; LV2_URID_Map* map; // Definition of styles BColors::ColorSet fgColors = {{{0.0, 0.75, 0.2, 1.0}, {0.2, 1.0, 0.6, 1.0}, {0.0, 0.2, 0.0, 1.0}, {0.0, 0.0, 0.0, 0.0}}}; BColors::ColorSet rdColors = {{{0.75, 0.0, 0.0, 1.0}, {1.0, 0.25, 0.25, 1.0}, {0.2, 0.0, 0.0, 1.0}, {0.0, 0.0, 0.0, 0.0}}}; BColors::ColorSet txColors = {{{0.0, 1.0, 0.4, 1.0}, {1.0, 1.0, 1.0, 1.0}, {0.0, 0.5, 0.0, 1.0}, {0.0, 0.0, 0.0, 0.0}}}; BColors::ColorSet bgColors = {{{0.15, 0.15, 0.15, 1.0}, {0.3, 0.3, 0.3, 1.0}, {0.05, 0.05, 0.05, 1.0}, {0.0, 0.0, 0.0, 0.0}}}; BColors::Color ink = {0.0, 0.75, 0.2, 1.0}; BStyles::Border border = {{ink, 1.0}, 0.0, 2.0, 0.0}; BStyles::Border actborder = {{{CAIRO_INK1, 1.0}, 2.0}, 0.0, 1.0, 0.0}; BStyles::Border inactborder = {{BColors::darkgrey, 1.0}, 0.0, 2.0, 0.0}; BStyles::Border blindborder = {{{0.0, 0.0, 0.0, 0.0}, 1.0}, 0.0, 2.0, 0.0}; BStyles::Border labelBorder = BStyles::Border (BStyles::noLine, 0.0, 4.0); BStyles::Border focusborder = BStyles::Border (BStyles::Line (BColors::Color (0.0, 0.0, 0.0, 0.5), 2.0)); BStyles::Fill widgetBg = BStyles::noFill; BStyles::Fill screenBg = BStyles::Fill (BColors::Color (0.0, 0.0, 0.0, 0.75)); BStyles::Border screenBorder = BStyles::Border (BStyles::Line (BColors::Color (0.0, 0.0, 0.0, 0.75), 4.0)); BStyles::Font defaultFont = BStyles::Font ("Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL, 12.0, BStyles::TEXT_ALIGN_CENTER, BStyles::TEXT_VALIGN_MIDDLE); BStyles::Font leftFont = BStyles::Font ("Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL, 12.0, BStyles::TEXT_ALIGN_LEFT, BStyles::TEXT_VALIGN_MIDDLE); BStyles::Font mdFont = BStyles::Font ("Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL, 10.0, BStyles::TEXT_ALIGN_CENTER, BStyles::TEXT_VALIGN_MIDDLE); BStyles::Font smFont = BStyles::Font ("Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL, 8.0, BStyles::TEXT_ALIGN_CENTER, BStyles::TEXT_VALIGN_MIDDLE); BStyles::StyleSet defaultStyles = {"default", {{"background", STYLEPTR (&BStyles::noFill)}, {"border", STYLEPTR (&BStyles::noBorder)}}}; BStyles::StyleSet labelStyles = {"labels", {{"background", STYLEPTR (&BStyles::noFill)}, {"border", STYLEPTR (&BStyles::noBorder)}, {"textcolors", STYLEPTR (&txColors)}, {"font", STYLEPTR (&defaultFont)}}}; BStyles::StyleSet llStyles = {"labels", {{"background", STYLEPTR (&BStyles::noFill)}, {"border", STYLEPTR (&BStyles::noBorder)}, {"textcolors", STYLEPTR (&txColors)}, {"font", STYLEPTR (&leftFont)}}}; BStyles::StyleSet mlStyles = {"labels", {{"background", STYLEPTR (&BStyles::noFill)}, {"border", STYLEPTR (&BStyles::noBorder)}, {"textcolors", STYLEPTR (&fgColors)}, {"font", STYLEPTR (&mdFont)}}}; BStyles::StyleSet smStyles = {"labels", {{"background", STYLEPTR (&BStyles::noFill)}, {"border", STYLEPTR (&BStyles::noBorder)}, {"textcolors", STYLEPTR (&txColors)}, {"font", STYLEPTR (&smFont)}}}; BStyles::StyleSet focusStyles = {"labels", {{"background", STYLEPTR (&screenBg)}, {"border", STYLEPTR (&focusborder)}, {"textcolors", STYLEPTR (&txColors)}, {"font", STYLEPTR (&defaultFont)}}}; BStyles::Theme theme = BStyles::Theme ({ defaultStyles, {"B.Choppr", {{"background", STYLEPTR (&BStyles::blackFill)}, {"border", STYLEPTR (&BStyles::noBorder)}}}, {"main", {{"background", STYLEPTR (&widgetBg)}, {"border", STYLEPTR (&BStyles::noBorder)}}}, {"widget", {{"uses", STYLEPTR (&defaultStyles)}}}, {"mmonitor", {{"background", STYLEPTR (&BStyles::blackFill)}, {"border", STYLEPTR (&BStyles::noBorder)}}}, {"smonitor", {{"background", STYLEPTR (&BStyles::blackFill)}, {"border", STYLEPTR (&border)}}}, {"nbutton", {{"background", STYLEPTR (&BStyles::blackFill)}, {"border", STYLEPTR (&inactborder)}}}, {"abutton", {{"background", STYLEPTR (&BStyles::blackFill)}, {"border", STYLEPTR (&actborder)}}}, {"rcontainer", {{"background", STYLEPTR (&BStyles::noFill)}, {"border", STYLEPTR (&border)}}}, {"scontainer", {{"background", STYLEPTR (&BStyles::noFill)}, {"border", STYLEPTR (&BStyles::noBorder)}}}, {"listbox", {{"border", STYLEPTR (&border)}, {"background", STYLEPTR (&BStyles::blackFill)}}}, {"listbox/item",{{"uses", STYLEPTR (&defaultStyles)}, {"border", STYLEPTR (&labelBorder)}, {"textcolors", STYLEPTR (&BColors::whites)}, {"font", STYLEPTR (&defaultFont)}}}, {"listbox/button",{{"border", STYLEPTR (&BColors::darks)}, {"background", STYLEPTR (&BStyles::blackFill)}, {"bgcolors", STYLEPTR (&BColors::darks)}}}, {"dial", {{"uses", STYLEPTR (&defaultStyles)}, {"fgcolors", STYLEPTR (&fgColors)}, {"bgcolors", STYLEPTR (&bgColors)}, {"textcolors", STYLEPTR (&fgColors)}, {"font", STYLEPTR (&defaultFont)}}}, {"redbutton", {{"uses", STYLEPTR (&defaultStyles)}, {"fgcolors", STYLEPTR (&rdColors)}, {"bgcolors", STYLEPTR (&bgColors)}}}, {"halobutton", {{"uses", STYLEPTR (&defaultStyles)}, {"fgcolors", STYLEPTR (&bgColors)}}}, {"halobutton/focus", {{"uses", STYLEPTR (&focusStyles)}}}, {"dial/focus", {{"background", STYLEPTR (&screenBg)}, {"border", STYLEPTR (&screenBorder)}, {"textcolors", STYLEPTR (&txColors)}, {"font", STYLEPTR (&defaultFont)}}}, {"slider", {{"uses", STYLEPTR (&defaultStyles)}, {"fgcolors", STYLEPTR (&fgColors)}, {"bgcolors", STYLEPTR (&bgColors)}, {"textcolors", STYLEPTR (&fgColors)}, {"font", STYLEPTR (&defaultFont)}}}, {"slider/focus",{{"background", STYLEPTR (&screenBg)}, {"border", STYLEPTR (&screenBorder)}, {"textcolors", STYLEPTR (&txColors)}, {"font", STYLEPTR (&defaultFont)}}}, {"switch", {{"uses", STYLEPTR (&defaultStyles)}, {"fgcolors", STYLEPTR (&fgColors)}, {"bgcolors", STYLEPTR (&bgColors)}}}, {"switch/focus",{{"background", STYLEPTR (&screenBg)}, {"border", STYLEPTR (&screenBorder)}, {"textcolors", STYLEPTR (&txColors)}, {"font", STYLEPTR (&defaultFont)}}}, {"label", {{"uses", STYLEPTR (&labelStyles)}}}, {"llabel", {{"uses", STYLEPTR (&llStyles)}}}, {"mlabel", {{"uses", STYLEPTR (&mlStyles)}}}, {"smlabel", {{"uses", STYLEPTR (&smStyles)}}}, {"hilabel", {{"uses", STYLEPTR (&labelStyles)}, {"textcolors", STYLEPTR (&BColors::whites)}}}, }); }; #endif /* BCHOPPR_GUI_HPP_ */ BChoppr-1.10.10/src/BUtilities/000077500000000000000000000000001411663013200160505ustar00rootroot00000000000000BChoppr-1.10.10/src/BUtilities/Any.hpp000066400000000000000000000047371411663013200173230ustar00rootroot00000000000000/* Any.hpp * Copyright (C) 2019 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BUTILITIES_ANY_HPP_ #define BUTILITIES_ANY_HPP_ #include #include namespace BUtilities { class Any { protected: struct Envelope { virtual ~Envelope () {} virtual Envelope* clone () {return new Envelope (*this);} }; template struct Data : Envelope { Data (const T& t) : data (t) {} virtual ~Data () {} virtual Envelope* clone () override {return new Data (*this);} T data; }; Envelope* dataptr = nullptr; size_t dataTypeHash = typeid (void).hash_code (); Envelope* clone () const { if (dataptr == nullptr) return nullptr; return dataptr->clone (); } public: Any () {} Any (const Any& that) : dataTypeHash (that.dataTypeHash) {dataptr = that.clone ();} ~Any () {if (dataptr) delete dataptr;} Any& operator= (const Any& that) { if (dataptr) delete dataptr; dataptr = that.clone (); dataTypeHash = that.dataTypeHash; return *this; } template void set (const T& t) { if (dataptr) delete dataptr; dataptr = new Data (t); dataTypeHash = typeid (T).hash_code (); } template T get () const { if ((!dataptr) || (typeid (T).hash_code () != dataTypeHash)) return T (); // Return () better throw exception return ((Data*)dataptr)->data; } }; template Any makeAny (const T& t) { Any a; a.set (t); return a; } } #endif /* BUTILITIES_ANY_HPP_ */ BChoppr-1.10.10/src/BUtilities/Path.hpp000066400000000000000000000053101411663013200174540ustar00rootroot00000000000000/* Path.hpp * Copyright (C) 2021 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT PATH WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BUTILITIES_PATH_HPP_ #define BUTILITIES_PATH_HPP_ #include #ifdef _WIN32 #define BUTILITIES_PATH_SLASH "\\" #else #define BUTILITIES_PATH_SLASH "/" #endif namespace BUtilities { class Path { public: Path () : dir_(), file_(), ext_() {} Path (const std::string& path) {split (path);} Path& operator= (const std::string& path) { split (path); return *this; } operator std::string() const {return (dir().empty() || (dir() == BUTILITIES_PATH_SLASH) ? dir() : dir() + BUTILITIES_PATH_SLASH) + filename();} std::string dir() const {return dir_;} std::string filename() const {return file_ + (ext_.empty() ? "" : "." + ext_);} std::string ext() const {return ext_;} protected: std::string dir_; std::string file_; std::string ext_; void split (const std::string& path) { const size_t spos = path.find_last_of (BUTILITIES_PATH_SLASH); if (spos == std::string::npos) dir_ = ""; else if (spos == 0) dir_ = BUTILITIES_PATH_SLASH; else dir_ = path.substr (0, spos); file_ = path.substr (spos + 1); if (file_ == "") ext_ = ""; else if ((file_ == ".") || (file_ == "..")) { dir_ = (dir_.empty() || (dir_ == BUTILITIES_PATH_SLASH) ? dir_ : dir_ + BUTILITIES_PATH_SLASH) + file_; file_ = ""; ext_ = ""; } else { const size_t dpos = file_.find_last_of ("."); if ((dpos != std::string::npos) && (dpos != 0)) { ext_ = file_.substr (dpos + 1); file_ = file_.substr (0, dpos); } else ext_ = ""; } } }; } #endif /* BUTILITIES_PATH_HPP_ */ BChoppr-1.10.10/src/BUtilities/Point.hpp000066400000000000000000000030611411663013200176520ustar00rootroot00000000000000/* Point.hpp * Beat / envelope shaper LV2 plugin * * Copyright (C) 2019 by Sven Jähnichen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef BUTILITIES_POINT_HPP_ #define BUTILITIES_POINT_HPP_ namespace BUtilities { struct Point { double x, y; Point () : Point (0, 0) {} Point (double x, double y) : x (x), y (y) {} Point& operator+= (const Point& rhs) { this->x += rhs.x; this->y += rhs.y; return *this; } Point& operator-= (const Point& rhs) { this->x -= rhs.x; this->y -= rhs.y; return *this; } friend bool operator== (const Point& lhs, const Point& rhs) {return ((lhs.x == rhs.x) && (lhs.y == rhs.y));} friend bool operator!= (const Point& lhs, const Point& rhs) {return !(lhs == rhs);} friend Point operator+ (Point lhs, const Point& rhs) {return (lhs += rhs);} friend Point operator- (Point lhs, const Point& rhs) {return (lhs -= rhs);} }; } #endif /* BUTILITIES_POINT_HPP_ */ BChoppr-1.10.10/src/BUtilities/RectArea.hpp000066400000000000000000000075011411663013200202520ustar00rootroot00000000000000/* RectArea.hpp * Beat / envelope shaper LV2 plugin * * Copyright (C) 2019 by Sven Jähnichen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef BUTILITIES_RECTAREA_HPP_ #define BUTILITIES_RECTAREA_HPP_ #include "Point.hpp" namespace BUtilities { class RectArea { protected: Point p1, p2; public: RectArea () : RectArea (Point (), Point ()) {} RectArea (const double x1, const double y1, const double width, const double height) : RectArea (Point (x1, y1), Point (x1 + width, y1 + height)) {} RectArea (const Point& p1, const Point& p2) : p1 (Point ((p1.x < p2.x ? p1.x : p2.x), (p1.y < p2.y ? p1.y : p2.y))), p2 (Point ((p1.x > p2.x ? p1.x : p2.x), (p1.y > p2.y ? p1.y : p2.y))) {} Point getPosition () const {return p1;} double getX () const {return p1.x;} double getY () const {return p1.y;} Point getExtends () const {return Point (p2.x - p1.x, p2.y - p1.y);} double getWidth () const {return (p2.x - p1.x);} double getHeight () const {return (p2.y - p1.y);} void setX (const double x) {moveTo (x, getY());} void setY (const double y) {moveTo (getX(), y);} void moveTo (const double x, const double y) {moveTo (Point (x, y));} void moveTo (const Point& position) { p2 = p2 - p1 + position; p1 = position; } void setWidth (const double width) {resize (width, getHeight());} void setHeight (const double height) {resize (getWidth(), height);} void resize (const double width, const double height) {resize (Point (width, height));} void resize (const Point& extends) {p2 = p1 + extends;} bool contains (const Point& p) const { return ((p.x > p1.x) && (p.x < p2.x) && (p.y > p1.y) && (p.y < p2.y)); } bool includes (const RectArea& ra) const { return ((ra.p1.x >= p1.x) && (ra.p1.y >= p1.y) && (ra.p2.x <= p2.x) && (ra.p2.y <= p2.y)); } bool overlaps (const RectArea& ra) const { return !((ra.p2.x < p1.x) || (ra.p2.y < p1.y) || (ra.p1.x > p2.x) || (ra.p1.y > p2.y)); } void extend (const RectArea& ra) { if (*this == RectArea ()) *this = ra; else if (ra != RectArea ()) { p1 = Point ((p1.x < ra.p1.x ? p1.x : ra.p1.x), (p1.y < ra.p1.y ? p1.y : ra.p1.y)); p2 = Point ((p2.x > ra.p2.x ? p2.x : ra.p2.x), (p2.y > ra.p2.y ? p2.y : ra.p2.y)); } } void intersect (const RectArea& ra) { if ((*this == RectArea ()) || (ra == RectArea ()) || (!overlaps (ra))) *this = RectArea (); else { double x1 = (ra.p1.x < p1.x ? p1.x : ra.p1.x); double y1 = (ra.p1.y < p1.y ? p1.y : ra.p1.y); double x2 = (ra.p2.x > p2.x ? p2.x : ra.p2.x); double y2 = (ra.p2.y > p2.y ? p2.y : ra.p2.y); p1 = Point (x1, y1); p2 = Point (x2, y2); } } RectArea& operator+= (const RectArea& rhs) { this->extend (rhs); return *this; } RectArea& operator*= (const RectArea& rhs) { this->intersect (rhs); return *this; } friend bool operator== (const RectArea& lhs, const RectArea& rhs) { return ((lhs.p1 == rhs.p1) && (lhs.p2 == rhs.p2)); } friend bool operator!= (const RectArea& lhs, const RectArea& rhs) {return !(lhs == rhs);} friend RectArea operator+ (RectArea lhs, const RectArea& rhs) {return (lhs += rhs);} friend RectArea operator* (RectArea lhs, const RectArea& rhs) {return (lhs *= rhs);} }; } #endif /* BUTILITIES_RECTAREA_HPP_ */ BChoppr-1.10.10/src/BUtilities/mix.hpp000066400000000000000000000016731411663013200173650ustar00rootroot00000000000000/* mix.hpp * Copyright (C) 2020 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BUTILITIES_MIX_HPP_ #define BUTILITIES_MIX_HPP_ namespace BUtilities { template inline T mix (const T& t0, const T& t1, const double ratio) { return t1 * ratio + t0 * (1.0f - ratio); } } #endif /* BUTILITIES_MIX_HPP_ */ BChoppr-1.10.10/src/BUtilities/stof.cpp000066400000000000000000000042761411663013200175400ustar00rootroot00000000000000/* stof.cpp * Copyright (C) 2020 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "stof.hpp" #include namespace BUtilities { float stof (const std::string& str, size_t* idx) { const std::string numbers = "0123456789"; bool isNumber = false; float sign = 1.0f; float predec = 0.0f; float dec = 0.0f; float decfac = 0.1f; size_t i = 0; // Ignore spaces before while (str[i] == ' ') ++i; // Check sign if ((str[i] == '+') || (str[i] == '-')) { if (str[i] == '-') sign = -1.0f; ++i; } // Interpret pre-decimal digits while ((str[i] != 0) && (numbers.find_first_of (str[i]) != std::string::npos)) { predec = predec * 10.0f + str[i] - '0'; ++i; isNumber = true; } // Check decimal sign if ((str[i] == '.') || (str[i] == ',')) { ++i; // Interpret decimal digits while ((str[i] != 0) && (numbers.find_first_of (str[i]) != std::string::npos)) { dec += (str[i] - '0') * decfac; decfac *= 0.1f; ++i; isNumber = true; } } // Communicate next position if (idx != nullptr) *idx = i; // Not a number: invalid argument exception if (!isNumber) throw std::invalid_argument (str + " is not a number"); return sign * (predec + dec); } } BChoppr-1.10.10/src/BUtilities/stof.hpp000066400000000000000000000016311411663013200175350ustar00rootroot00000000000000/* stof.hpp * Copyright (C) 2020 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BUTILITIES_STOF_HPP_ #define BUTILITIES_STOF_HPP_ #include #include namespace BUtilities { float stof (const std::string& str, size_t* idx = 0); } #endif /* BUTILITIES_STOF_HPP_ */ BChoppr-1.10.10/src/BUtilities/to_string.cpp000066400000000000000000000020621411663013200205640ustar00rootroot00000000000000/* to_string.cpp * Copyright (C) 2019 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "to_string.hpp" #include namespace BUtilities { std::string to_string (const double value) { std::ostringstream os; os << value; std::string str = os.str(); return str; } std::string to_string (const double value, const std::string& format) { char c[64]; snprintf (c, 64, format.c_str (), value); std::string str = c; return c; } } BChoppr-1.10.10/src/BUtilities/to_string.hpp000066400000000000000000000017251411663013200205760ustar00rootroot00000000000000/* to_string.hpp * Copyright (C) 2019 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BUTILITIES_TO_STRING_HPP_ #define BUTILITIES_TO_STRING_HPP_ #include namespace BUtilities { std::string to_string (const double value); std::string to_string (const double value, const std::string& format); } #endif /* BUTILITIES_TO_STRING_HPP_ */ BChoppr-1.10.10/src/BUtilities/vsystem.cpp000066400000000000000000000020451411663013200202670ustar00rootroot00000000000000/* vsystem.cpp * Copyright (C) 2021 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "vsystem.hpp" #include #include namespace BUtilities { [[noreturn]] static void vexec (char* argv[]) { execvp (argv[0], argv); perror ("execvp"); _exit (1); } int vsystem (char* argv[]) { pid_t pid = vfork(); if (pid != 0) return pid; vexec (argv); return 0; } } BChoppr-1.10.10/src/BUtilities/vsystem.hpp000066400000000000000000000015431411663013200202760ustar00rootroot00000000000000/* vsystem.hpp * Copyright (C) 2021 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BUTILITIES_VSYSTEM_HPP_ #define BUTILITIES_VSYSTEM_HPP_ namespace BUtilities { int vsystem (char* argv[]); } #endif /* BUTILITIES_VSYSTEM_HPP_ */ BChoppr-1.10.10/src/BWidgets/000077500000000000000000000000001411663013200155035ustar00rootroot00000000000000BChoppr-1.10.10/src/BWidgets/BColors.cpp000066400000000000000000000103321411663013200175510ustar00rootroot00000000000000/* BColors.cpp * Copyright (C) 2018 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "BColors.hpp" #ifndef LIMIT #define LIMIT(val, min, max) (val < min ? min : (val < max ? val : max)) #endif namespace BColors { /***************************************************************************** * Class BColors::Color *****************************************************************************/ Color::Color () : Color (0.0, 0.0, 0.0, 0.0) {}; Color::Color (const double red, const double green, const double blue, const double alpha) : red_ (LIMIT (red, 0.0, 1.0)), green_ (LIMIT (green, 0.0, 1.0)), blue_ (LIMIT (blue, 0.0, 1.0)), alpha_ (LIMIT (alpha, 0.0, 1.0)) {} Color::Color (const uint32_t red32, const uint32_t green32, const uint32_t blue32, const uint32_t alpha32) : red_ (red32 / 0xFFFF), green_ (green32 / 0xFFFF), blue_ (blue32 / 0xFFFF), alpha_ (alpha32 / 0xFFFF) {} bool Color::operator== (const Color& that) const {return (0 == compare (that));} bool Color::operator!= (const Color& that) const {return !(0 == compare (that));} void Color::setRGBA (const double red, const double green, const double blue, const double alpha) { red_ = LIMIT (red, 0.0, 1.0); green_ = LIMIT (green, 0.0, 1.0); blue_ = LIMIT (blue, 0.0, 1.0); alpha_ = LIMIT (alpha, 0.0, 1.0); } void Color::setRGB (const double red, const double green, const double blue) { red_ = LIMIT (red, 0.0, 1.0); green_ = LIMIT (green, 0.0, 1.0); blue_ = LIMIT (blue, 0.0, 1.0); } void Color::setAlpha (const double alpha) { alpha_ = LIMIT (alpha, 0.0, 1.0); } double Color::getRed() const {return red_;} double Color::getGreen() const {return green_;} double Color::getBlue() const {return blue_;} double Color::getAlpha() const {return alpha_;} int Color::compare (const Color& that) const { return ((red_ == that.red_) && (green_ == that.green_) && (blue_ == that.blue_) && (alpha_ == that.alpha_) ? 0 : 1); } void Color::applyBrightness (const double brightness) { double b = LIMIT (brightness, -1.0, 1.0); if (b < 0) { red_ = red_ * (b + 1.0); green_ = green_ * (b + 1.0); blue_ = blue_ * (b + 1.0); } else if (b > 0) { red_ = red_ + (1.0 - red_) * b; green_ = green_ + (1.0 - green_) * b; blue_ = blue_ + (1.0 - blue_) * b; } } /* * End of class BColors::Color *****************************************************************************/ /***************************************************************************** * Class BColors::ColorSet *****************************************************************************/ ColorSet::ColorSet () : ColorSet ({grey, lightgrey, darkgrey}) {}; ColorSet::ColorSet (const std::vector vectorOfColors) : colors (vectorOfColors) {}; bool ColorSet::operator== (const ColorSet& that) const {return (colors == that.colors);} bool ColorSet::operator!= (const ColorSet& that) const {return (colors != that.colors);} int ColorSet::compare (const ColorSet& that) const {return (colors == that.colors ? 0 : 1);} void ColorSet::addColor (const State state, const Color& color) { // Filling undefined vector elements with Color invisible int size = colors.size (); for (int i = size; i <= (int) state; ++i) colors.push_back (invisible); colors[state] = color; } void ColorSet::removeColor (const State state) { if (state < colors.size ()) { colors[state] = invisible; } // TODO shrink vector colors if last element is removed } Color* ColorSet::getColor (const State state) { if (state < colors.size ()) { return &colors[state]; } else { return &noColor; } } /* * End of class BColors::ColorSet *****************************************************************************/ } BChoppr-1.10.10/src/BWidgets/BColors.hpp000066400000000000000000000150071411663013200175620ustar00rootroot00000000000000/* BColors.cpp * Copyright (C) 2018, 1019 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BCOLORS_HPP_ #define BCOLORS_HPP_ #include #include #include #ifndef LIMIT #define LIMIT(val, min, max) (val < min ? min : (val < max ? val : max)) #endif /* LIMIT */ #define CAIRO_RGBA(col) (col).getRed(), (col).getGreen(), (col).getBlue(), (col).getAlpha() namespace BColors { /** * Color states */ typedef enum { NORMAL = 0, ACTIVE = 1, INACTIVE = 2, OFF = 3, USER_DEFINED = 4 } State; /** * Class BColors::Color * * Color management class. Uses relative (0.0 .. 1.0) color and alpha values */ class Color { public: Color (); Color (const double red, const double green, const double blue, const double alpha); Color (const uint32_t red32, const uint32_t green32, const uint32_t blue32, const uint32_t alpha32); bool operator== (const Color& that) const; bool operator!= (const Color& that) const; /** * Sets colors rgb and alpha of a BColors::Color * @param red, green, blue, alpha Relative values (0.0 .. 1.0) */ void setRGBA (const double red, const double green, const double blue, const double alpha); /** * Sets colors rgb of a BColors::Color * @param red, green, blue Relative values (0.0 .. 1.0) */ void setRGB (const double red, const double green, const double blue); /** * Sets alpha value of a BColors::Color * @param alpha Relative value (0.0 .. 1.0) */ void setAlpha (const double alpha); /** * Gets red value of a BColors::Color * @return Relative red value (0.0 .. 1.0) */ double getRed () const; /** * Gets green value of a BColors::Color * @return Relative green value (0.0 .. 1.0) */ double getGreen () const; /** * Gets blue value of a BColors::Color * @return Relative blue value (0.0 .. 1.0) */ double getBlue () const; /** * Gets alpha value of a BColors::Color * @return Relative alpha value (0.0 .. 1.0) */ double getAlpha () const; /** * Compares the color of this object with the color of the given object by * comparison of all RGB and alpha values. * @param that Color to compare with * @return 0, if both colors are equal * 1, if the two colors are not equal */ int compare (const Color& that) const; /** * Changes the red, green and blue values of the BColors::Color by a given * brightness. * @param brightness Brightness ranging from -1.0 (full darkness => black * over 0.0 (normal => unchanged) to 1.0 (full brightness * => white) */ void applyBrightness (const double brightness); private: double red_, green_, blue_, alpha_; }; /* * End of class BColors::Color *****************************************************************************/ const Color white = Color (1.0, 1.0, 1.0, 1.0); const Color black = Color (0.0, 0.0, 0.0, 1.0); const Color red = Color (1.0, 0.0, 0.0, 1.0); const Color green = Color (0.0, 1.0, 0.0, 1.0); const Color blue = Color (0.0, 0.0, 1.0, 1.0); const Color yellow = Color (1.0, 1.0, 0.0, 1.0); const Color grey = Color (0.5, 0.5, 0.5, 1.0); const Color lightred = Color (1.0, 0.5, 0.5, 1.0); const Color darkred = Color (0.5, 0.0, 0.0, 1.0); const Color lightgreen = Color (0.5, 1.0, 0.5, 1.0); const Color darkgreen = Color (0.0, 0.5, 0.0, 1.0); const Color lightblue = Color (0.5, 0.5, 1.0, 1.0); const Color darkblue = Color (0.0, 0.0, 0.5, 1.0); const Color lightgrey = Color (0.75, 0.75, 0.75, 1.0); const Color darkgrey = Color (0.25, 0.25, 0.25, 1.0); const Color darkdarkgrey = Color (0.1, 0.1, 0.1, 1.0); const Color grey80 = Color (0.8, 0.8, 0.8, 1.0); const Color grey60 = Color (0.6, 0.6, 0.6, 1.0); const Color grey40 = Color (0.4, 0.4, 0.4, 1.0); const Color grey20 = Color (0.2, 0.2, 0.2, 1.0); const Color invisible = Color (0.0, 0.0, 0.0, 0.0); /** * Class BColors::ColorSet * * Defines a set of colors for different states. I can be used in combination * with BColors::Style. */ class ColorSet { public: ColorSet (); ColorSet (const std::vector vectorOfColors); bool operator== (const ColorSet& that) const; bool operator!= (const ColorSet& that) const; /** * Compares the colorset of this object with the color of the given object by * comparison of all colors of this set. * @param that Colorset to compare with * @return 0, if both sets (content and order) are equal * 1, if the two sets (content and order) are not equal */ int compare (const ColorSet& that) const; /** * Adds (or overwrites) a BColors::Color to the ColorSet * @param state BColors::State of the color to be added to the set. The * set will be extended automatically if needed. * @param color BColors::Color to be added */ void addColor (const State state, const Color& color); /** * Removes a BColors::Color from the ColorSet * @param state BColors::State of the color to be removed from the set. The * set will be shrinked automatically if needed. */ void removeColor (const State state); /** * Gets a (pointer to) BColors::Color from the ColorSet * @param state BColors::State of the color to be returned. * @return Pointer to BColors::Color of the respective state or pointer to * a copy of BColors::invisible if the states color is not within * the ColorSet. */ Color* getColor (const State state); private: std::vector colors; Color noColor = invisible; }; /* * End of class BColors::ColorSet *****************************************************************************/ const ColorSet reds = ColorSet ({red, lightred, darkred, black}); const ColorSet greens = ColorSet ({green, lightgreen, darkgreen, black}); const ColorSet blues = ColorSet ({blue, lightblue, darkblue, black}); const ColorSet greys = ColorSet ({grey, lightgrey, darkgrey, black}); const ColorSet whites = ColorSet ({lightgrey, white, grey, black}); const ColorSet darks = ColorSet ({darkgrey, grey, darkdarkgrey, black}); const ColorSet lights = ColorSet ({lightgrey, white, grey, darkgrey}); } #endif /* BCOLORS_HPP_ */ BChoppr-1.10.10/src/BWidgets/BDevices.hpp000066400000000000000000000174141411663013200177070ustar00rootroot00000000000000/* BDevices.hpp * Copyright (C) 2019 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BWIDGETS_BDEVICES_HPP_ #define BWIDGETS_BDEVICES_HPP_ #include #include #include #include #include "../BUtilities/Point.hpp" namespace BWidgets { class Widget; // Forward declaration } namespace BDevices { /** * Enumeration of mouse buttons as input device for event handling */ enum ButtonCode { NO_BUTTON = 0, LEFT_BUTTON = 1, MIDDLE_BUTTON = 2, RIGHT_BUTTON = 3, NR_OF_BUTTONS = 4 }; enum KeyCode { KEY_F1 = 0xE000, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, KEY_F12, KEY_LEFT, KEY_UP, KEY_RIGHT, KEY_DOWN, KEY_PAGE_UP, KEY_PAGE_DOWN, KEY_HOME, KEY_END, KEY_INSERT, KEY_SHIFT, KEY_CTRL, KEY_ALT, KEY_SUPER }; /** * Class BDevices::DeviceGrab * * Links a BWidgets::Widget to a std::set of devices */ template class DeviceGrab { protected: BWidgets::Widget* widget_; std::set devices_; public: DeviceGrab () : DeviceGrab (nullptr, std::set {}) {} DeviceGrab (BWidgets::Widget* widget) : DeviceGrab (widget, std::set {}) {} DeviceGrab (BWidgets::Widget* widget, const T& device) : DeviceGrab (widget, std::set {device}) {} DeviceGrab (BWidgets::Widget* widget, const std::set& devices) : widget_ (widget), devices_ (devices) {} /* Get (the pointer to) the widget of this DeviceGrab * @return Pointer to widget */ BWidgets::Widget* getWidget () const {return widget_;} /* Gets the devices of this DeviceGrab * @return std::set of devices */ std::set getDevices () const {return devices_;} /* Gets infomation whether this DeviceGrab contains a given device or * not. * @param device of device * @return True if device is in this DeviceGrab, otherwise * false */ bool contains (const T& device) const { if (devices_.empty()) return true; // Empty devices_ used as joker return (devices_.find (device) != devices_.end()); } }; template class DeviceGrabStack : std::list> { protected: std::list> stack_; bool contains (BWidgets::Widget* widget) { for (typename std::list>::iterator it = stack_.begin(); it != stack_.end(); ++it) { DeviceGrab& dg = *it; if (dg.getWidget() == widget) return true; } return false; } std::set getDevices (BWidgets::Widget* widget) { std::set devices {}; for (typename std::list>::iterator it = stack_.begin(); it != stack_.end(); ++it) { DeviceGrab& dg = *it; if (dg.getWidget() == widget) { std::set d = dg.getDevices (); devices.insert (d.begin(), d.end()); } } return devices; } public: using std::list>::clear; /* Removes DeviceGrab devices from the stack. If the DeviceGrab devices * are completely depleted, the empty DeviceGrab is removed from the * stack. * @param widget All DeviceGrabs with this widget will be removed * from the stack. * @param device Devices device from all DeviceGrabs of the stack * will be removed. * @param devices All given devices will be removed from all * DeviceGrabs of the stack. * @param deviceGrab For all DeviceGrabs of the stack that match with * deviceGrab.widget all deviceGrab.devices will be * removed. */ void remove (BWidgets::Widget* widget) {remove (DeviceGrab (widget));} void remove (const T& device) {remove (DeviceGrab (nullptr, device));} void remove (const std::set& devices) {remove (DeviceGrab (nullptr, devices));} void remove (const DeviceGrab& deviceGrab) { bool done = true; std::set devices = deviceGrab.getDevices(); BWidgets::Widget* widget = deviceGrab.getWidget(); do { done = true; for (typename std::list>::iterator it = stack_.begin(); it != stack_.end(); ++it) { DeviceGrab& dg = *it; if ((!widget) || (dg.getWidget() == widget)) { // Erase list item if joker (std::set{}) used if (devices.empty()) { stack_.erase (it); done = false; break; } std::set stackDevices = dg.getDevices(); // Deletion of individual devices is not allowed // if joker (std::set{}) is set if (stackDevices.empty()) {} else { // Build difference std::set diff = {}; std::set_difference ( stackDevices.begin(), stackDevices.end(), devices.begin(), devices.end(), std::inserter (diff, diff.begin()) ); // Erase list item if all devices are deleted if (diff.empty()) { stack_.erase (it); done = false; break; } // Otherwise replace list item else dg = DeviceGrab (dg.getWidget(), diff); } } } } while (!done); } /* Adds a widget to the top of DeviceGrab stack. If the widget is * already inside the stack, it is moved to the top and the linked * devices are combined. * @param deviceGrab DeviceGrab */ void add (BWidgets::Widget* widget) {add (DeviceGrab (widget, std::set{}));} void add (const DeviceGrab& deviceGrab) { BWidgets::Widget* widget = deviceGrab.getWidget(); std::set devices = deviceGrab.getDevices (); if (contains(widget)) { std::set d2 = getDevices (widget); if (devices.empty() || d2.empty()) devices.clear(); else devices.insert (d2.begin(), d2.end()); remove (deviceGrab.getWidget()); } stack_.push_back (DeviceGrab (widget, devices)); } /* Gets (the pointer to) the DeviceGrab containing the respective * device. Starts from the top of the DeviceGrab stack. * @param device of the respective device. * @return Pointer to the respective DeviceGrab or nullptr. */ DeviceGrab* getGrab (const T& device) { for (typename std::list>::reverse_iterator rit = stack_.rbegin (); rit != stack_.rend (); ++rit) { DeviceGrab& dg = *rit; if (dg.contains (device)) return &dg; } return nullptr; } }; class MouseDevice { public: ButtonCode button; BUtilities::Point position; protected: std::chrono::steady_clock::time_point time_; public: MouseDevice () : MouseDevice (NO_BUTTON, BUtilities::Point ()) {} MouseDevice (const ButtonCode but) : MouseDevice (but, BUtilities::Point ()) {} MouseDevice (const ButtonCode but, const BUtilities::Point& pos) : button (but), position (pos), time_ (std::chrono::steady_clock::now()) {} std::chrono::steady_clock::time_point getTime () const {return time_;} friend inline bool operator< (const MouseDevice& lhs, const MouseDevice& rhs) { if( lhs.button < rhs.button ) return true; return false; } friend inline bool operator== (const MouseDevice& lhs, const MouseDevice& rhs) { if( lhs.button == rhs.button ) return true; return false; } friend inline bool operator> (const MouseDevice& lhs, const MouseDevice& rhs) {return rhs < lhs;} friend inline bool operator<=(const MouseDevice& lhs, const MouseDevice& rhs) {return !(lhs > rhs);} friend inline bool operator>=(const MouseDevice& lhs, const MouseDevice& rhs) {return !(lhs < rhs);} friend inline bool operator!=(const MouseDevice& lhs, const MouseDevice& rhs) {return !(lhs==rhs);} }; } #endif /*BWIDGETS_BDEVICES_HPP_*/ BChoppr-1.10.10/src/BWidgets/BEvents.hpp000066400000000000000000000341141411663013200175650ustar00rootroot00000000000000/* BEvents.hpp * Copyright (C) 2018, 2019 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BEVENTS_HPP_ #define BEVENTS_HPP_ #include #include #include "BDevices.hpp" #include "../BUtilities/Any.hpp" #include "../BUtilities/RectArea.hpp" namespace BWidgets { class Widget; // Forward declaration } namespace BEvents { //TODO switch toward three pointer event handling states: pass, handle, block /** * Enumeration of event types */ enum EventType { CONFIGURE_REQUEST_EVENT, EXPOSE_REQUEST_EVENT, CLOSE_REQUEST_EVENT, KEY_PRESS_EVENT, KEY_RELEASE_EVENT, BUTTON_PRESS_EVENT, BUTTON_RELEASE_EVENT, BUTTON_CLICK_EVENT, POINTER_MOTION_EVENT, POINTER_DRAG_EVENT, WHEEL_SCROLL_EVENT, VALUE_CHANGED_EVENT, FOCUS_IN_EVENT, FOCUS_OUT_EVENT, MESSAGE_EVENT, NO_EVENT }; /** * Class BEvents::Event * * Main class of events. Only contains the event type and (a pointer to) the * widget which caused the event. All other event classes are derived from this * class. */ class Event { protected: BWidgets::Widget* eventWidget; EventType eventType; public: Event () : Event (nullptr, NO_EVENT) {} Event (BWidgets::Widget* widget, const EventType type) : eventWidget (widget), eventType (type) {} virtual ~Event () {} /** * Gets a pointer to the widget which caused the event. * @return Pointer to the widget */ BWidgets::Widget* getWidget () {return eventWidget;} /** * Gets the type of the event * @return Event type */ EventType getEventType () const {return eventType;} }; /* * End of class BEvents::Event *****************************************************************************/ /** * Class BEvents::WidgetEvent * * Widget events are emitted by an (event) widget if the widget is requested * by an other (request) widget. This event class is typically used if opening * or closing of a window or an request widget is requested. */ class WidgetEvent : public Event { protected: BWidgets::Widget* requestWidget; public: WidgetEvent () : WidgetEvent (nullptr, nullptr, NO_EVENT) {} WidgetEvent (BWidgets::Widget* eventWidget, BWidgets::Widget* requestWidget, const EventType type) : Event (eventWidget, type), requestWidget (requestWidget) {} /** * Gets a pointer to the widget which request the event. * @return Pointer to the widget */ BWidgets::Widget* getRequestWidget () {return requestWidget;} }; /* * End of class BEvents::WidgetEvent *****************************************************************************/ /** * Class BEvents::ExposeEvent * * Expose events are emitted by a parent event widget (or window) if the visual * output of a child (request) widget is requested to be * updated. An expose event additionally contains the coordinates (x, y, width * and height) of the output region (relative to the widgets origin) that should * be updated. */ class ExposeEvent : public WidgetEvent { protected: BUtilities::RectArea exposeArea; public: ExposeEvent () : ExposeEvent (nullptr, nullptr, NO_EVENT, 0, 0, 0, 0) {}; ExposeEvent (BWidgets::Widget* eventWidget, BWidgets::Widget* requestWidget, const EventType type, const double x, const double y, const double width, const double height) : ExposeEvent (eventWidget, requestWidget, type, BUtilities::RectArea (x, y, width, height)) {} ExposeEvent (BWidgets::Widget* eventWidget, BWidgets::Widget* requestWidget, const EventType type, const BUtilities::RectArea& area) : WidgetEvent (eventWidget, requestWidget, type), exposeArea (area) {} /** * Redefines the area coordinates of the output region for the expose * event * @param area Area coordinates relative to the widgets origin */ void setArea (const BUtilities::RectArea& area) {exposeArea = area;} /** * Gets the area coordinates of the output region for the expose event * @return Area coordinates relative to the widgets origin */ BUtilities::RectArea getArea () const {return exposeArea;} }; /* * End of class BEvents::ExposeEvent *****************************************************************************/ /** * Class BEvents::KeyEvent * * Key events are emitted by the system if a key is pressed or released. */ class KeyEvent : public Event { protected: BUtilities::Point point; uint32_t key; public: KeyEvent () : KeyEvent (nullptr, NO_EVENT, 0, 0, 0) {} KeyEvent (BWidgets::Widget* widget, const EventType type, const double x, const double y, const uint32_t unicode) : KeyEvent (widget, type, BUtilities::Point (x, y), unicode) {} KeyEvent (BWidgets::Widget* widget, const EventType type, const BUtilities::Point& position, const uint32_t unicode) : Event (widget, type), point (position), key (unicode) {} /** * Redefines the point coordinates of the key event * @param coords Point coordinates relative to the widgets origin */ void setPosition (const BUtilities::Point& coords) {point = coords;} /** * Gets the point coordinates of the key event * @return coords Point coordinates relative to the widgets origin */ BUtilities::Point getPosition () const {return point;} /** * Gets the key that caused of the key event * @return Unicode of the key */ uint32_t getKey () const {return key;} std::string getKeyUTF8 () const { // Invalide unicode if (key > 0x0010ffff) return ""; std::string s = ""; // 7 bit ASCII: utf-8 = unicode if (key < 0x80) s += char (key); // 2/3/4(/5/6) byte utf-8 else { uint32_t steps = 2; for (uint32_t i = 3; i <= 6; ++i) { if (key >= (uint32_t (2) << (5 * (i - 1)))) steps = i; } char c = char ((0xFF & (0xFF << (8 - steps))) | (key >> (6 * (steps - 1)))); s += c; for (uint32_t i = steps - 1; i >= 1; --i) { char c = char (0x80 | ((key >> (6 * (i - 1))) & 0x3f)); s += c; } } return s; } }; /* * End of class BEvents::KeyEvent *****************************************************************************/ /** * Class BEvents::PointerEvent * * Pointer events are emitted by the system (via pugl and the main window) if * buttons are pressed or released and/or the pointer is moved over a widget. * The pointer event contains data about the position (relative to the * respective widget and the button pressed (or not). * Pointer events will be handled by the respective widget and can be * redirected to external callback functions. */ class PointerEvent : public Event { protected: BUtilities::Point point, origin, delta; BDevices::ButtonCode buttonNr; public: PointerEvent () : PointerEvent (nullptr, NO_EVENT, 0, 0, 0, 0, 0, 0, BDevices::NO_BUTTON) {} PointerEvent (BWidgets::Widget* widget, const EventType type, const double x, const double y, const double xOrigin, const double yOrigin, const double deltaX, const double deltaY, const BDevices::ButtonCode button) : PointerEvent (widget, type, BUtilities::Point (x, y), BUtilities::Point (xOrigin, yOrigin), BUtilities::Point (deltaX, deltaY), button) {} PointerEvent (BWidgets::Widget* widget, const EventType type, const BUtilities::Point& point, const BUtilities::Point& origin, const BUtilities::Point& delta, const BDevices::ButtonCode button) : Event (widget, type), point (point), origin (origin), delta (delta), buttonNr (button) {} /** * Redefines the point coordinate of the pointer event * @param pont Point coordinate relative to the widgets origin */ void setPosition (const BUtilities::Point& coords) {point = coords;} /** * Gets the point coordinate of the pointer event * @return Point coordinate relative to the widgets origin */ BUtilities::Point getPosition () const {return point;} /** * Redefines the point coordinate of the position where the button was * initially pressed * @param origin Point coordinate relative to the widgets origin */ void setOrigin (const BUtilities::Point& coords) {origin = coords;} /** * Gets the point coordinate of the pointer position where the respective * button was initially pressed. The returned value is the same as * for getPoint() for BUTTON_PRESS_EVENTs, 0.0 for POINTER_MOTION_EVENTs. * @return Point coordinate relative to the widgets origin */ BUtilities::Point getOrigin () const {return origin;} /** * Redefines the pointers movement * @param delta Movement of the pointer */ void setDelta (const BUtilities::Point& coords) {delta = coords;} /** * Gets the movement (relative to the last PointerEvent) * @return Change in coordinates */ BUtilities::Point getDelta () const {return delta;} /** * Redefines the button pressed of the pointer event * @param button Button pressed */ void setButton (const BDevices::ButtonCode button) {buttonNr = button;} /** * Gets the button pressed of the pointer event * @return Button pressed */ BDevices::ButtonCode getButton () const {return buttonNr;} }; /* * End of class BEvents::PointerEvent *****************************************************************************/ /** * Class BEvents::WheelEvent * * Wheel events are emitted by the system (via pugl and the main window) if * a (mouse) wheel is turned. * The wheel event contains data about the relative change of the wheel and * about the pointer position (relative to the respective widget. * Wheel events will be handled by the respective widget and can be * redirected to external callback functions. */ class WheelEvent : public Event { protected: BUtilities::Point point; BUtilities::Point delta; public: WheelEvent () : WheelEvent (nullptr, NO_EVENT, 0, 0, 0, 0) {} WheelEvent (BWidgets::Widget* widget, const EventType type, const double x, const double y, const double deltaX, const double deltaY) : WheelEvent (widget, type, BUtilities::Point (x, y), BUtilities::Point (deltaX, deltaY)) {} WheelEvent (BWidgets::Widget* widget, const EventType type, const BUtilities::Point& point, const BUtilities::Point delta) : Event (widget, type), point (point), delta (delta) {} /** * Redefines the pointers coordinate * @param x Point coordinate relative to the widgets origin */ void setPosition (const BUtilities::Point& coords) {point = coords;} /** * Gets the pointers coordinate of the wheel event * @return Point coordinate relative to the widgets origin */ BUtilities::Point getPosition () const {return point;} /** * Redefines the wheels movement * @param delta Movement of the wheel */ void setDelta (const BUtilities::Point& coords) {delta = coords;} /** * Gets the xmovement of the wheel * @return Change in coordinate */ BUtilities::Point getDelta () const {return delta;} }; /* * End of class BEvents::WheelEvent *****************************************************************************/ /** * Class BEvents::ValueChangedEvent * * Value changed events are emitted by widgets (namely BWidgets::ValueWidget) * if their setValue method is called. The event additionally exposes the * changed value (that should also be accessible via * BWidgets::ValueWidget::getValue ()). Value changed events can be handled * internally (e.g., by composite widgets) and can also be redirected to * external callback functions. */ class ValueChangedEvent : public Event { protected: double value; public: ValueChangedEvent () : ValueChangedEvent (nullptr, 0.0) {} ValueChangedEvent (BWidgets::Widget* widget, const double val) : Event (widget, VALUE_CHANGED_EVENT), value (val) {} /** * Redefines the value exposed by the event. This method doesn't change the * value within a widget! * @param val New value */ void setValue (const double val) {value = val;} /** * Gets the value exposed by the event * @return Value of the event */ double getValue () const {return value;} }; /* * End of class BEvents::ValueChangedEvent *****************************************************************************/ /** * Class BEvents::FocusEvent * * Focus events are emitted by widgets if the pointer rests for a predefined * time over the widget */ class FocusEvent : public Event { protected: BUtilities::Point point; public: FocusEvent () : FocusEvent (nullptr, NO_EVENT, 0, 0) {} FocusEvent (BWidgets::Widget* widget, const EventType type, const double x, const double y) : FocusEvent (widget, type, BUtilities::Point (x, y)) {} FocusEvent (BWidgets::Widget* widget, const EventType type, const BUtilities::Point& point) : Event (widget, type), point (point) {} /** * Redefines the pointers coordinate * @param x Point coordinate relative to the widgets origin */ void setPosition (const BUtilities::Point& coords) {point = coords;} /** * Gets the pointers coordinate of the wheel event * @return Point coordinate relative to the widgets origin */ BUtilities::Point getPosition () const {return point;} }; /* * End of class BEvents::ValueChangedEvent *****************************************************************************/ /** * Class BEvents::MessageEvent * * Ubiquitous event type */ class MessageEvent : public Event { protected: std::string messageName; BUtilities::Any messageContent; public: MessageEvent () : MessageEvent (nullptr, "", BUtilities::Any ()) {} MessageEvent (BWidgets::Widget* widget, const std::string& name, const BUtilities::Any& content) : Event (widget, MESSAGE_EVENT), messageName (name), messageContent (content) {} void setName (const std::string& name) {messageName = name;} std::string getName () const {return messageName;} void setContent (const BUtilities::Any& content) {messageContent = content;} BUtilities::Any getContent () const {return messageContent;} }; } #endif /* BEVENTS_HPP_ */ BChoppr-1.10.10/src/BWidgets/BItems.cpp000066400000000000000000000116131411663013200173740ustar00rootroot00000000000000/* BItems.cpp * Copyright (C) 2019 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "BItems.hpp" #include "Label.hpp" #include namespace BItems { Item::Item () : Item (UNSELECTED, nullptr) {} Item::Item (const double value, BWidgets::Widget* widget) : value (value), widget (widget), internal (nullptr) {} Item::Item (const double value, const std::string& text) : Item (value, nullptr) { try {internal = new BWidgets::Label (0, 0, BWIDGETS_DEFAULT_LABEL_WIDTH, BWIDGETS_DEFAULT_LABEL_HEIGHT, "label", text);} catch (std::bad_alloc &ba) {throw ba;} internal->getBorder ()->setPadding (BITEMS_DEFAULT_TEXT_PADDING); widget = internal; } Item::Item (const Item& that) : Item (that.value, nullptr) { if (that.internal) { try {internal = that.internal->clone ();} catch (std::bad_alloc &ba) {throw ba;} widget = internal; } else { internal = nullptr; widget = that.widget; } } Item::~Item () { if (internal) deleteInternal (); } void Item::deleteInternal () { delete internal; internal = nullptr; widget = nullptr; } Item& Item::operator= (const Item& that) { value = that.value; if (internal) deleteInternal (); if (that.internal) { try {internal = that.internal->clone ();} catch (std::bad_alloc &ba) {throw ba;} widget = internal; } else { internal = nullptr; widget = that.widget; } return *this; } void Item::setValue (const double value) {this->value = value;} double Item::getValue () const {return this->value;} void Item::setWidget (BWidgets::Widget* widget) { if (internal) deleteInternal (); this->widget = widget; } void Item::setWidget (const std::string& text) { if (internal) deleteInternal (); try {internal = new BWidgets::Label (0, 0, BWIDGETS_DEFAULT_LABEL_WIDTH, BWIDGETS_DEFAULT_LABEL_HEIGHT, "label", text);} catch (std::bad_alloc &ba) {throw ba;} internal->getBorder ()->setPadding (BITEMS_DEFAULT_TEXT_PADDING); widget = internal; } void Item::cloneWidgetFrom (BWidgets::Widget* widget) { if (internal) deleteInternal (); try {internal = widget->clone ();} catch (std::bad_alloc &ba) {throw ba;} this->widget = internal; } BWidgets::Widget* Item::getWidget () const {return widget;} /*****************************************************************************/ ItemList::ItemList () : std::list () {} ItemList::ItemList (const Item& item) : std::list ({item}) {} ItemList::ItemList (const std::list& items) : std::list (items) {} ItemList::ItemList (BWidgets::Widget* widget) : std::list ({Item (1.0, widget)}) {} ItemList::ItemList (const std::initializer_list& widgets) : std::list () { for (BWidgets::Widget* w : widgets) push_back (Item (getNextValue (), w));; } ItemList::ItemList (const std::string& text) : std::list ({Item (1.0, text)}) {} ItemList::ItemList (const std::initializer_list& texts) : std::list () { for (std::string const& s : texts) push_back (Item (getNextValue (), s)); } void ItemList::push_back (const Item& item) {std::list::push_back (item);} void ItemList::push_back (BWidgets::Widget* widget) { double v = getNextValue (); std::list::push_back (Item (v, widget)); } void ItemList::push_back (const std::string& text) { double v = getNextValue (); std::list::push_back (Item (v, text)); // TODO try catch bad_alloc } Item* ItemList::getItem (const double value) { for (iterator it = begin (); it != end () ; ++it) { if ((*it).getValue () == value) return &(*it); } return nullptr; } double ItemList::getNextValue () const { double maxValue = UNSELECTED; for (Item const& i : *this) { if (i.getValue () > maxValue) maxValue = i.getValue (); } if (maxValue != UNSELECTED) return floor (maxValue) + 1; else return 1.0; } } BChoppr-1.10.10/src/BWidgets/BItems.hpp000066400000000000000000000054271411663013200174070ustar00rootroot00000000000000/* BItems.hpp * Copyright (C) 2019 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BWIDGETS_BITEMS_HPP_ #define BWIDGETS_BITEMS_HPP_ #include #include #include "Widget.hpp" #include #ifndef UNSELECTED #define UNSELECTED -HUGE_VAL #define BITEMS_DEFAULT_TEXT_PADDING 4.0 #endif namespace BItems { class Item { public: Item (); Item (const double value, BWidgets::Widget* widget); Item (const double value, const std::string& text); Item (const Item& that); ~Item (); Item& operator= (const Item& that); void setValue (const double value); double getValue () const; void setWidget (BWidgets::Widget* widget); void setWidget (const std::string& text); void cloneWidgetFrom (BWidgets::Widget* widget); BWidgets::Widget* getWidget () const; protected: void deleteInternal (); double value; BWidgets::Widget* widget; BWidgets::Widget* internal; }; class ItemList : private std::list { public: ItemList (); ItemList (const Item& item); ItemList (const std::list& items); ItemList (BWidgets::Widget* widget); ItemList (const std::initializer_list& widgets); ItemList (const std::string& text); ItemList (const std::initializer_list& texts); using std::list::operator=; using std::list::begin; using std::list::end; using std::list::size; using std::list::empty; using std::list::front; using std::list::back; using std::list::pop_back; using std::list::pop_front; using std::list::erase; using std::list::iterator; void push_back (const Item& item); void push_back (BWidgets::Widget* widget); void push_back (const std::string& text); // TODO void push_front // TODO iterator insert Item* getItem (const double value); // TODO renumber protected: double getNextValue () const; }; } #endif /* BWIDGETS_BITEMS_HPP_ */ BChoppr-1.10.10/src/BWidgets/BStyles.cpp000066400000000000000000000237331411663013200176040ustar00rootroot00000000000000/* BStyles.cpp * Copyright (C) 2018 Sven Jähnichen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "BStyles.hpp" namespace BStyles { /***************************************************************************** * Class BStyles::Line *****************************************************************************/ Line::Line () : Line (BColors::invisible, 0.0) {} Line::Line (const BColors::Color& color, const double width) : lineColor (color), lineWidth (width) {} void Line::setColor (const BColors::Color& color) {lineColor = color;} BColors::Color* Line::getColor () {return &lineColor;} void Line::setWidth (const double width) {lineWidth = width;} double Line::getWidth () const {return lineWidth;} /* * End of class BWidgets::Line *****************************************************************************/ /***************************************************************************** * Class BStyles::Border *****************************************************************************/ Border::Border () : Border (noLine, 0.0, 0.0, 0.0) {} Border::Border (const Line& line) : Border (line, 0.0, 0.0, 0.0) {} Border::Border (const Line& line, const double margin, const double padding) : Border (line, margin, padding, 0.0) {} Border::Border (const Line& line, const double margin, const double padding, const double radius) : borderLine (line), borderMargin (margin), borderPadding (padding), borderRadius (radius) {} void Border::setLine (const Line& line) {borderLine = line;} Line* Border::getLine () {return &borderLine;} void Border::setMargin (const double margin) {borderMargin = margin;} double Border::getMargin () const {return borderMargin;} void Border::setPadding (const double padding) {borderPadding = padding;} double Border::getPadding () const {return borderPadding;} void Border::setRadius (const double radius) {borderRadius = radius;} double Border::getRadius () const {return borderRadius;} /* * End of class BWidgets::Border *****************************************************************************/ /***************************************************************************** * Class BStyles::Fill *****************************************************************************/ Fill::Fill () : fillColor (BColors::invisible), fillSurface (nullptr) {} Fill::Fill (const BColors::Color& color) : fillColor (color), fillSurface (nullptr) {} Fill::Fill (const std::string& filename) : fillColor (BColors::invisible), fillSurface (nullptr) { loadFillFromFile (filename); } Fill::Fill (const Fill& that) { fillColor = that.fillColor; if (that.fillSurface) fillSurface = cairo_image_surface_clone_from_image_surface (that.fillSurface); else fillSurface = nullptr; } Fill& Fill::operator= (const Fill& that) { if (this != &that) { fillColor = that.fillColor; if (that.fillSurface) fillSurface = cairo_image_surface_clone_from_image_surface (that.fillSurface); else fillSurface = nullptr; } return *this; } Fill::~Fill () { if (fillSurface && (cairo_surface_status (fillSurface) == CAIRO_STATUS_SUCCESS)) cairo_surface_destroy (fillSurface); } void Fill::setColor (const BColors::Color& color) {fillColor = color;} BColors::Color* Fill::getColor () {return &fillColor;} void Fill::loadFillFromFile (const std::string& filename) { if (fillSurface) cairo_surface_destroy (fillSurface); fillSurface = cairo_image_surface_create_from_png (filename.c_str()); } void Fill::loadFillFromCairoSurface (cairo_surface_t* surface) { if (fillSurface) cairo_surface_destroy (fillSurface); fillSurface = cairo_image_surface_clone_from_image_surface (surface); } cairo_surface_t* Fill::getCairoSurface () {return fillSurface;} /* * End of class BWidgets::Fill *****************************************************************************/ /***************************************************************************** * Class BStyles::Font *****************************************************************************/ Font::Font () : Font ("Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL, 12.0) {} Font::Font (const std::string& family, const cairo_font_slant_t slant, const cairo_font_weight_t weight, const double size, TextAlign align, TextVAlign valign, double lineSpacing) : fontFamily (family), fontSlant (slant), fontWeight (weight), fontSize (size), textAlign (align), textVAlign (valign), textLineSpacing (lineSpacing) {} void Font::setFontFamily (const std::string& family) {fontFamily = family;} std::string Font::getFontFamily () const {return fontFamily;} void Font::setFontSlant (const cairo_font_slant_t slant) {fontSlant = slant;} cairo_font_slant_t Font::getFontSlant () const {return fontSlant;} void Font::setFontWeight (const cairo_font_weight_t weight) {fontWeight = weight;} cairo_font_weight_t Font::getFontWeight () const {return fontWeight;} void Font::setTextAlign (const TextAlign align) {textAlign = align;} TextAlign Font::getTextAlign () const {return textAlign;} void Font::setTextVAlign (const TextVAlign valign) {textVAlign = valign;} TextVAlign Font::getTextVAlign () const {return textVAlign;} void Font::setLineSpacing (const double lineSpacing) {textLineSpacing = lineSpacing;} double Font::getLineSpacing () const {return textLineSpacing;} void Font::setFontSize (const double size) {fontSize = size;} double Font::getFontSize () const {return fontSize;} cairo_text_extents_t Font::getTextExtents (cairo_t* cr, const std::string& text) const { if (cr && (! cairo_status (cr))) { cairo_save (cr); cairo_text_extents_t ext; cairo_select_font_face (cr, fontFamily.c_str (), fontSlant, fontWeight); cairo_set_font_size (cr, fontSize); cairo_text_extents (cr, text.c_str(), &ext); cairo_restore (cr); return ext; } else { return {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; } } /* * End of class BWidgets::Font *****************************************************************************/ /***************************************************************************** * Class BStyles::StyleSet *****************************************************************************/ StyleSet::StyleSet () {} StyleSet::StyleSet (const std::string& name, const std::vector