Dear All,
Apologies if this is not the correct place to ask, but I am stuck for anywhere else to put this request....
So, I am trying to write a little utility that will run on Windows to perform simple MIDI-to-DMX translations. I have so far been able to identify incoming MIDI and extract the data I'm after (Note ON and Velocity). I have also found some information about the functions exposed by uDMX.dll but in my programming environment (VB .NET in Visual Studio 2017), I get errors from the system when I try to send data to the driver using the function "ChannelSet"
Therefore, does anyone here have any experience with PInvoke declarations and calls to uDMX.dll?
... Anyone?
.... Mr Freestyler developer?
Please help
Thanks
Graham
Programming uDMX
Forum rules
Please do NOT post bugs here! If you spot a potential Bug please report it HERE first then you can chat about it with other users in the appropriate section.
Please do NOT post bugs here! If you spot a potential Bug please report it HERE first then you can chat about it with other users in the appropriate section.
-
- Starting to get to grips with FreeStyler
- Posts: 17
- Joined: December 20th, 2017, 3:51 pm
- FreeStyler Version: 3.638
- I Use FreeStyler for: Band
-
- Starting to get to grips with FreeStyler
- Posts: 17
- Joined: December 20th, 2017, 3:51 pm
- FreeStyler Version: 3.638
- I Use FreeStyler for: Band
Re: Programming uDMX
Bad form to reply to one's own post, but....
Just on the off-chance, I tried a bit of code "fiddling" and cracked the issue myself
For anyone who is remotely interested, the API notes (and VB5 sample) on the uDMX website are wrong... Channel set takes Integers and not Longs as parameters, so the correct VB .NET implementation is to declare the function via DLLImport, like so:
Then call it like
Cheers
Graham
PS: Look out for a MIDI to DMX "Direct" utility when I've finished writing it. Hopefully it will allow those of you who have asked previously about expanding the Freestyler's 24 MIDI to DMX controls to drive any combination of 512 DMX channels from any combination of 127 MIDI Notes
Just on the off-chance, I tried a bit of code "fiddling" and cracked the issue myself
For anyone who is remotely interested, the API notes (and VB5 sample) on the uDMX website are wrong... Channel set takes Integers and not Longs as parameters, so the correct VB .NET implementation is to declare the function via DLLImport, like so:
Code: Select all
<DllImport("uDMX.dll", CallingConvention:=CallingConvention.StdCall)>
Private Shared Function ChannelSet(ByVal Channel As Integer, ByVal Data As Integer) As Boolean
End Function
Code: Select all
ChannelSet(1, 127)
Graham
PS: Look out for a MIDI to DMX "Direct" utility when I've finished writing it. Hopefully it will allow those of you who have asked previously about expanding the Freestyler's 24 MIDI to DMX controls to drive any combination of 512 DMX channels from any combination of 127 MIDI Notes
-
- FS is my life
- Posts: 772
- Joined: July 11th, 2007, 8:39 pm
- FreeStyler Version: 4.01
- I Use FreeStyler for: Nightclub Lighting
- Twitter: twitter.com/
- Contact:
Re: Programming uDMX
I look forward to trying it out but I have no solutions for you.
-
- Starting to get to grips with FreeStyler
- Posts: 17
- Joined: December 20th, 2017, 3:51 pm
- FreeStyler Version: 3.638
- I Use FreeStyler for: Band
Re: Programming uDMX
Well on the way to finishing. I have to try it out against our live rig but it's looking promising so far.
- Aevarex
- Knows how to turn Lights ON
- Posts: 8
- Joined: July 4th, 2017, 5:22 pm
- FreeStyler Version: 3.4.6
- I Use FreeStyler for: Band
Re: Programming uDMX
Sounds interesting for sure.
-
- Starting to get to grips with FreeStyler
- Posts: 17
- Joined: December 20th, 2017, 3:51 pm
- FreeStyler Version: 3.638
- I Use FreeStyler for: Band
Re: Programming uDMX
All,
Please check out the '3rd Party and Addons' forum where I have just uploaded the first version of MIDI-2-DMX.
Enjoy!
Please check out the '3rd Party and Addons' forum where I have just uploaded the first version of MIDI-2-DMX.
Enjoy!