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

Support wave-form plotting for BlepSynth #144

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

swesterfeld
Copy link
Collaborator

It would be nice if the oscillator wave form (which depends on the oscillator parameters) could be displayed at the UI. I've ported the necessary plotting code from Python (plotblep.py) to C++.

The actual waveform is sampled, so one parameter to tune might be how many samples to use. Or the overlap (copy_samples). Finally we currently don't have the infrastructure to display this, so when enabled, the wave forms of both oscillators are written to "/tmp/plot1" and "/tmp/plot2", just to be able to test it.

@swesterfeld
Copy link
Collaborator Author

swesterfeld commented Jul 26, 2020

Just one more comment on this code: I saw that if you use a very small pulse_width and make sync really high then not all pulses will be visible. A higher number of samples would help, but I think we may want to make the minimum pulse width depend on the sync factor (to plot a wider pulse in order to be able to display it properly). But such fine tuning would be easier if the wave form would be displayed.

Btw, an alternative to sampling the wave form would be a line-segment representation.

sub_phase reset wasn't implemented properly

Signed-off-by: Stefan Westerfeld <[email protected]>
The code from plotblep.py was C++ified, in order to be able to display
Osc1/2 waveform at the UI. As there is no UI support for that yet, a
gnuplot file will be written. The code needs to be explicitely enabled,
as it dumps the files in the RT processor code.

Signed-off-by: Stefan Westerfeld <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant