KVR Audio is the Internet's number one news and information resource for open standard audio plugins. We report new releases, product announcements and product updates (major and minor) for all VST Plugins, DirectX Plugins and Audio Units Plugins. We manage a fully searchable audio plugin database (updated daily), and offer many free member services including user reviews, product update notifications and a very active discussion forum. We also host official support forums for many plugin developers plus the official Receptor support forum.
Plug-in Database: Virtual
Instruments, Effects & Hosts
Banks & Patches
Download & Upload
Plug-in Ratings
by KVR Members
Wiki: Tutorials,
Audio Lexicon, ...
Listen to Music
by KVR Members
Search
KVR

Google Powered Search:

in new window

KVR Powered Plug-in Search:

AuthorTopic: Bezier curve based VSTi
xg2
Posted: 19th November 2003 04:00
I've had a new idea (which I just found out somebody has already written a paper on) about using Bezier curves to represent waveforms, to save on storage space when compressing samples, and also to create a new kind of soft synth that is easier to edit.

Here's two of the posts I made about it on the SOS forum:

"I've been watching the arrival of many of the new VSTis over the past year, and while I was very impressed with Plugsound, and no doubt Sampletank 2 is very good, I think there's a big hole in the market for the following synth:
It comes with 8 or more gigabytes of one cycle samples, which equals tens of thousands of individual samples. Say you have a piano sample, for example - the program has distinct one cycle samples from along the waveform, from beginning to end, but it morphs in between samples as often as possible, so you can compress what was a 20Mb sample down to 100k or something like that. Along the waveform, about sixty or so samples would be taken, the program having examined the whole waveform, and looked for the most important one cycle waves to take out. So you could reform the piano sample from a file a fraction of the original size.

This would be done with loads of popular instruments, as well as synth patches.

Then you'd have a massive library of one cycle waves, which could be played as their original samples (with no need for any audible degradation) but could also be used to create new sounds. The program would classify all the one cycle waves so you could go from one end of the spectrum (sine) to the other (noise) and everything in between, and pick out samples you wanted to use.

