Ignore:
Timestamp:
11/29/12 15:14:27 (7 years ago)
Author:
AzureViolin <zhanghaotz@…>
Branches:
master, RawEEG, Raw_EEG_Plot, Servo, Tab_Interface, pyramid
Children:
a2d894c
Parents:
2cd475f
Message:

flyOrbit Works should for EVERY Android (not tested)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • octave/GenerateAudioCommand/initCodeGenAndroid.m

    ra0b523e rf22b7ab  
    1 function initWave=initCodeGenAndroid(audioFileName);  
     1function initWave=initCodeGenAndroid(audioFileName,sps);  
    22 
    33% code: array of 1s and 0s. 1 means bit "1", 0 means bit "0". 
     
    55% Multiplyer: value around 1, to change "carrier" period. 
    66bps = 16;       % bits per sample 
    7 sps = 48000;     % sample rate [samples/s] 
    87 
    9 longHIGH=45+3; 
    10 longLOW=89+7; 
    11 mediumLOW=21+2; 
    12 shortHIGH=5; 
    13 shortLOW=8; 
    14 pause=480; 
    15 space=4049; 
     8_longHIGH=1000; %[us] 
     9_longLOW=2000;  
     10_mediumLOW=500; 
     11_shortHIGH=100; 
     12_shortLOW=180; 
     13_pause=10000; 
     14_space=84354; 
     15 
     16longHIGH=floor(_longHIGH*sps/1e6)-1; 
     17longLOW=floor(_longLOW*sps/1e6)+1; 
     18mediumLOW=floor(_mediumLOW*sps/1e6)-1; 
     19shortHIGH=floor(_shortHIGH*sps/1e6)+1; 
     20shortLOW=floor(_shortLOW*sps/1e6); 
     21pause=floor(_pause*sps/1e6); 
     22space=floor(_space*sps/1e6); 
    1623 
    1724initWave=[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)]; 
Note: See TracChangeset for help on using the changeset viewer.