 # beat examples

This page gives example input and output data for the beat program. The output data from these tests can be compared to output on your platform using the same input file in order to determine if there is a problem with the beat program. If the output you generate is not the same as the output listed in the individual tests, then something may be wrong with the compiled program or your computing environment (or a bug added to the program after the example output was generated).

Test Index

 Test 001: Measure the beat position of each point in the score. Test 002: Measure the beat position of each point in the score, using fractions. Test 003: Measure the beat position of each point in the score, using ticks. Test 004: Append output data to input lines. Test 005: Prepend output data to input lines. Test 006: Sum the number of beats in each measure. Test 007: Sum the number of beats in each measure and append analysis to input data. Test 008: Measure the beat position in 6/8 meter, beat on the eighth note. Test 009: Measure the beat position in 6/8 meter, beat on the dotted quarter-note. Test 010: Start counting beats at 0 rather than 1. Test 011: Analyze music in a compound meter, displaying as fractions.
```
```

Test 001: Measure the beat position of each point in the score.

The command:

`     beat input-file > output-file`
using the following input, will generate the following output:

 input-file: **kern *M2/4 *MM120 4c 4d =2 4e 8.f 16g =3 4a 4b =4 2cc == *- output-file: **beat *M2/4 *MM120 1 2 =2 1 2 2.75 =3 1 2 =4 1 == *-
Test 002: Measure the beat position of each point in the score, using fractions.

The command:

`     beat -f input-file > output-file`
using the following input, will generate the following output:

 input-file: **kern *M2/4 *MM120 4c 4d =2 4e 8.f 16g =3 4a 4b =4 2cc == *- output-file: **beat *M2/4 *MM120 1 2 =2 1 2 2+3/4 =3 1 2 =4 1 == *-
Test 003: Measure the beat position of each point in the score, using ticks.

The command:

`     beat -t input-file > output-file`
using the following input, will generate the following output:

 input-file: **kern *M2/4 *MM120 4c 4d =2 4e 8.f 16g =3 4a 4b =4 2cc == *- output-file: **beat *M2/4 *MM120 4 8 =2 4 8 11 =3 4 8 =4 4 == *-
Test 004: Append output data to input lines.

The command:

`     beat -a input-file > output-file`
using the following input, will generate the following output:

 input-file: **kern *M2/4 *MM120 4c 4d =2 4e 8.f 16g =3 4a 4b =4 2cc == *- output-file: **kern **beat *M2/4 *M2/4 *MM120 *MM120 4c 1 4d 2 =2 =2 4e 1 8.f 2 16g 2.75 =3 =3 4a 1 4b 2 =4 =4 2cc 1 == == *- *-
Test 005: Prepend output data to input lines.

The command:

`     beat -p input-file > output-file`
using the following input, will generate the following output:

 input-file: **kern *M2/4 *MM120 4c 4d =2 4e 8.f 16g =3 4a 4b =4 2cc == *- output-file: **beat **kern *M2/4 *M2/4 *MM120 *MM120 1 4c 2 4d =2 =2 1 4e 2 8.f 2.75 16g =3 =3 1 4a 2 4b =4 =4 1 2cc == == *- *-
Test 006: Sum the number of beats in each measure.

The command:

`     beat -s input-file > output-file`
using the following input, will generate the following output:

 input-file: **kern *M2/4 *MM120 4c 4d =2 4e 8.f 16g =3 4a 4b =4 2cc == *- output-file: **beatsum *M2/4 *MM120 2 =2 2 =3 2 =4 2 == *-
Test 007: Sum the number of beats in each measure and append analysis to input data.

The command:

`     beat -sa input-file > output-file`
using the following input, will generate the following output:

 input-file: **kern *M2/4 *MM120 4c 4d =2 4e 8.f 16g =3 4a 4b =4 2cc == *- output-file: **kern **beatsum *M2/4 *M2/4 *MM120 *MM120 4c 2 4d . =2 =2 4e 2 8.f . 16g . =3 =3 4a 2 4b . =4 =4 2cc 2 == == *- *-
Test 008: Measure the beat position in 6/8 meter, beat on the eighth note.

The command:

`     beat -u 8 input-file > output-file`
using the following input, will generate the following output:

 input-file: **kern *M6/8 *MM120 4.c 4d 8e =2 4.f 8g 8a 8b =3 4.cc 4.dd =4 2.ee == *- output-file: **beat *M6/8 *MM120 1 4 6 =2 1 4 5 6 =3 1 4 =4 1 == *-
Test 009: Measure the beat position in 6/8 meter, beat on the dotted quarter-note.

The command:

`     beat -u 4. input-file > output-file`
using the following input, will generate the following output:

 input-file: **kern *M6/8 *MM120 4.c 4d 8e =2 4.f 8g 8a 8b =3 4.cc 4.dd =4 2.ee == *- output-file: **beat *M6/8 *MM120 1 2 2.66667 =2 1 2 2.33333 2.66667 =3 1 2 =4 1 == *-
Test 010: Start counting beats at 0 rather than 1.

The command:

`     beat -z input-file > output-file`
using the following input, will generate the following output:

 input-file: **kern *M2/4 *MM120 4c 4d =2 4e 8.f 16g =3 4a 4b =4 2cc == *- output-file: **beat *M2/4 *MM120 0 1 =2 0 1 1.75 =3 0 1 =4 0 == *-
Test 011: Analyze music in a compound meter, displaying as fractions.

The command:

`     beat -f -u 4. input-file > output-file`
using the following input, will generate the following output:

 input-file: **kern *M6/8 *MM120 4.c 4d 8e =2 4.f 8g 8a 8b =3 4.cc 4.dd =4 2.ee == *- output-file: **beat *M6/8 *MM120 1 2 2+2/3 =2 1 2 2+1/3 2+2/3 =3 1 2 =4 1 == *-
```

```