Welcome to %s forums

BrainModular Users Forum

Login Register

Morphusine

Discussions about add-ons, announcements
Post Reply
User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 06 Aug 2010, 17:22

Image

Inspired by the metasurface of Audiomulch , this addon is a tentative for a morphing tool.

You create a list of 12 buses ,you link them to the parameters you have choose then you can made a morphing between them with the mouse ( or fingers )

Special thanks to woodslanding for his script to extract comma text !

Can be improved, collaboration welcome.

check wiki page for more info

Floego
Member
Posts: 319
Location: Venezuela
Contact:

Unread post by Floego » 06 Aug 2010, 17:39

Great!, this funcionality is very welcome. I`ll try and comment later.

I'll translate the wikihelp as soon as possible.:)

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 06 Aug 2010, 17:57

thanks Floego !

wait a little to translate cause it's maybe not the definitive version...;)

ethnix73
Member
Posts: 604
Location: France, Caen
Contact:

Unread post by ethnix73 » 07 Aug 2010, 11:03

interesting one nay-seven!
Seb.Dub

multiphone
Member
Posts: 303
Contact:

Unread post by multiphone » 07 Aug 2010, 13:01

Hello,

First, congratulation to Nay Seven for is Morphusine very nice idea to adapt the very nice Metasurphace from Audiomulch.

But i have the intution of a more simple patch with the morphing script of Bsork. I try to adapt this script to have (for exemple) heigth inputs, but i'm a newbee to script that.

I begin the work but...

I dont have enderstand the method of interpolation in the "main proc"

If somebody enderstand... or if Bsörk is here...!?


{$ --------------------------------------------------------------------------------------------
If you change the number of parameters in the "num" constant module, you must change the
the value of the NUM_PARAMS constant below also. If the number of parameters is more than 16, use the
Get/Set Array Value modules.

bSork, 05.07.2008
----------------------------------------------------------------------------------------------- $}
VAR V1 : tParameter;
VAR V2 : tParameter;
VAR V3 : tParameter;
VAR V4 : tParameter;
VAR V5 : tParameter;
VAR V6 : tParameter;
VAR V7 : tParameter;
VAR V8 : tParameter;
VAR pXPos : tParameter;
VAR pYPos : tParameter;
VAR pOut : tParameter;
VAR pUpdXY : tParameter;

VAR x1, x0, y1, y0, out : single;
VAR blocks, i : integer;

CONST NUM_PARAMS = 8;

PROCEDURE init;
BEGIN
V1 := CreateParam('V1', ptArray); SetIsOutput(V1, FALSE); SetLength(V1, NUM_PARAMS);
V2 := CreateParam('V2', ptArray); SetIsOutput(V2, FALSE); SetLength(V2, NUM_PARAMS);
V3 := CreateParam('V3', ptArray); SetIsOutput(V3, FALSE); SetLength(V3, NUM_PARAMS);
V4 := CreateParam('V4', ptArray); SetIsOutput(V4, FALSE); SetLength(V4, NUM_PARAMS);
V5 := CreateParam('V5', ptArray); SetIsOutput(V5, FALSE); SetLength(V5, NUM_PARAMS);
V6 := CreateParam('V6', ptArray); SetIsOutput(V6, FALSE); SetLength(V6, NUM_PARAMS);
V7 := CreateParam('V7', ptArray); SetIsOutput(V7, FALSE); SetLength(V7, NUM_PARAMS);
V8 := CreateParam('V8', ptArray); SetIsOutput(V8, FALSE); SetLength(V8, NUM_PARAMS);

pXPos := CreateParam('pos X', ptDataFader); SetIsOutput(pXPos, FALSE); SetSymbol(pXPos, ' ')
pYPos := CreateParam('pos Y', ptDataFader); SetIsOutput(pYPos, FALSE); SetSymbol(pYPos, ' ')

pOut := CreateParam('out XY', ptArray); SetIsInput(pOut, FALSE); SetLength(pOut, NUM_PARAMS);

pUpdXY := CreateParam('update XY', ptButton); SetIsOutput(pUpdXY, FALSE);

END;

// main proc
BEGIN
blocks := blocks + 1;
i := blocks MOD NUM_PARAMS;
IF (GetValue(pUpdXY) = 1) THEN BEGIN
x1 := GetValue(pXPos);
y1 := GetValue(pYPos);
x0 := 1 - x1;
y0 := 1 - y1;
END;
out := x0 * y1 * GetDataArrayValue(V1, i);
out := out + (x1 * y1 * GetDataArrayValue(V2, i));
out := out + (x1 * y0 * GetDataArrayValue(V3, i));
out := out + (x0 * y0 * GetDataArrayValue(V4, i));
SetDataArrayValue(pOut, i, out);
END.
HB

Lines / Points / Squares

http://www.hervebirolini.com/

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 07 Aug 2010, 13:15

Thanks Hervé !
happy to see that you like it
but it's a really beta one, I've yet an other one really more efficient ( with the help of Senso and Euclid for his math formula )
but of courses all ideas are welcome and I'm impatient to see what you and bsork can done with script..

here a more simple example of v2 :
note that you can change area size in the options window
and in this version , if you don't have a touchscreen , you have to click and move to interact...
Morphusine_v2

multiphone
Member
Posts: 303
Contact:

Unread post by multiphone » 07 Aug 2010, 13:45

Yes, the morphing tools are very welcome.
This is a very helpfull patch to sounds transformations and very adapted in a touch or multitouch surface for live performence. I imagine the sound result for exemple with finger(s) or a slow automation speed.
I'm like you for the math formula i dont realy enderstand the relationship beetween the values. I meen i'ts like a mixing desk and the relaationship are "*" but ...

The V2 are more clear in fact and the Area value is a good idea.

Best
HB

Lines / Points / Squares

http://www.hervebirolini.com/

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 07 Aug 2010, 14:30

for info , the math formula used is the Euclidean Distance :
√ [ (X1-X2)² + (Y1-Y2)² ]

multiphone
Member
Posts: 303
Contact:

Unread post by multiphone » 07 Aug 2010, 15:59

Incredible !
I'ts the same formula for the panning of surround pack ..!!!

I look of that deeply .

Thanks
HB

Lines / Points / Squares

http://www.hervebirolini.com/

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 09 Aug 2010, 09:51

multiphone wrote:I dont have enderstand the method of interpolation in the "main proc"
I guess you can call it "linear"... This one is getting old and should at least be updated to the new script engine. I'll take a look.
Bjørn S

multiphone
Member
Posts: 303
Contact:

Unread post by multiphone » 09 Aug 2010, 20:21

Hello Bsork,

Yes thanks a lot i'm litle limited in script langage, sorry.

Nay made a difrent aproch with distance calculation for an interpolation of two values (X/Y). But for exemple if you want to create a "morphing" betwen two FFT Filter you must be an interpolation between two table of diferent value and... Your script are a nice solution. Thanks in advance for your help.
HB

Lines / Points / Squares

http://www.hervebirolini.com/

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 10 Aug 2010, 00:03

To not hi-jack this thread totally...: Nay-seven, that's a cool patch!

...back off topic...: Multiphone, I was initially a bit confused by the script above. "Did I write that? What do all those V-parameters do?" If I'm not mistaken, it's your script based on the v3 add-on, or?

Well, nevermind. I've uploaded a new version of the XY Morph patch using a new script. It doesn't have the inbuilt latency I used in the old version to spread the CPU load, still it takes a lot less power. If you will control a lot of parameters with with a lot of morphing back and forth, it might be wise to do some trickery to spread the load, at least if you can live with a little extra latency.
Bjørn S

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 10 Aug 2010, 09:01

...more off topic...

@Multiphone: If you're just interpolating between two sets of values, and it's ok with a linear interpolation, there's a much simpler solution. Just multiply the first set with the output of a fader or whatever going from 0 to 1, and multiply the second set with (1 - fader value). As an afterthought, I also think that I will try to make the XY Morph with modules to see what's most CPU friendly with the latest incarnation of Usine. Probably tonight.
Bjørn S

multiphone
Member
Posts: 303
Contact:

Unread post by multiphone » 10 Aug 2010, 19:21

Hello Bsork,

Thaks a lot for the new version of the script its more reactive like that !! In 512 or 1024 values the script are very faster than beafore and CPU Friendly ;-)

Yes, for tha script with V1, V2...etc... i'ts my try :-(( Sorry, you script only a working thing (This is not my case)

I try to imagine (for exemple) an interpolation beetwen 2 or 8 Array of values. In first time i just want to increase the value of array entry to 8 and i imagine an inlet especialy for the selection of the number of array input. (But i'ts an onether story for me)

Thanks a lot for your help.
HB

Lines / Points / Squares

http://www.hervebirolini.com/

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 10 Aug 2010, 23:15

FWIW, I tried to use modules instead and have tried both with 1024 values instead of just 16 as a "stress test" of the CPU usage. There's no definitive winner; the script version seems to use a little less CPU than the module version when the patch is idle, but shows some occasional spikes when the XY is moved like mad for a while.

[edit] I've uploaded the module version as well as an add-on if you want to try it.
Bjørn S

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 11 Aug 2010, 00:36

great idea, will definitelt look deeper into that!

multiphone
Member
Posts: 303
Contact:

Unread post by multiphone » 12 Aug 2010, 12:05

Hello Bsork,

Thanks again for the two version.

I have tested the two patchs.

For me no real difrence of consumption betwen the script and the module version.
HB

Lines / Points / Squares

http://www.hervebirolini.com/

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests