## modular module: DRAW SHAPER - lookup table value

Device/Module Wishlist

Original topic on PlanetZ: https://forums.scopeusers.com/viewtopic.php?t=21676

#### modular module: DRAW SHAPER - lookup table value

Posted: Tue Mar 06, 2007 2:45 pm
by hifiboom
okay I try to explain....
how it should work.....
basically its a table..... that takes a linear value as input f.e.
1,2,3,4,.....,127
and outputs a value that is draw into a box, f.e.
10,11,14,.......
(by looking into a table or calculating from the graph in the module - depends on how much memory is available for such stuff)
like a 1-dimensional array with fully controlable values.
this could morph almost every signal into a new way.
there could also be a preset bank with predefined curves.....
example usages:
(1) a constant value module would be able to control the cutoff and resonance of a filter simultaniously in an very spectacular way....
So we could model the unlinear behaviour of resonance and cutoff
(look on the demo picture)
(2)could be also used to sharp a standard saw wave into a very sharp one by drawing an exponential curve into that module.....or any other oscillator could be shaped...
(3) could be also used as a kind of compressor/expander module on audio signals by drawing a compressor curve or something completly different into it...
(4) could be used as distortion module, too: jumps in that graph would result in distortion, of course there has to be some smoothening algo inside as to heavy jumps will be speaker killer
1->10
2->100
3->10
I think it would be a cool module....
I don`t know if modular makes a difference between control and audio signals... but in that case there should be one for audiorate shaping and one for control shaping....
any thoughts?
maybe its not possible....
and maybe I should adress this to RED_MUZE as he seems to be the modular module guru ....

Attachments
    lookup_table.JPG (22.56 KiB) Viewed 5336 times

####

Posted: Fri Mar 16, 2007 4:48 am
by hifiboom
VAZ does the trick with a module designed like this.
a cool tool

Attachments
    vaz_waveshape.JPG (10.76 KiB) Viewed 5286 times

####

Posted: Mon Mar 19, 2007 4:46 am
by roy thinnes
yes, such an idea occupied myself too for some times. Though, I think an array of 128 values would be too much, isn't it. Even if this could be designed somehow with reasonable dsp and cpu power, I can't imagine how such a module could be edited:
old value1>newVal x1
old value2>newVal x2
.
old value128>newVal x128
...only solution would be 2 textfields corresponding with each other (which I have not seen so far in scope).
Btw, the VAZ module has a matrix of 16, not 128 values.
But if we lower our sights down to an array of 16 or even 8 values (maybe with a definable range), this could be a big step forward, me thinks.
I once did a MIII patch which could change values of 8 incoming signals, which was a big effort, as the circuit goes like this
...and that`s only for one value. So I would go further down to a module which has this very basic function: if an incoming signal with value [x_old] lies between the range of [x1] and [x2] then output a new value [x_new].

####

Posted: Mon Mar 19, 2007 10:32 am
by hifiboom
jeah, you are right, if you have to input the values manually 128 will be too much. Thats why I recommend it too write the table by a draw window shown above...
the 128 was just an example....
it has to interpolate the values to the audiorate bit depth (16,24 or 32 bit), if its processing audiosignals.
I don`t know on which bit depth the modular audiosignals are transfered, but
a table with 2^16 2^24 or 2^32 would be too memory intensive, I`m sure....
so a 16 values shaper could be enough, but the problem is the audiosignal is not a 4 bit signal. so it has to transfer somewhere the 4bit shaping to the f.e 16bit audiosignal thats coming in.

####

Posted: Mon Mar 19, 2007 3:12 pm
by wolf
hi,
this is already available.
For audio with the flexor pack (WaveDraw) and for midi with my miditool box (MidiTransformer).
best,
Wolfgang

####

Posted: Mon Mar 19, 2007 3:23 pm
by hifiboom
hey wolf,
the wavedraw is something other... from my understanding....
I though it replaces a wave with the new wave...
but I may be wrong.

####

Posted: Mon Mar 19, 2007 3:44 pm
by wolf

> hifiboom wrote:I thought it replaces a wave with the new wave...

That was the goal, wasn't it ?
However the possibility to connect an input wouldn' t be there, if it wouldn't serve a purpose .. well, I don't know about its internals .

####

Posted: Mon Mar 19, 2007 4:34 pm
by roy thinnes
yeah, wolf you're right, wavedraw can do this. but reassigning specified values...

> takes a linear value as input f.e.
> 1,2,3,4,.....,127
> and outputs a value that is draw into a box, f.e.
> 10,11,14,.......

...is practically impossible-
theoretically you can connect constantVal modules to the mod inputs of wavedraw (x = inValue, y=newOutValue) and change the values step by step- but without any possibility to correct or store this "table".
So maybe a solution would be a new (Flexor2.5?) module : a kind of helper module for exact specifying in- and output values (plus preset list) for wavedraw.

####

Posted: Tue Mar 20, 2007 12:15 am
by astroman
smells like convolution...

> hifiboom wrote:...I don`t know on which bit depth the modular audiosignals are transfered, but
> a table with 2^16 2^24 or 2^32 would be too memory intensive, I`m sure....
> so a 16 values shaper could be enough, but the problem is the audiosignal is not a 4 bit signal. so it has to transfer somewhere the 4bit shaping to the f.e 16bit audiosignal thats coming in.

