Routing MIDI CC to map DAW parameters

I’m trying to create a plugin that can output MIDI cc to the DAW, such that the DAW can learn a parameter, such as through controller assignment in Logic Pro. Here is the code I have so far, within the ProcessBlock function:

        if (elapsed_since_midi == samples_per_midi_message) {
            elapsed_since_midi = 0;
            int value = signalProcessor.getEnvelopePosition();
            sendCCMessage(midiMessages, value, index);

and then the following code for the sendCCMessage method:

void EnvelopeFollowerAudioProcessor::sendCCMessage(
    juce::MidiBuffer& midiMessages, int value, int sample_number)
    juce::MidiMessage message;
    std::cout<<"sending midi message "<<value<<"\n";
    message = juce::MidiMessage::controllerEvent(1, 1, value);
    midiMessages.addEvent(message, sample_number);

In the Projucer, I have “Plugin MIDI output” checked in Plugin Characteristics.

The print statements confirm that the function is actually called, with the expected values. However, the MIDI cc data does not show up in Logic’s controller assignment window, the way, say, the motion of a keyboard mod wheel does.

What do I need to change about how the MIDI cc is being sent for it to be able to be mapped in the DAW?

Beware that in Juce DAW parameters currently only are handled with a per-block timing, while Midi CC is handled in a sample accurate way.