Simplified Ltspice model of an electric guitar : magnet, vibrating string and pickup with core saturation.

Following is a Ltspice model of a vibrating ferromagnetic guitar string with a AlNiCo magnet and a coil pickup.

Model Download :

Dependencies :

TL072 Op-Amp model or any other Audio grade suitable op-amp

Explanation :

It assumes a single pickup with a copper wire wound around a Nickel Steel alloy core. Saturation is modeled.

In a realistic model, the magnetic excitation of the coil is as follows :

  • A) Magnet generates (magnetostatic equation) magnetic field. (2)
  • B) Vibrating string is magnetized. Creates a time varying magnetic field according to motion equations (1) & (4)
  • C) Time varying magnetic field is picked up by the coil wrapped around the pickup pole cores.

Because of the limitations of integration in Ltspice (time integral support, but not space integrals), the model of B) has been simplified – As if the magnet was vibrating like a string at a distance of the pickup, but taking into account geometry. A better model would be possible using “C++ black boxes” as it is possible now with QSpice, as the DLL engine is Turing complete which allows to render space integrals easily. The model of B) excited by A) is doable in QSpice and is explained in the paper (4). So B) has been simplified to a simple coupling parameter int the form of a factor “chi_wire” (or wire magnetic susceptibility).

Note that the code for such a model of B) has been explored as such, but not validated. It may be added here in a future release.

Finally the core Mechanical model is simplified and according to (1) :

It assumes a string displacement along the Z axis only, and bridge reaction is not modeled.

Bias magnetic field is modelled and as a notable contribution if the pickup core saturation is modelled.

Note that the coil is assumed to be wrapped around a single pole (as just one string is modeled), number of turns has been decreased to take into account the tighter magnetic coupling.

Pickup flux is the sum of self inductance times current + induced flux from time varying magnetic field. Since the preamp is very high impedance the current is negligible and only the EMF from the magnetic field has sensible contribution.

Finally a preamp has been added. (5)

References :

(1) Solving the Sound of a Guitar String
Jason Pelc
December 10, 2007
(Submitted as coursework for Physics 210, Stanford University, Fall 2007)

http://large.stanford.edu/courses/2007/ph210/pelc2/

(2) Magnetic Field of a Cylindrical Bar Magnet – Wolfram Demonstrations Project

https://demonstrations.wolfram.com/MagneticFieldOfACylindricalBarMagnet

(3) Analytical Functions of Magnetization Curves
for High Magnetic Permeability Materials

Mehran Mirzaei1 , and Pavel Ripka1
Faculty of Electrical Engineering, Czech Technical University, 16627 Prague, Czech Republic

https://ieeexplore.ieee.org/document/8356239

(4) Exact expression for the magnetic field of a finite cylinder with arbitrary
uniform magnetization
Alessio Caciagli 1, Roel J. Baars 1, Albert P. Philipse, Bonny W.M. Kuipers ⇑

(5) ELECTRIC GUITAR PREAMPLIFIER by EFI Bureau

https://www.electronicsforu.com/electronics-projects/electric-guitar-preamplifier

Thermionic VST3

What is Thermionic?

Thermionic is an FX VST3 Plugin.
It is waveshaping in nature by applying a custom dynamic range compression followed by a single-ended triode amplifier.
The single-ended triode circuit uses a SPICE algorithm to solve the circuit state.
It can do both very low THD and heavy distortion/waveshaping effects.

The idea for this plugin came after designing this waveshaping compressor in LTspice. Then I thought that it would be cool to add a final triode stage.

Custom compression :
The compression applies a linear-to-log conversion with an additional coefficient (parameter k) that alters the transfer function to provide varied waveshaping effects.
Also, the knee effect can be tailored to provide distortion at the knee level. It is roughly the digital implementation of the LTspice knee-breaker compressor that I discussed in a previous post.

As for the triode implementation, it uses a classic 12AX7 single-ended configuration circuit. with AC coupling at the input and output stages for the default preset, with additional presets available.
It features a cathode bypass resistor and capacitor, grid current emulation, and Miller capacitance.

The intrinsic triode parameters are based on Norman Koren’s model and allow the emulation of other models of triodes.
Grid current is based on Rydel’s model.
Non-realistic Vact parameter is added to start grid current distortion at an arbitrary voltage input level, disregarding biasing.

Since the state-based nature of the circuit, some parameter combinations may result in divergence and are non-recoverable, but it is rare, Some parameter combinations also require more CPU time to find a solution.
So, it is advised to tread carefully when modifying parameters.

Saving a preset / restoring a preset is possible and the simulation should start all right but with a delay of a handful of seconds to obtain convergence.

abstol defines the SPICE solution tolerance and improves quality at the expense of more CPU load.

The plugin also features an experimental routing of the gain reduction to some triode parameters.

Additional features :

  • Oversampling from 0x to 3x.
  • Auto Make-up gain on/off with trimming.
  • Compressor / Triode bypass.
  • Compressor Stereo Linking On/Off.

Beta Caveats / Bugs :

  • Not all parameters are suitable for automation.
  • In some cases, when CPU load is high, switching on/off checkboxes and a StringListBox parameter, (for instance, Oversampling, GR Routing) may not be taken into account. If that happens, Please stop audio processing and change the parameter state, and then resume audio processing.

Tests :

To ensure a quality product, we will try to test the plugin in the most varied configurations, including a wide variety of OS and Hosts configurations.
Most of the tests to date have been done on Renoise 3.41

We also plan to enroll users for beta testing. Nothing is better than field experience.

Release Date :
To be announced,
Probably June to August 2023.

Minimum OS/Software requirements :

  • Windows 8 to 11.
  • x64 OS.
  • A VST3 compatible host.

What about Mac users?

We envision a plugin for Mac users, but we need more time to port some functions.

Will there be a Demo version?

There will be a demo version available on our portal soon, to start the beta field testing phase. For now, there is a youtube video with a demo of the product for waveshaping applications.

Some Screencaps :

Triode operation, Default Settings, Harmonic content.
Triode operation while drawing grid current
WaveShaping operation.

For a more dynamic presentation, check the video :

Thermionic VST3 Demo Video