I used:

#include <MIDI.h>

void setup() {
MIDI.begin(); // Launch MIDI with default options

void loop() {
MIDI.sendNoteOn(42,127,1); // Send a Note (pitch 42, velo 127 on channel 1)
delay(600); // Wait for a second
MIDI.sendNoteOff(42,0,1); // Stop the note
delay(600); // Wait for a second

I use the MidiWatcher ap from software CSharpMidiToolkitV5_demo
The a Midi Controller Behringer BCR2000 sends messages that are reported in MidiWatcher.

Windows detects the Teensy as a MIDI device.
The software MidiWatcher software recognizes that a MIDI device is present,
but does not report receiving the notes sent by Teensy.

I note that Channel 1 is declared and Setup() has no parameters for default.
Do these need to change and to what?

Any ideas?