alexmitchellmus's picture
Shared by on 2016.01.06 07:02

Just finished this small project. Wanted to see how far I could push Vuo and audio in C.

Custom node reading a list of VuoReal values as the wavetable and writing them to the audio buffer while interpolating between them to create nicer connections - frequency is also controllable.

VuoReal List can be any length, from 2 values to 2000 (or more). Can be exciting with a 'parametric wavetable' style node, if we implement XY (not only X) then some very cool scanning synthesis is not that far away!

Actually made this to test inter-buffer triggering, but this is nice. Currently the frequency is worked out within the buffer loop can be changed with control signals if wanted (FM synth). (FM Wavetable Synth!)

As with custom nodes you will need to place the awm.audio.wavetable.vuonode in your nodes directory.

Please also note there are no 'speed ups' everything is calculated in realtime.

+1
Interesting
+0
Helpful
+0
Unique

Download

AttachmentSize
Package icon awm.audio_.wavetable.zip80.08 KB

Example

AttachmentSize
Package icon Wavetable.app_.zip7.6 MB

Source code

Tested with

Vuo version:
OS version:

Comments

I would love feedback on how

alexmitchellmus's picture
Submitted by

I would love feedback on how to speed things up a bit. Currently its using 50% of one core, (on a 4ghz 8 core machine). In the awm.audio_wavetable.zip there is the .c file, so please check it out and give me feedback.

I am thinking of making a version without lerp- and possibly changing the use of VuoListGetValue_VuoReal() to only looking up table every execution (and saving the table, and accessing it via a pointer?) Currently VouListGetValue_VuoReal() is used for every sample.

I could also make the table a fixed size?

I would like to continue this node in C (not C++) as I am using this as a learning tool and it would be nice to make a "Vuo" class for synthesis.

Any ideas?

UPDATE: Just worked out that

alexmitchellmus's picture
Submitted by

UPDATE: Just worked out that this node quantises frequencies, so as you get higher there are less frequencies selectable. Need to fix. Fixed but need to update.

I used https://mitpress.mit.edu/books/audio-programming-book to work out where I was going wrong. (Well it had more to do with the maths for sample playback speed having a typo). :-/

But if anyone is interested in getting to know c/c++ for audio it's actually a very good book. There are some negative reviews but that is only due to the fact that there is a crash course in c in the beginning - then smash: audio code! But if you know a bit of c and use online resources it's a good start. (At least I think so)

As promised. This new version

alexmitchellmus's picture
Submitted by

As promised. This new version includes the Guard Point automatically (so that point one of wavetable is also the last point (whatever that is)). Included in this is also a wavetable generator, currently it just makes a simple sine wave, (naive - so no band-limiting) but this could easily be added. I intend to test for Lerp to reduce CPU load. Attached is .c files (very messy right now)

Add comment

Log in or register to post comments