Author Topic: Sequence to Background  (Read 545 times)

Offline gc2016

  • Jr. Member
  • **
  • Join Date: Nov 2016
  • Location:
  • Posts: 73
  • Kudos: 0
Sequence to Background
« on: February 04, 2019, 02:59:34 PM »
I am biting the bullet and trying to (cautiously) upgrade my FPP from 1.9 to 2.6 in my tiki bar, but I have run into an issue with background sequences.


I am using the latest version of Vixen to create both sequences and effects. I have observed:
  • effects that are built with the latest Vixen export to effect produces an effect with the wrong colors, and possibly wrong channels.
  • Rebuilding the effect does not help
  • If I export as a sequence, the sequence performs as expected.
So, it seems a change occurred in the format of an effect? The effect works fine in 1.9.
Also, is there a way to fix this? It looks like Vixen needs to change something in their code. Is anyone in contact with them?


Thank you in advance.

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,798
  • Kudos: 208
Re: Sequence to Background
« Reply #1 on: February 04, 2019, 03:27:03 PM »
This is probably an off by 1 error in FPP.  Dan updated the ESEQ reading code in FPP to use the new FSEQ file class.  Hopefully he will see this and know what the problem is, otherwise I will dive into the code.   Eventually the ESEQ file format will be deprecated since the FSEQ v2 file format now supports a subset of channel ranges which is effectively what a .eseq file is.
-
Chris

Offline gc2016

  • Jr. Member
  • **
  • Join Date: Nov 2016
  • Location:
  • Posts: 73
  • Kudos: 0
Re: Sequence to Background
« Reply #2 on: February 04, 2019, 03:29:55 PM »
Thank you for the speedy reply as usual. Does this mean that effects will eventually be FSEQV2, once the majors support it?




Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,798
  • Kudos: 208
Re: Sequence to Background
« Reply #3 on: February 04, 2019, 03:39:45 PM »
Thank you for the speedy reply as usual. Does this mean that effects will eventually be FSEQV2, once the majors support it?

That would be the goal.  I think that the code Dan has already added will let you rename a FSEQv2 file to .eseq and FPP will play it as an effect.  If the file has sparse ranges in it, then those multiple ranges will get played.  The .eseq spec supports multiple ranges, but we have never really implemented that part of the spec, so switching FPP to allow using the FSEQv2 for effects gives us compression, sparse ranges, and consolidates down onto a single file format.

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,798
  • Kudos: 208
Re: Sequence to Background
« Reply #4 on: February 04, 2019, 03:54:04 PM »
I just tested here using the VirtualDisplay in FPP and my TuneTo effects are playing correctly, so i'm not sure if this is on the FPP side or not.

Offline gc2016

  • Jr. Member
  • **
  • Join Date: Nov 2016
  • Location:
  • Posts: 73
  • Kudos: 0
Re: Sequence to Background
« Reply #5 on: February 04, 2019, 03:55:05 PM »
I might be able to put together a sample file, if that would help.


To describe what I'm seeing a bit more, my volcano has a red/yellow twinkle effect, which becomes a blue/purple twinkle effect. The colors of my bar shelves also become shifted, my cyan became yellow-ish
« Last Edit: February 04, 2019, 04:06:14 PM by gc2016 »

Offline gc2016

  • Jr. Member
  • **
  • Join Date: Nov 2016
  • Location:
  • Posts: 73
  • Kudos: 0
Re: Sequence to Background
« Reply #6 on: February 04, 2019, 05:21:43 PM »
A quick update:  If I change my "Start Channel Override' to 1, I see parity between my sequence colors and my background effect colors. This is a background sequence, so I'm not sure how to set that to 1 initially.

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,798
  • Kudos: 208
Re: Sequence to Background
« Reply #7 on: February 04, 2019, 09:10:02 PM »
The start channel should be embedded in the eseq file.  The override is only there in case you want to use the same .eseq on multiple props that are identical other than start channel.

Is this an up to date Vixen3?  This sounds familiar but I cant recall.  Maybe check the vixen3 bug list, I think they have one somewhere.

Offline gc2016

  • Jr. Member
  • **
  • Join Date: Nov 2016
  • Location:
  • Posts: 73
  • Kudos: 0
Re: Sequence to Background
« Reply #8 on: February 04, 2019, 09:22:48 PM »



I did sign up on the bug list, and there is a cased opened for 2.x, which is closed by Vixen in build #790, and I'm on #759. So, I'll try to update Vixen and see if I can get the newest build.


Looks like the release builds only go to #759, so I'll try a dev build above #790, and keep my fingers crossed.


« Last Edit: February 04, 2019, 10:30:23 PM by gc2016 »

Offline gc2016

  • Jr. Member
  • **
  • Join Date: Nov 2016
  • Location:
  • Posts: 73
  • Kudos: 0
Re: Sequence to Background
« Reply #9 on: February 05, 2019, 07:48:29 AM »
My current update is that using build 819 of Vixen seemed to produce the same effect files as #759, where explicitly setting the offset in fpp to 1 produced the correct results.


I took a look at the code, and it *seemed* be be checking if the start channel is anything other than 0, and if so, subtracting 1 from the supplied start channel.
Code: [Select]
   if (startChannel != 0) {
      // This will need to change if/when we support multiple models per file
        v2fseq->m_sparseRanges[0].first = startChannel - 1;
   }

