Tutorial: How to connect external fx pedals with FoxDot

In this tutorial, we gonna show you how to use a guitar pedal as an fx in FoxDot.

What we need:
  • a sound card with 2 Stereo Output (2*2), in our case we use a Scarlett 2i4
  • some guitar fx pedals, for this example a MetalMuff distortion and a HolyGrail reverb 
  • FoxDot and Supercollider
  • an audio connection application like Carla or QjackCtl (Linux, Mac), Soundflower (Mac), Audio vritual cable (windows)
7eme ciel - livecoding with laptop and fx pedals


This method is similar to this previous tutorial : Configure SuperCollider for the multichannel

First we need to extend the SuperCollider Output to 4 (2*Stereo) because by default FoxDot use only 1 Stereo output.


In SuperCollider go to :

  • Language / Quarks
  • Select the FoxDot Quarks and click Show classes
  • Select FoxDot and Open File
  • Close all windows and look at the FoxDot.sc open in the SuperCollider window (image 1).

Or you can simply open in SuperCollider : .local/share/SuperCollider/downloaded-quarks/FoxDot/FoxDot.sc

Look for server.options.numOutputBusChannels = 2 and change it to 4 (image 1)

Foxdot quark with 4 outputs
FoxDot Quark with 4 Outputs (Image 1)
jack supercollider 4 outputs
Carla : Supercollider with 4 Outputs (Image 2)

Reboot SuperCollider and now you should see the 4 outputs (Image 2).

>> ADD the FX effect in FOXDOT

If you don’t know how to add a fx in FoxDot or if you are lost you can read our previous tutorial on FoxDot customization.

For just a test you can try this in FoxDot :

fx = FxList.new(‘fx1′,’fxout1’, {‘fx1’: 0}, order=2)
fx.doc(“FX1 Bus”)
fx.add(“Out.ar(2, Mix.ar(osc*fx1))”)

fx = FxList.new(‘fx2′,’fxout2’, {‘fx2’: 0}, order=2)
fx.doc(“FX2 Bus”)
fx.add(“Out.ar(2, Mix.ar(osc*fx2))”)


To make this changes permanent, the easiest way is to edit /FoxDot/lib/Effects/Util.py and add the code above before the last 2 lines. Save and restart FoxDot and if it works, at the startup FoxDot create this file FoxDot/osc/sceffects/fx1.scd and fx2.scd

Output Fx should ALWAYS be the last FX you add in this file.

>> Connect the pedals to the audio interface

fx pedals to soundcard
Connect the pedals to the soundcard (Image 3)

Connect Soundcard Output 3 to the pedal input, and the pedal output to the Soundcard input 1 (Image 3).

In this case we use a rca/jack cable to connect the soundcard outputs to the fx pedals.

The distortion is fx1 (output 3) and reverb fx2 (output 4).


Route the Supercollider output (out_3/out_4) to the soundcard output (playback _3 / playback_4) (Image 4)

Connect the soundcard inputs (capture_1 / capture_2) to your system playback (playback_1 / playback_2) or to a additional mixer for more control.

Now, in FoxDot you can use those fx :

d1 >> play("x-", fx1=1)

d2 >> dbass(dur=1/4, fx2=1)

Important :

You will probably need to adjust the latency, ideally you aim for a latency of 10-15ms. Depending on the complexity of your synthdef and your equipment, you will have to find a compromise between good latency and audio dropouts (xruns).


carla fx routing
Carla : Supercollider and pedal routing (Image 4)