logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
NachtaktiverHalbaffe  
#1 Posted : Thursday, August 2, 2018 12:29:45 PM(UTC)
NachtaktiverHalbaffe

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.
spino  
#2 Posted : Friday, August 3, 2018 1:42:06 PM(UTC)
spino

Rank: Advanced Member

Groups: Registered
Joined: 12/20/2016(UTC)
Posts: 182
Man
Italy
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.
NachtaktiverHalbaffe  
#3 Posted : Friday, August 3, 2018 1:51:11 PM(UTC)
NachtaktiverHalbaffe

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?
spino  
#4 Posted : Saturday, August 4, 2018 12:59:18 PM(UTC)
spino

Rank: Advanced Member

Groups: Registered
Joined: 12/20/2016(UTC)
Posts: 182
Man
Italy
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.
NachtaktiverHalbaffe  
#5 Posted : Tuesday, August 28, 2018 3:06:08 PM(UTC)
NachtaktiverHalbaffe

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?
spino  
#6 Posted : Tuesday, August 28, 2018 5:18:48 PM(UTC)
spino

Rank: Advanced Member

Groups: Registered
Joined: 12/20/2016(UTC)
Posts: 182
Man
Italy
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.
Users browsing this topic
Guest
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.