Ignore:
Timestamp:
12/04/12 19:47:09 (10 years ago)
Author:
dorabot <dorabot@…>
Branches:
master, RawEEG, Raw_EEG_Plot, Servo, Tab_Interface, pyramid
Children:
f323fb4
Parents:
dccf843
Message:

add comment to script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • octave/GenerateAudioCommand/initCodeGenAndroid.m

    rf22b7ab rcb3655b  
    66bps = 16;       % bits per sample 
    77 
     8 
     9%all numbers start with '_' is measured in uS with audacity. 
    810_longHIGH=1000; %[us] 
    911_longLOW=2000;  
     
    1416_space=84354; 
    1517 
     18%turn everything into samples based on sps. Modifyer is optimized when sps=44100Hz 
    1619longHIGH=floor(_longHIGH*sps/1e6)-1; 
    1720longLOW=floor(_longLOW*sps/1e6)+1; 
     
    2225space=floor(_space*sps/1e6); 
    2326 
     27%initWave stores the init code we will finnaly generate 
     28%function halfSineGenDirect can generate the upper or lower half of a sine wave based on how many samples are included in a "half-period" sine wave. 
    2429initWave=[halfSineGenDirect('u',longHIGH,0,1,sps);zeros(longLOW,1);halfSineGenDirect('u',longHIGH,0,1,sps);zeros(longLOW,1);halfSineGenDirect('u',longHIGH,0,1,sps);halfSineGenDirect('d',mediumLOW,0,1,sps);halfSineGenDirect('u',shortHIGH,0,1,sps)]; 
    2530 
    26 initWave2=[initWave;halfSineGenDirect('d',shortLOW,0,1,sps)]; 
    27 initWave=[initWave;halfSineGenDirect('d',mediumLOW,0,1,sps)]; 
     31initWave2=[initWave;halfSineGenDirect('d',shortLOW,0,1,sps)];%inits 4,5,6 
     32initWave=[initWave;halfSineGenDirect('d',mediumLOW,0,1,sps)];%inits 1,2,3 
    2833 
    2934 
Note: See TracChangeset for help on using the changeset viewer.