   ADLS               D  ,   $                                       x  \  <       
  
  
  
  
  
  
  x
  h
  X
  D
  0
  
  
  	  	  	  	  	  	  	  	  x	  d	  T	  @	  ,	  	  	                |  l  X  H  8  (                      p  `  P  <  (                      p  `  L  <  ,                    |  l  \  H  8  (                    t  `  P  @  0                       t  d  T  D  4  $                     x     T  \O  I  H   H  G  F  F  E  E  @D  C  C  lC  C  B  dB  (B  A  A  A  @  @  L@  ?  ?  l?  @>  t=  <  |<  ;  x;  :  `:  9  9  8   8  7  7  @7  6  6  d6  6  5  5  05  4  4  l4  ,4  3  3  T3  3  2  2  1  d1  (1  0  0   0  X/  -  D-  $  p$  0$  #  8#  "  "        (               P      \      L        0    x  <      ,      `          x  4      h  (      \        H      |  4      \        L        <      p      |  0  
  
  
  	  l	  (	      X      H          "      .      :                        f   u   r      ~                                          {      `   L            q         
            "   s      t      >         s      Z~   V   f~   S   r}   [   ~}   T   {         {   z   z         y   x   ,x         <v         Lv   x      u      hu         u   o   t   }   &t   v   2s   ~   s   v      Nq      Zq      fo   m   ro   l   ~n   t   m         l         j         j      i   n   i   e   Hh   f      e   h   e   f   pc   a      `   c   "`   a   ^   \      >[   ^   J[   \   Y   W      fV   Y   rV   W   ~L   K   I   L   I   5   H   F   H   D      (G   H      F   %   E   H   C   B   \?   =      <   ?   <   =   9   C   &9   2   28   +   >8      7   3      Z6   !   f5   6   r5   4   ~5   3   4   #    3   $      2   1   1   #      .      .      -      -      \+   1      +   *   x*   1      )   (   (   6      &   6      &   (      Z%   7   %   4      v%      $   -   $   &   #   .   #   &      !   <   !   :                  $   \   3      l   4      |   F      "   D   .      :               V      b               ~                                                     	           
      
      	     
      
          0   0                       AkCjĄC	                    @   @                   A  A    
A  A   tC)kCN                    toggle      H   H                 ,   4   4   ~m@у   @  C  ;PCm                         0   0                    A  Cnx^C	                   ,   ,                    ؁"B6C>                   \<   <                       )\=  4B  B(~mҶC                   `,   ,                    $CJC=                   0   0                   A  B(~EжC	                   (@   @                   HB  HBP    @  B   v%CҶCN                       m      k       0   0                       AkCjĄC	                   @   @                   A  A"    
A  A   C)nCN                    toggle      @   @                 $   ,   ,   ~m@у  :Cm+C                         D,   ,                 T8    A                       Audio       8   8                 $   {       C   B                   `(   (                   jC                     x0   0                           XB	                   L   L                 9  ,   4   4     ?3+À @@  HB  B  :CaB                               (0   0                   HB  B:PC9B
                   h0   0                       A;ГCm5C                   0   0                    A   A@BѶ?	                   ,   ,                 %  u,B                    x       ,   ,                     @C ?                   l0   0                   HB  BfB0	                   @,   ,                    0`C('?                   |,   ,                    æC4?                   $0   0                   B  B^$	                   ,   ,                    \]B?                   8   8                A%    B      Cm	                   4   4           @A%    B  B   VLCϫ                   4   4                   B  @   #CA
                   4   4                   B   B   C=˯
                   4   4           @A4  ZA >   Ó"                   t4   4                    A  @   	v$	                   0$   $           %  {A                    x       ,   ,                 %    C                    L,   ,                      C >                   8   8                 0%    >B  A    @!D @                   ,   ,                    "C:=                   4   4                 4ALB   zm	                   P,   ,                      *C  >                   ,   ,                    SJ1C>                   $8   8              wBp&     A  fB   yt'CN5                   `,   ,             HB  A    D  
                   4   4           @A.  ZAB     p                     $   $           &  	m                    s        ,   ,              A   B      B 	                   l$   $           t'  _                    x       $   $           '  Ԩ                    x       8<   <             B  B    (   (   ~?=Ø$
D[hC cA                   l   m   n   o   p   q   r   s   t   u   v   w   x   y   z   {   |   }   ~                              8   8                    C>  A  B`=B!iIC                    0   0                    A  pB@BFۢB	                   ,   ,                 -    A                       Audio       d8   8                 +   {T      C   B                   (   (                   jC                     0   0                           XB	                   L   L                 D/  ,   4   4     ?3+À @@   A  pB  @BF۶B                   e   f   g   h   T,   ,                 D,    A                       Audio       8   8                 ,   {T      C   B                   p(   (                   jC                     0   0                           XB	                   L   L                 -  ,   4   4     ?3+À @@  *A  A  @B06A                   `   a   b   c   ,   ,                 *    A                       Audio       \8   8                 (   {T      C   B                   (   (                   jC                     0   0                           XB	                   L   L                 L,  ,   4   4     ?3+À @@ HB  qB  :CFB                   [   \   ]   ^   L,   ,                 L)    A                       Audio       8   8                 )   {T      C   B                   h(   (                   jC                     0   0                           XB	                    L   L                 *  ,   4   4     ?3+À @@  KB   A  :C%Y                   V   W   X   Y   00   0                   HB  pB:PCFB
                   p0   0                   HB   A:PC蒼
                   @   @                   A  A<     
A  A   C)bCN                    toggle      =   rotate(math.pi/2)
scale{0.45,0.45}
text("DUAL", theme.text)

   H   H                 ,   4   4   ~m@у    C   C%C                   R   l<   <                      DB(     A   ChCZC                      DUAL    | P   H   < 8 4           (                  $                                   G                              0   , |   )  L   L                   *C  pB.  $   ,   ,   z?&Uwi      "                   P   Q   S   T   U   Z   _   d   i   j   k                                       (@   @                   A  A<     
A  A   C)bCN                    toggle      >   rotate(math.pi/2)
scale{0.45,0.45}
text("FADER", theme.text)

  (H   H                 ,   4   4   ~m@у   C    B  C                   N   L0   0                       AkCjĄC	                   l@   @                   A  A<     
A  A   tC)kCN                    toggle         if toggle == 1 then 
colour = theme.modules
else
colour = theme.text
end

save()
translate{23.5,7.8}
scale{0.45,0.45}
text("RMS", theme.modules)
restore()

translate{5,7.8}
scale{0.45,0.45}
text("LIN", colour)

 | H   @ 4 , ( $                                                                  ?       >                            |   H   H                 ,   4   4   ~m@у   @  C    pC                     K   L   4   4                       A  C5C?7                   |,   ,                         C>                   h < 8 0 (       $                                                              #                  h   <   <                       )\=  4B  B    C                   l,   ,                    +Bo?C=                   0   0                   A  B    C	                   4@   @                   HB  HBD     @  B     B  CN                       m      k         
-- add k and m input ports for knob and modulation

knobSize = 1 -- 1 = standard, 2 = large, 3 = mini
-- make Canvas width/height 50x50, 70x70 for large, 25x25 for mini
if knobSize == 1 then ksize = 25 end
if knobSize == 2 then ksize = 35 end
if knobSize == 3 then ksize = 12.5 end

-- Knob modulation: this displays knob modulation for both types of modulation - connecting a cable directly to a knob and/or a modulation port for the knob (with clamping on or off)

-- Audulus colors
white = color_paint {.84, .84, .84, 1}
black = color_paint { .05,.05,.06,1}
module = color_paint{ .11,.11,.11,1}

azure = color_paint {0, 0.83, 1, 1}
azure_dark = color_paint {0, 0.61, 0.73, 1}
azure_bkgd = color_paint {0, 0.06, 0.08, 1}

green = color_paint {0.23, 0.77, 0.33, 1}
green_dark = color_paint {0.15, 0.51, 0.03, 1}
green_bkgd = color_paint {0, 0.08, 0.01, 1}

red = color_paint {1, 0, 0.38, 1}
red_dark = color_paint {0.65, 0, 0.25, 1}
red_bkgd = color_paint {0.11, 0, 0.04, 1}

grad = linear_gradient({10,25}, {50,25}, theme.redHighlight, theme.azureHighlight, 0)
--fill_circle({25,25}, 25, grad)

-- module color circle (a little larger than knob to diminish aliasing when zoomed out)
stroke_circle({ksize,ksize}, ksize-1, 3, module)

-- black circle
stroke_circle({ksize,ksize}, ksize-1, 2, black)

a = math.pi * k
b = math.pi * m

-- when cable is attached directly to the knob (which is internally clamped)
stroke_arc({ksize,ksize}, ksize-1, 2, a+math.pi/2, a, black)

-- when using the modulation port (clamp = 0 shows full range of modulation)
clamp = 1
if clamp == 1 then c = math.max(math.min(math.pi-a,b), -a) else c = b end

-- change both to some other color (like red) to distinguish port from knob takeover
if m >= 0 then
    mpos = math.max(0,c)
    stroke_arc({ksize,ksize}, ksize-1, 2, 2*a-math.pi/2+mpos, mpos, grad)
elseif m < 0 then
    mneg = math.min(0,c)
    stroke_arc({ksize,ksize}, ksize-1, 2.3, 2*a+math.pi/2+mneg, mneg, grad)
end

-- highlight current position (using stroke_arc aperture)
stroke_arc({ksize,ksize}, ksize-1,3, 2*a-math.pi/2, .08, grad)
 0   0                       AkCjĄC	                   h @ < 4 (               $                                                       3                 h   @   @                   A  A<     
A  A   C)nCN                    toggle         if toggle == 1 then 
colour = theme.modules
else
colour = theme.text
end

translate{16.4,7.2}
scale{0.6,0.6}
text("RM", colour)
    | @   8   , ( $                                                                  7       6                            |   @   @                 $   ,   ,   ~m@у   C   C                   B   C   h < 8 0 (               $                                                                         h   <   <                    B(     A   C  *C  C                   
   DUAL FADER  ,   ,                     A                       Audio       08   8                 ,    {       C   B                      × 
    (   (                   jC                     0   0                           XB	                   dL   L                 l  ,   4   4     ?3+À @@  HB  B   C  4B                   <   =   >   ?   0   0                   HB  B  C  B
                   h 4 0 (                                                                                           h   4   4                          A  C  *C                   0   0                    A   A  B   	                   X,   ,                 ,   u,B                    x          1-x ,   ,                     @C ?                   L0   0                   HB  BfB0	                    ,   ,                    0`C('?                   \,   ,                    æC4?                   0   0                   B  B^$	                   ,   ,                    \]B?                   p8   8                A,     B      Cm	                      R   4   4           @A,     B  B   VLCϫ                      L   4   4                   B  @   #CA
                   4   4                   B   B   C=˯
                   4   4           @A  ZA >   Ó"                   d4   4                    A  @   	v$	                    $   $           ,   {A                    x          -x  ,   ,                       C                       0.7071
 P,   ,                      C >                   8   8                 ,     >B  A    @!D @                      ×  ,   ,                    "C:=                   h 4 0 (                                                                         '                 h   4   4                 4ALB   zm	                   ,   ,                      *C  >                   h , (                                                                                             h   ,   ,                    SJ1C>                   h 8 4 ,                                                                        +                  h   8   8              wB,      A  fB   yt'CN5                      
(Bipolar) VCA
(RMS) Crossfade
 ,   ,             HB  A    D  
                   h 4 0 (                                                                       '                   h   4   4           @A  ZAB     p                     $   $           ,   	m                    s          s*(pi/2)    h , (                                                                                              h   ,   ,              A   B      B 	                   $   $           ,   _                    x          cos(x)  h $                                                                                                h   $   $           ,   Ԩ                    x          sin(x)  | <   4   , ( $                                                                                                       |   <   <             B  B    (   (   ~?=Ø$
D.@CA                                   !   "   #   $   %   &   '   (   )   *   +   ,   -   .   /   0   1   2   3   4   5   6   7   h 8 4 , $                                                                                         h   8   8                    C>  A  B@}=C                   0   0                    A  pB  B  B	                   ,   ,                     A                       Audio       8   8                 $   {T      C   B                   (   (                   jC                     0   0                           XB	                   8L   L                   ,   4   4     ?3+À @@   A  pB    4B  B                                ,   ,                     A                       Audio       8   8                    {T      C   B                   (   (                   jC                     40   0                           XB	                   L   L                   ,   4   4     ?3+À @@  *A  A    4B                                  |,   ,                     A                       Audio       8   8                 ,    {T      C   B                      A
  (   (                   jC                     0   0                           XB	                   8L   L                   ,   4   4     ?3+À @@ HB  qB   C  B                               h , (                                                                                             h   ,   ,                 0     A                       Audio          -Audio  h 8 4 ,                                                                         +                 h   8   8                 ,    {T      C   B                      B
  h ( $                                                                                             h   (   (                   jC                     0   0                           XB	                   | L   D 8 0 , (                                                                 C       B                       $     |   L   L                 T   ,   4   4     ?3+À @@  KB   A   C                              	      Audio I/O Light 0   0                   HB  pB  C  B
                   h 0 , $                                                                                           h   0   0                   HB   A  C  
                   | X   P D < 8 4           (                  $                                   O                              0   , |   X                       *C  pB  ,       G?LK     4C   lB    u  Here’s an update to the **Dual Fader**, this time round in a simplified form as a basic building block that can be patched according to one’s needs.   

In essence, it’s a crossfader with an (optional) RMS curve that can be used for: 

- Crossfading: 2 input signals, 1 output signal
- Panning: 1 input signal, 2 output signals
- Ducking: 2 input signals, 2 output signals

With a single input, it can also be used as a VCA, with a (close to) logarithmic curve if the RMS option is toggled. 

The ‘RM’ toggle inverts the polarity of the second channel, allowing for spatial effects, or ring modulation when modulated at audio rates. 

### Controls
- **LIN/RMS**: Toggle selects a linear or RMS curve. 
- **Fader**
- **Fader modulation level**
- **RM**: Ring Modulation (channel B inversion) toggle

### Ins & Outs
- **Input A**
- **Input B**
- **Output A**
- **Output ×** (Crossfade)
- **Output B**

### Version History
- v1.1 – 09 April 2018 (Audulus 3)
- v2.0 – 02 May 2026 (Audulus 4)

### Links 
- [Audulus Forum](https://forum.audulus.com/t/hordijk-dual-fader/284) 
- [Hordijk #12 @NOVARS](https://youtu.be/ux_Qodg1r84)                             
                  8   9   :   ;   @   A   D   E   F   G   H   I   J   M      Fader   | H   @   8 4 0                              $                                                                  ,   ( |   H                       C  pB        h @BaV.C      # Dual Fader
## After Rob Hordijk

Here’s an update to the **Dual Fader**, this time round in a simplified form as a basic building block that can be patched according to one’s needs.   

In essence, it’s a crossfader with an (optional) RMS curve that can be used for: 

- Crossfading: 2 input signals, 1 output signal
- Panning: 1 input signal, 2 output signals
- Ducking: 2 input signals, 2 output signals

With a single input, it can also be used as a VCA, with a (close to) logarithmic curve if the RMS option is toggled. 

The ‘RM’ toggle inverts the polarity of the second channel, allowing for spatial effects, or ring modulation when modulated at audio rates. 

### Controls
- **LIN/RMS**: Toggle selects a linear or RMS curve. 
- **Fader**
- **Fader modulation level**
- **RM**: Ring Modulation (channel B inversion) toggle

### Ins & Outs
- **Input A**
- **Input B**
- **Output A**
- **Output ×** (Crossfade)
- **Output B**

### Version History
- v1.1 – 09 April 2018 (Audulus 3)
- v2.0 – 02 May 2026 (Audulus 4)

### Links 
- [Audulus Forum](https://forum.audulus.com/t/hordijk-dual-fader/284) 
- [Hordijk #12 @NOVARS](https://youtu.be/ux_Qodg1r84)                        O   | <   4   , ( $                                                                                                       |   <   <                     (   (   \A@hE{1                              