Points 1.0 by Grekim Jennings Points is a simple command terminal utility to translate measures and beats into samples and milliseconds. Importantly, it can read a text file that contains a list of changing meters and tempos (a tempo map file). The tempo map file is of the same format as my metronome program and is described below. By default, data is mapped for each beat for a chosen a range of measures. But, the beats can be divided into any desired amount such as four for sixteenth notes or three for eight note triplets. In other words, the program can tell you down to the sample and millisecond when the 2nd sixteenth note of beat 3 of measure 102 begins even if a variety of meter and tempo changes have occurred before that measure. See the example data output at the end. Installation ------------ The program can be run from a working directory or with permission, placed in a standard folder such as /usr/bin. Tempo Map Files --------------- A tempo map file is optional, but it can be used to recall settings. The tempo map file can be loaded after the program has launched or as the first command line argument. The file must be a plain text file. All data in the tempo map file must be tab separated. A line begins with a command word. To set the sample rate begin a line with 'rate' and then enter value. For example, rate 44100 To set the number of divisions per beat use the command 'div'. For example, div 4 This will set the precision to 16th notes. By default div is set to 1. Whenever there is a tempo change or meter change in a song you will need to specify how many measures the new meter or tempo will last for. To create a new section, begin a line with the command 'tmap'. This is followed by a value for the tempo, beats per measure, and finally the number measures it will last for. For example, a section at 122.6 beats per minute in 3/4 time that lasts for 16 bars is entered as follows: tmap 122.6 3 16 Up to 512 sections (tempo and meter changes) can be specified. Stop and start measures to can be specified by beginning a line with 'start' or 'stop' followed by the value. Command Line Arguments ---------------------- When there is only one command line argument, it must be the name of the tempo map file. The program will then load this data automatically and allow you to view the "translation" in the terminal or print it out. If a second argument is provided, the name of an output file, then the program will read the tempo map file and automatically generate the output file containing all the data points. In this case, the program will not run interactively. If the output file already exists, data will be appended to it. Otherwise, a new file will be created. The third command line argument is the sample rate. But, this can also be specified in the tempo map file itself as described above. When the sample rate is used as a command line argument, it will override the sample rate in tempo map file. The fourth and fifth arguments are the start and stop measures. The sixth argument is the number of divisions. Command line values take priority over values given in the tempo map file. Interactive Commands -------------------- When the program is run interactively the following is an example of what you will see: Input Settings: 'r' to change sample rate (44100) 't' to change tempo (120) 'b' to change beats per measure (4) 'm' to read tempo map Output Settings: 'i' to change start measure (1) 'o' to change stop measure (16) 'd' to change divisions per beat (1) 'p' to print to screen 'w' to write points to beginning of file 'a' to append points to existing file 'f' to change output filename: data1.txt 'l' to toggle this list on/off 'h' help 'q' to quit Data Output ----------- The output is limited to about 525 measures of 4/4 time at the 1 division per beat (quarter note) setting. But, any range of about 525 measures can be displayed by using different start and stop measures. Using the 2 divisions per beat (8th notes) cuts the number of measures viewable at once by about 1/2. The following is an example of what the program will output. The is the 1 division (default) setting: Sample Rate 48000 Section 1 Tempo 120.000 Beats/Meas 4 Measures 2 M 1 B 1 0.000 sec 0 smp B 2 0.500 sec 24000 smp B 3 1.000 sec 48000 smp B 4 1.500 sec 72000 smp M 2 B 1 2.000 sec 96000 smp B 2 2.500 sec 120000 smp B 3 3.000 sec 144000 smp B 4 3.500 sec 168000 smp Section 2 Tempo 133.000 Beats/Meas 3 Measures 2 M 3 B 1 4.000 sec 192000 smp B 2 4.451 sec 213654 smp B 3 4.902 sec 235308 smp M 4 B 1 5.353 sec 256962 smp B 2 5.805 sec 278616 smp B 3 6.256 sec 300270 smp