Using band-limited pulse snd 1 pole lowpass for a band-limited triangle

tejas

Active member
Hello,

I'm trying to create an band-limited triangle with 0.25 duty cycle. For that, an approach that I came across uses a band-limited pulse wave with proper DC offset and a 1 pole lowpass (an integrator). Though I understand this conceptually, what is the best way to implement this in teensy 4.1?

Thanks,
Tejas
 
I mean variable triangle or asymmetric triangle. Since these argument options for the waveform object aren’t band limited, I looked up on how to create them using a band limited pulse.

Update: Just yesterday I asked Claude to do the work for me, and it did! Though, I’m not sure if it did it in the most efficient way.
 
I checked with a spectrum analyzer. There is indeed a DC offset. I don’t know how to fix that though. Any help is appreciated! I have attached the .h file here.
 

Attachments

  • BandLimitedTriangle.h
    3.8 KB · Views: 11
Back
Top