moritzvieli / rocketshow

A system to automate your backtracks, lighting- and videoshow.
http://www.rocketshow.net
GNU General Public License v3.0
15 stars 3 forks source link

Bug - Rocket Show's Fixture Pool JSON parser doesn't appear to support matrices #93

Closed DavidOpgh closed 2 months ago

DavidOpgh commented 1 year ago

Having a major issue trying to get the Chauvet DJ - Gigbar 2 fixture from the fixture pool to work in Designer. Tried using the Fixture Pool entry and downloading the JSON directly from the Open Fixture Library. Neither worked correctly

The fixture has 3 modes: 23-channel, 11-channel, 3-channel. Only the 3-channel mode had the proper configuration for all 3-channels. The 11-channel didn't show any channels. The 23-channel only showed a couple of channels.

Looking at the JSON in Notepad it appears the issue is Rocket Show interpreter doesn't support matrices. The 3-channel mode doesn't use any matrices to configure the channels the 11-channel mode uses all matrices the 23-channel mode uses mostly matrices.

@moritzvieli can you verify this behavior? Can this behavior be fixed or should I just make a custom Gigbar 2 fixture JSON by removing the matrices?

Description https://github.com/OpenLightingProject/open-fixture-library/blob/master/docs/fixture-format.md#matrices

moritzvieli commented 2 months ago

@DavidOpgh I just published an updated version supporting matrix fixtures. This is quite a large update for the designer and could introduce some side-effects. Also, there is a migration being done between old designer projects and new ones (done automatically, when you open an old project with the new version and save it). I specifically tested with the Gigbar 2, but I don't own the fixture physically. Can you check, whether it works as expected?

Thanks a lot for your feedback!

DavidOpgh commented 2 months ago

Yes, I will test it with my Gigbar 2. Can you tell me a little more about the auto migration? What does it try to do?

moritzvieli commented 2 months ago

Just some changes in the internal data structure of the designer project files. Fixtures are stored a little bit different now, having fixtures with multiple beams.

DavidOpgh commented 2 months ago

1Capture

2Capture

3Capture

First test results On a Pi 4 I upgraded to 2.40

All I did here was make sure my custom Gigbar 2 profile worked correctly with 2.40.

The designer project gave the window saying the project was updated. I checked out some of my gigbar2 presets from my custom profile and they worked properly. I tried running the composition without saving and it threw that error.

But I hadn't saved the project. After saving the project and restarting the composition it worked properly with no noticeable error.

DavidOpgh commented 2 months ago

2nd testing results

Strictly speaking about implementing matrices I believe you've succeeded, but there is more that needs to be refined to create a useful fixture profile.

Here is your implementation of the par for gigbar2

4Capture

And my implementation 5Capture

Here is your implementation of the derby for gigbar2 6Capture

And my implementation 7Capture

The issue seems to be the implementation of a channel that has multiple functions that includes a range for a specific function i.e. capability entries

For example Par 1 Shutter You have implemented it as radio button presets but it also needs a slider to select a range within that function.

For Red 0-4 is off, you really don't need a slider because off is off but there is a range. 5-54 you need a slider because you can't select an intensity 55-255 again you need a slide because you can' select a strobe speed.

I'm not sure if there are guidelines how this issue is to be implemented but the OLA does list capabilities with ranges. https://github.com/OpenLightingProject/open-fixture-library/blob/master/docs/capability-types.md

But I'm guessing something like a fixture capability entity that has a dmxRange >1 needs to include a slider to select the range defined in it's dmxRange.

