In most guitar amplifiers a negative feedback loop is incorporated to flatten the frequency response and reduce noise, often taken from one of the speaker taps on the output transformer back to the cathode of one of the preamp valves. As this is not possible with the current valve models I decided to wrap the loop around various combinations of valves to see the results.
It is important that the feedback signal is 180 degrees out of phase with the original signal to ensure that he feedback is negative otherwise we will end up with howling feedback.
The valve models already invert the signal so if feedback is implemented around an odd number of valves no extra processing is necessary, if an even number the signal must be inverted.
Generally the level of feedback in guitar amps results in an overall gain reduction of between 6-10dB.
/* Experiments with Guitarix Components Series of experiments with aim of using the "tube" components to build amplifiers as close as possible in topology as real valve amplifiers Steve Poskitt 2013 Blog 1 - single valve stage Blog 2 - cascade valves to see effects of overload Blog 3 - add some NEGATIVE FEEDBACK and look at effects of filtering feedback loop */ import("guitarix.lib"); // Input gain so can test overload gain = vslider("Gain[alias][style:knob]",0,-20,20,0.1):db2linear: smoothi(0.999); // A valve is represented by the tubestage function // By time gain is at +6dB there are numerous harmonics above 22k with 1kHz input sine // so there is a need for a lowpass filter to calm this down. // Similarly you can also see harmonics at the very low end which could also cause problems // In a guitar amp this is no problem as likely to roll off above 6500Hz anyhow stage2 = tubestage(TB_12AX7_250k,10.0,1500.0,1.204285):highpass( 2,40):lowpass( 2, 18000 ) ; stage1 = tubestage(TB_12AX7_68k,10.0,1500.0,1.204541) ; feedback = vslider("Feedback[alias][style:knob]",-60,-60,0.0,0.1):db2linear: smoothi(0.999); // cascade produces more harmonics and a thicker distortion // Suing sub as need to make feedback negative // Once we get to around -6dB feedback gain we get mental high frequencies // try lowpass on feedback loop to stop this helps but needs to be quite low // With -3dB of feedback ( giving around 4dB reduction in output signal ) // we need lowpass at around 13400 // In guitarix amp sims they use 6531 lowpass in between stages // Listening the feedback does have the effect of tightening the sound some and reducing harmonics // so could be useful as feedback tone is definitely different // Interestingly can apply 0dB feedback as long as lowpass is as low as 6900Hz // any frequencies above that and level of feedback severely restricted // Maybe due to phase shift as on scope there is a fair amount ( filters??? ) freq = vslider("Freq[alias][style:knob]",20000,5000,20000,100); process =(sub:stage1:*(gain):stage2)~(lowpass( 1, freq):*(feedback));
Several Faust models later the results are pretty promising but do come with some problems. Seems that the feedback signal needs careful filtering as the mixing of the feedback and original signal produces aliasing artifacts and these can result in additive feedback at high frequencies. More tweaking need to get the best compromise here.