Browse Source

Add Fade.

tags/v2.2.0
Andrew Belt 1 year ago
parent
commit
e229df8fab
6 changed files with 786 additions and 306 deletions
  1. +315
    -304
      plugin.json
  2. +369
    -0
      res/Fade.svg
  3. +6
    -2
      src/CVMix.cpp
  4. +94
    -0
      src/Fade.cpp
  5. +1
    -0
      src/plugin.cpp
  6. +1
    -0
      src/plugin.hpp

+ 315
- 304
plugin.json View File

@@ -1,305 +1,316 @@
{
"slug": "Fundamental",
"name": "Fundamental",
"version": "2.1.0",
"license": "GPL-3.0-or-later",
"brand": "VCV",
"author": "VCV",
"authorEmail": "support@vcvrack.com",
"pluginUrl": "https://vcvrack.com/Fundamental",
"authorUrl": "https://vcvrack.com/",
"manualUrl": "https://vcvrack.com/Fundamental#manual",
"sourceUrl": "https://github.com/VCVRack/Fundamental",
"changelogUrl": "https://github.com/VCVRack/Fundamental/blob/v2/CHANGELOG.md",
"modules": [
{
"slug": "VCO",
"name": "VCO",
"description": "Voltage-controlled oscillator",
"manualUrl": "https://vcvrack.com/Fundamental#VCO",
"tags": [
"VCO",
"Polyphonic"
]
},
{
"slug": "VCO2",
"name": "Wavetable VCO",
"description": "Voltage-controlled wavetable oscillator",
"manualUrl": "https://vcvrack.com/Fundamental#WavetableVCO",
"tags": [
"VCO",
"Polyphonic"
]
},
{
"slug": "VCF",
"name": "VCF",
"description": "Voltage-controlled filter",
"manualUrl": "https://vcvrack.com/Fundamental#VCF",
"tags": [
"VCF",
"Polyphonic"
]
},
{
"slug": "VCA-1",
"name": "VCA",
"description": "Voltage-controlled amplifier",
"manualUrl": "https://vcvrack.com/Fundamental#VCA",
"tags": [
"VCA",
"Polyphonic"
]
},
{
"slug": "VCA",
"name": "VCA-2",
"description": "2-channel voltage-controlled amplifier",
"tags": [
"VCA",
"Dual",
"Polyphonic"
],
"hidden": true
},
{
"slug": "LFO",
"name": "LFO",
"description": "Low-frequency oscillator",
"manualUrl": "https://vcvrack.com/Fundamental#LFO",
"tags": [
"LFO",
"Polyphonic"
]
},
{
"slug": "LFO2",
"name": "Wavetable LFO",
"description": "Low-frequency wavetable oscillator",
"manualUrl": "https://vcvrack.com/Fundamental#WavetableLFO",
"tags": [
"LFO",
"Polyphonic"
]
},
{
"slug": "Delay",
"name": "Delay",
"description": "",
"manualUrl": "https://vcvrack.com/Fundamental#Delay",
"tags": [
"Delay"
]
},
{
"slug": "ADSR",
"name": "ADSR",
"description": "Generates an envelope with Attack/Decay/Sustain/Release",
"manualUrl": "https://vcvrack.com/Fundamental#ADSR",
"tags": [
"Envelope Generator",
"Polyphonic"
]
},
{
"slug": "Mixer",
"name": "Mix",
"description": "Mixes 6 signals",
"manualUrl": "https://vcvrack.com/Fundamental#Mix",
"tags": [
"Mixer",
"Polyphonic"
]
},
{
"slug": "VCMixer",
"name": "VCA Mix",
"description": "Mixes 4 signals with built-in VCAs",
"manualUrl": "https://vcvrack.com/Fundamental#VCMixer",
"tags": [
"Mixer",
"VCA",
"Polyphonic"
]
},
{
"slug": "8vert",
"name": "8vert",
"description": "Attenuverts 8 signals or creates constant voltages",
"manualUrl": "https://vcvrack.com/Fundamental#8vert",
"tags": [
"Attenuator",
"Polyphonic"
]
},
{
"slug": "Unity",
"name": "Unity",
"description": "Mixes or averages signals with unity gain",
"tags": [
"Mixer",
"Utility",
"Dual"
],
"hidden": true
},
{
"slug": "Mutes",
"name": "Mutes",
"description": "Toggles up to 10 signals",
"manualUrl": "https://vcvrack.com/Fundamental#Mutes",
"tags": [
"Switch",
"Polyphonic"
]
},
{
"slug": "Pulses",
"name": "Pulses",
"description": "Generates up to 10 trigger and gate signals",
"manualUrl": "https://vcvrack.com/Fundamental#Pulses",
"tags": [
"Switch"
]
},
{
"slug": "Scope",
"name": "Scope",
"description": "Inspect waveforms with an oscilloscope",
"manualUrl": "https://vcvrack.com/Fundamental#Scope",
"tags": [
"Visual",
"Polyphonic"
]
},
{
"slug": "SEQ3",
"name": "SEQ 3",
"description": "3-channel 8-step sequencer also with gate outputs",
"manualUrl": "https://vcvrack.com/Fundamental#SEQ3",
"tags": [
"Sequencer"
]
},
{
"slug": "SequentialSwitch1",
"name": "Sequential Switch 1 to 4",
"description": "Routes 1 input to one of 4 outputs",
"manualUrl": "https://vcvrack.com/Fundamental#SequentialSwitch",
"tags": [
"Utility",
"Polyphonic"
]
},
{
"slug": "SequentialSwitch2",
"name": "Sequential Switch 4 to 1",
"description": "Routes one of 4 inputs to 1 output",
"manualUrl": "https://vcvrack.com/Fundamental#SequentialSwitch",
"tags": [
"Utility",
"Polyphonic"
]
},
{
"slug": "Octave",
"name": "Octave",
"description": "Shifts 1V/oct pitch CV by octaves",
"manualUrl": "https://vcvrack.com/Fundamental#Octave",
"tags": [
"Utility",
"Polyphonic"
]
},
{
"slug": "Quantizer",
"name": "Quantizer",
"description": "12-note quantizer and scale selector",
"manualUrl": "https://vcvrack.com/Fundamental#Quantizer",
"tags": [
"Quantizer",
"Polyphonic"
]
},
{
"slug": "Split",
"name": "Split",
"description": "Splits a polyphonic cable into multiple monophonic cables",
"manualUrl": "https://vcvrack.com/Fundamental#Split",
"tags": [
"Polyphonic",
"Utility"
]
},
{
"slug": "Merge",
"name": "Merge",
"description": "Combines multiple monophonic cables into a polyphonic cable",
"manualUrl": "https://vcvrack.com/Fundamental#Split",
"tags": [
"Polyphonic",
"Utility"
]
},
{
"slug": "Sum",
"name": "Sum",
"description": "Sums all channels of a polyphonic cable",
"manualUrl": "https://vcvrack.com/Fundamental#Sum",
"tags": [
"Polyphonic",
"Utility"
]
},
{
"slug": "Viz",
"name": "Viz",
"description": "Visualizes all channels of a polyphonic cable",
"manualUrl": "https://vcvrack.com/Fundamental#Viz",
"tags": [
"Polyphonic",
"Visual"
]
},
{
"slug": "MidSide",
"name": "Mid/Side",
"description": "Encodes/decodes between mid/side and left/right stereo signals",
"manualUrl": "https://vcvrack.com/Fundamental#MidSide",
"tags": [
"Utility",
"Polyphonic"
]
},
{
"slug": "Noise",
"name": "Noise",
"description": "Multicolored noise generator",
"manualUrl": "https://vcvrack.com/Fundamental#Noise",
"tags": [
"Noise"
]
},
{
"slug": "Random",
"name": "Random",
"description": "Random CV generator",
"manualUrl": "https://vcvrack.com/Fundamental#Random",
"tags": [
"Random",
"Sample and hold"
]
},
{
"slug": "CVMix",
"name": "CV Mix",
"description": "Mixes 3 CV signals with attenuverters",
"tags": [
"Utility",
"Polyphonic",
"Mixer"
]
}
]
{
"slug": "Fundamental",
"name": "Fundamental",
"version": "2.1.0",
"license": "GPL-3.0-or-later",
"brand": "VCV",
"author": "VCV",
"authorEmail": "support@vcvrack.com",
"pluginUrl": "https://vcvrack.com/Fundamental",
"authorUrl": "https://vcvrack.com/",
"manualUrl": "https://vcvrack.com/Fundamental#manual",
"sourceUrl": "https://github.com/VCVRack/Fundamental",
"changelogUrl": "https://github.com/VCVRack/Fundamental/blob/v2/CHANGELOG.md",
"modules": [
{
"slug": "VCO",
"name": "VCO",
"description": "Voltage-controlled oscillator",
"manualUrl": "https://vcvrack.com/Fundamental#VCO",
"tags": [
"VCO",
"Polyphonic"
]
},
{
"slug": "VCO2",
"name": "Wavetable VCO",
"description": "Voltage-controlled wavetable oscillator",
"manualUrl": "https://vcvrack.com/Fundamental#WavetableVCO",
"tags": [
"VCO",
"Polyphonic"
]
},
{
"slug": "VCF",
"name": "VCF",
"description": "Voltage-controlled filter",
"manualUrl": "https://vcvrack.com/Fundamental#VCF",
"tags": [
"VCF",
"Polyphonic"
]
},
{
"slug": "VCA-1",
"name": "VCA",
"description": "Voltage-controlled amplifier",
"manualUrl": "https://vcvrack.com/Fundamental#VCA",
"tags": [
"VCA",
"Polyphonic"
]
},
{
"slug": "VCA",
"name": "VCA-2",
"description": "2-channel voltage-controlled amplifier",
"tags": [
"VCA",
"Dual",
"Polyphonic"
],
"hidden": true
},
{
"slug": "LFO",
"name": "LFO",
"description": "Low-frequency oscillator",
"manualUrl": "https://vcvrack.com/Fundamental#LFO",
"tags": [
"LFO",
"Polyphonic"
]
},
{
"slug": "LFO2",
"name": "Wavetable LFO",
"description": "Low-frequency wavetable oscillator",
"manualUrl": "https://vcvrack.com/Fundamental#WavetableLFO",
"tags": [
"LFO",
"Polyphonic"
]
},
{
"slug": "Delay",
"name": "Delay",
"description": "",
"manualUrl": "https://vcvrack.com/Fundamental#Delay",
"tags": [
"Delay"
]
},
{
"slug": "ADSR",
"name": "ADSR",
"description": "Generates an envelope with Attack/Decay/Sustain/Release",
"manualUrl": "https://vcvrack.com/Fundamental#ADSR",
"tags": [
"Envelope Generator",
"Polyphonic"
]
},
{
"slug": "Mixer",
"name": "Mix",
"description": "Mixes 6 signals",
"manualUrl": "https://vcvrack.com/Fundamental#Mix",
"tags": [
"Mixer",
"Polyphonic"
]
},
{
"slug": "VCMixer",
"name": "VCA Mix",
"description": "Mixes 4 signals with built-in VCAs",
"manualUrl": "https://vcvrack.com/Fundamental#VCMixer",
"tags": [
"Mixer",
"VCA",
"Polyphonic"
]
},
{
"slug": "8vert",
"name": "8vert",
"description": "Attenuverts 8 signals or creates constant voltages",
"manualUrl": "https://vcvrack.com/Fundamental#8vert",
"tags": [
"Attenuator",
"Polyphonic"
]
},
{
"slug": "Unity",
"name": "Unity",
"description": "Mixes or averages signals with unity gain",
"tags": [
"Mixer",
"Utility",
"Dual"
],
"hidden": true
},
{
"slug": "Mutes",
"name": "Mutes",
"description": "Toggles up to 10 signals",
"manualUrl": "https://vcvrack.com/Fundamental#Mutes",
"tags": [
"Switch",
"Polyphonic"
]
},
{
"slug": "Pulses",
"name": "Pulses",
"description": "Generates up to 10 trigger and gate signals",
"manualUrl": "https://vcvrack.com/Fundamental#Pulses",
"tags": [
"Switch"
]
},
{
"slug": "Scope",
"name": "Scope",
"description": "Inspect waveforms with an oscilloscope",
"manualUrl": "https://vcvrack.com/Fundamental#Scope",
"tags": [
"Visual",
"Polyphonic"
]
},
{
"slug": "SEQ3",
"name": "SEQ 3",
"description": "3-channel 8-step sequencer also with gate outputs",
"manualUrl": "https://vcvrack.com/Fundamental#SEQ3",
"tags": [
"Sequencer"
]
},
{
"slug": "SequentialSwitch1",
"name": "Sequential Switch 1 to 4",
"description": "Routes 1 input to one of 4 outputs",
"manualUrl": "https://vcvrack.com/Fundamental#SequentialSwitch",
"tags": [
"Utility",
"Polyphonic"
]
},
{
"slug": "SequentialSwitch2",
"name": "Sequential Switch 4 to 1",
"description": "Routes one of 4 inputs to 1 output",
"manualUrl": "https://vcvrack.com/Fundamental#SequentialSwitch",
"tags": [
"Utility",
"Polyphonic"
]
},
{
"slug": "Octave",
"name": "Octave",
"description": "Shifts 1V/oct pitch CV by octaves",
"manualUrl": "https://vcvrack.com/Fundamental#Octave",
"tags": [
"Utility",
"Polyphonic"
]
},
{
"slug": "Quantizer",
"name": "Quantizer",
"description": "12-note quantizer and scale selector",
"manualUrl": "https://vcvrack.com/Fundamental#Quantizer",
"tags": [
"Quantizer",
"Polyphonic"
]
},
{
"slug": "Split",
"name": "Split",
"description": "Splits a polyphonic cable into multiple monophonic cables",
"manualUrl": "https://vcvrack.com/Fundamental#Split",
"tags": [
"Polyphonic",
"Utility"
]
},
{
"slug": "Merge",
"name": "Merge",
"description": "Combines multiple monophonic cables into a polyphonic cable",
"manualUrl": "https://vcvrack.com/Fundamental#Split",
"tags": [
"Polyphonic",
"Utility"
]
},
{
"slug": "Sum",
"name": "Sum",
"description": "Sums all channels of a polyphonic cable",
"manualUrl": "https://vcvrack.com/Fundamental#Sum",
"tags": [
"Polyphonic",
"Utility"
]
},
{
"slug": "Viz",
"name": "Viz",
"description": "Visualizes all channels of a polyphonic cable",
"manualUrl": "https://vcvrack.com/Fundamental#Viz",
"tags": [
"Polyphonic",
"Visual"
]
},
{
"slug": "MidSide",
"name": "Mid/Side",
"description": "Encodes/decodes between mid/side and left/right stereo signals",
"manualUrl": "https://vcvrack.com/Fundamental#MidSide",
"tags": [
"Utility",
"Polyphonic"
]
},
{
"slug": "Noise",
"name": "Noise",
"description": "Multicolored noise generator",
"manualUrl": "https://vcvrack.com/Fundamental#Noise",
"tags": [
"Noise"
]
},
{
"slug": "Random",
"name": "Random",
"description": "Random CV generator",
"manualUrl": "https://vcvrack.com/Fundamental#Random",
"tags": [
"Random",
"Sample and hold"
]
},
{
"slug": "CVMix",
"name": "CV Mix",
"description": "Mixes 3 CV signals with attenuverters",
"tags": [
"Mixer",
"Utility",
"Polyphonic"
]
},
{
"slug": "Fade",
"name": "Fade",
"description": "Crossfades audio or CV",
"tags": [
"Panning",
"Voltage-controlled amplifier",
"Utility",
"Polyphonic"
]
}
]
}

+ 369
- 0
res/Fade.svg View File

@@ -0,0 +1,369 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="45"
height="380"
viewBox="0 0 45 380"
version="1.1"
id="svg122"
sodipodi:docname="FADE.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)">
<metadata
id="metadata126">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1017"
id="namedview124"
showgrid="false"
inkscape:zoom="1.7566021"
inkscape:cx="3.1191857"
inkscape:cy="227.65817"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg122" />
<defs
id="defs7">
<linearGradient
id="b84b55f3-8714-404a-8132-87c6ad8384e3"
x1="22.5"
x2="22.5"
y2="380"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#ebebeb"
id="stop2" />
<stop
offset="1"
stop-color="#e1e1e1"
id="stop4" />
</linearGradient>
</defs>
<g
id="ee06e79d-875e-4193-8cc0-79b9564537b3"
data-name="FND BG">
<rect
width="45"
height="380"
fill="url(#b84b55f3-8714-404a-8132-87c6ad8384e3)"
id="rect9" />
</g>
<g
id="b5503098-64d6-400b-bfd2-2c265d125e92"
data-name="FND GRAPH">
<rect
x="8.22422"
y="264.4852"
width="28.55155"
height="39.15691"
rx="2.83465"
fill="#1f1f1f"
id="rect12" />
<rect
x="8.22422"
y="308.77924"
width="28.55155"
height="39.15691"
rx="2.83465"
fill="#1f1f1f"
id="rect14" />
<g
id="g22">
<line
x1="22.50002"
y1="60.47646"
x2="22.50002"
y2="56.7532"
fill="none"
stroke="#1f1f1f"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="0.8"
id="line16" />
<path
d="M31.13564,87.30508a16.71232,16.71232,0,1,0-17.21552.04577"
fill="none"
stroke="#1f1f1f"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="0.8"
id="path18" />
<circle
cx="22.5"
cy="72.99991"
r="20.69419"
fill="none"
opacity="0.69"
style="isolation: isolate"
id="circle20" />
</g>
<g
id="g32">
<circle
cx="23.00165"
cy="355.84251"
r="1.18571"
fill="#1f1f1f"
id="circle24" />
<path
d="M14.35927,359.76448a.91214.91214,0,0,1-.8158-.50418l-2.96428-5.92857a.91209.91209,0,0,1,1.6316-.8158l2.14848,4.297,2.14848-4.297a.91209.91209,0,0,1,1.6316.8158l-2.96428,5.92857A.91211.91211,0,0,1,14.35927,359.76448Z"
fill="#1f1f1f"
id="path26" />
<path
d="M30.64073,359.76448a.91211.91211,0,0,1-.8158-.50418l-2.96428-5.92857a.91209.91209,0,0,1,1.6316-.8158l2.14848,4.297,2.14848-4.297a.91209.91209,0,0,1,1.6316.8158l-2.96428,5.92857A.91214.91214,0,0,1,30.64073,359.76448Z"
fill="#1f1f1f"
id="path28" />
<path
d="M22.94242,359.76448a3.87637,3.87637,0,1,1,2.32653-6.97719.91209.91209,0,1,1-1.09557,1.45854,2.034,2.034,0,0,0-1.231-.40991,2.0522,2.0522,0,1,0,0,4.10439,2.034,2.034,0,0,0,1.231-.40991.91209.91209,0,1,1,1.09557,1.45854A3.8448,3.8448,0,0,1,22.94242,359.76448Z"
fill="#1f1f1f"
id="path30" />
</g>
<g
id="g40">
<line
x1="22.5"
y1="122.33279"
x2="22.5"
y2="131.53474"
fill="none"
stroke="#1f1f1f"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="0.8"
id="line34" />
<line
x1="22.5"
y1="97.99838"
x2="22.5"
y2="109.47777"
fill="none"
stroke="#1f1f1f"
stroke-linecap="round"
stroke-linejoin="round"
id="line36" />
<path
d="M28.44034,119.34459a11.5338,11.5338,0,1,0-11.81152.04123"
fill="none"
stroke="#1f1f1f"
stroke-linecap="round"
stroke-linejoin="round"
id="path38" />
</g>
</g>
<g
id="e4010d8f-0121-4370-b488-926c9d38c6c2"
data-name="FND TXT">
<g
id="g53">
<path
d="M9.72461,140.75928l1.40918-1.748-1.32813-1.646a.53617.53617,0,0,1-.12793-.312.40078.40078,0,0,1,.41211-.40674.42921.42921,0,0,1,.37989.20362l1.19922,1.57861,1.18554-1.55176a.46915.46915,0,0,1,.40723-.23047.38279.38279,0,0,1,.3789.37989.49005.49005,0,0,1-.1289.31836l-1.32813,1.65283,1.39649,1.74121a.51858.51858,0,0,1,.12793.312.40061.40061,0,0,1-.41309.40625.42828.42828,0,0,1-.3789-.20312l-1.27442-1.66016-1.25293,1.63281a.47591.47591,0,0,1-.40625.23047.38076.38076,0,0,1-.37988-.38623A.517.517,0,0,1,9.72461,140.75928Z"
fill="#1f1f1f"
id="path43" />
<path
d="M16.72266,137.10059a.41321.41321,0,0,1,.41992-.41993h2.76367a.3794.3794,0,1,1,0,.75879H17.55566v1.29395h2.0459a.3794.3794,0,0,1,0,.75879h-2.0459V141.044a.41651.41651,0,0,1-.833,0Z"
fill="#1f1f1f"
id="path45" />
<path
d="M20.69727,140.88086l1.76171-3.9292a.52712.52712,0,0,1,.501-.33887H23a.52039.52039,0,0,1,.49512.33887l1.76074,3.9292a.36225.36225,0,0,1,.04785.17627.39029.39029,0,0,1-.39258.3999.43106.43106,0,0,1-.40722-.2915l-.38575-.88721H21.81445l-.39941.91455a.40007.40007,0,0,1-.38574.26416.38226.38226,0,0,1-.38672-.38623A.425.425,0,0,1,20.69727,140.88086Zm3.10253-1.34131-.833-1.91748-.834,1.91748Z"
fill="#1f1f1f"
id="path47" />
<path
d="M26.33789,137.10059a.41322.41322,0,0,1,.41992-.41993h1.34766a2.36407,2.36407,0,0,1,2.52051,2.35743v.01367a2.37431,2.37431,0,0,1-2.52051,2.37109H26.75781a.41321.41321,0,0,1-.41992-.41992Zm1.76758,3.56347a1.54551,1.54551,0,0,0,1.64648-1.59863v-.01367a1.55639,1.55639,0,0,0-1.64648-1.61231H27.1709v3.22461Z"
fill="#1f1f1f"
id="path49" />
<path
d="M31.83008,141.00293v-3.90234a.41322.41322,0,0,1,.41992-.41993h2.75684a.37557.37557,0,0,1,.37207.37256.37114.37114,0,0,1-.37207.37256H32.66309v1.2334h2.03906a.37661.37661,0,0,1,.37207.37891.36981.36981,0,0,1-.37207.36621H32.66309v1.27343H35.041a.37567.37567,0,0,1,.37207.37305.37072.37072,0,0,1-.37207.37207H32.25A.41321.41321,0,0,1,31.83008,141.00293Z"
fill="#1f1f1f"
id="path51" />
</g>
<g
id="g61">
<path
d="M16.94336,180.26025a.41652.41652,0,0,1,.833,0v3.98389a.41652.41652,0,0,1-.833,0Z"
fill="#1f1f1f"
id="path55" />
<path
d="M19.252,180.27393a.41845.41845,0,0,1,.41993-.42041h.08886a.52451.52451,0,0,1,.4336.24414l2.37109,3.06933v-2.91357a.40968.40968,0,0,1,.81934,0v3.98388a.40443.40443,0,0,1-.40625.41309h-.03418a.52422.52422,0,0,1-.4336-.251l-2.43847-3.15673v3.0083a.41018.41018,0,0,1-.82032,0Z"
fill="#1f1f1f"
id="path57" />
<path
d="M27.24023,180.667l-.48828.14893a.62435.62435,0,0,1-.14941.02.3602.3602,0,0,1-.08789-.71094l.71777-.23047a1.43685,1.43685,0,0,1,.40723-.07471h.01269a.40658.40658,0,0,1,.41407.41358v4.01074a.41309.41309,0,1,1-.82618,0Z"
fill="#1f1f1f"
id="path59" />
</g>
<g
id="g69">
<path
d="M16.20508,225.147a.41652.41652,0,0,1,.833,0v3.98389a.41652.41652,0,0,1-.833,0Z"
fill="#1f1f1f"
id="path63" />
<path
d="M18.51367,225.16064a.41867.41867,0,0,1,.4209-.42041h.08789a.52449.52449,0,0,1,.43359.24415l2.3711,3.06933v-2.91357a.40968.40968,0,0,1,.81933,0V229.124a.40442.40442,0,0,1-.40625.41309H22.207a.52289.52289,0,0,1-.43359-.251L19.334,226.12939v3.00831a.41017.41017,0,0,1-.82031,0Z"
fill="#1f1f1f"
id="path65" />
<path
d="M25.80371,228.7041l1.45606-1.24023c.65039-.54883.88867-.85352.88867-1.28028a.71085.71085,0,0,0-.76563-.73828,1.15866,1.15866,0,0,0-.93554.52832.38391.38391,0,0,1-.6709-.251.41972.41972,0,0,1,.09472-.25733,1.83681,1.83681,0,0,1,1.57227-.76562,1.42007,1.42007,0,0,1,1.56445,1.416v.01367c0,.74512-.39258,1.15186-1.23242,1.83594l-.97559.813h1.92383a.36573.36573,0,1,1,0,.73145H26.03418a.4001.4001,0,0,1-.44727-.39258A.51852.51852,0,0,1,25.80371,228.7041Z"
fill="#1f1f1f"
id="path67" />
</g>
<g
id="g79">
<path
d="M12.56543,272.00684v-.01368a2.45207,2.45207,0,0,1,2.52734-2.45214,2.42876,2.42876,0,0,1,2.5127,2.43847v.01367a2.45133,2.45133,0,0,1-2.52637,2.45264A2.42969,2.42969,0,0,1,12.56543,272.00684Zm3.95019,0v-.01368a1.441,1.441,0,0,0-1.43652-1.49023,1.41853,1.41853,0,0,0-1.42285,1.47656v.01367a1.44078,1.44078,0,0,0,1.43652,1.49073A1.41866,1.41866,0,0,0,16.51562,272.00684Z"
fill="#f0f0f0"
id="path71" />
<path
d="M18.68457,272.332v-2.229a.522.522,0,0,1,1.04395,0v2.20166c0,.77246.38574,1.17236,1.02246,1.17236s1.02246-.38623,1.02246-1.13818V270.103a.522.522,0,0,1,1.04394,0v2.19482A1.90931,1.90931,0,0,1,20.7373,274.439,1.88221,1.88221,0,0,1,18.68457,272.332Z"
fill="#f0f0f0"
id="path73" />
<path
d="M25.16992,270.584H24.167a.481.481,0,1,1,0-.96191h3.04785a.481.481,0,1,1,0,.96191H26.21289v3.29981a.52149.52149,0,0,1-1.043,0Z"
fill="#f0f0f0"
id="path75" />
<path
d="M31.13086,270.61133l-.36621.09472a.85161.85161,0,0,1-.18262.02735.45815.45815,0,0,1-.45508-.44727.46341.46341,0,0,1,.34571-.44726l.67089-.19629a1.84676,1.84676,0,0,1,.48829-.08838h.01269a.515.515,0,0,1,.51563.51514v3.8208a.51465.51465,0,1,1-1.0293,0Z"
fill="#f0f0f0"
id="path77" />
</g>
<g
id="g89">
<path
d="M11.88379,316.55176v-.01367a2.45207,2.45207,0,0,1,2.52734-2.45215,2.42876,2.42876,0,0,1,2.5127,2.43847v.01368a2.45133,2.45133,0,0,1-2.52637,2.45263A2.42969,2.42969,0,0,1,11.88379,316.55176Zm3.95019,0v-.01367a1.441,1.441,0,0,0-1.43652-1.49024,1.41853,1.41853,0,0,0-1.42285,1.47656v.01368a1.44077,1.44077,0,0,0,1.43652,1.49072A1.41865,1.41865,0,0,0,15.834,316.55176Z"
fill="#f0f0f0"
id="path81" />
<path
d="M18.00293,316.877v-2.229a.522.522,0,0,1,1.044,0v2.20166c0,.77246.38574,1.17236,1.02246,1.17236s1.02246-.38623,1.02246-1.13818V314.648a.522.522,0,0,1,1.04394,0v2.19482a1.90931,1.90931,0,0,1-2.08008,2.14112A1.88222,1.88222,0,0,1,18.00293,316.877Z"
fill="#f0f0f0"
id="path83" />
<path
d="M24.48828,315.12891H23.48535a.481.481,0,1,1,0-.96192H26.5332a.481.481,0,1,1,0,.96192h-1.002v3.2998a.52149.52149,0,1,1-1.043,0Z"
fill="#f0f0f0"
id="path85" />
<path
d="M29.80469,317.89307l1.34863-1.104c.58887-.48144.81934-.74511.81934-1.13867a.58137.58137,0,0,0-.63672-.61621,1.00047,1.00047,0,0,0-.77149.41309.47889.47889,0,0,1-.35351.14941.4712.4712,0,0,1-.47364-.47461.52436.52436,0,0,1,.12208-.32519,1.86607,1.86607,0,0,1,1.54492-.69776,1.4621,1.4621,0,0,1,1.63281,1.46338v.01367c0,.793-.40723,1.18555-1.24707,1.83594l-.77246.59619H32.6709a.45417.45417,0,0,1,.4541.4541.448.448,0,0,1-.4541.44678H30.0957a.49985.49985,0,0,1-.56152-.49414A.6595.6595,0,0,1,29.80469,317.89307Z"
fill="#f0f0f0"
id="path87" />
</g>
<g
id="g99">
<path
d="M5.9082,20.49121a.95629.95629,0,0,1,.96485-.96289h4.90429a.87574.87574,0,0,1,0,1.75147H7.83594V23.144h3.3789a.87574.87574,0,0,1,0,1.75147H7.83594v2.50293a.96387.96387,0,0,1-1.92774,0Z"
fill="#1f1f1f"
id="path91" />
<path
d="M12.97461,27.04785l3.05273-6.894a1.19188,1.19188,0,0,1,1.127-.76319h.11132a1.17341,1.17341,0,0,1,1.11426.76319l3.05371,6.894a.93922.93922,0,0,1,.09961.3877.91359.91359,0,0,1-.91406.92627.983.983,0,0,1-.92578-.66358l-.58789-1.376H15.252l-.61328,1.439a.946.946,0,0,1-.88867.60059.88716.88716,0,0,1-.88867-.90088A1.02513,1.02513,0,0,1,12.97461,27.04785Zm5.418-2.42724-1.21387-2.89014-1.21387,2.89014Z"
fill="#1f1f1f"
id="path93" />
<path
d="M22.95508,20.49121a.95524.95524,0,0,1,.96289-.96289h2.45215a4.3659,4.3659,0,0,1,4.65527,4.354v.02491a4.38545,4.38545,0,0,1-4.65527,4.37939H23.918a.95535.95535,0,0,1-.96289-.96338Zm3.415,6.05615a2.495,2.495,0,0,0,2.63965-2.61474v-.02539a2.51462,2.51462,0,0,0-2.63965-2.63965H24.88086v5.27978Z"
fill="#1f1f1f"
id="path95" />
<path
d="M32.80664,27.32324v-6.832a.95585.95585,0,0,1,.96289-.96289H38.625a.86544.86544,0,0,1,.86328.86328.85465.85465,0,0,1-.86328.85059H34.7207V23.019h3.34082a.86481.86481,0,0,1,.86328.86328.85445.85445,0,0,1-.86328.85108H34.7207v1.83887h3.9668a.86575.86575,0,0,1,.86328.86328.85506.85506,0,0,1-.86328.85107h-4.918A.956.956,0,0,1,32.80664,27.32324Z"
fill="#1f1f1f"
id="path97" />
</g>
<g
id="g111">
<path
d="M6.877,50.2793,8.6123,48.126,6.97656,46.09766a.65307.65307,0,0,1-.1582-.38379.49384.49384,0,0,1,.50879-.501.5293.5293,0,0,1,.46777.25049L9.27148,47.4082l1.46094-1.91113a.57781.57781,0,0,1,.501-.28418.47164.47164,0,0,1,.46777.46777.6008.6008,0,0,1-.15918.39209L9.90625,48.10938l1.71875,2.145a.63324.63324,0,0,1,.15918.38428.49431.49431,0,0,1-.50879.50049.52826.52826,0,0,1-.46777-.25049L9.23828,48.84375,7.69434,50.85547a.58678.58678,0,0,1-.501.28369.46787.46787,0,0,1-.4668-.47607A.63536.63536,0,0,1,6.877,50.2793Z"
fill="#1f1f1f"
id="path101" />
<path
d="M15.49316,45.77246a.50992.50992,0,0,1,.51758-.51758H19.416a.46729.46729,0,1,1,0,.93457H16.51953v1.59473H19.041a.46729.46729,0,0,1,0,.93457H16.51953v1.91113a.5132.5132,0,0,1-1.02637,0Z"
fill="#1f1f1f"
id="path103" />
<path
d="M20.30762,50.42969l2.16992-4.84082a.65058.65058,0,0,1,.61816-.41748h.04981a.63876.63876,0,0,1,.6084.41748l2.17089,4.84082a.443.443,0,0,1,.05762.21679.48078.48078,0,0,1-.4834.49268.52929.52929,0,0,1-.501-.35889l-.47559-1.09375H21.68457l-.49219,1.127a.493.493,0,0,1-.47558.32568.47066.47066,0,0,1-.47657-.47607A.524.524,0,0,1,20.30762,50.42969Zm3.82324-1.65235L23.10352,46.415l-1.02637,2.3623Z"
fill="#1f1f1f"
id="path105" />
<path
d="M27.18457,45.77246a.50992.50992,0,0,1,.51758-.51758h1.66113a2.9127,2.9127,0,0,1,3.10547,2.9043v.0166a2.926,2.926,0,0,1-3.10547,2.92188H27.70215a.50992.50992,0,0,1-.51758-.51758Zm2.17871,4.39014a1.90472,1.90472,0,0,0,2.02832-1.96973v-.01709a1.91762,1.91762,0,0,0-2.02832-1.98633H28.21094V50.1626Z"
fill="#1f1f1f"
id="path107" />
<path
d="M33.88184,50.58008V45.77246a.50991.50991,0,0,1,.51757-.51758h3.39747a.46321.46321,0,0,1,.459.459.45781.45781,0,0,1-.459.459H34.9082v1.519h2.5127a.46435.46435,0,0,1,.459.46729.45556.45556,0,0,1-.459.45117H34.9082V50.1792h2.92969a.46267.46267,0,0,1,.459.45947.45752.45752,0,0,1-.459.459H34.39941A.50991.50991,0,0,1,33.88184,50.58008Z"
fill="#1f1f1f"
id="path109" />
</g>
</g>
<g
id="fac5544c-5b8c-4438-963a-83a3f9fe99e5"
data-name="components"
style="display:none"
inkscape:groupmode="layer">
<circle
id="b92382ac-649f-4dc4-bbd7-fad5a30774ed"
data-name="Xfade#RoundBlackKnob"
cx="22.5"
cy="72.999901"
r="5"
style="fill:#ff0000" />
<circle
id="b8673b1f-b710-417d-892b-3d18a6cd5e21"
data-name="XfadeAtv#Trimpot"
cx="22.5"
cy="109.44009"
r="5"
style="fill:#ff0000" />
<circle
id="afea6672-c63f-4566-a5e8-a97de674cfe6"
data-name="In1#PJ301MPort"
cx="22.5"
cy="199.3996"
r="5"
style="fill:#00ff00" />
<circle
id="ad266a24-df2d-4cad-85b6-31c7e4222897"
data-name="In2#PJ301MPort"
cx="22.5"
cy="244.28709"
r="5"
style="fill:#00ff00" />
<circle
id="bca878dd-cc3b-4da0-887f-d21d8adf7306"
data-name="Out1#PJ301MPort"
cx="22.5"
cy="289.14182"
r="5"
style="fill:#0000ff" />
<circle
id="bea69b91-82fe-4236-8a53-111b5c239a18"
data-name="Out2#PJ301MPort"
cx="22.5"
cy="334"
r="5"
style="fill:#0000ff" />
<circle
id="a63622a5-b2cf-4d2e-8dcd-075235f9a23a"
data-name="Xfade#PJ301MPort"
cx="22.5"
cy="156.45821"
r="5"
style="fill:#00ff00" />
</g>
</svg>

+ 6
- 2
src/CVMix.cpp View File

@@ -1,6 +1,9 @@
#include "plugin.hpp"


using simd::float_4;


struct CVMix : Module {
enum ParamId {
ENUMS(LEVEL_PARAMS, 3),
@@ -22,8 +25,11 @@ struct CVMix : Module {
config(PARAMS_LEN, INPUTS_LEN, OUTPUTS_LEN, LIGHTS_LEN);
for (int i = 0; i < 3; i++)
configParam(LEVEL_PARAMS + i, -1.f, 1.f, 0.f, string::f("Level %d", i + 1), "%", 0, 100);

for (int i = 0; i < 3; i++)
configInput(CV_INPUTS + i, string::f("CV %d", i + 1));
getInputInfo(CV_INPUTS + 0)->description = "Normalized to 10 V";

configOutput(MIX_OUTPUT, "Mix");
}

@@ -31,8 +37,6 @@ struct CVMix : Module {
if (!outputs[MIX_OUTPUT].isConnected())
return;

using simd::float_4;

// Get number of channels
int channels = 1;
for (int i = 0; i < 3; i++)


+ 94
- 0
src/Fade.cpp View File

@@ -0,0 +1,94 @@
#include "plugin.hpp"
using simd::float_4;
struct Fade : Module {
enum ParamId {
CROSSFADE_PARAM,
CROSSFADE_CV_PARAM,
PARAMS_LEN
};
enum InputId {
CROSSFADE_INPUT,
IN1_INPUT,
IN2_INPUT,
INPUTS_LEN
};
enum OutputId {
OUT1_OUTPUT,
OUT2_OUTPUT,
OUTPUTS_LEN
};
enum LightId {
LIGHTS_LEN
};
Fade() {
config(PARAMS_LEN, INPUTS_LEN, OUTPUTS_LEN, LIGHTS_LEN);
configParam(CROSSFADE_PARAM, 0.f, 1.f, 0.5f, "Crossfade", "%", 0, 100);
configParam(CROSSFADE_CV_PARAM, -1.f, 1.f, 0.f, "Crossfade CV", "%", 0, 100);
configInput(CROSSFADE_INPUT, "Crossfade");
configInput(IN1_INPUT, "Ch 1");
configInput(IN2_INPUT, "Ch 2");
configOutput(OUT1_OUTPUT, "Ch 1");
configOutput(OUT2_OUTPUT, "Ch 2");
configBypass(IN1_INPUT, OUT1_OUTPUT);
configBypass(IN2_INPUT, OUT2_OUTPUT);
}
void process(const ProcessArgs& args) override {
if (!outputs[OUT1_OUTPUT].isConnected() && !outputs[OUT2_OUTPUT].isConnected())
return;
int channels = std::max({1, inputs[IN1_INPUT].getChannels(), inputs[IN2_INPUT].getChannels()});
for (int c = 0; c < channels; c += 4) {
// Get crossfade amount
float_4 crossfade = params[CROSSFADE_PARAM].getValue();
crossfade += inputs[CROSSFADE_INPUT].getPolyVoltageSimd<float_4>(c) / 10.f * params[CROSSFADE_CV_PARAM].getValue();
crossfade = clamp(crossfade, 0.f, 1.f);
// Get inputs
float_4 in1 = inputs[IN1_INPUT].getPolyVoltageSimd<float_4>(c);
float_4 in2 = inputs[IN2_INPUT].getPolyVoltageSimd<float_4>(c);
// Calculate outputs
float_4 out1 = (1.f - crossfade) * in1 + crossfade * in2;
float_4 out2 = crossfade * in1 + (1.f - crossfade) * in2;
outputs[OUT1_OUTPUT].setVoltageSimd(out1, c);
outputs[OUT2_OUTPUT].setVoltageSimd(out2, c);
}
outputs[OUT1_OUTPUT].setChannels(channels);
outputs[OUT2_OUTPUT].setChannels(channels);
}
};
struct FadeWidget : ModuleWidget {
FadeWidget(Fade* module) {
setModule(module);
setPanel(createPanel(asset::plugin(pluginInstance, "res/Fade.svg")));
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
addChild(createWidget<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addChild(createWidget<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
addParam(createParamCentered<RoundBlackKnob>(mm2px(Vec(7.62, 24.723)), module, Fade::CROSSFADE_PARAM));
addParam(createParamCentered<Trimpot>(mm2px(Vec(7.62, 37.064)), module, Fade::CROSSFADE_CV_PARAM));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.62, 52.987)), module, Fade::CROSSFADE_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.62, 67.53)), module, Fade::IN1_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(7.62, 82.732)), module, Fade::IN2_INPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 97.923)), module, Fade::OUT1_OUTPUT));
addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec(7.62, 113.115)), module, Fade::OUT2_OUTPUT));
}
};
Model* modelFade = createModel<Fade, FadeWidget>("Fade");

+ 1
- 0
src/plugin.cpp View File

@@ -35,4 +35,5 @@ void init(Plugin* p) {
p->addModel(modelNoise);
p->addModel(modelRandom);
p->addModel(modelCVMix);
p->addModel(modelFade);
}

+ 1
- 0
src/plugin.hpp View File

@@ -35,6 +35,7 @@ extern Model* modelMidSide;
extern Model* modelNoise;
extern Model* modelRandom;
extern Model* modelCVMix;
extern Model* modelFade;


struct DigitalDisplay : Widget {


Loading…
Cancel
Save