Forums > MaxMSP

creating feedback, like a guitar amp might

October 28, 2008 | 1:26 pm

Hi,

I’m sure this question has been raised a few dozen times, but I skimmed over the search:feedback results without finding an appropriate answer.

I like feedback!

In a guitar amp, feedback is generated when the sound from the amplifier is picked up by the guitar’s pickups and fed back through the amplifier, and so on.

How would it be possible to emulate this process in Max, with a dial (for example) representing the angle of guitar to amp? So 0 is no feedback (pickups are not receiving the signal from the amplifier), and 127 is maximum feedback (guitarist is fully facing amplifier.

Any suggestions are happily welcomed.

Jay


October 28, 2008 | 2:32 pm

Feedback with microphones, usually create a pure wave, like a sine wave.
I never analysed a feedback generated sound but to my hears, it’s a sine waves or maybe a soft triangle one.

Maybe you can analyse the main pitch of your sound and create a sine wave related to this pitch…

If your guitar is closer to the amp, the sine wave is louder.
You can add a sort of distortion simulation by morphing the sine wave to a triangle and to square one.

The difficulty would be to have the frequency logically move from a frequency to an other one.
Frequency movement in Feedback are smooth and somewhat chaotic.
It goes from one harmonic to the others.

I think you’ll create a strange synth more than a feedback simulator, but it’s maybe interesting.

You can work with feedback with effects too, by feeding the output back to the input…
It creates interesting sound with granulation for example.


October 28, 2008 | 2:42 pm

In rtcmix~. there is an instrument called STRUM2 (also the older
STRUM) which implements a feedback/distortion emulation described by
Charles Sullivan:

C.R. Sullivan. "Extending the Karplus-Strong Algorithm to Synthesize
Electric Guitar Timbres with Distortion and Feedback." Computer Music
J., Vol. 14, No. 3, 1990, pp. 26-37.

You are able to model the path between the amp and guitar by
specifying a ‘feedback pitch’, which sets the length of the delay line
for producing the harmonics typically associated with that kind of
guitar sound. The source code is available in the RTcmix distribution.

The PerCoLate objects blotar~ also has this feature, but it’s a fun
blend between a guitar and a flute model.

brad

http://music.columbia.edu/~brad

On Oct 28, 2008, at 9:26 AM, Jay Bodley wrote:

>
> Hi,
>
> I’m sure this question has been raised a few dozen times, but I
> skimmed over the search:feedback results without finding an
> appropriate answer.
>
> I like feedback!
>
> In a guitar amp, feedback is generated when the sound from the
> amplifier is picked up by the guitar’s pickups and fed back through
> the amplifier, and so on.
>
> How would it be possible to emulate this process in Max, with a dial
> (for example) representing the angle of guitar to amp? So 0 is no
> feedback (pickups are not receiving the signal from the amplifier),
> and 127 is maximum feedback (guitarist is fully facing amplifier.
>
> Any suggestions are happily welcomed.
>
> Jay
>


October 28, 2008 | 5:42 pm

Just use a [tapin~] [tapout~] pair. Connect the output of the tapout~ to a [*~] object, and then connect the output of the [*~] object back into the tapin~ input. You’ll want to listen to the output of the tapout~ object (i.e. connect that to the dac).

Adjust the delay time to change the feedback frequency (i.e. 1ms delay would result in a 1000 Hz feedback frequency). Use the *~ object to adjust the volume of the feedback signal, which ultimately will adjust how loud the feedback frequency is, and how long it takes to decay. Sending a value like 0.99 into the *~ object will result in a loud feedback frequency with a long decay. 0.8 would probably result in a less loud feedback with a short decay. 1.01 will probably result in a quickly increasing volume followed by massive clipping.

You’ll also need something to "trigger" the feedback loop, i.e. an initial sound from a microphone or guitar or even a generated sound within max.

Make sense? Check out the tapin~ tapout~ help files.


October 28, 2008 | 11:46 pm

here.. see if this makes any sense. it’s the patch i described above, with a couple of different "exciters". one is your computer’s audio input, another is a short sine wave burst, and the last is a short white noise burst. you can adjust the feedback frequency, the feedback gain, and the overall volume.

let me know if you don’t get it.

– Pasted Max Patch, click to expand. –

October 29, 2008 | 12:01 am

I’m sorry, I always forget to mention I’m using 4.6


October 29, 2008 | 1:32 am

hmm, not sure if you can open .maxpat files in 4.6, but i attached it here.

if you can’t open it with 4.6, you can certainly open it with max5 runtime, which you can get for free off of c74′s website.


November 27, 2008 | 3:05 pm

Yes i second Swieser’s approach.

I am working on something like this myself, and of course it turns out, that the simple tapin/tapout with feedback idea only gets one half way there. A 1ms delay with full feedback produces a feedback with a base freq of 1000 Hz, but incl. frequencies above 1000 Hz, too.

A fully working approach probably needed one or more bandpass filter in the feedback chain [reso~], which adjusts to the delay base freq and it’s 2nd to 4th harmonics probably automatically, as well as feature two adjustable speaker-simulation type of compression (bouncy, punchy).
One before the bandpass(es) – the guitar amp speaker membrane (not to speak of the compression of the amp itself) –
and one right after the bandpass – the microphone membrane or the guitar pickup.

Sounds like a monster of a patch to me already.

It might turn out to be better sounding and much easier to use a real amp and a guitar pickup or mic.

Or a plastic tube with a speaker one end, facing inwards, and a microphone on a stick to insert into it from the other side.

Anyways, i am working on a max thing like this already.

Did you get somewhere with your approach? I am on 4.63, too.

jrp


November 28, 2008 | 2:05 pm

Quote: jayrope wrote on Thu, 27 November 2008 08:05
—————————————————-
> Yes i second Swieser’s approach.
>
> I am working on something like this myself, and of course it turns out, that the simple tapin/tapout with feedback idea only gets one half way there. A 1ms delay with full feedback produces a feedback with a base freq of 1000 Hz, but incl. frequencies above 1000 Hz, too.
>
> A fully working approach probably needed one or more bandpass filter in the feedback chain [reso~], which adjusts to the delay base freq and it’s 2nd to 4th harmonics probably automatically, as well as feature two adjustable speaker-simulation type of compression (bouncy, punchy).
> One before the bandpass(es) – the guitar amp speaker membrane (not to speak of the compression of the amp itself) –
> and one right after the bandpass – the microphone membrane or the guitar pickup.
>
> Sounds like a monster of a patch to me already.
>
> It might turn out to be better sounding and much easier to use a real amp and a guitar pickup or mic.
>
> Or a plastic tube with a speaker one end, facing inwards, and a microphone on a stick to insert into it from the other side.
>
> Anyways, i am working on a max thing like this already.
>
> Did you get somewhere with your approach? I am on 4.63, too.
>
> jrp
—————————————————-

sounds like a very cool patch to me !
please show me the patch you are working on !

Cheers


November 30, 2008 | 12:22 am

Morning guys and gals (1a.m…),

didn’t really get to work on it, here’s a quick shot just with [clip~] and a self-adjusting [reson~] filter, which i ran just on some old tapes of miles davis, to see if it does the basics. it still sounds "digital" to me, however it is adjustable & might be of some use & for some of you.

good night, enjoy,

jrp

max v2;
#N vpatcher 10 59 866 559;
#P window setfont "Sans Serif" 9.;
#P message 150 386 30 196617 open;
#P comment 208 302 100 196617 distorted audio;
#P window linecount 2;
#P user com 386 194 109 196617 18;
#K set 0 24932 27253 29556 8301 24952 8294 26988 29797 29289 28263 3437 24942 30049 27756 31008 25189 27759 30464;
#K end;
#P window linecount 1;
#P hidden newex 514 210 27 196617 b;
#P hidden newex 551 229 31 196617 float;
#P window setfont "Sans Serif" 14.;
#P flonum 386 221 103 14 0. 0 33 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 3;
#P user com 121 166 86 196617 25;
#K set 0 19567 30576 24947 29472 18025 27764 25970 8237 3443 26735 30060 25632 24932 25632 24864 25193 29728 28015 29285 8292 25958 26990 26996 26991 28206;
#K end;
#P window linecount 1;
#P hidden newex 121 239 41 196617 *~ 1.5;
#P hidden newex 48 239 41 196617 *~ 1.5;
#P newex 122 205 58 196617 svf~ 3000;
#P newex 27 205 53 196617 svf~ 150;
#P newex 321 297 53 196617 svf~ 50;
#P user ezdac~ 150 409 194 442 0;
#P user levelmeter~ 47 319 64 32 20 0 0 0 -64 0 0 0 0 0 0;
#X brgb 240 240 240;
#X frgb 200 200 200;
#X rgb2 0 0 0;
#X rgb3 0 0 0;
#X rgb4 0 0 0;
#X rgb5 255 0 0;
#X rgb6 220 100 100;
#X rgb7 220 150 80;
#X rgb8 220 200 100;
#X rgb9 180 210 100;
#X markers 12 6 0 -6 -12 -24 -36 -48 0;
#X markersused 8;
#X done;
#P flonum 303 277 63 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 303 256 87 196617 scale 0. 6. 0. 0.1;
#P user spectroscope~ 382 344 176 90 20 0 0 0 1 1 0 1 0 0 0 0;
#X frgb 224 224 224;
#X brgb 255 255 255;
#X rgb2 0 0 0;
#X rgb3 243 204 204;
#X rgb4 255 0 0;
#X rgb5 184 184 184;
#X rgb6 0 0 0;
#X rgb7 0 0 0;
#X rgb8 255 255 255;
#X rgb9 255 0 0;
#X rgb10 255 191 0;
#X rgb11 0 191 127;
#X rgb12 127 0 127;
#X rgb13 0 0 0;
#X range 0. 1.2;
#X domain 0. 22050.;
#X done;
#P newex 382 316 51 196617 cascade~;
#P newex 203 276 95 196617 reson~ 1 150 0.12;
#P newex 279 73 63 196617 loadmess 0.;
#P user multiSlider 47 355 87 87 -64. 0. 1 3193 31 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 208 355 87 87 -64. 0. 1 3193 31 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user levelmeter~ 208 319 64 32 20 0 0 0 -64 0 0 0 0 0 0;
#X brgb 240 240 240;
#X frgb 200 200 200;
#X rgb2 0 0 0;
#X rgb3 0 0 0;
#X rgb4 0 0 0;
#X rgb5 255 0 0;
#X rgb6 220 100 100;
#X rgb7 220 150 80;
#X rgb8 220 200 100;
#X rgb9 180 210 100;
#X markers 12 6 0 -6 -12 -24 -36 -48 0;
#X markersused 8;
#X done;
#P toggle 110 32 15 0;
#P newex 110 60 39 196617 adc~ 1;
#P window setfont "Sans Serif" 14.;
#P flonum 279 96 113 14 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P message 239 149 31 196617 $1 5;
#P newex 239 168 54 196617 line~ 0.01;
#P message 369 149 31 196617 $1 5;
#P newex 369 169 49 196617 line~ 10.;
#P newex 239 128 128 196617 expr pow(5.7\,(-1.-$f1));
#P newex 369 128 115 196617 expr pow(5\,(0.+$f1));
#P newex 239 196 34 196617 !-~ 0.;
#P newex 203 256 32 196617 *~ 1;
#P newex 203 222 83 196617 clip~ -0.01 0.01;
#P comment 343 75 177 196617 < - initial level "0" / no distortion;
#P comment 368 278 43 196617 filter Q;
#P comment 394 100 125 196617 < - increase for distortion;
#P window linecount 5;
#P user com 26 142 90 196617 45;
#K set 0 18537 26472 28769 29555 8262 26988 29797 29216 11533 17256 24942 26469 8308 26729 29472 29807 8308 26725 8300 28535 25970 8308 28448 26469 29728 28015 29285 8292 26994 29740 8290 30068 8300 25971 29472 25452 25953 29216 25185 29555 8297 28016 24931 29728 11776;
#K end;
#P window linecount 1;
#P comment 47 302 100 196617 original audio;
#P window setfont Georgia 12.;
#P window linecount 2;
#P user com 176 30 155 797638668 16;
#K set 0 26482 25957 29801 28263 29486 8205 27233 31090 28528 25903 27500 26987 27745 27438 28261 29696;
#K end;
#P user panel 169 26 174 43;
#X brgb 229 152 152;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden newex 247 48 94 196617 bgcolor 255 10 51;
#P hidden fasten 18 0 32 0 115 204 32 204;
#P lcolor 11;
#P hidden fasten 18 0 29 0 115 123 52 123;
#P lcolor 11;
#P connect 29 0 22 0;
#P lcolor 11;
#P hidden connect 33 1 34 0;
#P lcolor 11;
#P hidden connect 32 0 34 0;
#P lcolor 11;
#P connect 19 0 18 0;
#P lcolor 11;
#P hidden connect 32 0 35 0;
#P lcolor 11;
#P hidden connect 33 1 35 0;
#P lcolor 11;
#P hidden fasten 18 0 33 0 115 147 127 147;
#P lcolor 11;
#P fasten 24 0 30 0 208 301 155 301;
#P lcolor 11;
#P connect 42 0 30 0;
#P lcolor 11;
#P hidden fasten 34 0 30 0 53 272 155 272;
#P lcolor 11;
#P fasten 24 0 30 1 208 304 189 304;
#P lcolor 11;
#P hidden fasten 35 0 30 1 126 272 189 272;
#P lcolor 11;
#P connect 32 1 8 0;
#P lcolor 11;
#P connect 8 0 9 0;
#P lcolor 11;
#P connect 9 0 24 0;
#P lcolor 11;
#P hidden connect 24 0 20 0;
#P lcolor 11;
#P connect 20 0 21 0;
#P lcolor 11;
#P fasten 13 0 9 1 374 246 230 246;
#P lcolor 11;
#P fasten 17 0 12 0 284 121 244 121;
#P lcolor 11;
#P connect 12 0 16 0;
#P lcolor 11;
#P connect 16 0 15 0;
#P lcolor 11;
#P connect 15 0 10 0;
#P lcolor 11;
#P connect 10 0 8 1;
#P lcolor 11;
#P fasten 15 0 8 2 244 190 280 190;
#P lcolor 11;
#P connect 23 0 17 0;
#P lcolor 11;
#P connect 27 0 24 3;
#P lcolor 11;
#P fasten 38 0 27 0 556 252 308 252;
#P lcolor 11;
#P connect 27 0 28 0;
#P lcolor 11;
#P connect 24 0 31 0;
#P lcolor 11;
#P hidden connect 37 0 27 4;
#P lcolor 11;
#P fasten 17 0 11 0 284 121 374 121;
#P lcolor 11;
#P connect 11 0 14 0;
#P lcolor 11;
#P connect 14 0 13 0;
#P lcolor 11;
#P connect 31 1 25 0;
#P lcolor 11;
#P connect 25 0 26 0;
#P lcolor 11;
#P hidden fasten 37 0 39 0 510 242 510 204 519 204;
#P lcolor 11;
#P hidden fasten 39 0 38 0 556 227;
#P lcolor 11;
#P fasten 17 0 38 0 284 121 556 121;
#P lcolor 11;
#P pop;


December 3, 2008 | 9:47 am

another vote for [reson~].

i think it’s hard to emulate guitar feedback sound by actually feedbacking with tapin~/tapout~ in max.

when i made a guitar feedback emulator,
i used fm synth + reson~ and get a somewhat usable result.
http://ondomusic.com/mes01.html
(tgr_onky.txt in the archive is the editable max4 patch)


December 3, 2008 | 1:25 pm

thanks for sharing this… it looks cool. can’t wait to dig in.


December 3, 2008 | 10:18 pm

Is this patch similar to patches for physical modelling of instruments like pan flutes?

Arent they also based on feedbackloops with whitenoise as excitatiors, and some compression/filtering and saturation on the feedback or something?

Cheers



Zh
December 3, 2008 | 10:39 pm

Have you tried the Best Plugin Ever ™, Pluggo’s "Feedback Network"? It’s obviously made in Max but as its a VST you can’t see the code. Its feedback sounds are amazing, the best digital feedback I’ve ever heard. I’ve been wondering how it’s done for a long while. Can anyone shed any light?


February 3, 2010 | 8:39 am

I’d just like to weigh in after discovering this thread a year later to say thanks Brad for RTCMix and STRUM2! Sounds totally gorgeous and does exactly what I was expecting to spend months trying to create from scratch. Now time to make some music. :-)


Viewing 15 posts - 1 through 15 (of 15 total)