source: orbit/octave/GenerateAudioCommand/bitGenHDMI.m @ 0edc9d8

RawEEGRaw_EEG_PlotServoTab_Interfacepyramid
Last change on this file since 0edc9d8 was 0edc9d8, checked in by AzureViolin <zhanghaotz@…>, 7 years ago

generated working iPad init Code

  • Property mode set to 100644
File size: 495 bytes
Line 
1function wave = bitGenHDMI(bit,num,sps)
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
17        wave = [halfSineGen('u',longHIGH,0,1,sps);zeros(floor(longLOW*sps/1e6),1)];
18elseif bit==0
19        wave = [halfSineGen('u',shortHIGH,0,1,sps);zeros(floor(shortLOW*sps/1e6),1)];
20endif
Note: See TracBrowser for help on using the repository browser.