tubeAmp / Ardour / DAW / LV2 The making of tubeAmp: don’t moan, write code

The history of this project is not exactly typical. A few guys gathered in an off-topic section at the linux.org.ru forum to talk about guitar amp/cab simulation on Linux. And mostly, they were unhappy with existing options.

Around page 9, Oleg Kapitonov, who started this thread, was using specmatch to make impulses from YouTube videos demonstrating clean/crunch sound difference. On page 10, he was already prototyping emulation models with Scilab…

Some 50 pages later, we now have tubeAmp guitar amp emulator and half a dozen of plug-ins, all in LV2 — an octaver, a vintage fuzz pedal, a tube screamer etc.

I’ve been watching this thread with fascination since its inception, so I guess it’s time to share it with the rest of the world :) Hence, here is a quick interview with the developer.

Oleg, let’s get right down to it :) If I remember correctly, a good chunk of R&D was made by measuring the signal in different cascades of another guitar amp simulator (Amplitube). So that basically makes tubeAmp a derivative of a derivative project. Do you ever get nightmares how you lay your hands on a real guitar amplifier, disassemble it, make impulses and, with cold sweat running dowm your spine, realize YOU HAD IT ALL WRONG? :)

No, it wasn’t like that really. The project began with the idea of ​​making a universal model of a guitar amplifier instead of emulating specific electronic circuits.

If you look from the point of view of mathematics, not electronics, a typical guitar amplifier works like this: the guitar signal first passes through a certain filter, then it is limited, then again through a certain filter. That is, the model of any amplifier can be simplified to an input filter, an overdrive, and an output filter.

tubeAmp

The sound of such a model will depend on the frequency response of the filters and the overdrive curve, and can mimic any type of an amplifier — a vintage or a modern one.

If you want your model to produce a familiar sound instead of something completely alien, your model’s options must correspond to real devices. To do this, I developed a method for obtaining these parameters with a test signal. The same approach is used in Kemper Amps, but, of course, the method there is more sophisticated and more accurate.

So no, I don’t have nightmares )) I tested my method on Amplitube, and the profiles in the first release were received from there (but noticeably adjusted manually, stealing the sound is not good).

With a real device, the parameters will be different, but the mathematical principle of the amplifier itself cannot be different. These are just filters and a limiter. Everything that does not fit into this model are basically nuances.

During the discussion in the forum, you said you weren’t fond of the idea to go along the beaten track of imitating specific amps. You said you’d rather make some sort of a generalized synthesizer of guitar amplifiers. Did you succeed? What’s your opinion on this currently?

I ended up doing something like that indeed. The tubeAmp plugin contains a universal amplifier model with which, in principle, you can receive sounds of any type. It all depends on the profile.

To create profiles, I am currently developing an editor where you would be able to set all parameters manually, so that’s the part that is a kind of an amplifiers’ synthesizer. You can also create new profile parameters with a test signal which is just a WAV file. You can pass it through a real device, through a software processor, through a model in Qucs or OpenModelica, and so on.

The profile taken by the test signal can be edited manually as desired.

Do you have any kind of roadmap or at least an idea in which direction to develop the project?

Here is what I have in mind.

For tubeAmp:

Version 1.2 — a more sophisticated model, with the addition of asymmetric distortion forms. They cannot be obtained right now, and thus profiles of vintage amplifiers do not sound exactly as they should. I also want to add transformer nonlinearity to the model.

Version 2.0 will have a new profile format instead of *.tapf. I’ll also switch to the YAML format to describe the block chain and parameters of blocks. This will make the format vastly more human-readable (and not binary, as it is now). Secondly, you would then be able to create more flexible models, including as many filters and overdrives as you like in the order that you want. That is, one tubeAmp plug-in will be able to emulate both an amplifier and a set of pedals. If necessary, the entire chain can be placed in one profile.

deadgate

For the profiles editor, my plan is:

Version 1.0 — the ability to create profiles manually or with a test signal. I’ll also add a deconvolver and an automatic equalizer.

Version 2.0 — transition to a new profile format. This will require the addition of a structural diagram editor, such as in Simulink or OpenModelica, but simpler.

Oh, and the tubeAmp hardware project is getting ready. This is a DIY guitar processor based on the DSP ADAU1452. The control program for this processor will be able to load profiles from the tubeAmp plugin into it, and it will give the same sound, plus the main plugins from the KPP set. And this is practically without signal delay, which everyone hates so much on the PC.

