source: orbit/octave/GenerateAudioCommand/generate_throttle_spectrum.py @ 8f2c1b2

RawEEGRaw_EEG_PlotServoTab_Interfacepyramid
Last change on this file since 8f2c1b2 was 8f2c1b2, checked in by Steve Castellotti <sc@…>, 7 years ago

generate_throttle_spectrum.py:

  • initial checkin
  • Property mode set to 100644
File size: 660 bytes
Line 
1#!/bin/env python
2
3import os
4
5command_template = '''flyOrbit(throttleYawPitch(__THROTTLE__,78,31,'A'),84354,'throttle___THROTTLE___android_common.wav',44100,300,'Android','flip');
6'''
7
8command_filename = 'generate_throttle.m'
9
10throttle_minimum = 30
11throttle_maximum = 128
12
13for x in range( (throttle_maximum + 1) - throttle_minimum ):
14
15        throttle = x + throttle_minimum
16
17        print throttle
18
19        current_command = command_template[:]
20        current_command = current_command.replace('__THROTTLE__', '%i' % throttle)
21
22        file = open(command_filename, 'w')
23
24        print current_command
25
26        file.write(current_command)
27
28        file.close()
29
30        os.system('octave --silent %s' % command_filename)
Note: See TracBrowser for help on using the repository browser.