Randomizer for Zebra, ZebraCM, MFM2...

Official support for: u-he.com
Post Reply New Topic
RELATED
PRODUCTS

Post

I think the Delta-Patches were never adjusted for the changes in parameter layout. I don't think these still work as expected.

Post

Hey Urs, just made a topic about this on u-he main forum and saw your response now, I hope this is not a problem, if it is I will remove the second post.

Actually this script was made by you, here is the original:

Code: Select all

#defaults=no
<?

int fractionalType = 1;
int first_XY_Target = Core.XY[ 4 ].Down[ 8 ].id + 1;
int last_XY_Target = Global.numParameters - 1;

int iterations = 0;

for ( int xy = 1; xy < 5; xy++ )
{
   for ( int slot = 1; slot < 9; slot++ )
   {      
      int target = -1;
   
      for ( 1; 1; 1) // same as while( true )
      {      
         target = rand( first_XY_Target, last_XY_Target );
            
         if ( Global.Parameter[ target ].type == fractionalType )
         {
            int moduleID = Global.Parameter[ target ].moduleID;
            
            if ( Module[ moduleID ].active )
            {
               Core.XY[ xy ].TargetX[ slot ] = target;
            
               float value = Global.Parameter[ target ];
            
               float minInfluence = Global.Parameter[ target ].min - value;
            
               float maxInfluence = Global.Parameter[ target ].max - value;
         
               Core.XY[ xy ].Right[ slot ] = rand( minInfluence, maxInfluence );
               Core.XY[ xy ].Left[ slot ] = rand( minInfluence, maxInfluence );
            
               break;
            }
         }
         
         iterations++;
      }
      
      for ( 1; 1; 1) // same as while( true )
      {      
         target = rand( first_XY_Target, last_XY_Target );
            
         if ( Global.Parameter[ target ].type == fractionalType )
         {
            int moduleID = Global.Parameter[ target ].moduleID;
            
            if ( Module[ moduleID ].active )
            {
               Core.XY[ xy ].TargetY[ slot ] = target;
         
               float value = Global.Parameter[ target ];
            
               float minInfluence = Global.Parameter[ target ].min - value;
            
               float maxInfluence = Global.Parameter[ target ].max - value;
         
               Core.XY[ xy ].Up[ slot ] = rand( minInfluence, maxInfluence );
               Core.XY[ xy ].Down[ slot ] = rand( minInfluence, maxInfluence );
            
               break;
            }
         }
         
         iterations++;
      }
   }
}

?>

The only problem seems to be choosing the target.

The up/down & right/left handles will move correctly (randomly speaking), but because they do not have the "Target" value for reference they move too much randomly and fail to stay within adequate values (most of the time):

Code: Select all

#defaults=no
<?
//This will just move the right and left handles of the first slot on the frist XY pad (even not being specified to do only so)

float value = Global.Parameter[ target ];
            
float minInfluence = Global.Parameter[ target ].min - value;
            
float maxInfluence = Global.Parameter[ target ].max - value;
         
Core.XY[ xy ].Right[ slot ] = rand( minInfluence, maxInfluence );
Core.XY[ xy ].Left[ slot ] = rand( minInfluence, maxInfluence );

?>


I have been trying more direct simplified code to see if something happens, in this case just the first slot on the first XY, but nothing (forgive me if this is stupidly simple code, I am not a programmer in the true sense of the word):

Code: Select all

#defaults=no
<?

int xy = 1;
int slot = 1;

Core.XY[xy].TargetX[slot] = rand(Global.numParameters);

?>
With this it seems the up / down handles will move occasionally to the default state, somehow, but the slot "Target" never gets filled/choosen.

I noticed you use a fractionalType and an "iterations" sort of counting variable (?), but I do not understand the point of them.

I just would love to understand and use this script on latest Zebra :)

Thank you

Post

Ok, I think I got it to work

