Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

cubic interpolation sophisticated example

Post any examples or modules that you want to share here

cubic interpolation sophisticated example

Postby tulamide » Fri Sep 19, 2014 1:13 pm

interpolation_example.jpg
interpolation_example.jpg (133.46 KiB) Viewed 15750 times


Just as promised, here's a schematic that makes use of cubic interpolation (see http://www.dsprobotics.com/support/viewtopic.php?f=3&t=2769) in various ways:

    - cubic spline module renders it visible
    - wavetable synth renders it audible
    - cubic colored dBFS uses it to colorize in 2 different ways

The schematic is saved with volume set to zero. So make sure to turn on the volume in order to hear the synth. Things to meantion:

    - The spline module is completely size-independent. No matter the size of the view, the left and top edge represents -1, the right and bottom edge represents +1, the center represents 0
    - The spline itself is rendered with a resolution of 512 in order to have enough samples for a detailed waveform. You can change the resolution to any value you like, as long as it is equal to or greater than 4. To change it look into the module "cubic properties"
    - For this demo, it's only a one-segment spline. Extending it would be done by creating another segment in a way that the end-point of the previous segment is the same as the start point of the current one, and the end point of the current one equal to the start point of the next segment, etc.
    - The synth is just a very simple one, it shows the x-values, y-values and the multiplied values as seperate wavetables. When playing a note, all three wavetables are used to build the sound.
    - Note that no matter how short or long the spline is, you'll always get resolution amount of values. This behaviour could be changed to get more interesting wavetables, but for this example you have to live with it ;)
    - the level meter shows two peak bars. The first one picks the current interpolated color and draws it over its area, while the second one renders a gradient of the interpolated colors up until the current peak point.
    - Keep in mind that it's just an example, so no optimizations are done. You could speed it up a lot.
    - Thanks to those involved in solving the trigger switch issue: billv, tester and perfect.

Have fun exploring it! :?: :o :idea: :!:
:mrgreen:
Attachments
interpolation_example.fsm
(89.28 KiB) Downloaded 1135 times
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: cubic interpolation sophisticated example

Postby Exo » Fri Sep 19, 2014 7:40 pm

Really great stuff thanks for sharing :)

Might be interesting to use that as a waveshaper too.
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
Exo
 
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK

Re: cubic interpolation sophisticated example

Postby tulamide » Sat Sep 20, 2014 12:41 am

Exo wrote:Really great stuff thanks for sharing :)

Might be interesting to use that as a waveshaper too.

Indeed!
You can use it for pretty much everything, that's so great about it. In case you want to give it a try for whatever you're thinking of, here's a dsp version of all three interpolation methods (linear, quadratic and cubic).

interpolation_dsp.jpg
interpolation_dsp.jpg (140.02 KiB) Viewed 15713 times


Just remember, whatever you feed it with, it interpolates from a (t-value = 0) to d (t-value = 1), over b and c. So t-value = 0.5 means, all 4 inputs are present with all the same shares.

Would love to see something made from it :)
Attachments
interpolation_dsp.fsm
(23.68 KiB) Downloaded 1118 times
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: cubic interpolation sophisticated example

Postby tulamide » Sat Sep 20, 2014 2:24 pm

And here is an animated gif I found on wikipedia, that visualizes perfectly what the cubic modules calculate:

Image
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: cubic interpolation sophisticated example

Postby Exo » Sat Sep 20, 2014 3:54 pm

Cool!

I will try and knock together a quick waveshaper tomorrow if I get time.
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
Exo
 
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK


Return to User Examples

Who is online

Users browsing this forum: No registered users and 90 guests