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
Sev  
#1 Posted : Wednesday, August 16, 2023 6:29:31 AM(UTC)
Sev

Rank: Member

Groups: Registered
Joined: 7/8/2023(UTC)
Posts: 28
United States
Location: New Mexico

Can anyone help me write a VMix script to send a MIDI CC message from VMix through loopMIDI to another Program (Cantabile). LoopMIDI connects the 2 programs. I can figure out the other end once I can get a Midi cc message there.
Something like
Function = send midi cc message from VMix to Cantabile
var midiOut = GetMidiOutPort("LoopMIDI 1");
midiOut.SendControlChange(1, 1, 127);
Thanks, I'm clueless on scripting at this point.
Roy Sinclair  
#2 Posted : Thursday, August 17, 2023 6:22:02 AM(UTC)
Roy Sinclair

Rank: Advanced Member

Groups: Registered
Joined: 11/23/2020(UTC)
Posts: 170
United States
Location: Wichita

Thanks: 10 times
Was thanked: 24 time(s) in 20 post(s)
I was thinking you should use a tool like https://github.com/gbevin/SendMIDI which you can call from a script like this example:

Code:

Dim MidiProcessProperties As New ProcessStartInfo
MidiProcessProperties.FileName = "C:\<path to the sendmidi program goes here>\sendmidi-windows-1.2.1\sendmidi"
MidiProcessProperties.Arguments = "dev LoopMidi 1 cc 1 1 127"
'MidiProcessProperties.WindowStyle = ProcessWindowStyle.Hidden


Dim myMidiProcess As Process = Process.Start(MidiProcessProperties)
Sev  
#3 Posted : Friday, August 18, 2023 6:03:46 AM(UTC)
Sev

Rank: Member

Groups: Registered
Joined: 7/8/2023(UTC)
Posts: 28
United States
Location: New Mexico

Thanks Roy, unfortunately I have not been able to get SendMIDI to open on my computer. But thanks for the really specific code you sent.

Dim MidiProcessProperties As New ProcessStartInfo
MidiProcessProperties.FileName = "C:\<path to the sendmidi program goes here>\sendmidi-windows-1.2.1\sendmidi"
MidiProcessProperties.Arguments = "dev LoopMidi 1 cc 1 1 127"
'MidiProcessProperties.WindowStyle = ProcessWindowStyle.Hidden


Dim myMidiProcess As Process = Process.Start(MidiProcessProperties)
Sev  
#4 Posted : Friday, August 18, 2023 6:12:19 AM(UTC)
Sev

Rank: Member

Groups: Registered
Joined: 7/8/2023(UTC)
Posts: 28
United States
Location: New Mexico

Here's a basic example of a VMix script that sends a MIDI CC message through LoopMIDI to another program (Cantabile):

-- Define the MIDI port
local midiOut = GetMidiOutPort("LoopMIDI 1")

-- Send MIDI CC message
midiOut.SendControlChange(1, 1, 127)
This script snippet assumes that you have LoopMIDI set up with a port named "LoopMIDI 1" and that you want to send a MIDI CC message with control number 1, channel 1, and value 127. Make sure you adjust the port name and MIDI parameters as needed.


Thanks doggy and Robertcassey.I wasn't able to get it to work as it is, do I need to put API. Function in front of Local midiout and midOut.Send controlChange. Or maybe Function=local midi out. I assume Define the MIDI port isnt part of the code or is it. I just starting to lear code so its all greek to me. If you can show me exactly what to put into vmix maybe I can figure out other ways to use it.
Thanks for your patience.
doggy  
#5 Posted : Friday, August 18, 2023 8:17:23 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,216
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: Sev Go to Quoted Post
Here's a basic example of a VMix script that sends a MIDI CC message through LoopMIDI to another program (Cantabile):

-- Define the MIDI port
local midiOut = GetMidiOutPort("LoopMIDI 1")

-- Send MIDI CC message
midiOut.SendControlChange(1, 1, 127)
This script snippet assumes that you have LoopMIDI set up with a port named "LoopMIDI 1" and that you want to send a MIDI CC message with control number 1, channel 1, and value 127. Make sure you adjust the port name and MIDI parameters as needed.


Thanks doggy and Robertcassey.I wasn't able to get it to work as it is, do I need to put API. Function in front of Local midiout and midOut.Send controlChange. Or maybe Function=local midi out. I assume Define the MIDI port isnt part of the code or is it. I just starting to lear code so its all greek to me. If you can show me exactly what to put into vmix maybe I can figure out other ways to use it.
Thanks for your patience.


That was the point of my question, meaning was not tested by poster else would have noticed line 1 was allready faulty (local midiOut = GetMidiOutPort("LoopMIDI 1"))
Users browsing this topic
Guest (2)
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.