In this tutorial, you will

  1. Select a part from the full score
  2. Learn about the Plot Panel
  3. Plot a pitch histogram

For this tutorial, we will turn to a more realistic question: how often does the bass sing a B natural in Bach's chorale "O Lamm Gottes unschuldig"? Let's break down the problem: we need to select the chorale as an input, isolate the bass voice and then count the occurrences of B naturals.

To get started, as always, we first create a new file. Then we select "Browse" in the source_score node, switch to the "Library" tab and find the chorale "O Lamm Gottes unschuldig" using the search.

On to the task of isolating the bass voice. vimu comes with various tools to select specific parts of the score. You can isolate different measures, parts (voices/instruments), or even single notes. In our case, we want to select a part. Choose "Select"->"Parts" from the Node Palette. And plug the newly created select_parts node between the source_score node and the output node.

You can now use the input field of the select_part node to select the part you want. You can either write the number of the part (counted from the top). So in our case "4", to get the bass part. Or you can simply write the instrument name ("Bass"). Press Enter to confirm your input. In any case, you should now notice that the Output Panel is showing only the bass part of the chorale

For our small toy example, you could now of course start to count the number of B naturals by hand. However, if you suddenly became interested in A# instead, you would have to start all over. What we would like is a pitch histogram, which conveniently displays all pitches and their frequency.

Luckily, vimu has various powerful plotting nodes. Select "Plot"->"Histogram" from the Node Palette. You can connect this plot node to any other node output to generate a plot. To continue, connect the plot_histogram node to the select_part node. You could of course also connect it to the source_score node. But then we would plot the histogram for all voices instead of just the bass part.

You may have noticed the small popup at the bottom left of your screen asking if you would like to open the Plot Panel. In short, the Plot Panel is an additional type of output panel. It displays all plots that are generated by your node graph. If it is currently not open in your editor, now would be a good time to toggle it on. You can either click "Yes" on the popup notification or go to "Menu"->"View"->"Plots" in the Node Palette and toggle it on.

As we have already connected our plot_histogram node, you will notice that there is a plot already being displayed in the Plot Panel. In our case, the default settings of the node are exactly what we want. We can now see each pitch on the x-axis and how often it occurs on the y-axis. Of course, you can aggregate all kinds of score metrics. If you want to play around with it a bit, you can change the aggregation with the dropdown menu of the plot_score node.

Finally, to answer our question we can see that the bass sings two B naturals in the chorale "O Lamm Gottes unschuldig".