The code does not explicitly set v2fseq->msparsseRanges[0].first when the result is 0. Explicitly setting the results to 0 in the FPP UI produces the same effect as if I put in nothing. I'm wondering if v2fseq->m_sparseRanges[0].first needs to be explicitly set when 0 is passed as the startChannel.

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,798
  • Kudos: 208
Re: Sequence to Background
« Reply #10 on: February 05, 2019, 08:48:26 AM »
The code does not explicitly set v2fseq->msparsseRanges[0].first when the result is 0. Explicitly setting the results to 0 in the FPP UI produces the same effect as if I put in nothing. I'm wondering if v2fseq->m_sparseRanges[0].first needs to be explicitly set when 0 is passed as the startChannel.

When you start he effect, are you telling it to use 0 or leaving the start channel field blank which tells FPP to use the start channel included in the .eseq file?

In fpp/src/fseq/FSEQFile.cpp line 1250, the code takes the value of the start channel in the .eseq file and subtracts one as it inserts the entry into m_sparseRanges, so the range appears to be set correctly.  The code in effects.cpp is overriding the start channel, so we don't need to override when a 0 is supplied in the UI because 0 just means use the default which was read in in FSEQFile.cpp.

Can you run a command and paste the results here in a 'code' section so they are formatted properly?   "hd < media/effects/YourEffectFileName.eseq | head -10"

Offline gc2016

  • Jr. Member
  • **
  • Join Date: Nov 2016
  • Location:
  • Posts: 73
  • Kudos: 0
Re: Sequence to Background
« Reply #11 on: February 05, 2019, 11:05:27 AM »
I have both left the start channel field blank and explicitly put the number 0 in there. The effect seems to play the same in both cases.


I'll run that command tonight, thank you!

Offline gc2016

  • Jr. Member
  • **
  • Join Date: Nov 2016
  • Location:
  • Posts: 73
  • Kudos: 0
Re: Sequence to Background
« Reply #12 on: February 05, 2019, 07:59:08 PM »

Okay, here we go!

Code: [Select]

00000000  45 53 45 51 01 00 00 00  b0 06 00 00 00 00 00 00  |ESEQ............|                                                   
00000020  00 00 00 00 01 19 13 01  19 13 01 19 13 01 19 13  |................|                                                   
00000030  01 19 13 01 19 13 01 19  13 01 19 13 01 19 13 01  |................|                                                   
00000040  19 13 01 19 13 01 19 13  01 19 13 01 19 13 01 19  |................|                                                   
00000050  13 01 19 13 01 19 13 01  19 13 01 19 13 01 19 13  |................|                                                   
00000060  01 19 13 01 19 13 01 19  13 01 19 13 ad 4f 3d ad  |.............O=.|                                                   
00000070  4f 3d ad 4f 3d ad 4f 3d  ad 4f 3d ad 4f 3d ad 4f  |O=.O=.O=.O=.O=.O|                                                   
00000080  3d ad 4f 3d ad 4f 3d ad  4f 3d ad 4f 3d ad 4f 3d  |=.O=.O=.O=.O=.O=|                                                   
00000090  ad 4f 3d ad 4f 3d ad 4f  3d ad 4f 3d ad 4f 3d ad  |.O=.O=.O=.O=.O=.|


Not sure I'm reading the FSEQFile.cpp file right, but it looks like its expecting the value of the model_start at offset 12, which in the eseq file is 0, so is being read as a -1?
« Last Edit: February 05, 2019, 08:12:38 PM by gc2016 »

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,798
  • Kudos: 208
Re: Sequence to Background
« Reply #13 on: February 06, 2019, 10:30:38 PM »
Yes, that file should have a 1 in it for the start channel.

Here's a sample from a .eseq that runs on one of my TuneTo signs with a start channel of 11317 (0x2c35 hex).

Code: [Select]
000000: 45 53 45 51 01 00 00 00 e8 01 00 00 35 2c 00 00    ESEQ........5,..
000010: e6 01 00 00 00 00 00 00 00 00 bf 00 00 00 00 00    ................
000020: 00 00 00 bf 00 00 bf 00 00 bf 00 00 00 00 00 bf    ................
000030: 00 00 00 00 00 00 00 00 bf 00 00 2f 2f 2f 00 00    ...........///..

Internally, FPP subtracts 1 and uses a 0 since C/C++ arrays are 0-based, but the file should have the real start channel number in it.  We probably could add a fallback to use 1 if the file contains a 0, but I'll let Dan touch that code since he is keeping it in sync between xLights and FPP so they can share the same C++ classes for working with FSEQ files.

Offline gc2016

  • Jr. Member
  • **
  • Join Date: Nov 2016
  • Location:
  • Posts: 73
  • Kudos: 0
Re: Sequence to Background
« Reply #14 on: February 07, 2019, 09:13:53 PM »
Thank you for the guidance. I put together a quick program that will resolve the issue and create the type of file FPP expects.


Because its not a particularly hard program, I wrote it in golang to teach myself more golang, but if there is actual interest for a temporary fix, I could do it in python as well.


https://github.com/DMXMax/vixenEffectFix

 

Back to top