Interacting Sonic Pi code with the integrated hydra code being developed allows some interesting things.
I wanted to see if it was possible to get hydra to display playing notes visually, using a dot to represent the note and positioning it vertically to reflect the pitch of the note and horizontally it position on the timeline. This means that you need to be continually updating the sketch and adding extra code to it as each note is played. I ran into a problem in that there is currently a limit to the length of the string that the system can parse. I wanted to display two parts together and so elected to use separate sketches for each part and use two of the four output panes in hydra one for each. The picture below shows these two panes representing frere jaques which is playing as a two part round, notes being added as they are played.
I’ve now modified the sketch to use all four panes and played the round twice. I’ve redone the vidoe and put it on youtube where it is easier to see.
The code is available too for anyone else who has built the hydra dev version.