source: orbit/octave/GenerateAudioCommand/ @ 3322dad

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

generated working iPad init Code

  • Property mode set to 100644
File size: 929 bytes
1This script suppose to generate Audio wave to talk to UPRtek's IR dongle and produce IR signal to control helicopter.
2this is an unfinished script, without complete documentation.
3Released under GPLv2.
51 open terminal;
62 switch to this path;
73 run octave;
84 type these commands:
9        code=[1  0      1       1       0       1       1       1       0       1       0       0       1       1       0       0       1       0       0       1       1       1       1       1       0       1       1       0       1];
10        finalCodeAudioGen(code,'audioCommand.wav',44100,10);
115 first parameter is the code you want to produce as an audio file.
12  second parameter is the output file name.
13  3rd parameter is the sample rate (sample per second)
14  4th parameter is how many times you want to repeat the code. Since this script is not optimised at all, set this parameter higher than 20 is not recomanded, unless you have a lot time to wait or your computer is super super fast. Otherwise you need to copy and paste the sound wave in Audacity several times to get a long enough audio file.
Note: See TracBrowser for help on using the repository browser.