source: orbit/octave/GenerateAudioCommand/ @ 71aa88f

Last change on this file since 71aa88f was 6aa182f, checked in by AzureViolin <zhanghaotz@…>, 10 years ago

add octave script

  • Property mode set to 100644
File size: 953 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] (replace with your code)
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.