# How can I make the vertices of a tree graph clickable?

Would it be possible to make the vertices of a tree graph clickable, executing a function when clicked?

Specifically, I am using Mathematica / the Wolfram Language to prototype a modern, microtonal synthesizer I call 'PTOLEMUSE'. Its function is to afford a person the ability to hear the sound of epimoric / superparticular ratios in relation to a tonic frequency in hertz. Here's what I have so far:

limitation = 32 ;
relations = List[];
reciprocals = List[];

EpimoricRatios = # / (# - 1) & [ Range[2, limitation] ] ;
ReciprocalRatios = (# - 1) / # & [ Range[2, limitation] ];

For[child = 1, 2 child < Length[EpimoricRatios], child++,
AppendTo[relations, {EpimoricRatios[[child]] \[UndirectedEdge]
EpimoricRatios[[2 child]],
EpimoricRatios[[child]] \[UndirectedEdge]
EpimoricRatios[[2 child + 1]]}]];

For[child = 1, 2 child < Length[ReciprocalRatios], child++,
AppendTo[reciprocals, {ReciprocalRatios[[child]] \[UndirectedEdge]
ReciprocalRatios[[2 child]],
ReciprocalRatios[[child]] \[UndirectedEdge]
ReciprocalRatios[[2 child + 1]]}]];

GraphTree[TreeGraph[Flatten[relations], VertexLabels -> "Name"]]
GraphTree[TreeGraph[Flatten[reciprocals], VertexLabels -> "Name"],
TreeLayout -> Bottom]


This produces the following tree graphs:

• You can apply Button to the nodes. You can do this either when constructing the nodes/edges, or you can use TreeMap on the GraphTrees that you create later. Commented Jul 8, 2022 at 20:43

upperGraph =