Interval Count Report
The interval count report demonstrates looping through the list of music_data records in a score, while saving state to make comparisons between notes.
Only the first note of each chord, as it appears in the MusicXML file, is compared. The report procedure counts the number of each interval in a piece, where positive numbers are upward intervals, and negative numbers are downward intervals. The report visualization displays each interval and its count, from the highest count to the lowest.
Reports output
Beethoven Symphony No. 4, 1st movement:
interval count beethoven
J. S. Bach Brandenburg Concerto No. 6:
interval count bach
Report visualization
I've chosen a pie chart visualization for the interval count display.
To set up the report:
To set up the data source:
The visualization report is web-based and will have a prompt to enter the score ID.
To add the score ID prompt:
To set up the report query:
I've cast the pitch_interval column to a char type because BIRT has difficulty with negative numbers as a category name. The sort order of the interval names in the report is in interval count order.
The query string contains a ? which is a query parameter.
To create the layout:
To run the report:
You can further refine the chart by right clicking the chart in the report area, and setting various formatting options.