Rank: Member
Groups: Registered
Joined: 7/8/2023(UTC) Posts: 28 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.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 11/23/2020(UTC) Posts: 170 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)
|
|
|
|
Rank: Member
Groups: Registered
Joined: 7/8/2023(UTC) Posts: 28 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)
|
|
|
|
Rank: Member
Groups: Registered
Joined: 7/8/2023(UTC) Posts: 28 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.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: Sev 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"))
|
|
|
|
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