source: orbit/octave/GenerateAudioCommand/bitGenHDMI.m @ f22b7ab

RawEEGRaw_EEG_PlotServoTab_Interfacepyramid
Last change on this file since f22b7ab was 3322dad, checked in by AzureViolin <zhanghaotz@…>, 8 years ago

iOS working code. Run flyOrbit.m

  • Property mode set to 100644
File size: 529 bytes
RevLine 
[3322dad]1function wave = bitGenHDMI(bit,num,sps,longHIGH_s,longLOW_s,shortHIGH_s,shortLOW_s)
[0edc9d8]2
3% bit: 1 means bit "1", 0 means bit "0".
4% num: how many certain bit to generate.
5% audioFileName: like 'audio.wav'.
6
7longHIGH=875;
8longLOW=729;
9shortHIGH=458;
10shortLOW=333;
11
12bps = 16;       % bits per sample
13%sps = 960000;     % sample rate [samples/s]
14
15wave = [];
16if bit==1
[3322dad]17        wave = [halfSineGenDirect('u',longHIGH_s,0,1,sps);zeros(longLOW_s,1)];
[0edc9d8]18elseif bit==0
[3322dad]19        wave = [halfSineGenDirect('u',shortHIGH_s,0,1,sps);zeros(shortLOW_s,1)];
[0edc9d8]20endif
Note: See TracBrowser for help on using the repository browser.