0

Bright Sign + DMX + scripting

Hello

I am planning an installation with 6 videos in sync and 2 DMX controlled light scanners. 
The sync can be realized over LAN with 1 master and 5 slaves i figured. 

For the DMX control, Dick Harkey from HMS Electronics recommended the BS-RS232-DMX board, which may be combined with any BrightSign having a serial port by using the 'Serial Send Bytes' command. So far so good. 

What I am unclear about is the programming: 
I want to start the synced movies and while the movie is playing, send out DMX commands over the serial interface.  

- Can this be done or is the processor unresponsive while a movie is playing?
- Are there any limits on how complex the program can be while a video is playing (any timing issues) ? 
- Is there any documentation that brings one swiftly up to speed for BrightScript scripting? 

Thank you 
Best RFL
 

5 comments

  • 0
    Avatar
    Shaun

    Hey,

    You should just be able to send out "video time code" commands while you video is playing. Depending on how complex your show is of course.

    It's been awhile but the I think the time code function is done in milliseconds. So for each lighting state change you would just send a new timecode with a serial command attached to it.

    Check out the documentation page there should be a Bright Author user guide with stuff in it.

  • 0
    Avatar
    RFL

    Hi

    Thanks for the hint. I found some interesting things in the reference files. I add it for reference reasons. Please correct me if I am wrong. 

    Object Reference Manual 4.4/4.2/3.10 says: "All object calls are asynchronous. That is, video playback is handled in a different thread from the script. The script will continue to run while video is playing.


    afaik codewise one needs to do something like the following. 
    code is experimentally hacked together, not tested... 

    // create roVideoPlayer Object 
    v = CreateObject("roVideoPlayer")

    // create roMessagePort Object
    p = CreateObject("roMessagePort")

    // connect Port Object to roVideoPlayer Object
    ok = v.SetPort(p)

    // AddEvent(int, int) to VideoObject 
    ok = v.AddEvent(1, 2000)

    main:
    ok = v.SetLoopMode(1)
    ok = v.PlayFile("/video.mpg")
    msg = wait(0,p)
    if msg.getInt() <> 1 then "do something" 

  • 0
    Avatar
    Lyndon

    Time code events return an integer value of 12. Then, you can do a msg.GetData() to retrieve the ID for that timecode event. In your example above, your event id would be 1. 

     

  • 0
    Avatar
    Lyndon

    You need to have a loop so that you return to listen for the next message. So, here's a simple example of a loop where I check for the types of messages received, and then go back to checking.

    short_loop:
    msg=wait(0, p)

    if type(msg)="roVideoEvent" then
    status = msg.GetInt()
    if status=8 then

         goto nextfile
    else if status = 12 'timecode event detected
          print "timecode found"
    endif

    else if type(msg)="roGpioButton" then
         print "gpio button press found"
    endif

    goto short_loop

  • 0
    Avatar
    RFL

    Thanks a lot for the example!

Please sign in to leave a comment.