Also, the samples would be choosable (if there's such a word) from a screen sized palette which allowed you to hear the sample changing as you moved your mouse around, from one corner (sine) to the other (noise) and everywhere in between. You could then click when you'd picked the one cycle wave you wanted, and place it along the waveform of your final sample.

Here's the good bit: once you'd picked, say, ten one cycle waves to go along the entire sample, the program would store only those sample numbers and their positions (so this could be done in about 1k of memory), and then everytime that patch was loaded, the program would recreate the whole sample by morphing between all the one cycle waves.

If the sample library was kept in the gigabyte range, it would make P2P piracy quite a lot more difficult.

Dumb idea?"

and

"If y'all take a look at the very bottom of my (crap) webpage about Logic, at
http://www.angelfire.com/hiphop3/logicinterface/

you'll see three examples of close ups of samples that I've screengrabbed from Renoise.

If you look at the left most cycle and the right hand most cycle on the first and third waveforms, I reckon it would be possible to just use the first and last cycles and morph between them. (After all, presumably the curves the waveforms are made up of are Bezier (or whatever they're called in Corel Draw) and the program could compute and store these values, and then use these reference points to store the final wave, rather than storing every single sample at 44Khz all along the sample. (Obviously this wouldn't be as effective, compression-wise, with sounds with more and higher frequency harmonics in them, I think.)

The middle waveform is of an oboe or something like that- that's the whole sample! (About 8k or something). Sounds really good, if you set up the volume and filter envelopes well in Renoise.

Those of you who have studied FM synthesis (and spent time looking at frequency modulated waveforms) may see what I'm getting at.

In any sample of a musical instrument (except for percussion), there are not going to be complete changes between one wave cycle and the next - i.e. you won't expect to find a piano type cycle followed immediately by a completely different wave cycle, of a saxophone, for example. This wouldn't sound musical, as there'd be an obvious (and no doubt audible) glitch between the two (rather like when trying to find the loop of a sample, which is something I do in Renoise a lot). So the ear's desire to hear a smooth transition from one wave cycle to the next is very fortuitous, and can be used to our advantage when it comes to this synth and the compression of samples.

To compress the waves even more, having thought about it, I see no reason why they aren't all completely stored as Bezier curves, not as individual samples. Presumably it isn't that difficult to write a program that can recognise the Bezier curves in the examples I've given, and reduce them to mathematical formulae and a set of input data that is far smaller than the original sample, while recreating it perfectly.

The wonderful thing about this is that theoretically it should be possible to change the values of the Bezier curves' reference points 'en masse', so to speak - so you could have a reference set of values for a saxophone, for example, (which is simply moving a few of the curves from point A to point B, and adding some more in between, etc.) and gradually morph your samples that way.

Remember you read it here first!"


There is an online pdf file here

http://www.cems.uwe.ac.uk/~xzhang/CRES2003/papers/BobL.pdf

about using Bezier curves for synthesis - I think it's got huge potential. You can represent a hell of a lot of sample data with a very small amount of Bezier curve data (since the vast majority of instrument samples consist of 'smooth' waves that are easily represented by Bezier curves.)

Has anybody here thought of this idea before? Do you think it's a good idea? Would it be possible to implement? Would it be possible to write a VSTi that can 'read' a sample and turn it into Bezier curves?
Concretefx
Posted: 19th November 2003 04:31
Hi there

Interesting ideas. There are of course wavetable type synths out all ready , an appropriate example is Wavefusion in Orion, which I believe uses 256 waves tables made up of up of 256 points which are interpolated between to make the sounds (probably using Bezier curves)

However looking at a more sample based approach I create a plugin called copier which tried to extract the waveform in a sample at different points, say noise near the start, then going to something lika a saw wave and then to something like a sine wave. Interpolating between these and using a volume envelope to recreate the volume changes should have created somthing similar to the original sound but it never worked very well. Looking back at it I think the original program may have been overlay simple so I might have a look back at it

Also at the moment I'm collecting lots of single wave cycles for adder, if you know where there any collections then any links would be great

Cheers

Jon : ConcreteFX
CreepJoint
Posted: 19th November 2003 05:39
http://www.mdx.ac.uk/www/sonic/research/nickspline.html

some info and software to play with, been out for years
Phaedo
Posted: 19th November 2003 05:42
Small point, but sometimes interpolating bezier curves produces a curve that crosses itself. Not exactly what you want in an audio waveform.
pummel
Posted: 19th November 2003 06:37
i think bezier curves are too expensive computationally; you would need a multitude of 3rd order poly's to match anything. you might be able to do something incrementally with the partials, but then you have error accumulation to deal with.

as for wave duplication and morphing -- that is what camel audio's cameleon 5000 is all about.
Markleford
Posted: 19th November 2003 07:51
This kind of sounds like what I'm doing with my additive synth project, but without the Beziers. I have a slew of additive spectrums that are analyzed from single-cycle waves. I can sequence these in order and then morph between them over time in a cycle. Really neat sounding stuff.

I'm not sure that using Beziers to curve-fit a single-cycle wave would be particularly advantageous when it came to CPU, however, and these days storage space isn't really much of a concern. However, what might be neat is to allow for waveform creation with Beziers by pushing and pulling points, and then pre-rendering to single-cycles or even doing Fourier analysis to convert it to an additive spectrum. (well, erm, not that additive is particularly nice on the cpu either!)

- m
Markleford
Posted: 19th November 2003 07:55
Concretefx wrote:
Also at the moment I'm collecting lots of single wave cycles for adder, if you know where there any collections then any links would be great

Wavestation cycles: http://www.digital-synthologie.de/maxisound/download/waves.zip

I could also design you a load of single-cycles with my additive stuff: send me a PM if interested! Smile

- m
Phaedo
Posted: 19th November 2003 07:56
Oh yeah, I forgot to mention, bezier curves aren't brilliant at approximating geometric shapes like circles. Since sine wave are tones, this would mean that you'd always have entertaining overtones. That doesn't mean they wouldn't necessarily sound nice...
monsterbeetle
Posted: 19th November 2003 08:04
interesting stuff but I think graphically designing waves is not going to help creating stuff that sound good, because we predominantly have a frequency based apprehension of the sound, and bezier curves are often very smooth curves, with no high frequencies in them. They'll sound dull.

this graphical approach to sound waves design at the level of the cycle itself is rather unnatural.


Waveshaping is already a good way to sculpt waveforms
Markleford
Posted: 19th November 2003 08:12
monsterbeetle wrote:
[...] and bezier curves are often very smooth curves, with no high frequencies in them. They'll sound dull.

Aieee! Hadn't even thought of that! Confused Rolling Eyes

And yes, waveshaping is verrrrry nice... Cool

- m
foosnark
Posted: 19th November 2003 08:22
I'm not sure if this is as true in audio as it is in 3D graphics, but if there's one thing I've learned in the past year:

always use more memory if it means using less CPU time. Very Happy
Phaedo
Posted: 19th November 2003 08:25
It probably is until you load up a PMI piano. Wink
xg2
Posted: 19th November 2003 11:39
Phaedo wrote:
Oh yeah, I forgot to mention, bezier curves aren't brilliant at approximating geometric shapes like circles. Since sine wave are tones, this would mean that you'd always have entertaining overtones. That doesn't mean they wouldn't necessarily sound nice...


Sorry, I don't understand this part. I would have thought it was pretty easy to use Bezier curves to represent a one cycle wave. I don't see how they would introduce overtones.
(I can draw perfectly good one cycle waves using Corel Draw's Bezier curves.)
xg2
Posted: 19th November 2003 11:43
monsterbeetle wrote:
interesting stuff but I think graphically designing waves is not going to help creating stuff that sound good, because we predominantly have a frequency based apprehension of the sound, and bezier curves are often very smooth curves, with no high frequencies in them. They'll sound dull.


I meant that Bezier curves would be used to represent all the parts of the one cycle waves that were sampled throughout the original sample.
My idea would obviously recreate all parts of the one cycle wave, including the higher frequencies!
Quote:


this graphical approach to sound waves design at the level of the cycle itself is rather unnatural.


As is all synthesis!
I thought it was a particularly useful idea, as, by using Bezier curves, it would be easy to adjust the waveform by performing translations (or whatever they're called in mathematics) on the Bezier points.
Quote:



Waveshaping is already a good way to sculpt waveforms
xg2
Posted: 19th November 2003 11:50
Concretefx wrote:

...Also at the moment I'm collecting lots of single wave cycles for adder, if you know where there any collections then any links would be great

Cheers

Jon : ConcreteFX


Thanks for your input Jon. Hopefully somebody here will be able to write a program that can convert any given sample into a set of Bezier curves, enabling huge compression, as well as the ability to adjust the sample in ways that are impossible with a normal sampler.


Pummel - I was suggesting that the extraction of the data to a sample wasn't done in real time.
The program would take an input sample and convert it into Bezier curves, and only those that were necessary, morphing between as many as possible, while still maintaining exactly the same waveform as in the original sample. (This would work fine for musical instruments - the only thing it won't work with is human speech with lots of background noise, so this doesn't matter). When you loaded in a patch to the VSTi, it would be pre-rendered back to a sample, but could be edited at will (rather like a 'Freeze' function) and then re-rendered.
mauseoleum
Posted: 19th November 2003 13:37
b-splines should be lighter on computations?
Forum topics in the archive are read only. New posts should be made in the main KVR Forums.
Disclaimer:
All communications made available as part of this forum and any opinions, advice, statements, views or other information expressed in this forum are solely provided by, and the responsibility of, the person posting such communication and not of kvraudio.com (unless kvraudio.com is specifically identified as the author of the communication).