#include "MusimatChapter9.h"Go to the source code of this file.
Functions | |
| MusimatChapter9Section (C091204d) | |
| Integer | randTendency (IntegerList L1, Integer Reference pos1, IntegerList L2, Integer Reference pos2, Integer inc) | 
| Static Void | para1 () | 
| MusimatChapter9Section | ( | C091204d | ) | 
Definition at line 2 of file C091204d.cpp.
References para1().
                                 {
        Print("*** Random Tendency Mask ***");
        /*****************************************************************************
         
         Random Tendency Mask
         
         We can use a row to specify an upper boundary and another row to 
         specify a lower boundary, and then pick a pitch in this range. We can pick any pitch in the range, either 
         the median pitch or a random pitch or even all pitches, depending upon what we want to use it for. This 
         example returns a random value lying between two rows that act as fences to limit the random range.
         *****************************************************************************/
        para1(); // Step into this function to continue.
}
| Static Void para1 | ( | ) | 
Definition at line 27 of file C091204d.cpp.
References randTendency().
                    {
        /*****************************************************************************
         For example, if L1 and L2 are as shown in the following table, the values in the middle row are 
         random values chosen from between.  
         *****************************************************************************/
        
        Print("*** Random Tendency Mask ***");
        IntegerList L1( 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 );
        Print("First list:", L1);
        Integer pos1 = 0;
        IntegerList L2( 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 );
        IntegerList R;
        Integer pos2 = 0;
        Integer inc = 1;
        For( Integer i = 0; i < Length( L1 ); i = i + 1 ) {
                R[ i ] = randTendency( L1, pos1, L2, pos2, inc );
        }
        Print("Result:", R);
        Print("Second list:", L2);
        
}
| Integer randTendency | ( | IntegerList | L1, | 
| Integer Reference | pos1, | ||
| IntegerList | L2, | ||
| Integer Reference | pos2, | ||
| Integer | inc | ||
| ) | 
Definition at line 16 of file C091204d.cpp.
References cycle().
 1.7.2