Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actor_jakdaw, actor_lv_scope: waveform glitch #45

Open
rigid opened this issue Jan 17, 2013 · 10 comments
Open

actor_jakdaw, actor_lv_scope: waveform glitch #45

rigid opened this issue Jan 17, 2013 · 10 comments
Labels
Milestone

Comments

@rigid
Copy link
Member

rigid commented Jan 17, 2013

Somehow the waveform is distorted (maybe due to a buffering issue). With input_debug it shows as small "spikes" that break the waveform that should be a perfect sine (attached screenshot showing enlarged portion of waveform rendered by lv_scope & jakdaw):

lv_scope

jakdaw

@kaixiong
Copy link
Member

We desperately need a unit test for this.

@kaixiong
Copy link
Member

Closing this as it's a side-effect of the way actors use a fixed size input buffer.

@rigid
Copy link
Member Author

rigid commented Jan 31, 2013

reopened until actually fixed. Even if this is related to another issue (which one exactly?) it's a seperate bug. Those two issues can be closed at the same time when they have been fixed.

@rigid rigid reopened this Jan 31, 2013
@kaixiong
Copy link
Member

Just to elaborate, this is not a bug or limitation with the audio input system. Almost all the actors draw their input data from a fixed size buffer. The problem occurs when some of them apply a wraparound when they need more samples. The number of samples for a single frame may also vary depending on frame dimensions.

One solution is to read as many samples as necessary for a 'smooth' waveform, and pad with zeros when there are insufficient samples.

@rigid
Copy link
Member Author

rigid commented Mar 3, 2013

whether this is a bug or not I wouldn't like to discuss. I think it's nasty and in case of a DFT taken of the glitchy waveform, it produces wrong results.
I don't really like the idea of padding an incomplete waveform with zeroes. It would be much better to provide the correct waveform and thus limit the possible framerate/maximum resolution/amount of samples per frame

@kaixiong
Copy link
Member

kaixiong commented Mar 4, 2013

For certain kinds of actors, there will always be frames where there are insufficient samples, given large enough dimensions. You can either wrap, scale, or zero pad.

@rigid
Copy link
Member Author

rigid commented Mar 4, 2013

i'd say there is a sane limit. Why would an actor, say, render 5 seconds of samples in one frame?
I think the best would be to "pad" with old samples and thus buffering (according to the size of the last request). So if an actor requests 1024 samples but only 800 are available, deliver 224 old samples and append the most recent 800 to them. Only if there are no previous samples, pad with zeros.

@kaixiong
Copy link
Member

kaixiong commented Mar 4, 2013

One more thing: the DFT should be unaffected by the 'glitch'. As mentioned, the issue is with individual actor code using fixed size buffers and applying wraparound, not LV core. Where DFT is applied by the actor, it is applied on the buffer.

The right solution is actor specific. However, LV core can provide some support in the form of zero padding for cases where the actor requests for more samples than what's available.

@kaixiong
Copy link
Member

kaixiong commented Mar 8, 2013

So far it seems that only lv_scope and jakdaw are affected by this. This is an actor specific problem, so this issue needs to be retitled.

@rigid
Copy link
Member Author

rigid commented Mar 8, 2013

confirmed, bumpscope doesn't suffer from this. Retitling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants