H2P scripting problem

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

Post

Trying to create random waveform, but Zebra crashes when loading OSC preset. Why?

Code: Select all

#defaults=no 
 #cm=OSC 
 Wave=2 
 <? 

 float Wave[ 128 ]; 

 for ( int table = 1; table <= 16; table++ ) 
 { 
   
    for ( int i = 0; i < 128; i++ ) 
    { 
       Wave[ i ] = rand( -1.0, 1.0 );
    } 

    Selected.WaveTable.set( table, Wave ); 
     
 } 

 ?>

Post

maybe "rand ( -1.0f, 1.0f )" i.e. explicit float values required?

Post

yes, probably... not sure...

Post

Tryed "rand ( -1.0f, 1.0f )" - crashed againg, but when I used variables "float a = -1; float b = 1;" and "rand ( a, b)" it works!
Wow! I have some ideas with noise-like waveforms and spectrums!

BTW, for Spectrablend I need to use " Wave=3"?

Post

Hm, it seems now (using noise-like waveforms and filters) I have pseudo Karplus-Strong algorithm, but more controllable and versatile than using Comb for string.
https://dl.dropboxusercontent.com/u/570 ... strong.mp3

Post Reply

Return to “u-he”