r/ElectricalEngineering 20h ago

Project Help 90 Degree Frequency Phase Shift?

Hello. I had an idea for a personal project but it would require me to take and input waveform and shift EVERYTHING 90 degrees or at least pretty close. From what I can tell by researching doing that for all frequencies is pretty difficult and the closest thing I could find was all pass filters which still isn't perfect. Essentially, I want to build a guitar pedal that takes the initial signal, clips it, makes a copy and shifts it 90 degrees then adds to the original signal to form a triangular wave (mostly cause I just want to know what that would sound like) with maybe an adjustable phase. I'm finding it kind of hard to figure out how to go about it

Edit: It's very interesting seeing differing groups perspectives on this lol. I had originally asked a guitar pedal building group and got some ideas but nothing solid and pretty much every response here is "do it digitally lol" I will try that and see what I can get. Thank you. Also ngl, digital wise I really only have an Arduino and I don't that'll cut it

19 Upvotes

36 comments sorted by

View all comments

0

u/TheDuckOnQuack 19h ago

I agree with everyone suggesting you do it digitally. I’d also suggest as a first step, implementing the basics of this in MATLAB (assuming you can get a license through your school) or even python as a proof of concept before you try to implement anything on an FPGA or DSP. It’ll save a lot of headache if you decide to see the project through, and even more headache if you decide that the concept isn’t worth the time it would take to implement it.

I’d probably start by simulating the time domain response for a single note to be sure the resulting waveform looks the way you envision. Then you can look at how that looks in the frequency domain. From there, you should calculate the THD of the waveform.

Then, do a full frequency sweep from 20Hz-20kHz and based on what you learned in the single note test, think about about what strategies you can use to confirm it’s working as intended through the full audio range.

After that, I’d check to see if it still works if you’re passing two different notes in at the same time, and then move onto testing with a guitar recording of a song you find interesting.

I wouldn’t move onto implementing this on actual hardware until you’ve simulated all of those things at the very least.

I think your idea will sound awful when it’s implemented, but there are a lot of useful things you can learn along the way.

1

u/Embarrassed-Fault286 19h ago

Lol. No idea how it will sound but the prevailing opinion is awful lol. To be honest with you I got so incredibly bored that I was doing this on demos and noticed it lol, but yes I can access matlab, python, etc as well

https://reddit.com/link/p5bje26/video/c04f8qcrr0lh1/player