These adverts are supporting the forum's costs and the products/services are not endorsed by the forum owners.
First have you tried?
Log in to Search the Forum for help!
Learn more about using FreeStyler at the FreeStyler WIKI HERE
Learn more about DMX in General at The DMX Wiki HERE

if all else fails and you need a fixture consider the fixture building service HERE

Programming uDMX

Questions and discussions regarding FreeStyler Software.
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.
Post Reply
Codeweasel
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

Programming uDMX

Post by Codeweasel »

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 :D

Thanks

Graham


Codeweasel
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

Post by Codeweasel »

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:

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
Then call it like

Code: Select all

ChannelSet(1, 127)
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 :D
Partyman
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

Post by Partyman »

I look forward to trying it out but I have no solutions for you.
Codeweasel
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

Post by Codeweasel »

Well on the way to finishing. I have to try it out against our live rig but it's looking promising so far.
User avatar
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

Post by Aevarex »

Sounds interesting for sure.
Codeweasel
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

Post by Codeweasel »

All,

Please check out the '3rd Party and Addons' forum where I have just uploaded the first version of MIDI-2-DMX.

Enjoy!
Post Reply

Return to “FreeStyler Software”