if (i==1){ // start a new sound // critical section? note_time = 0 ; current_amplitude = 0 ; FM_current_amplitude = 0 ; FM_DDS_increment = 3*Fout*two32/Fs ; FM_max_amplitude=10000 ; FM_attack_time=100; FM_decay_time=30000; FM_sustain_time=100; PT_YIELD_TIME_msec(1000); } if (i==2){ // start a new sound // critical section? note_time = 0 ; current_amplitude = 0 ; FM_current_amplitude = 0 ; FM_DDS_increment = 1.8*Fout*two32/Fs ; FM_max_amplitude=12000; //6000 FM_attack_time=100; FM_decay_time=20000; FM_sustain_time=1000; PT_YIELD_TIME_msec(1000); } if (i==3){ // start a new sound // critical section? note_time = 0 ; current_amplitude = 0 ; FM_current_amplitude = 0 ; FM_DDS_increment = 0.1*Fout*two32/Fs ; FM_max_amplitude=6000; FM_attack_time=100; FM_decay_time=35000; FM_sustain_time=1000; PT_YIELD_TIME_msec(1000); } if (i==4){ // start a new sound // critical section? note_time = 0 ; current_amplitude = 0 ; FM_current_amplitude = 0 ; FM_DDS_increment = 5*Fout*two32/Fs ; FM_max_amplitude=10000; FM_attack_time=100; FM_decay_time=20000; //10000 FM_sustain_time=1000; PT_YIELD_TIME_msec(1000); } if (i==5){ // start a new sound // critical section? note_time = 0 ; current_amplitude = 0 ; FM_current_amplitude = 0 ; FM_DDS_increment = 1.05*Fout*two32/Fs ; FM_max_amplitude=20000; FM_attack_time=100; FM_decay_time=20000; FM_sustain_time=1000; PT_YIELD_TIME_msec(1000); } if (i==6){ // start a new sound // critical section? note_time = 0 ; current_amplitude = 0 ; FM_current_amplitude = 0 ; FM_DDS_increment = 2*Fout*two32/Fs ; FM_max_amplitude=50000; FM_attack_time=100; FM_decay_time=1000; FM_sustain_time=500; PT_YIELD_TIME_msec(1000); }