The device is focused on working with Linux, all the software will be open under the terms of GPL. I will also open all PCB designs and make it an open hardware project. You won’t need proprietary programs or drivers to use it.

What stage is the DIY project at?

I bought all the electronic components I need for the guitar processor. These are ready-made modules: my initial plan was that you wouldn’t have to solder anything, with maybe an exception for cables between components. Now I need to write the DSP firmware and a program for PC that interacts with the guitar processor. Not difficult, but so far, I have given all my attention to the profile editor. Once I release the editor, I can go all in with the DIY processor project.

At some point in the discussion on the forum you wrote this: “Personally, I’d rather smash my head against the wall than I admit something is not possible on Linux yet possible on other systems. Linux is not the problem, it’s the people who did not write this or that program. Don’t moan, write code”. Now that you have the experience of writing something that was missing for you, what was it like?

What I wrote is that I was more interested in the technical side of the electric guitar than improving my playing to a professional level (which is unattainable for me). If I just wanted to play the guitar, I would buy a guitar amp, that’s all. But I wanted to delve into digital signal processing and delve into it I did. It’s close to what I do at work, and I’ve been fascinated by electronics since I was a child.

Bluedream

Do I think that guitar players need to write code? No, of course they don’t have to.They need to play the instrument. But there are many programmers who like playing guitar, and they can make software. Just look at the crapton of VST plugins for Windows. For Linux, there were just Guitarix and Rakarrack. So I thought I’d join.

While working on this, I acquired very useful knowledge in the field of digital signal processing. I recently bought an RTL-SDR dongle and started studying the processing of radio signals. Turned out, it’s all the same.

Do you see any connection between your own playing the guitar and the quality of your plugin? Like, you played guitar a little, didn’t like the sound, tweaked the code, rebuilt it, and liked the results better?

Yeah, sure! I did everything to make it sound the way I wanted it to. I used to constantly compare the sound of real amps on YouTube picked up by a mic with how my plugin sounded. So I did something like what you described on a daily basis for a long time. I don’t touch that code right now only because I’m focusing on the profile editor. Once it’s ready, adjusting the sound will be possible on a completely different level.

The code that I have already released isn’t perfect and raises some well-deserved questions — all because I made quick and dirty profiles.

All this time I’ve been playing through my plugins only. I can hear my bloopers better when I do, and with decent settings, I can variate between clean and crunch easily. I think I started playing better, if I may call it that.

A few months back, Hermann Meyer, the lead developer of Guitarix stopped by to send you a few pull requests — to add Makefiles and suchlike. Did you maybe have a treacherous thought at that moment to stop working alone and join a larger project? :)

I’m very grateful to him. He actually also helped squashing a bad bug in the plugin.

I don’t see myself joining Guitarix, I basically started my journey by modifying its code. We discussed that in the forum too.

What I think is that it’s now better to make plugins for DAWs rather than make standalone applications. Plus, I see some historical problems in the architecture of Guitarix, it’s an old project after all.

Actually, my impression is that Hermann decided to turn everything into plugins and move all new features there. At least, he’s been releasing LV2 plugins in batches lately.

After all, Guitarix is, in fact, a host of such plugins, with some hardcoded design decision.

distruction

Doing everything in a DAW is more flexible, in my opinion. You need it to record your guitar anyway. So why not use a DAW and some 3rd party plug-ins like the ones both of us make?

How could an interested developer make him-/herself useful for your project?

It is better for a new developer to wait for the first release of the profile editor, which will be soon. The editor is, in fact, the main part of the project, on which everything depends.

There will be a huge field for work for every taste: from a graphical interface to complex mathematics. There’s even a place for a front-end developer ))

What about non-coding contributions? What kind of work is in demand?

One might help using the editor. Like, pick a profile from your equipment. Or maybe fix/customize an existing profile in the editor, then upload the result into the profile repository — another project I’m planning.

I’m also lacking examples of how my plugins sound. Sure, I can record some stuff myself, but I don’t play in all possible styles. If you are a Linux user and you could record yourself playing your usual guitar parts through my plugins, that would be a big help.


Patreon subscribers get early access to my posts. If you are feeling generous, you can also make a one-time donation on BuyMeACoffee.

Support Libre Arts at Patreon