####

Posted: Tue Mar 20, 2007 12:47 am
by hifiboom
astro, no no,
it has nothing to do with convolution....

####

Posted: Tue Mar 20, 2007 1:09 am
by astroman
of course it has... or I may have misunderstood it entirely (possible)
you have a stream of input (sample) values and want to modify each one by a transfer function (in your example a very simple one, lookup/replace)
in my understanding that's convolution's principle - no matter that usually a more 'complex' function is applied
cheers, Tom

####

Posted: Tue Mar 20, 2007 11:53 am
by hifiboom
I think my first explanation was a bit misleading....
so I did draw it with Visio what I wanted to explain.
here is what I mean... The example only shows some tasks with a Triangle as input.... but surely it would alter any other oscillator waveform in the desired way.....
but it should also work with audio input and other modulating sources like LFOs and other stuff....
this would be the most powerful shaper.
you could shape a triangle into a sinus and everything in between
or a sinus into something closer to a square.
with less simple drawings like in example4 you could freshen any audiosource, roughen 303, make kicks harder and so on....
...or plug it behind an osc for new creations and other nice stuff....
switched behind a constant value module it could give us unlinear curves for controlling cutoff and resonance of a filter in a unconventional way and more natural way....
a preset button could hold the different shapes for instant checkout.....
@astro: convolution would be applying an impulse on any input freq. so it would be time-depended operaton.
this shaper just takes an audio amplitude value of a dedicaded input bit depth (16,24,32 - don`t know which bit depth modIII is working with) on timepoint A and outputs a new value for timepoint A.
In german scientific calling would be a "mathematische Abbildung".
a transformation / mapping process
in a programming language I would do it with an array that holds for every input value 1..32768 (f.e. unipolar 16 Bit, 1bit for polarity) a new output value, while the values are calculated by the drawn curve...
But I`m sure its not that easy to do with CW SDK. As I don`t have access to an SDK I cannot give any further recommendations on how to do it.

Attachments
    exaples with a triangle
    shaper.JPG (43.34 KiB) Viewed 5146 times

####

Posted: Tue Mar 20, 2007 12:17 pm
by steffensen
This is really something that is missing in our modular, and wich is covered in most other native ones. +1

####

Posted: Tue Mar 20, 2007 4:48 pm
by alfonso
A lot of this stuff is already available in Flexor, the Tri 2 Sin module does exactly one of the examples above that and in a progressive way, but I'd suggest to have a better look to all the Shapers....
The WaveDraw module uses any NBLSaw oscillator to shape it on whatever you draw on the surface with a 64 sample resolution and the shape can be XY modulated up to audiorate, there is also a Wavedraw Assist that provides fixed modulation shapes....the possibilities are already countless....

####

Posted: Wed Mar 21, 2007 4:47 am
by roy thinnes
hifi,

> hifiboom wrote:I would do it with an array that holds for every input value 1..32768 (f.e. unipolar 16 Bit, 1bit for polarity) a new output value

that is exactly what Wavedraw does, check it.
if you patch it like this
you'll use it as a fx (64 sample resolution) which re-maps (distorts) incoming values (audio).
btw, I've made it in *old* Mod2 shell, because the waveshapes are not stored in mod2(new) and ModIII presets)
BUT exact mapping isn't possible with wavedraw.
So something like building a new key scale (eg for Karplus strong) is not available.

####

Posted: Thu Mar 22, 2007 2:22 pm
by hifiboom
@alfonso:
you are right the tri-sin does what example1 shows.... but its more what I would call a one trick pony...
@roy:
the wavedraw seems to do a similar trick, but the results are a bit more like a high resolution bit-crushing effect even at linear setting( non-affecting like example2 in the picture shown above) ...
anyways it was just a wish .....

####

Posted: Fri Mar 23, 2007 6:50 am
by astroman
that's why I pointed to 'convolution' - no need to debate the definition or what qualifies mathematically
do it according to Dr. Lector, ask '...what is everything in it's essence, in it's very nature... ?'
the results in your example are not pleasing - no wonder...
convolution in graphics is a really simple process - then why is it so difficult in sound ?
(leaving aside the 'specialized' case of the room response)
the answer is really simple, too - but as the doctor I'll leave that for the reader...
cheers, Tom

####

Posted: Fri Mar 23, 2007 10:26 am
by hifiboom
found this thread in the depths of the i-net....
http://electro-music.com/forum/viewtopic.php?t=12389
poster 7 shows pretty good how an extensive shaping is possible....
including the proper visualization of the waveform.

####

Posted: Fri Mar 23, 2007 3:33 pm
by astroman
dunno if you've noticed it (as a fun contribution) in S4L's CPU force thread, but I'm pleased to post it again - it's a 20 years old screenshot from a MacPlus
note the similiarity to the external forum picture you refer to
this one shows the resulting waveform from an additive synthesis with the partials distributed as in the upper left diagram (it's ConcertWare's instrument builder)
the external picture shows a waveform that's modified by splines
obviously this method yields quite similiar results, as there's also a list of instrument timbres visible
these waveforms 'sound' good because the graphic function is controlled by parameters that have an 'acoustically relevant' scaling, opposed to random mouse drawing.
cheers, Tom

Attachments
    CW1.jpg (19.08 KiB) Viewed 4988 times