Skip to content

Conversation

@brbrr
Copy link

@brbrr brbrr commented Aug 31, 2022

Adds a bandlimited wavetable oscillator. The implementation is quite opinionated, and it would require some amount of refactoring to make it general enough to be used in multiple use cases.

It behaves similarly to Oscillator class, with the caveat that one needs to run Tables::Generate(); before processing the oscillator.

std::vector<WaveBuffer *> buffers;
};

struct Tables
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As suggested by @antisvin in the forum, it might be a good idea to provide a templated FFT implementation instead of one hardcoded below.

@stephenhensley
Copy link
Collaborator

ouu, very cool! Thanks for the contribution @brbrr

I should have some time to give this a look next week!

GuilhermeMoreno and others added 12 commits September 30, 2023 20:31
Contributed-by: Guilherme Moreno <guilhermewr9@gmail.com>
Signed-off-by: Guilherme Moreno <guilhermewr9@gmail.com>
Contributed-by: Guilherme Moreno <guilhermewr9@gmail.com>
Signed-off-by: Guilherme Moreno <guilhermewr9@gmail.com>
Contributed-by: Guilherme Moreno <guilhermewr9@gmail.com>
Signed-off-by: Guilherme Moreno <guilhermewr9@gmail.com>
Converts the struct to a template class, allowing to provide the FFT implementation as a template parameter.

Signed-off-by: Guilherme Moreno <guilhermewr9@gmail.com>
Added to .cpp to the makefile, added the .h to daisysp.h,
fixed an include.

Also moved the waveform enum to pass by the type rather than uint8_t. This is a change I want to make across the library to how we handle enums.
Converts Tables struct into a template class
Comment on lines +40 to +44
case Waveform::WAVE_SIN: SetWaveTable(&Tables::Sine); break;
case Waveform::WAVE_TRI: SetWaveTable(&Tables::Tri); break;
case Waveform::WAVE_SAW: SetWaveTable(&Tables::Saw); break;
case Waveform::WAVE_SQUARE: SetWaveTable(&Tables::Square); break;
default: SetWaveTable(&Tables::Sine);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These now throw the error(s)
'template<class T, void (* fft_func)(int, T*, T*)> class daisysp::Tables' used without template arguments and so on.

@beserge
Copy link
Contributor

beserge commented Dec 12, 2023

Sorry about working on top of you a bit, I think my repo was a bit out of sync and I re-fixed issues that had already been addressed. I'm going to squash and merge anyways, so it shouldn't be an issue.

If we can get it building again with the template change, that would be great!

@SimonKunz
Copy link

Hi all! Any chance this will get merged? Having a wavetable OSC would be so awesome!

@Sam2R
Copy link

Sam2R commented Jan 17, 2025

Hi All!
Is the wave-table osc has been merged to the library? it's an important step to leverage performance!

@davidlpower
Copy link

Hey, I was wondering why there dosen't seem to be much love from the company on these PRs. I'm curious, is the project dead or being replaced by something (PiSound)?

@benjaminvdb
Copy link

Hey, I was wondering why there dosen't seem to be much love from the company on these PRs. I'm curious, is the project dead or being replaced by something (PiSound)?

Good question. I'm also wondering about this. Going through the open issues and PRs while contemplating whether to invest learning the platform was a little... off-putting. I really hope it's a temporary glitch 😄

@stephenhensley
Copy link
Collaborator

The project's not dead, or being replaced.
We're just a small team, and quite busy 😬

The time I have had for maintaining the libraries has been prioritized on libDaisy lately.
That said, this PR looks like it is pretty much good to go. So I may be able to carve out some time to resolve the build-file conflicts, and merge it soon.

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.

8 participants