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

Freestyler .NET Wrapper Library

Discuss the latest developments or get support for them HERE.
Post Reply
ewdieckman
Knows how to turn Lights ON
Posts: 7
Joined: April 28th, 2014, 9:11 pm
FreeStyler Version: 3.5.9
I Use FreeStyler for: Band

Freestyler .NET Wrapper Library

Post by ewdieckman »

I created a wrapper library for sequences and cues to use with a cue stacking program/plugin. I figured I would post it, in case anybody else is interested.

It reads in cue files (FCF) and generates .NET objects with those options. Currently the library only supports reading in files - no writing yet. I will post subsequent versions here.

Most of my development is for in-house apps - I have never sent stuff out in the wild before. So if you have any comments or suggestions (that are constructive - "Hey dude, this sucks" doesn't really help) to improve it, please let me know.

A generated .CHM help file is included for documentation. Thanks to mattotone for his FreeStylerConnection library.
You do not have the required permissions to view the files attached to this post.


chriske
Knows how to turn Lights ON
Posts: 4
Joined: August 19th, 2014, 4:32 pm
FreeStyler Version: 3.5.5
I Use FreeStyler for: Stage Show

Re: Freestyler .NET Wrapper Library

Post by chriske »

Hi! First of all thank you for sharing this!

I am very interested in your libary, although i don't completly understand it :D Maybe you have a little example to show us how it works? I would be happy to use your libary in my application!
ewdieckman
Knows how to turn Lights ON
Posts: 7
Joined: April 28th, 2014, 9:11 pm
FreeStyler Version: 3.5.9
I Use FreeStyler for: Band

Re: Freestyler .NET Wrapper Library

Post by ewdieckman »

I'll use some examples from the Cue-ing program I wrote (called LiveCue). Let me know if this helps:

Code: Select all

        Dim cueF As FSCueFile = FSCueFile.LoadFCF("C:\FreeStyler\Cues\Songs N-Z\Slither Intro.fcf")

        Dim sequenceNumber As Int16 = 0
        Dim cue As FSCue


        For Each cue In cueF.Cues
            sequenceNumber = cueF.Cues.IndexOf(cue)
            Console.WriteLine(String.Format("Sequence {0} path: {1}", sequenceNumber, cue.Sequence.Path))
            Console.WriteLine(String.Format("Sequence {0} looped: {1}", sequenceNumber, cue.Loop))
            'etc - cue has all the properties available to the end user for a cue line (sequence) in a cue
        Next

        'you can either send the cue as-is, or manipulate values and then send to Freestyler

        'stop all sequences - in case there are sequences already running
        For sequenceNumber = FSConstants.FIRST_SEQUENCE_NUM To FSConstants.TOTAL_SEQUENCES_IN_CUE - 1
            FSCommandUtil.StopSequence(sequenceNumber )
        Next


        'loop thru and "load up" freestyler with the sequences from the .FCF file and set all options
        For Each cue In cueF.Cues
            If cue IsNot Nothing Then
                sequenceNumber = cueF.Cues.IndexOf(cue)

                'load cue into FreeStyler
                FSCommandUtil.LoadCue(cue.SequenceLoadCommand(sequenceNumber))

                'set cue options
                FSCommandUtil.LoadCueOptions(cue.SequenceOptionsCommand(sequenceNumber))

                'set cue speed
                FSCommandUtil.SetCueSpeed(sequenceNumber, cue.SpeedCommand)
            End If

        Next
       

        'loop through all sequences - if a cue exists, start it.  
        For sequenceNumber = FSConstants.FIRST_SEQUENCE_NUM To FSConstants.TOTAL_SEQUENCES_IN_CUE - 1

            If sequenceNumber < cueF.Cues.Count Then
                cue = cueF.Cues(sequenceNumber)
                If cue IsNot Nothing Then
                    'send the command to freestyler to play the sequence
                    FSCommandUtil.PlaySequence(sequenceNumber)

                End If
            End If
        Next
Let me know if that's enough to get you started.
Post Reply

Return to “FreeStyler 3rd Party Addons and utilities”