Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

only hairless midi in to see Arduino led changing according software output information master out level #55

Open
fredOnGitHub opened this issue Mar 21, 2019 · 0 comments

Comments

@fredOnGitHub
Copy link

fredOnGitHub commented Mar 21, 2019

Hello,

version : http://projectgus.github.io/hairless-midiserial
With only « Midi in » that’s the good result : when Traktor is stopping playing the led turn off.
1

But when I put  « Midi in » and « Midi OUT » the led is frozen and when Traktor is stopping playing the led doesn’t change his state.
2

Traktor setting for "Master Out Level"
3

Thank you for your help

/**************************** Here the pgm **************************/

#include <MIDI.h> // Add Midi Library

#define LEDPWM6 10

//Create an instance of the library with default name, serial port and settings
MIDI_CREATE_DEFAULT_INSTANCE();

void setup() {
     MIDI.begin(MIDI_CHANNEL_OMNI); // Initialize the Midi Library.
    // OMNI sets it to listen to all channels.. MIDI.begin(2) would set it
    // to respond to notes on channel 2 only.
    MIDI.setHandleControlChange(f); // This command tells the MIDI Library
    // the function you want to call when a Continuous Controller command
    // is received. In this case it's "f".

    //analogWrite(LEDPWM6, 255);

    Serial.begin(115200);
}

void loop() { // Main loop
    MIDI.read(); // Continuously check if Midi data has been received.
}

void f(byte channel, byte number, byte value) {
    if(channel == 2)
    {
        if(number == 3)
        {
            analogWrite(LEDPWM6, value*36);//252 max (7*36)
        }
    }
}

/**************************** end of the pgm **************************/
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant