Humdrum Extras

prange examples


This page gives example input and output data for the prange 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 prange 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:Count the pitches in a rising major scale.
    Test 002:Count the pitches in a rising major scale with different rhythms
    Test 003:Count pitches with duration weighting
    Test 004:Find average pitch not considering duration.
    Test 005:Find average pitch considering duration.
    Test 006:Count pitches in music adding histogram fraction ranges.
    Test 007:Count pitches in a range of music
    Test 008:Count pitches in a range of music


Test 001: Count the pitches in a rising major scale.

The command:

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

input-file:
output-file:
Test 002: Count the pitches in a rising major scale with different rhythms

The command:

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

input-file:
output-file:
Test 003: Count pitches with duration weighting

The command:

     prange -d input-file > output-file
using the following input, will generate the following output:

input-file:
output-file:
Test 004: Find average pitch not considering duration.

The command:

     prange -p 50 input-file > output-file
using the following input, will generate the following output:

input-file:
output-file:
Test 005: Find average pitch considering duration.

The command:

     prange -d -p 50 input-file > output-file
using the following input, will generate the following output:

input-file:
output-file:
Test 006: Count pitches in music adding histogram fraction ranges.

The command:

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

input-file:
output-file:
Test 007: Count pitches in a range of music

The command:

     prange -c 62-67 input-file > output-file
using the following input, will generate the following output:

input-file:
output-file:
Test 008: Count pitches in a range of music

The command:

     prange -c d:g input-file > output-file
using the following input, will generate the following output:

input-file:
output-file: