reverse-engineering ehx hog

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
dormirj
Established Member
Posts: 59
Joined: Thu Jul 20, 2017 9:13 am

reverse-engineering ehx hog

Post by dormirj »

hello,

while reading another thread about analysing guitar midi notes, i've made a small comment and decided that it actually deserves its own thread. i'm kind of intrigued by the ehx hog,hog2 and the smaller versions of it like the organ pedal, mellotron, etc. it seems to me that they all use the same variation of a single algorithm with a lot of harmonic processing and filtering. i've found a few posts in the muff wiggler forum about the possible workings:
I can't speak for EHX, but my guess is it's some variation of a Fast Fourier Transform. From a mathematical standpoint, there's a series of formulas (or really just one big, ugly formula) that describe the relationship between the input signal and the output signal. What they're doing with the entire 9 series is taking an input signal (they make a lot of interesting assumptions about what the input signal looks like, but that's beside the point of this post) and applying an extreme degree of filtering/waveshaping/signal processing (defined by that formula) to that input signal, generating an output signal that we hear as a variation on a Mellotron/organ/rhodes/whatever.

All of this is an extension of the technology present in the HOG/POG line. One of the interesting features on the HOG is the Spectral Gate, which as I understand it tried to isolate the fundamental harmonic of whatever note(s) were present on the input to improve the "tracking" of the various shifts. One of the ways they could be doing this is applying the Spectral Gate technology to anything/everything coming in and then performing various distortions/waveshaping/filtering/EQ'ing operations on that signal. A Mellotron flute, for example, has a consistent, well defined transient portion of every note-it is effectively the same whether you are playing the lowest G or the highest C, so you can get by with applying one transient to everything that comes in on the input. After that initial transient attack (which has, historically, been the big sticking point with respect to tracking live instruments and doing pitch to synth conversion), the pedal can apply the real time processing necessary to turn a boring electric guitar sound into a goofy clarinet (as shown in the Mel9 demo video). As far as the formant filtering they do to get the various choir sounds, there's the Talking Machine from EHX's past, which was an envelope formant filter that they could have either modeled in software or taken the code from (if it's digital) and put into a new box.

TL;DR-basically I think EHX is using fancy technology to mask the part of the note that doesn't need to be "tracked" (it isn't tracking, but yeah) and then instead of "tracking" a note they're applying a ton of filtering so as to turn the guitar sound into as close to a sine wave as possible, then processing the shit out of that until it sounds like whatever instrument they're looking to emulate.
Basically the way moogboy described - resynthisizing the sound in real time. They have analyzed the original samples and have made an algorithm that describes that sound and applies it to the incoming audio. They don't need to detect the frequency exactly and do any sort of pitch to anything conversion, they just add spectral noise and apply a VERY dense mult-filter transform to make the sound. I imagine there is a nice fast DSP in that box that is working really hard.
i know i'm probably not the first one to ask this, but maybe someone here is pretty deep into dsp coding? anyhow, maybe it can spark a discussion about ways to do fx coding. i'm just curious about some opinions/ideas.

greetings;;
User avatar
lucianodato
Established Member
Posts: 156
Joined: Sat May 15, 2010 9:00 pm
Has thanked: 3 times
Been thanked: 16 times

Re: reverse-engineering ehx hog

Post by lucianodato »

Fft transform is often not suitable for zero latency processing so could be that they replaced that with some kind of perceptually motivated filterbank or something like that. I know that pretty complex stuff like that could be done using a sinusoidal+noise model as the second comment mention but I doubt they are using that because that involves fft processing and that means latency.
Edit: Or maybe they have a really good pitch detector and use it to feed a synth engine.
Arguy (IRC)
dormirj
Established Member
Posts: 59
Joined: Thu Jul 20, 2017 9:13 am

Re: reverse-engineering ehx hog

Post by dormirj »

i have access to an "organ modulator" c9 currently, i dont know for sure, but i don't feel like its doing pitch analysis, since it seems perfect for any kind of polyphony and pitch-modulation, maybe they have an fft-like algorithm that is just really fast, so the delay is beyond recognition? i also had a look inside and it seems the processing is done by an "Analog Devices BF592KCPZ", which is a blackfin processor with 400mhz.

greetings..
User avatar
lucianodato
Established Member
Posts: 156
Joined: Sat May 15, 2010 9:00 pm
Has thanked: 3 times
Been thanked: 16 times

Re: reverse-engineering ehx hog

Post by lucianodato »

Could be that they are using a small window of analysis yes.
Arguy (IRC)
User avatar
ufug
Established Member
Posts: 525
Joined: Tue Jan 10, 2012 12:28 am
Has thanked: 71 times
Been thanked: 22 times

Re: reverse-engineering ehx hog

Post by ufug »

I have spent some time with the Mel9, and it is incredible. I am not going to hold my breath on a low latency plugin version, but it would be quite a tool.

I don't understand about how these things work, but it does get glitchier on lower notes of the guitar and certainly on bass. Alternatively, it is nearly perfect tracking the output of a keyboard. Makes me think it is indeed doing some kind of pitch recognition--the more controlled the harmonics/overtones are, the better it can track the note.
listenable at c6a7.org
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: reverse-engineering ehx hog

Post by ssj71 »

They're using a DSP chip which has dedicated hardware to achieve low-latency FFTs. I thought it would be an ASIC but I suppose a DSP isn't that far off. Basically IMHO trying to get generic processing hardware (i.e. like what we are using to type and read this) to perform the same algorithm at the same latency is a lost cause. That said, I'd love to see the algorithm, because even with latency it is a pretty cool thing they're doing.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: reverse-engineering ehx hog

Post by tramp »

I'm pretty sure they don't tracking, it's clearly archived by filters, adsr driven, maybe driven by a analysed fft spectrum, but, for sure, not synthesized from the tracked frequency's.
Otherwise you'll need a hex pickup to archive those accurate polyphonic tracking, special in the low frequency range.

just my 2 cents on it.
On the road again.
User avatar
lucianodato
Established Member
Posts: 156
Joined: Sat May 15, 2010 9:00 pm
Has thanked: 3 times
Been thanked: 16 times

Re: reverse-engineering ehx hog

Post by lucianodato »

Then it must be fft resynthesis.
Arguy (IRC)
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: reverse-engineering ehx hog

Post by ssj71 »

tramp wrote:Otherwise you'll need a hex pickup to archive those accurate polyphonic tracking, special in the low frequency range.
not necessarily. Melodyne autotunes arbitrary notes in chords and polyphonic recordings very accurately. I really don't know if EHX tracks frequency, but I'm pretty sure they have full sound source separation, since the "attack" mode of the POG (the HOG little brother) can fade in a middle note while other notes are still sounding. So I wouldn't rule it out myself. There's some blurry line between tracking and resythesizing anyway.

Its possible they use some other transform like the wavelet as well, but I'm not sure that is likely as I think the HW is usually tuned for fast FFTs.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
Post Reply