(sorry for the duplicated post in viewtopic.php?p=8435431#p8435431):

Code: Select all

#defaults=no
<?

int fractionalType = 1;
int first_XY_Target = Core.XY[ 4 ].Down[ 8 ].id + 1;
int last_XY_Target = Global.numParameters - 1;

//int iterations = 0; //this is probably not needed in the current Zebra version (2.9.3), see below

for ( int xy = 1; xy < 5; xy++ )
{
   for ( int slot = 1; slot < 9; slot++ )
   {      
      int target = -1;
   
      for(int i = 1; i <100;  i++) // the previous "for ( 1; 1; 1) // same as while( true )" probably was the source of the problem, hence the "break;" below is no more used 
      {      
         target = rand( first_XY_Target, last_XY_Target );
            
         if ( Global.Parameter[ target ].type == fractionalType )
         {
            int moduleID = Global.Parameter[ target ].moduleID;
            
            if ( Module[ moduleID ].active )
            {
               Core.XY[ xy ].TargetX[ slot ] = target;
            
               float value = Global.Parameter[ target ];
            
               float minInfluence = Global.Parameter[ target ].min - value;
            
               float maxInfluence = Global.Parameter[ target ].max - value;
         
               Core.XY[ xy ].Right[ slot ] = rand( minInfluence, maxInfluence );
               Core.XY[ xy ].Left[ slot ] = rand( minInfluence, maxInfluence );
            
               //break; //removed because the for ( 1; 1; 1) no longer is used
            }
         }
         
         //iterations++;
      }
      
      for(int i = 1; i <100;  i++)
      {      
         target = rand( first_XY_Target, last_XY_Target );
            
         if ( Global.Parameter[ target ].type == fractionalType )
         {
            int moduleID = Global.Parameter[ target ].moduleID;
            
            if ( Module[ moduleID ].active )
            {
               Core.XY[ xy ].TargetY[ slot ] = target;
         
               float value = Global.Parameter[ target ];
            
               float minInfluence = Global.Parameter[ target ].min - value;
            
               float maxInfluence = Global.Parameter[ target ].max - value;
         
               Core.XY[ xy ].Up[ slot ] = rand( minInfluence, maxInfluence );
               Core.XY[ xy ].Down[ slot ] = rand( minInfluence, maxInfluence );
            
               //break;  //removed because the for ( 1; 1; 1) no longer is used
            }
         }
         
         //iterations++;
      }
   }
}

?>

I think the previous for (1;1;1) was the main reason for it to crash, because the "break;" seems to make the script not work.

Replaced it with "for(int i = 1; i <100; i++)" to increase the probability of the for loop to work.

Anyway thank you very much for this great script and time!

Best regards,
O.

Post

I am new to this thread. I like the idea of a randomizer working with different u-he synths.
I downloaded the randomizer (and his variation "no noise") and tried it in different synths. Now, I have two questions:
- Within the Zebralette-update the Randomizer produces not many usable results; often, the new created preset is "silent". Does anybody know why - and perhaps, to make the randomizer more usable for Zebralette?
(When using "normal" presets in Zebralette after use of the randomizer, these presets does not work any more.)

- I use the randomizer also within Diva and Zebra CM. The created presets often sound good. But I can only use the presets within my music if it has the same pitch like the old preset (without a change). The randomizer often change the pitch of presets. Does anybody know if it is possible to delete all possible randomized pitch variations within the randomizer?

Post

I still have the old zebraCM randomizer, a small text that starts as below with a setting for
the desired percentage of randomization, 25% in this case
------------------------------------------------------------------------
defaults=no
<?

// edit next line to set percentage

float percentage = 25;

// off we go!
-----------------------------------------------------------------------

Maybe try and find that setting in what you're using, and reduce that value to see if the
pitch setting remains unchanged at some point.

I would also experiment with pitch controls to find new harmonies that might not
have been obvious in real life.
Cheers

Post

"Maybe try and find that setting in what you're using, and reduce that value"

I will try this, thanks. But how can I avoid that using the randomizer makes presets getting silent in Zebralette?

Post

You can't.
It's a randomizer, it randomizes values.
This can lead to silence in any plugin.
If it goes silent, reload the preset and start randomizing again.
That QA guy from planet u-he.

Post

This behaviour often occurs in Zebralette, not in other u-he-plugins...

It is strange, that you can not switch to other presets when the randomized-preset is silent (it rests silent). You have to reload the u-he-synth anew to use a preset.

Post

gonzomaster wrote: Wed Jan 04, 2023 3:40 pm It is strange, that you can not switch to other presets when the randomized-preset is silent (it rests silent). You have to reload the u-he-synth anew to use a preset.
You never mentioned this crucial little detail before.

Maybe you should try a tamer version of the reandomize script.
Here is the milder version that doesn't get as extreme as the full version.
It simply comments out the last section of the script.
Zufallstrans4mator-mild.zip
Additionally, you can also set a smaller percentage value in the script, as already suggested by other users and our support.
You do not have the required permissions to view the files attached to this post.
That QA guy from planet u-he.

Post

Thanks, I will try the "mild" version!

Post Reply

Return to “u-he”