//1950

BPM tempo;
Section s;



// initialize variables
0 => int b;


// sound chain
SndBuf TechHit1950 => NRev r1 => dac;
SndBuf VocalHit1950 => dac;
SndBuf EngineHit1950 => NRev r3 => dac;
SndBuf EngineLoop1950 => NRev r4 => dac;

// me.dir()
me.dir() + "/Sounds/1950TechHit.wav" => TechHit1950.read;
me.dir() + "/Sounds/1950VocalHit.wav" => VocalHit1950.read;
me.dir() + "/Sounds/1950EngineHit.wav" => EngineHit1950.read;
me.dir() + "/Sounds/1950EngineLoop.wav" => EngineLoop1950.read;

// turn off all percussion
TechHit1950.samples() => TechHit1950.pos;
VocalHit1950.samples() => VocalHit1950.pos;
EngineHit1950.samples() => EngineHit1950.pos;
EngineLoop1950.samples() => EngineLoop1950.pos;

// set relative levels
0.5 => EngineHit1950.gain;
0.5 => TechHit1950.gain;
1.0 => VocalHit1950.gain;
0.5 => EngineLoop1950.gain;


while ( true )
{
    
    tempo.sixteenthNote => dur hit;
    
    b % 32 => int count16;
    count16/2.0 => float count8;
    count8/2.0 => float count4;
    
    
    if (s.s1950 == 1)
    {
        1 => EngineHit1950.rate;
        1 => TechHit1950.rate;
        1 => VocalHit1950.rate;
        1 => EngineLoop1950.rate;
        
        if ((count4 == 1.0) || (count4 == 2.0) || (count4 == 3.0) || (count4 == 4.0) || (count4 == 5.0) || (count4 == 6.0) || (count4 == 7.0) || (count4 == 0.0))
        {
            0 => EngineLoop1950.pos;
        }
        if ((count4 == 0.0) || (count4 == 4.0))
        {
            0 => TechHit1950.pos;
        }
        if ((count4 == 0.0) || (count4 == 2.0) || (count4 == 4.0) || (count4 == 6.0))
        {
            0 => EngineHit1950.pos;
        }        
        if (count4 == 0.0)
        {
            0 => VocalHit1950.pos;
        }
        
    }    
    
    if (s.s1950 == 2)
    {
        
        1 => EngineHit1950.rate;
        1 => TechHit1950.rate;
        1 => VocalHit1950.rate;
        1 => EngineLoop1950.rate;
        
        if ((count4 == 0.0) || (count4 == 4.0))
        {
            0 => EngineLoop1950.pos;
        }
        if ((count8 == 0.0) || (count8 == 1.0))
        {
            0 => TechHit1950.pos;
        }
        if ((count4 == 1.0) || (count4 == 3.0) || (count4 == 5.0) || (count4 == 7.0))
        {
            0 => EngineHit1950.pos;
        }        
        if (count8 == 12.0)
        {
            0 => VocalHit1950.pos;
        }
        
    }
    
    if (s.s1950 == 3)
    {
        
        1 => EngineHit1950.rate;
        1 => TechHit1950.rate;
        1 => VocalHit1950.rate;
        1 => EngineLoop1950.rate;
        
        if ((count4 == 0.0))
        {
            0 => EngineLoop1950.pos;
        }
        if ((count8 == 5.0) || (count8 == 6.0) || (count8 == 7.0) || (count8 == 8.0))
        {
            0 => TechHit1950.pos;
        }
        if ((count8 == 10.0) || (count8 == 11.0))
        {
            0 => EngineHit1950.pos;
        }        
        if (count8 == 9.0)
        {
            0 => VocalHit1950.pos;
        }
        
    } 
    
    if (s.s1950 == 4)
    {
        
        1 => EngineHit1950.rate;
        1 => TechHit1950.rate;
        1 => VocalHit1950.rate;
        1 => EngineLoop1950.rate;
        
        if ((count4 == 4.0))
        {
            0 => EngineLoop1950.pos;
        }
        if ((count8 == 5.0) || (count8 == 6.0) || (count8 == 7.0) || (count8 == 8.0))
        {
            0 => TechHit1950.pos;
        }
        if ((count4 == 2.0) || (count4 == 4.0))
        {
            0 => EngineHit1950.pos;
        }        
        if (count8 == 0.0)
        {
            0 => VocalHit1950.pos;
        }
        
    } 
    
    if (s.s1950 == 5)
    {
        1 => EngineHit1950.rate;
        0.1 => TechHit1950.rate;
        1 => VocalHit1950.rate;
        1 => EngineLoop1950.rate;
        
        if ((count4 == 2.0))
        {
            0 => EngineLoop1950.pos;
        }
        
        1 => TechHit1950.pos;
        
        if ((count4 == 0.0) || (count4 == 5.0))
        {
            0 => EngineHit1950.pos;
        }        
        if (count4 == 7.0)
        {
            0 => VocalHit1950.pos;
        }
        
    } 
    
    if (s.s1950 == 6)
    {
        
        1 => EngineLoop1950.loop;
        1 => EngineHit1950.rate;
        0.1 => TechHit1950.rate;
        0.3 => VocalHit1950.rate;
        1 => EngineLoop1950.rate;
        
        if ((count8 == 0.0))        
        {
            0 => TechHit1950.pos;
        }
        if ((count4 == 2.0) || (count4 == 4.0))
        {
            0 => EngineHit1950.pos;
        }        
        if (count8 == 0.0)
        {
            0 => VocalHit1950.pos;
        }
        
    } 
    
    if (s.s1950 == 7)
    {
        
        1 => EngineLoop1950.loop;
        0.7 => EngineHit1950.rate;
        0.4 => TechHit1950.rate;
        0.2 => VocalHit1950.rate;
        0.8 => EngineLoop1950.rate;
        
        if ((count8 == 0.0))        
        {
            0 => TechHit1950.pos;
        }
        if ((count4 == 5.0) || (count4 == 6.0))
        {
            0 => EngineHit1950.pos;
        }        
        if ((count4 == 1.0) || (count4 == 3.0) || (count4 == 4.0))
        {
            0 => VocalHit1950.pos;
        }
        
    } 
    
    if (s.s1950 == 8)
    {
        
        1 => EngineLoop1950.loop;
        3 => EngineHit1950.rate;
        2 => TechHit1950.rate;
        .3 => VocalHit1950.rate;
        3 => EngineLoop1950.rate;
        
        if ((count8 == 0.0))        
        {
            0 => TechHit1950.pos;
        }
        if (count16 % 1 == 0)
        {
            0 => EngineHit1950.pos;
        }        
        if (count4 % 1 == 0)
        {
            0 => VocalHit1950.pos;
        }
        
    } 
    
    if (s.s1950 == 9)
    {
        
        1 => EngineLoop1950.loop;
        .4 => EngineHit1950.rate;
        .1 => TechHit1950.rate;
        .1 => VocalHit1950.rate;
        .1 => EngineLoop1950.rate;
        
        if ((count8 == 0.0) || (count8 == 8.0))        
        {
            0 => TechHit1950.pos;
        }
        if (count8 % 1 == 0)
        {
            0 => EngineHit1950.pos;
        }        
        if (count8 % 1 == 0.5)
        {
            0 => VocalHit1950.pos;
        }
        
    } 
    
    if (s.s1950 == 0)
    {
        
        0 => EngineLoop1950.loop;
        
    } 
    
    hit => now;    
    
    b+1 => b;
}