Humdrum Extras

serialize examples


This page gives example input and output data for the serialize 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 serialize 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:Serialize all spines in file.
    Test 002:Serialize only **a spines in file.
    Test 003:Serialize all spines in file, alternate parameter style.
    Test 004:Serialize all spines in file, including spine manipuations.
    Test 005:Comments before/after spines occur only once in output.
    Test 006:Comments within spines are repeated in each extracted spine.
    Test 007:Merge all serialized spines into single data stream.
    Test 008:Serialize chord notes.
    Test 009:Serialize multiple-stop tokens, using non-default separator.
    Test 010:Serialize subspines.
    Test 011:Add an end-of-spine marker.
    Test 012:Extract sub-spines after primary spine.
    Test 013:Extract only the first sub-token in each token.
    Test 014:Extract only the last sub-token in each token.
    Test 015:Extract the second sub-token in each token.
    Test 016:Extract the second-to-last sub-token in each token.


Test 001: Serialize all spines in file.

The command:

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

input-file:
output-file:
Test 002: Serialize only **a spines in file.

The command:

     serialize -i '**a' input-file > output-file
using the following input, will generate the following output:

input-file:
output-file:
Test 003: Serialize all spines in file, alternate parameter style.

The command:

     serialize -i a input-file > output-file
using the following input, will generate the following output:

input-file:
output-file:
Test 004: Serialize all spines in file, including spine manipuations.

The command:

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

input-file:
output-file:
Test 005: Comments before/after spines occur only once in output.

The command:

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

input-file:
output-file:
Test 006: Comments within spines are repeated in each extracted spine.

The command:

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

input-file:
output-file:
Test 007: Merge all serialized spines into single data stream.

The command:

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

input-file:
output-file:
Test 008: Serialize chord notes.

The command:

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

input-file:
output-file:
Test 009: Serialize multiple-stop tokens, using non-default separator.

The command:

     serialize -c -s ':' input-file > output-file
using the following input, will generate the following output:

input-file:
output-file:
Test 010: Serialize subspines.

The command:

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

input-file:
output-file:
Test 011: Add an end-of-spine marker.

The command:

     serialize -m -t X input-file > output-file
using the following input, will generate the following output:

input-file:
output-file:
Test 012: Extract sub-spines after primary spine.

The command:

     serialize -m -p -t X input-file | ridx -i > output-file
using the following input, will generate the following output:

input-file:
output-file:
Test 013: Extract only the first sub-token in each token.

The command:

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

input-file:
output-file:
Test 014: Extract only the last sub-token in each token.

The command:

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

input-file:
output-file:
Test 015: Extract the second sub-token in each token.

The command:

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

input-file:
output-file:
Test 016: Extract the second-to-last sub-token in each token.

The command:

     serialize -n -2 input-file > output-file
using the following input, will generate the following output:

input-file:
output-file: