wir35 / marf

Source code for electronic music store MARF 248r
MIT License
19 stars 2 forks source link

potential-jitter-fix #12

Closed waldnzwrld closed 3 years ago

waldnzwrld commented 4 years ago

Round voltage level of precision of sliders or inputs to 4 decimal places.

Ultimately when converting a voltage value to binary and then reinterpreting it as a numeric value there is a degree of variance (computers aren't perfect). This reigns in that variance while still leaving enough wiggle room to maintain buchlas wonderful microtonality.

I believe this will fix the jitter that has been described. Will need to get my ST-Link in the mail before I could check directly, also my current oscilloscope is OLD so if someone else want's to try this and let me know, I would appreciate it.

maxl0rd commented 4 years ago

W

Thanks for taking a look at this. I have a few comments.

The source is still a "whitespace disaster area" and I can't read your diff with all the whitespace changes. Is it possible to reduce this commit to just the changed lines?

maxl0rd commented 4 years ago

Rather than truncating the internal resolution, I think we would be better off adding hysteresis before the write to the DAC to eliminate the jitter in the last few bits.

Before writing to the DAC, you would check the current value, and only update it if the delta to the new value is greater than some N, where N is the largest observed value of the jitter.

stevenbarsky commented 4 years ago

There is also a hardware component to this which is caused by less than optimal PCB design. Steffen is addressing this with some changes to his PCBs, including ground planes and trace optimization. I'd suggest not spending too much time in this area until we see the results of his endeavors.

waldnzwrld commented 4 years ago

The source is still a "whitespace disaster area" and I can't read your diff with all the whitespace changes. Is it possible to reduce this commit to just the changed lines?

@maxl0rd in the diff, there is a settings gear at the top. If you click that, you can hide whitespace changes.

marf 2020-02-23 13-16-33
waldnzwrld commented 3 years ago

Closing this PR as it has since been resolved