Here is the OLA code for the Shutter for the Par 1

   "$pixelKey Shutter": {
      "capabilities": [
        {
          "dmxRange": [0, 127],
          "type": "Intensity",
          "brightnessStart": "off",
          "brightnessEnd": "bright"
        },
        {
          "dmxRange": [128, 239],
          "type": "ShutterStrobe",
          "shutterEffect": "Strobe",
          "speedStart": "slow",
          "speedEnd": "fast"
        },
        {
          "dmxRange": [240, 249],
          "type": "ShutterStrobe",
          "shutterEffect": "Strobe",
          "soundControlled": true
        },
        {
          "dmxRange": [250, 255],
          "type": "ShutterStrobe",
          "shutterEffect": "Open"
        }
      ]

And your implementation correctly produced 4 radio buttons but you have no way to set the range for the intensity and the strobe, so the profile isn't usable. You need a slider to set the range.

Here is my "hack" code for the Shutter to make a slider appear along with a radio button for intensity / strobe. I couldn't find any "real" code to accomplish this but I searched other profiles and found the function I was looking for. The "angleStart": and "angleEnd": properties does this. It's a real hack and it has some limitations, namely it has to be first and only one in the capabilities. So you can see my slider has to do both Intensity and Strobe.

   "Par 1 Shutter": {
      "capabilities": [
        {
          "dmxRange": [0, 239],
          "type": "ShutterStrobe",
          "angleStart": "0%",
          "angleEnd": "100%"
        },
        {
          "dmxRange": [240, 249],
          "type": "ShutterStrobe",
          "shutterEffect": "Strobe",
          "soundControlled": true
        },
        {
          "dmxRange": [250, 255],
          "type": "ShutterStrobe",
          "shutterEffect": "Open"
        }
      ]

The same thing for the Derby strobe and rotation

Original code

   "$pixelKey Strobe": {
      "capabilities": [
        {
          "dmxRange": [0, 9],
          "type": "NoFunction"
        },
        {
          "dmxRange": [10, 239],
          "type": "ShutterStrobe",
          "shutterEffect": "Strobe",
          "speedStart": "0Hz",
          "speedEnd": "30Hz"
        },
        {
          "dmxRange": [240, 255],
          "type": "ShutterStrobe",
          "shutterEffect": "Strobe",
          "soundControlled": true
        }
      ]
    },
    "$pixelKey Rotation": {
      "capabilities": [
        {
          "dmxRange": [0, 4],
          "type": "Rotation",
          "speed": "stop"
        },
        {
          "dmxRange": [5, 127],
          "type": "Rotation",
          "speedStart": "slow CW",
          "speedEnd": "fast CW"
        },
        {
          "dmxRange": [128, 133],
          "type": "Rotation",
          "speed": "stop"
        },
        {
          "dmxRange": [134, 255],
          "type": "Rotation",
          "speedStart": "slow CCW",
          "speedEnd": "fast CCW"
        }
      ]

My hacked code

   "Derby 1 Strobe": {
      "capabilities": [
        {
          "dmxRange": [10, 239],
          "type": "ShutterStrobe",
          "angleStart": "0%",
          "angleEnd": "100%"
        },
        {
          "dmxRange": [0, 9],
          "type": "NoFunction"
        },
         {
          "dmxRange": [240, 255],
          "type": "ShutterStrobe",
          "shutterEffect": "Strobe",
          "soundControlled": true
        }
      ]
    },
    "Derby 1 Rotation": {
      "capabilities": [
        {
          "dmxRange": [5, 255],
          "type": "Rotation",
          "angleStart": "0%",
          "angleEnd": "100%"
        },
        {
          "dmxRange": [0, 4],
          "type": "Rotation",
          "speed": "stop",
          "comment": "stop"
        }

In the original code for Derby Rotation there is a "dmxRange": [128, 133] for a stop. But because my hack can only have one slider I couldn't implement it and had to make the range for the slider "dmxRange": [5, 255]. Not a big issue but it shows the limitations of my hack.

FYI - My entire non-matrix Gigbar 2 fixture profile is here.

https://drive.google.com/file/d/16cBeNqriOQ7s9tJJ-f7yeGOVOCpXXzyC/view?usp=sharing

moritzvieli commented 2 months ago

@DavidOpgh great! Thanks a lot for the findings!

I need to check the error from the upgrade. Seems like something has not synced properly between the frontend and the backend.

The other errors regarding unreachable devices seem unrelated (maybe slave devices shut down?).

Regarding the 2nd test with radio buttons: I noticed it during my tests with the Gigbar as well, but did not investigate further yet. This is unrelated to the matrix fixtures, but it needs to be fixed as well. From what I saw, it‘s three options and one of them has a dmx range and should hence display a slider additionally, if selected, to adjust the value. This is just a small fix and I will look into it soon as well. Thanks for confirming! 👍

DavidOpgh commented 2 months ago

Yes, The unreachable error is unrelated and it not really an error. I normally have a 2nd Pi running as a slave but it was disconnected for the test.

DavidOpgh commented 2 months ago

This is unrelated to the matrix fixtures, but it needs to be fixed as well. From what I saw, it‘s three options and one of them has a dmx range and should hence display a slider additionally, if selected, to adjust the value. This is just a small fix and I will look into it soon as well. Thanks for confirming!

This is related to issue #94

moritzvieli commented 2 months ago

@DavidOpgh Indeed, thanks for the link. In this case I'll close this issue.