a SPICE-like circuit simulation tool for live audio signals.
LiveSPICE releases are distributed from the GitHub releases page. Note the following requirements:
Here are some resources in the getting started guide to help you start using LiveSPICE:
LiveSPICE is a SPICE-like circuit simulation tool for processing live audio signals. The motivation for developing LiveSPICE is to help prototype guitar effects and amplifiers, without requiring constructing a physical circuit or waiting for an offline simulation to run to try it out. With LiveSPICE, you can design the circuit in an easy to use visual schematic editor, and simulate it using your real audio device as an input signal and your speakers as the output.
Transient simulation of circuits is an extremely computationally intensive task, making it difficult to perform in real time. In addition, circuit simulation is a difficult problem to parallelize, meaning that most of the computer power improvements in recent years are not useful to speed up circuit simulation. In order to deliver real time, low latency transient simulations for audio signals, LiveSPICE is somewhat unique among circuit simulators in the following ways:
Despite these measures, there will always be a limit to the complexity of the circuits that can be simulated in real time. More powerful computers will be able to simulate larger and more complex circuits before running into limitations with simulation performance.
LiveSPICE is a hobby project with no particular goal besides making a tool that is fun to use. It is an open source project hosted on GitHub. If you would like to contribute, take a look at the open issues and send a pull request!
The obligatory bullet point feature list:
Planned future features and improvements but not yet implemented:
Here are some examples of what LiveSPICE is currently capable of simulating. All of these examples are screenshots of LiveSPICE during a real-time simulation.
Some notes about the performance data:
This simulation runs at 74.3 kHz with an 8x oversampling factor (1.68x real time at a 44.1 kHz sample rate).
Circuit schematic from GM Arts.
This simulation runs at 97.2 kHz with an 8x oversampling factor (2.2x real time at a 44.1 kHz sample rate).
Circuit schematic from GM Arts.
This circuit contains 3 related triodes (using a model derived from the Child-Langmuir law).
This simulation runs at 47.6 kHz with a 4x oversampling factor (1.08x real time at a 44.1 kHz sample rate).
Circuit schematic from Watts Tube Audio.
This simulation runs at 83 kHz with an 8x oversampling factor (1.88x real time at a 44.1 kHz sample rate).
Circuit schematic from GM Arts.
This circuit is a building block of most transistor amplifiers.
This simulation runs at 268 kHz with an 8x oversampling factor (6.08x real time at a 44.1 kHz sample rate).
Circuit described and analyzed in David Yeh's Dissertation (section 5.3).
This circuit is a building block of most tube amplifiers.
This simulation runs at 213 kHz with an 8x oversampling factor (4.83x real time at a 44.1 kHz sample rate).
Circuit described and analyzed in David Yeh's Dissertation (section 5.4).
To configure your audio device, use the menu to select SimulateAudio Configuration.
Use the Test button to ensure your device is working. The test mode captures the signal from the input channels, displays the waveform on the scope, and plays the signal to the output channels.
Check that the signal is visible on the scope to ensure the input channels are configured correctly. LiveSPICE maps the digital signal maximum (0 dB) to 1 V. Therefore, if the peak of the signal is near 1 V, it is likely that your audio system will have clipping issues.
Check that you can hear the signal coming from your output device to ensure the output channels are configured correctly.
Note that the device cannot be reconfigured while the Test button is pressed. Click the Test button again to stop testing and enable reconfiguration of the audio device.
This tutorial will walk through using LiveSPICE to build and simulate a simple passive first-order RC low-pass filter.
This tutorial expects that you have already configured your audio device in LiveSPICE.
For some background on the filter circuit to be simulated, see the low-pass filter article on Wikipedia.
The first step is to build the circuit we are going to simulate. To begin, select FileNew to create a new blank schematic.
Next, we will begin adding the circuit components. To add a component, find the component in the Component Library and click it. Then, click on the schematic where you want to place an instance of that component. We're going to need the following components, all from the Generic group in the library, to build the filter:
Arrange the components roughly as follows:
If you need to move the components, select them and then click and drag them to move them. You can also use the arrow keys to rotate and flip the selected components.
Next, we need to wire the components together. Select the Wire component from the library (or press Ctrl+W). Adding wires is a little different from the rest of the components, to draw a wire between two points, click on one point, and drag to the other point. Draw wires to connect the components as follows:
The next step is to edit the values of the resistor and capacitor to build the circuit that we want. Let's build a filter with a cutoff frequency near a D3 (the D string on a guitar), which is 147 Hz. If we use a 1 µF capacitor, we need roughly a 1 kΩ resistor to achieve this. To change the value of the components in the circuit, select a component by clicking it. This will bring up the properties for this component. Edit the Capacitance and Resistance fields of the appropriate components by clicking on them and typing the value.
Verify that your circuit looks like the following:
To run the simulation, select SimulateSimulate on the menu. If you have not yet configured your audio device, you will be prompted to do so now. The simulation should now be running!
Click on any of the wires in the schematic to place a Probe. Probes generate signal data from the simulation, which is displayed in the Scope.
Using this information, we can verify that the qualitative behavior of the circuit matches our expectations for the circuit we designed:
Plucking the low-E string of the guitar shows the higher harmonics filtered, and the gain of the circuit near unity.
We selected the corner frequency of the circuit to be the frequency of this note, and we can indeed roughly see the expected gain of -3 dB (1/2).
Plucking the high-E string shows a gain significantly smaller than unity, as expected.