Quantcast
Channel: KVR Audio
Viewing all articles
Browse latest Browse all 5477

DSP and Plugin Development • Overlapping COS BLEPs for PWM

$
0
0
Hi folks, I am experimenting with bandlimited oscillators. Currently, I want to create an antialiased pulse generator with modulated pulse width and FM. It is a simple java algorithm where a phase variable is incremented until the phase is >=1. Them a sync appears (rising slope). For the falling slope, another t2 is incremented faster, dependent of the width. Then a second sync occurs. Since I made quite good experiences with a cos BLEP (cos(x)+cos(2x)/2-0.5), especially when oversampled. I start these BLEPs when the sync appears (up and down). The BLEPs are continued in the following samples, since fired.
The oscillator is able to handle inter-sample sync. When a falling edge and a rising edge appears, the BLEPs were mixed together (added). In some cases, the addition leads to a offset which seems too high (expecially in case of 2 sample distance). The naive value of the pulse (-1,1) is also added, but I am not sure how to deal with that exactly.
It seems to be a better approach to derive the BLEP function (-sin(x)-sin(2x)), then sum the values and integrate the whole thing. But this leads to significant integration errors which are phase dependent, quite ugly and even noisy. Well, this is not a sinc function where I did not have these problems. But sinc has the disadvantage that it must be "predicted", which makes modulation difficult.
The question is: When you have (any) BLEPs which overlap in some samples, how do you deal with that, while avoiding integration?

Statistics: Posted by Stipe72 — Sat Dec 30, 2023 7:06 pm — Replies 1 — Views 36



Viewing all articles
Browse latest Browse all 5477

Trending Articles