vMix Forums
»
General
»
3rd Party Software and Development
»
Activators with Arduino Midi (Technical Documentation of Activators)
Rank: Newbie
Groups: Registered
Joined: 8/28/2016(UTC) Posts: 3 Location: Germany
|
Dear guys,
I started to build my own MIDI-Controller based on arduino. I got the MIDI-Controller working exept the Buttons LEDs. I have planned to do it with Activators, but I don't know what Activators sent to the MIDI-Controller when a Activator ist activated. I only need to know what Midi-Message is sent when a Button-LED ist turned on when an Input is in Output, Preview or an Overlay (including when a DSK ist active), so that I can decode it in my code to turn the right LED on.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/20/2016(UTC) Posts: 182 Location: Milano Was thanked: 21 time(s) in 13 post(s)
|
I built a controller based on Arduino too. I used two arduino's mega: one for shortcuts and the second one for activators. I used the Vmix interface to send activators messages and to receive shortcuts messages. Maybe I didn't understand your problem.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 8/28/2016(UTC) Posts: 3 Location: Germany
|
My Problem is that I dont know how Activators works technically. My Initial thought was that IT sends a MIDI-Message which I can usw in My Code.
What is vMix Interface?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/20/2016(UTC) Posts: 182 Location: Milano Was thanked: 21 time(s) in 13 post(s)
|
NachtaktiverHalbaffe wrote: My Initial thought was that IT sends a MIDI-Message which I can usw in My Code.
Right. In Vmix go to Settings-Activators and assign a midi note to a function. Example: Event- input- Type- Message InputPreview- 1 Blank- ButtonLED-Default- Note 1:35 InputPreview- 2 Blank- ButtonLED-Default- Note 1:37 and so go on In your Arduino code remember to load the midi library: MIDI.begin(1); // Initialize the Midi Library on channel 1 Serial.begin(115200); // Hairless MIDI speed MIDI.setHandleNoteOn(MyHandleNoteOn); // This is important!! This command // tells the Midi Library which function you want to call when a NOTE ON command // is received. In this case it's "MyHandleNoteOn". MIDI.setHandleNoteOff(MyHandleNoteOff); // This command tells the Midi Library // to call "MyHandleNoteOff" when a NOTE OFF command is received.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 8/28/2016(UTC) Posts: 3 Location: Germany
|
my broadcasting uttons arrived an i workend on my controller. But I found a problem:
How did you implement setHandleNoteOn? I tried this:
void loop() { MIDI.setHandleNoteOn(led_on(MIDI.getData1)); MIDI.setHandleNoteOff(led_off(MIDI.getData1)); }
void led_on(const uint8_t note){ digitalWrite(note,HIGH); } void led_off(const uint8_t note){ digitalWrite(note,LOW); } }
Of course my code doesnt work, because i cant put getData1 (which is the note of the NoteOn-event) as a parametger for the function. the function itself should be fine, but im stuck do give the function the note as ac parameter to turn the button LED on (the note is the same as the pin on he arduino for the LED). How did you handle this?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/20/2016(UTC) Posts: 182 Location: Milano Was thanked: 21 time(s) in 13 post(s)
|
NachtaktiverHalbaffe wrote:my broadcasting uttons arrived an i workend on my controller. But I found a problem:
How did you implement setHandleNoteOn? I tried this:
void loop() { MIDI.setHandleNoteOn(led_on(MIDI.getData1)); MIDI.setHandleNoteOff(led_off(MIDI.getData1)); }
void led_on(const uint8_t note){ digitalWrite(note,HIGH); } void led_off(const uint8_t note){ digitalWrite(note,LOW); } }
Of course my code doesnt work, because i cant put getData1 (which is the note of the NoteOn-event) as a parametger for the function. the function itself should be fine, but im stuck do give the function the note as ac parameter to turn the button LED on (the note is the same as the pin on he arduino for the LED). How did you handle this? You have a private message.
|
|
|
|
vMix Forums
»
General
»
3rd Party Software and Development
»
Activators with Arduino Midi (Technical Documentation of Activators)
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close