Math function for modular

Request a new device/modular module, and hope that some enterprising developer grants your wish!

Moderators: valis, garyb

Post Reply
JLS
Posts: 663
Joined: Tue Dec 31, 2002 4:00 pm
Location: Czech
Contact:

Post by JLS »

Hi all SDK user

Tip for new modules

Basic Math function ( +,-,/,*,sin,cos,tan,lin,exp,..........)
Logical Function ( and,or,xor.......)
More Gate function

For better controling and modulation :smile:
( Like Ni Reaktor and Nord Modular )

Very thanks this :smile:

<font size=-1>[ This Message was edited by: megerov on 2005-07-02 03:19 ]</font>
User avatar
at0m
Posts: 4743
Joined: Sat Jun 30, 2001 4:00 pm
Location: Bubble Metropolis
Contact:

Post by at0m »

There's some basic math modules already, in different forms:
- an adder sums, if you invert one side it will subtract.
- a ringmodulator divides, a divider multiplies (check it out;)
- sine: Flexor's saw2trisin, when it's set to sine, will make a linear signal into sinus, make 90' phase offset and it's a cosinus.

I found some C algo's to make 16bit precision lin/log from 32bit integer, which wasn't really usefull for our purpose. If anyone finds a way to calculate more precise logarithm, we'd be happy to read it - any language would do, as long as it works for integer and not float.

For the gate function, have you tried Flexor's Val Freezer? There's some logic functions in Modular, but they're Gate logic indeed, not the full 'maths' logic. These would be very possible to make IMHO.

A small step forward?
more has been done with less
https://soundcloud.com/at0m-studio
JLS
Posts: 663
Joined: Tue Dec 31, 2002 4:00 pm
Location: Czech
Contact:

Post by JLS »

Hi Atom

sorry my very bad english :smile:

few experiments:

1. add module 1+1=1 , 1+3=2 ( not working only aproximate function )
2. add module + invertor 10-2=4 ( not working )
3. ring modulator ( only chaotic number )

Sorry NOT WORKING MATH FUNCTION

:smile:
User avatar
at0m
Posts: 4743
Joined: Sat Jun 30, 2001 4:00 pm
Location: Bubble Metropolis
Contact:

Post by at0m »

That's indeed no straightforward maths, but that's how it works. SFP works with a 32bit number, 2^32. -2^31<0<2^31 . To make it more complex, that is not all correct: There is no zero. There is 2^31 negative values, and 2^31 positive values, making for a total 2^32, 32bit, resolution. This makes for one number offset in many situations that will become more clear (and frustrating;) as you play with it and need exact results. Also, on every addition you loose a bit of resolution: 2^31+2^31=2^31 here :grin: It's funny maths, that's for sure. But if you get to know it a bit better, it becomes more workeable. You can compensate for it, it will only save some screen space in a patch if made in DP. Modular provides you with the same maths stuff as the SDK or DP. Creating more complex and correct math algorithms is quite difficult. People with experience in that specialised maths area don't come walking up to you everyday, let alone someone that can create atoms/modules for sharc DSP and makes music with it. Or do they? :grin:

Check out j9k again too, he made a comparator and a couple other math functions that work with audio signals.

A little bit more explanation on trigonometric functions (from very far down memory lane):
* sin a = cos (a-90')
* tg = sin / cos
These can relatively easy be made with the modules we have. More complex functions can be found on the web for lower bitdepths, as used in mobile telephony or speech analysis/synthesis applications, that info is available online and may give you an impression of the problems working with fixed point binary math.

Maybe ReD_MuZe can create some maths modules for the upcoming Flexor2 pack...

_________________
more has been done with less

<font size=-1>[ This Message was edited by: at0m on 2005-07-04 02:02 ]</font>
JLS
Posts: 663
Joined: Tue Dec 31, 2002 4:00 pm
Location: Czech
Contact:

Post by JLS »

Hi Atom

Thanks this very big info :smile:

Yes J9k modules very interesting

Flexor 1.5 is mega modular ( i love it )

Little question Flexor 2 release day ?

Thanks Kamil




<font size=-1>[ This Message was edited by: megerov on 2005-07-04 03:41 ]</font>
Post Reply