electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software
Wave-Goo
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 2 [26 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: 1, 2 Next
Author Message
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Mon Apr 14, 2008 7:47 am    Post subject: Wave-Goo
Subject description: Wave Morphing
Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
yusynth



Joined: Nov 24, 2005
Posts: 1221
Location: France

PostPosted: Mon Apr 14, 2008 8:07 am    Post subject: Reply with quote  Mark this post and the followings unread

Yes it's been done in the RSF Kobol for example.http://www.simple-answer.com/DIY.html
It's called an interpolating scanner (see Don Tillman's circuit at http://www.till.com/articles/scanner/index.html )

_________________
Yves
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Mon Apr 14, 2008 8:54 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
frijitz



Joined: May 04, 2007
Posts: 1710
Location: NM USA
Audio files: 54

PostPosted: Mon Apr 14, 2008 9:27 am    Post subject: Reply with quote  Mark this post and the followings unread

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?

Very Happy

Ian
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Mon Apr 14, 2008 9:49 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Mon Apr 14, 2008 10:04 am    Post subject: Reply with quote  Mark this post and the followings unread

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.


wavegoo.gif
 Description:
 Filesize:  4.51 KB
 Viewed:  5804 Time(s)

wavegoo.gif



_________________
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
View user's profile Send private message Visit poster's website
Papareil



Joined: Mar 23, 2005
Posts: 21
Location: France

PostPosted: Mon Apr 14, 2008 12:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hello,

Quote:
Has this been done?


May be not exactly the way you think , but yes Smile
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 Wink but i think reading your post that my little work could be of interest ... I just hope this will help Smile

Cheers,

Marc B.[/code]

_________________
PAPAREIL SYNTH LABS
http://m.bareille.free.fr
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Tue Apr 15, 2008 9:42 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
bearblock



Joined: Sep 27, 2006
Posts: 90
Location: uk
Audio files: 1

PostPosted: Tue Apr 15, 2008 9:51 am    Post subject: Reply with quote  Mark this post and the followings unread

hey scott,

based on your diagram this would be different from a simple x-fade. would be cool to hear what it sounds like Very Happy 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
View user's profile Send private message Visit poster's website
ian-s



Joined: Apr 01, 2004
Posts: 2575
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 608

PostPosted: Tue Apr 15, 2008 2:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
GlassX



Joined: Jan 27, 2008
Posts: 50
Location: Brazil

PostPosted: Tue Apr 15, 2008 4:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Tue Apr 15, 2008 5:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Wed Apr 16, 2008 11:59 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Sun Apr 20, 2008 4:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
usw



Joined: Mar 22, 2007
Posts: 27
Location: valence france

PostPosted: Sun Apr 27, 2008 6:17 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
yusynth



Joined: Nov 24, 2005
Posts: 1221
Location: France

PostPosted: Sun Apr 27, 2008 7:02 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Sun Apr 27, 2008 7:04 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
usw



Joined: Mar 22, 2007
Posts: 27
Location: valence france

PostPosted: Sun Apr 27, 2008 8:48 am    Post subject: Reply with quote  Mark this post and the followings unread

( welcome 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
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Thu May 01, 2008 1:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks to Yves, I tried something that I think is interesting.

I started thinking about the trigonometric identities and what they might supply.

I see this...

Code:
sin(2u) = 2sin(u)cos(u)


I then thought of this:

Code:
out = ( sin( angle ) *  ( P * cos( angle ) + ( 1.0 - P ) ) ) * ( P + 1.0 )  ;


which is capable of smoothly moving from sin(u) to sin(2u) by varying the parameter P between the values 1.0 and 0.0. I generated a wave file sweeping from 1.0 to 0.0. Note that parameter P handles both the "morph" and compensates the amplitude to a constant 1.0.

What I can't say is whether this sweep represents the same sound animation as would a simple pan from sin(2u) to sin(u).

EDIT ADD: I now see this:

Code:
sin(u)cos(v) = [ sin(u+v) + sin(u-v) ] / 2


I believe I can do a sweep between sin(u) and sin(3u) using this, where sin(3u) represents a perfect 5th interval. I think I can also use this with the one above and do some other weird stuff.


sine_morph_test.wav
 Description:
sin(2u) to sin(u) sweep using parametrically driven trigonetric identity

Download
 Filename:  sine_morph_test.wav
 Filesize:  617.23 KB
 Downloaded:  315 Time(s)


_________________
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
View user's profile Send private message Visit poster's website
usw



Joined: Mar 22, 2007
Posts: 27
Location: valence france

PostPosted: Thu May 01, 2008 3:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

weird...I'm getting a very different result (sounding like a crossfade) with your function (sweep is reversed) Shocked Are you using very short tables for your sine/cosine waves ?

http://perso.numericable.fr/usw/electro-music.aiff
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Thu May 01, 2008 3:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

usw wrote:
weird...I'm getting a very different result (sounding like a crossfade) with your function (sweep is reversed) Shocked 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
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Thu May 01, 2008 3:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ok, the second identity did not yield a sweep from sin(3u) to sin(u), however, it does yield a sweep from sin(3u) to sin(2u) as I used it in the function below. The attached wave was produced with this:

Code:
out = sin( u + u ) * ( P * cos( u ) + ( 1.0 - P ) ) - ( P / 2.0 ) * sin( u ) ;


This doesn't have amplitude compensation (my brain already hurts), but the amplitude change isn't outrageous. Sample attached.

EDIT ADD: What's really cool about this is that there's no sin(3u) anywhere in the input, yet it certainly exists in the output Cool

EDIT ADD:
this:
Code:
out = ( sin( u + u ) * ( P * cos( u ) + ( 1.0 - P ) ) - ( P / 2.0 ) * sin( u ) ) * ( P + 0.9 )  ;

nearly compensates for amplitude, but not exactly.


sine_morph_test_2.wav
 Description:
sin(3u) to sin(2u) using a parametrically controlled trigonometric identity

Download
 Filename:  sine_morph_test_2.wav
 Filesize:  925.82 KB
 Downloaded:  269 Time(s)


_________________
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
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Thu May 01, 2008 5:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Last one, I took the two systems above and drove one with the other. The result was a sweep from sin(3u) to sin(u) as I orignally wanted. Again, I never actually use sin(3u), only sin(u) and cos(u) from which sin(2u) and sin(3u) are generated.

EDIT ADD: To me, this one sounds like it morphs from sin(3u) to sin(2u) to sin(u)...


sine_morph_test_3.wav
 Description:
sine morph from sin(3u) to sin(u) using two parametrically controlled trigonometric identities

Download
 Filename:  sine_morph_test_3.wav
 Filesize:  462.93 KB
 Downloaded:  273 Time(s)


_________________
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

Last edited by JovianPyx on Fri May 02, 2008 1:51 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Fri May 02, 2008 7:11 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1225
Location: West Red Spot, Jupiter
Audio files: 157

PostPosted: Sat May 03, 2008 7:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 2 [26 Posts]
View unread posts
View new posts in the last week
Goto page: 1, 2 Next
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use