Author |
Message |
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Mon Apr 14, 2008 7:47 am Post subject:
Wave-Goo Subject description: Wave Morphing |
|
|
I had this idea the other day, I don't know if it's original, probably not.
Wave-Goo, like Kai-Goo. Morph a wave from one shape to another over time. A sequence could be defined that given a control input, could morph a wave from it's starting shape to an ending shape that depends both on the morph target wave shape and the control amount which states how far to take the morphing process.
Am I making any sense?
Has this been done? _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
yusynth
Joined: Nov 24, 2005 Posts: 1314 Location: France
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Mon Apr 14, 2008 8:54 am Post subject:
|
|
|
Hmm. I think that's similar to what I want to do.
I would do this with DSP in an FPGA.
Looking at the block diagram on Don's site, I think I see how this works.
He mentions that a two channel panner is a denerate form of this. In order for his system to not be a simple panner, it needs more than two waveforms.
The interpolation occurs across several waveforms, but it is trapped in time.
The design I am considering could operate as a morpher with only two waveforms because unlike Don's system, the information for a complete wave cycle is known in advance so anchor points can sort of go back or forward in time. In other words, the beginning of one waveform doesn't have to coincide with the beginning of the other waveform.
I need to do some math and simulations in C. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
frijitz
Joined: May 04, 2007 Posts: 1734 Location: NM USA
Audio files: 54
|
Posted: Mon Apr 14, 2008 9:27 am Post subject:
|
|
|
ScottG wrote: | The design I am considering could operate as a morpher with only two waveforms because unlike Don's system, the information for a complete wave cycle is known in advance so anchor points can sort of go back or forward in time. In other words, the beginning of one waveform doesn't have to coincide with the beginning of the other waveform. |
So ... this is somehow different from cross-fading between two waveforms? Sorry, not following you. Anchor points?
Ian |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Mon Apr 14, 2008 9:49 am Post subject:
|
|
|
Like when Kai-Goo morphs a man face into an ape face, the eyes are set as anchor points, the ears are set as anchor points, the center of the forehead, etc. When the program generates the morph frames, it makes sure that the anchor points move from their start position to their end position.
I'm not sure it isn't a simple pan yet either, if it is, I'll look into a digital version of system Don describes using several waveforms. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
Back to top
|
|
|
Papareil
Joined: Mar 23, 2005 Posts: 21 Location: France
|
Posted: Mon Apr 14, 2008 12:15 pm Post subject:
|
|
|
Hello,
Quote: | Has this been done? |
May be not exactly the way you think , but yes
I have recently released a little 8 bits hardware platform and PC editor software who do that and many other things ...
The software is freeware to download from my site and morph waves in all directions/sizes. You can also simulate the morphing in realtime or pre-calculate it and animate it..
Check here http://m.bareille.free.fr/modular1/quantix8/quantix8.htm
The sofware link is somewhere in the middle of the page ...
Sorry for self promoting but i think reading your post that my little work could be of interest ... I just hope this will help
Cheers,
Marc B.[/code] _________________ PAPAREIL SYNTH LABS
http://m.bareille.free.fr |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Tue Apr 15, 2008 9:42 am Post subject:
|
|
|
Thanks Marc,
Does one of the samples on your site contain an example of the wave morphing I refer to above ? I.e., morphing that uses only two wave samples (the starting and ending waveforms) and math functions that do the morph as a control value is increased.
Basically, I'm looking for something with a more profound sound changing character than simply panning between two waveforms. In other words, if this sound can be produced other ways, I'm probably not interested in spending a lot of time developing this. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
bearblock
Joined: Sep 27, 2006 Posts: 90 Location: uk
Audio files: 1
|
Posted: Tue Apr 15, 2008 9:51 am Post subject:
|
|
|
hey scott,
based on your diagram this would be different from a simple x-fade. would be cool to hear what it sounds like i reckon you could write a program to load the two endpoint waves, let you set the anchorpoints, and generate the in-between waves. you could then load these waves into marc's quantix-8 and scan them with a cv... |
|
Back to top
|
|
|
ian-s
Joined: Apr 01, 2004 Posts: 2669 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Tue Apr 15, 2008 2:38 pm Post subject:
|
|
|
Interesting.
I guess that having a non linear relationship for the anchor points would introduce phase distortion in the intermediate waveforms.
I am curious to hear how it sounds, and how easy it would be to intuitively set the distribution of the anchor points. |
|
Back to top
|
|
|
GlassX
Joined: Jan 27, 2008 Posts: 50 Location: Brazil
|
Posted: Tue Apr 15, 2008 4:58 pm Post subject:
|
|
|
ScottG wrote: | Here's a graphic of what I mean. This would be morphing a sine into a saw. The connecting lines between the two waveforms represent the "anchor points".
While the beginning and end are simply the two waveforms, I think that the waves generated in between will not represent a simple two channel panner. |
It's still interpolation, no? Simple linear interpolation will be just simple panning (finding the midway point between the two waves)... A cool thing would be finding the peaks and valleys of both waves and using them as the "anchor points"... This would be like the traditional EMS Synthi triangle/saw morph, but with dedicated DSP, much more could be achieved... |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Tue Apr 15, 2008 5:03 pm Post subject:
|
|
|
The way I see this, the ending waveforms are mapped to each other through nonlinear time compression and time expansion functions. These functions would then be driven by a linear standard time scale so that pitch is preserved regardless of the interpolation. The morphing happens by interpolation between the time scale functions to generate a table lookup address for each of the two tables and then using lookup tables to get the two output values which are then panned using the interpolation value as a pan amount input. This should certainly distort the waveforms as they are morphing, but should preserve the endpoint waveforms when the interpolation factor is at either end of it's range.
This means that the waveforms stored in the wavetables must be pre-distorted so that when played through the time compression/expansion functions, the waveform plays correctly. Consider a sawtooth that is recorded with a compressed section followed by an expanded section. When played back with an expanded section followed by a compressed section, the waveform would look like a saw - but it would not look like a saw as stored in the table or if played back with linear time.
I'd like to do this in realtime, but I'm not sure how practical that is. I may need to do some things precomputed such as the distorted version of each endpoint waveform. I'm working out the math details to do this. I will probably start with a simple experiment in C to generate a .WAV file. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Wed Apr 16, 2008 11:59 am Post subject:
|
|
|
After reviewing this idea and the complexity of the math and logic involved, I believe it will work, but is not worth the coding effort. It's affect will not be intuitive. I don't believe it will do more than either Marc's method or Don's.
Marc's method appears to be more intuitive, but requires lots of RAM. There is a 64 megabyte DDR SDRAM on the board I have... _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sun Apr 20, 2008 4:58 pm Post subject:
|
|
|
In case there are still interested parties, I've decided to do a digital MIDI synth with voice expression implemented using an interpolating scanner .
What I have working right now is a simple two waveform panner system. MIDI Velocity and the ADSR value are used to pan from waveform 0 to waveform 1. 8 voice polyphony using MIDI is working. This much is using about 15% of the FPGA. Sample rate is 250KHz.
Hopefully, the final version of the synth will max out at 16 wavetables, 1024 samples each; each voice will have an ADSR to control interpolation over the 16 wavetables, another ADSR to control output amplitude and if resources permit, a third ADSR to control an SVF per voice. Wavetables will be preinitialized with usable data and updatable by system exclusive messages.
The state machine for the current version is using only about half of the time it is allowed for each voice, so I believe all the above is possible. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
usw
Joined: Mar 22, 2007 Posts: 27 Location: valence france
|
Posted: Sun Apr 27, 2008 6:17 am Post subject:
|
|
|
hello,
I am wrong or true morphing (not just crossfading) between two arbitrary waveforms would require finding a formula, general enough to represent both waves, and then interpolating its coefficients ? |
|
Back to top
|
|
|
yusynth
Joined: Nov 24, 2005 Posts: 1314 Location: France
|
Posted: Sun Apr 27, 2008 7:02 am Post subject:
|
|
|
Yep such a formula is the Fourier Transform for example, but interpolating can be done in a much simpler way by cross-fading _________________ Yves |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sun Apr 27, 2008 7:04 am Post subject:
|
|
|
That is one way that can work.
Another way would be to have many successive waveforms to interpolate through. If you imagine going from a square to a saw, this seems a bit difficult, but what if you made many waveform images that are succesive steps toward the morph, then it's more like a movie. You can't imagine how to get from the first frame to the last unless you watch the whole movie and see the characters smoothly move about. That's the idea behind the interpolating scanner. Not two waveforms, but many that define the progress of the morph over time. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
usw
Joined: Mar 22, 2007 Posts: 27 Location: valence france
|
Posted: Sun Apr 27, 2008 8:48 am Post subject:
|
|
|
( how are you, yves ?)
wavetable stuff is more easy to deal with than additive synthesis, but you're limited to plain periodic waveforms then, and, unless you have huge memory ressources (frequency, amplitude and possibly expression should affect harmonic content, with decent resolution, all this being user editable) and/or intend to add some post-processing (filters, etc...) the sound will remain rather artificial and static, let aside aliasing issues (?)
Morphing vs crossfading is an interesting subject.
My poor maths background unfortunately don't allow me to fully understand how fft analysis really works...
For example :
Considering a width modulated pulse, going from infinitely narrow (all harmonics theorically equal) to square (odd harmonics only, -6db slope)...
A naive guy like me would be tempted to perform an fft analysis of the start and another of the end waveforms, take the union of the two, recompute the two spectra (setting the amplitude of the partials not initially present in one, to zero) and interpolate all partials...
Which I think would lead to crossfading, not morphing...
My understanding is that only morphing would allow to faithfully restitute the original pwm sound (?) I'd really like to know how to do that in an additive synthesis context... |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
Back to top
|
|
|
usw
Joined: Mar 22, 2007 Posts: 27 Location: valence france
|
Posted: Thu May 01, 2008 3:11 pm Post subject:
|
|
|
weird...I'm getting a very different result (sounding like a crossfade) with your function (sweep is reversed) Are you using very short tables for your sine/cosine waves ?
http://perso.numericable.fr/usw/electro-music.aiff |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Thu May 01, 2008 3:26 pm Post subject:
|
|
|
usw wrote: | weird...I'm getting a very different result (sounding like a crossfade) with your function (sweep is reversed) Are you using very short tables for your sine/cosine waves ? |
No, I used a C program, double prec. arith. and the built in sin/cos functions.
If I were to implement this in an FPGA, I would use a table, it would be the equivalent of 4096 samples of the wave by using a quarter cycle 1024 location table folded out. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Fri May 02, 2008 7:11 am Post subject:
|
|
|
This has been an interesting experiment for me. I'm not sure where this will go, but right off, perhaps an FPGA based bell synth?
I also noticed that the basis for sideband is rooted in trig identities. With that formula, one can create sines (or cosines) with angle sums and differences. Eg: using sin(2u) and sin(3u) as inputs, one gets sin(5u) and sin(u) as outputs, but parameterization allows a sweep between them. The resources required are multiplies, add/subtract and a single table for sine/cosine. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sat May 03, 2008 7:22 pm Post subject:
|
|
|
First cut of a test FPGA synth is working using a simple sin(2u) to sin(u) morph.
8 voice polyphonic, morph is controlled by an ADSR and velocity.
Next is to get the sin(3u) to sin(u) morph working because I think that will be more interesting and may allow other morphs using simple arithmetic.
This synth uses an 18 bit wide 1024 location 1/4 cycle sine table producing both sines and cosines. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
|