(deleted)
I don't know anything about MIDI but I suspect you would be more likely to attract someone who does if you edit your Original Post and change the title to "Help with modifying a MIDI sketch"
...R
Perhaps you can find instructions at GitHub - tttapa/MIDI_controller: This is a library for creating a MIDI controller using an Arduino or Teensy board.
There is a DigitalCC class that works in the same way as the Digital class: MIDI_controller/DigitalCC.h at master · tttapa/MIDI_controller · GitHub
To use multiple pins, just create an array of Digital object, as shown in this example.
If you want more features, or newer documentation, check put the successor of the MIDI Controller library, the Control Surface library.
Start here. Find documentation of all MIDI outputs here.
Pieter