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
Wave shapes transition triggered with midi, plus envelope
21 posts
• Page 1 of 3 • 1, 2, 3
Wave shapes transition triggered with midi, plus envelope
Hello
I am struggling with an issue, since few days (btw. excuse my English), and haven't found the solution yet.
As you can see in the attached .fsm, there is a wave shape selector, and a seamless blending knob. When you move it, it moves between selected wave shape and next nine presets. I'd like to achieve the same with MIDI signal. So - when a key is pressed - output value moves from 0 to 1.
But the thing is - I'd like to construct an ASR envelope (and - if possible - LFO), controlling that over time. So - attack time is the time between going from 0 to value about 0.9 (to the last wave shape), then sustain is that value around 0.9 when the key is pressed, and then release time goes back to 0. Is it possible to do in FlowStone?
This idea came into my mind after reading this article - http://www.propellerheads.se/substance/discovering-reason/index.cfm?fuseaction=get_article&article=part31
Merging between following waveshapes in relatively short time would produce a good result, I think.
I am struggling with an issue, since few days (btw. excuse my English), and haven't found the solution yet.
As you can see in the attached .fsm, there is a wave shape selector, and a seamless blending knob. When you move it, it moves between selected wave shape and next nine presets. I'd like to achieve the same with MIDI signal. So - when a key is pressed - output value moves from 0 to 1.
But the thing is - I'd like to construct an ASR envelope (and - if possible - LFO), controlling that over time. So - attack time is the time between going from 0 to value about 0.9 (to the last wave shape), then sustain is that value around 0.9 when the key is pressed, and then release time goes back to 0. Is it possible to do in FlowStone?
This idea came into my mind after reading this article - http://www.propellerheads.se/substance/discovering-reason/index.cfm?fuseaction=get_article&article=part31
Merging between following waveshapes in relatively short time would produce a good result, I think.
- Irminsul
- Posts: 5
- Joined: Fri Feb 08, 2013 2:28 pm
- Location: Silesia, Poland
Re: Wave shapes transition triggered with midi, plus envelop
A morphing oscillator?
I will have a look in my old SynthMaker files - a long time ago I started work on a "multi-wavetable" oscillator, but never finished it. I am certain it is possible - though it requires a different solution. If I find any useful files I will post them for you.
To change the wave using the method you show will not work well to be modulated by LFO's etc. - because it uses many "green" components, and these are very slow. This makes it difficult to make smooth fades - and the audio will sound a bit distorted.
To make it work well, all must use stream components - mostly "mem Array" parts, but also a little custom code to make it better. But I think maybe I did not finish that code - I will have to look and see.
It may also be useful to search the 'SynthMaker' forum for wavetable oscillators - most designs there are compatible with FlowStone, and there are many years of good modules posted.
I will have a look in my old SynthMaker files - a long time ago I started work on a "multi-wavetable" oscillator, but never finished it. I am certain it is possible - though it requires a different solution. If I find any useful files I will post them for you.
To change the wave using the method you show will not work well to be modulated by LFO's etc. - because it uses many "green" components, and these are very slow. This makes it difficult to make smooth fades - and the audio will sound a bit distorted.
To make it work well, all must use stream components - mostly "mem Array" parts, but also a little custom code to make it better. But I think maybe I did not finish that code - I will have to look and see.
It may also be useful to search the 'SynthMaker' forum for wavetable oscillators - most designs there are compatible with FlowStone, and there are many years of good modules posted.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Wave shapes transition triggered with midi, plus envelop
I started to think about morphing between wavetables too, so include me on the list Trog
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: Wave shapes transition triggered with midi, plus envelop
Irminsul - thankyou so much. I hadn't looked at this for ages and thanks to your inspiration I dug out the old schematics, and guess what?
I spotted the years old bug that was stopping it from working properly (doing my maths wrong as usual)!!
It was only a matter of minutes before I had it working...
... this is naturally just a very rough prototype at the moment; but now that the tricky stuff is done, I should be able to tidy it up and optimise it quite quickly.
Note that it won't work straight away after download - I had to clear out all of the wave data to make the file small enough to post (16 * 1024 tables with 2048 samples each takes up rather a lot of room!!).
To get it working you need to fill the "Wave Table Array" module with data - and it's a bit time consuming because there's no GUI or file loader yet.
To do it...
1) - Set the index value to the array entry that you want to put some data (first index is zero)
2) - Go into the function generator module and type in an equation for the waveform - OR- you could connect a float array of data here (as you do from the strings in your example)
3) - You should see a small thumbnail of the waveshape appear in the little thumnail window.
4) -Change the index to the next one
5) - Repeat until you fill enough slots.
The crossfader doesn't need all of the slots to be full, you can enter a number for the max. index for testing with only a few waves.
The Array part resamples arrays of any size to match the correct wavetable size - but don't change the table size property of the Wave Table Array module!!! - it isn't connected to the wave readers yet, so it is fixed at 2048 sample arrays at the moment.
The basic anti-aliasing features of the wavetable oscillators seems to work well with the custom reader code - but there are quite a few improvements that could be made - e.g. a phase input, wave save/load etc. I'll post up any worthwhile improvements that I can make, and try to get it all into one module so that it's easier to use like the regular oscillators.
Hope you enjoy it - let me know what you think, or any ideas you have - or bugs that you notice!!
I spotted the years old bug that was stopping it from working properly (doing my maths wrong as usual)!!
It was only a matter of minutes before I had it working...
... this is naturally just a very rough prototype at the moment; but now that the tricky stuff is done, I should be able to tidy it up and optimise it quite quickly.
Note that it won't work straight away after download - I had to clear out all of the wave data to make the file small enough to post (16 * 1024 tables with 2048 samples each takes up rather a lot of room!!).
To get it working you need to fill the "Wave Table Array" module with data - and it's a bit time consuming because there's no GUI or file loader yet.
To do it...
1) - Set the index value to the array entry that you want to put some data (first index is zero)
2) - Go into the function generator module and type in an equation for the waveform - OR- you could connect a float array of data here (as you do from the strings in your example)
3) - You should see a small thumbnail of the waveshape appear in the little thumnail window.
4) -Change the index to the next one
5) - Repeat until you fill enough slots.
The crossfader doesn't need all of the slots to be full, you can enter a number for the max. index for testing with only a few waves.
The Array part resamples arrays of any size to match the correct wavetable size - but don't change the table size property of the Wave Table Array module!!! - it isn't connected to the wave readers yet, so it is fixed at 2048 sample arrays at the moment.
The basic anti-aliasing features of the wavetable oscillators seems to work well with the custom reader code - but there are quite a few improvements that could be made - e.g. a phase input, wave save/load etc. I'll post up any worthwhile improvements that I can make, and try to get it all into one module so that it's easier to use like the regular oscillators.
Hope you enjoy it - let me know what you think, or any ideas you have - or bugs that you notice!!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Wave shapes transition triggered with midi, plus envelop
Tried to populate the wave_array with my wavetable, and after a certain number,
it depends on how big each table, you receive an error message >> OUT OF MEMORY.
I understand that the primitive wave_array is still in beta, but DSPR boys can not do anything about it?
it depends on how big each table, you receive an error message >> OUT OF MEMORY.
I understand that the primitive wave_array is still in beta, but DSPR boys can not do anything about it?
-
digitalwhitebyte - Posts: 106
- Joined: Sat Jul 31, 2010 10:20 am
Re: Wave shapes transition triggered with midi, plus envelop
trogluddite wrote:To change the wave using the method you show will not work well to be modulated by LFO's etc. - because it uses many "green" components, and these are very slow. This makes it difficult to make smooth fades - and the audio will sound a bit distorted.
Oh snap, my bad - i thought that using as many "green" parts as possible will save the CPU. But "mixing green waveforms" and "mixing stream waveforms" gives the same audible effect, right?
trogluddite wrote:... this is naturally just a very rough prototype at the moment; but now that the tricky stuff is done, I should be able to tidy it up and optimise it quite quickly.
Thanks for your example. It looks very promising And works. Would you be interested in expanding this prototype into a decent, properly working oscillator? I am planning to build a synth based on that kind of synthesis.
Questions:
- Does bigger number of sample arrays means better quality, or simply a longer duration of waveform? (if latter, then maybe a size of 256 could spare some CPU ?)
- Can it handle a large number of waveforms, e.g. a few thousand?
- Could this work with polyphony? (So when a new voice is triggered, morphing sequence starts from the beginning)
Ideas:
- A phase input (like you said)
- PWM modulation
- "Unison effect" (http://en.wikipedia.org/wiki/Roland_JP-8000#The_Supersaw)
- Ability to select first and last waveform in morphing sequence / or first and a field to input a number of waves (Number of waves input in "Multi-fade" component).
- Advanced LFO (maybe a step-lfo from Analog Kit?)
- In general, I'd like to ressurect the spirit of the PPG and Prophet Synths (and article worth reading - http://www.soundonsound.com/sos/apr98/articles/synthschool.html). So - four morphing oscillators would be controlled by XY pad, where you could record the movement of pad.
Hopefully I'm not throwing too much ideas at you
- Irminsul
- Posts: 5
- Joined: Fri Feb 08, 2013 2:28 pm
- Location: Silesia, Poland
Re: Wave shapes transition triggered with midi, plus envelop
digitalwhitebyte wrote:Tried to populate the wave_array with my wavetable, and after a certain number,
it depends on how big each table, you receive an error message >> OUT OF MEMORY
Oooh - thanks for the report DWB; I hadn't got as far as populating the whole table, so I hadn't seen this before.
Needs a bit of testing, I think - to see if it just the wave array that has a limit, or whether it is affected by the "intermediate" values being stored in e.g . float arrays etc.
Of course, one could make the wavetables smaller, but I chose to stick with 2048, as theoretically that keeps the sound good down to ~20Hz - would be nice not to lose that.
However, in the worst case, it would be possible to do away with the Array IF that is the only limitation - the different waves could all be within a single 'mem' and indexed by sample pointers. I have never encountered a problem loading large wave files into a regular 'mem' - but then again, maybe I just haven't tried hard enough!!
Irminsul wrote: In general, I'd like to ressurect the spirit of the PPG and Prophet Synths
I think we are thinking along very similar lines!
The wave-sequencing and vestor synthesis of those old synth is something I would love to re-create - there are just certain sounds that are easier to make that way than any other.
Irminsul wrote:Oh snap, my bad - i thought that using as many "green" parts as possible will save the CPU. But "mixing green waveforms" and "mixing stream waveforms" gives the same audible effect, right?
The final audio output for any given mix would be exactly the same, yes - and green would save CPU load overall if it could be used. The trouble is just with the speed that green calculations can be done - crossfades would not smoothly change from sample to sample, but in a series of little steps that would lead to bad "zipper" noise.
Irminsul wrote:- Does bigger number of sample arrays means better quality, or simply a longer duration of waveform? (if latter, then maybe a size of 256 could
For a wavetable, the number of samples in the table affects the purity of the sound at low frequencies - ideally, you want enough samples that the oscillator doesn't have to calculate any "in between" samples at the lowest frequency you want to use. For example, if we assume a 44100Hz sample rate, and we want our pitch to go down to 20Hz, we need...
44100 / 20 = 2205 samples
...and so we use 2048 because it is the nearest power of two.
The reason for the greedy memory that DWB pointed out, is that a 2048 sample waveform requires 1024 differently filtered version of the wave to make up the complete table (number of tables = wave size / 2) - so in total each table is 2048 * 1024 = 2097152 samples. So yes, if shrinking the tables doesn't affect the sound too badly, smaller ones would be good to save a lot of memory - 1/2 wave size => 1/4 memory used.
It's worth noting that there is often a bit of confusion here because the term "wave table" is used in two different ways...
1) In the 'PPG'/Waldorf sense - a set of waves of different shapes that get faded together to make evolving waveforms.
2) In the FS primitives sense - the set of waves are all the SAME waveform, but each with different harmonics filtered out, chosen according to frequency so that the oscillator doesn't create aliasing distortion.
Particularly confusing for this project, as we are trying to do both things in the same oscillator!
Irminsul wrote:- Can it handle a large number of waveforms, e.g. a few thousand?
From what DWB has found out, not if they all need to be kept in memory at the same time - it would be possible to have tables loaded from HDD as wave files though, so that each patch could have it's own smaller set of waves - and you can save a whole wavetable as a single file so that it doesn't need re-calculating every time. This would slow down patch changes a bit, but it would make the synth much more versatile, and allow the end user to add their own custom waveforms.
Irminsul wrote:- Could this work with polyphony? (So when a new voice is triggered, morphing sequence starts from the beginning)
Yes - this is another reason for doing it all using the stream components. If you delete the links to the output section, and replace with a poly to mono "combiner", all of the stream sections should immediately become poly.
This will allow every poly voice to have its own mix of waves independently of all the others.
And, yes - a morphing sequence with a nice long multi-stage envelope curve (tempo synchronised) is exactly what I've been thinking about - it's really nice to have a few people who share the same interest and want to contribute to the project!
About the ideas you proposed - all good!
Looking into the memory problem, and optimising performance are top priority at the moment - it needs to be robust (no memory errors!), and to have low enough CPU that multiple oscillators don't strain everyone's CPU.
Beyond that, well I'd like to take up some of your ideas myself - but ideally it would be made into a single oscillator modules - as easy to use as any other oscillator, except with an extra modulation input that folks could connect up to whatever crazy mod sources and GUI they fancied.
The motion recording particularly interests me - I've implemented it already in my SM "Soopa Loopa" project, so have much of what's needed worked out already. Compared to LFO's, envelope graphs, I find it really the most intuitive way to add musical modulation to a sound - no numbers to worry about, or fiddling with the mouse; just play what you want to hear from your controller, and get the hell on with making some music! That one is definitely on my "to do" list.
Thanks all for your comments - it's nice to see this old project rolling again.
Very busy with work just at the moment (big product release that I have to prepare for), so I doubt I'll be doing much for the next week or so - but keep the mod's, bug reports, ideas coming, this could shape up to be something very nice indeed!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Wave shapes transition triggered with midi, plus envelop
trogluddite wrote:From what DWB has found out, not if they all need to be kept in memory at the same time - it would be possible to have tables loaded from HDD as wave files though, so that each patch could have it's own smaller set of waves - and you can save a whole wavetable as a single file so that it doesn't need re-calculating every time. This would slow down patch changes a bit, but it would make the synth much more versatile, and allow the end user to add their own custom waveforms.
That's a great idea. Maybe it worth be looking at original waveforms from PPG and Microwave:
- http://www.ppg.synth.net/download.shtml
- http://carbon111.com/300waves.pdf
- http://carbon111.com/xtwavetables.html
Another idea: I don't know if it's possible, but it would be nice to be able to load various file formats/patches (like those available to download from Waldorf website: http://www.waldorf-music.info/en/archiv/microwave.html )
trogluddite wrote:And, yes - a morphing sequence with a nice long multi-stage envelope curve (tempo synchronised) is exactly what I've been thinking about - it's really nice to have a few people who share the same interest and want to contribute to the project!
That's good to hear Although I'm pretty noobish with DSP, hopefully maybe we can come up with something very nice.
BTW. did you hear about so called z-plane filters? The idea is pretty similar to morphing waveforms - except, here comes morphing between filter parameters, based on interpolation. As far as I've understood, this is something different than a simple crossfading. EQUO from FL studio implements some kind of this.
- Irminsul
- Posts: 5
- Joined: Fri Feb 08, 2013 2:28 pm
- Location: Silesia, Poland
Re: Wave shapes transition triggered with midi, plus envelop
Irminsul wrote:BTW. did you hear about so called z-plane filters?
Indeed, and I have heard them in action - though could never afford one of those symths myself.
I've seen the "z-plane" mentioned in many of the texts I've read about filters - but the mathematics of it is way beyond my understanding. From what I have heard, it is like you say - not just a crossfade; and not even like just changing the usual freq, resonance controls either - one can morph between different types and slopes of filters too in some way.
I've searched in vain for some code examples that might translate to DSP code, but haven't yet found anything that I could really get a grasp of - it would be something that SM/FS never had before, and surely a useful and popular thing to have available.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Wave shapes transition triggered with midi, plus envelop
trogluddite wrote:I've searched in vain for some code examples that might translate to DSP code, but haven't yet found anything that I could really get a grasp of - it would be something that SM/FS never had before, and surely a useful and popular thing to have available.
Well, I've found something. Here - http://www.alloyelectric.com/?page_id=59 - you can download and play around with that kind of filter. When you click "more about z-plane" in the bottom, there is some explanation, however way beyond my understanding of math
- Irminsul
- Posts: 5
- Joined: Fri Feb 08, 2013 2:28 pm
- Location: Silesia, Poland
21 posts
• Page 1 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 30 guests