Home AMX User Forum NetLinx Studio
Options

Trouble with AMX Multiroom DAS-T-0808-SIG

To control Volume and Bass\Treble levels of each zone, I combine corresponding levels of each panel and virtual device. But when I try to change any level from panel, it begins jumping between two last received points for a long time, like if there is feedback loop. How to do it correctly?

Comments

  • Options
    DHawthorneDHawthorne Posts: 4,584
    There *is* a feedback loop. You are using the same level for setting the level and displaying it. So you set it, and it generates a level_event, which goes to the device. The changes its level, and sends the new value to your UI, which generates another level-event ... which goes right back to the device. Around and around it goes, and it only stops if the level reported by the device is exactly the same as the level of the UI, because at that point, no level-event is generated because it didn't change (in most cases, there are some where even an unchanged level generates an event, usually in virtual devices). I have gotten away with using combines in cases like this where the resulting feedback damped off naturally and fairly quickly, but that's pretty rare.

    There are two ways to do this, and both require isolating your UI level from the device level. One is to set a flag on the PUSH event for your UI level, and put a WAIT on it so when the flag is active, and received level_event from the device are ignored. The other is to have two UI levels ... one that sets it and sets it only, and the other for feedback and feedback only. The latter is probably the cleanest way to do it, unless someone else can chime in with t=something I haven't considered.
  • Options
    depsdeps Posts: 27
    DHawthorne wrote: »
    There *is* a feedback loop. You are using the same level for setting the level and displaying it. So you set it, and it generates a level_event, which goes to the device. The changes its level, and sends the new value to your UI, which generates another level-event ... which goes right back to the device. Around and around it goes, and it only stops if the level reported by the device is exactly the same as the level of the UI, because at that point, no level-event is generated because it didn't change (in most cases, there are some where even an unchanged level generates an event, usually in virtual devices). I have gotten away with using combines in cases like this where the resulting feedback damped off naturally and fairly quickly, but that's pretty rare.

    There are two ways to do this, and both require isolating your UI level from the device level. One is to set a flag on the PUSH event for your UI level, and put a WAIT on it so when the flag is active, and received level_event from the device are ignored. The other is to have two UI levels ... one that sets it and sets it only, and the other for feedback and feedback only. The latter is probably the cleanest way to do it, unless someone else can chime in with t=something I haven't considered.

    Thank you for idea with PUSH!

    I decided to combine levels because it was in standart AMX module, which I downloaded from amx site, so I think that it should work correct.
  • Options
    viningvining Posts: 4,368
    I almost always have problems with the push method since the level event usually seems to fire before the button event so I create a global var to hold my level event value and send it to where ever on the release not the push. The push > set flag > level event if flag set > do something > release > clear flag method doesn't work unless things happen in that order and It just doesn't for me.

    The only thing I can guarantee is the release will happen last and the only downside to using the release is if someone holds the button too long but you could then add a hold event handler and initiate a do_release to expidite things.
  • Options
    Joe HebertJoe Hebert Posts: 2,159
    vining wrote: »
    I almost always have problems with the push method since the level event usually seems to fire before the button event...
    Which event is defined in code first?
  • Options
    viningvining Posts: 4,368
    My level events usually follow the button events but I've tried swapping their order before too and the levels still usually trigger first.
  • Options
    depsdeps Posts: 27
    Problem fixed by changing virtual device to different number(41001) which IS OUT of allowed range( 32,768 to 36,863): 41001. Don't understand why.
  • Options
    viningvining Posts: 4,368
    deps wrote: »
    Problem fixed by changing virtual device to different number(41001) which IS OUT of allowed range( 32,768 to 36,863): 41001. Don't understand why.
    That's in the range for duet mod virtuals. Duet mods virtuals won't work in the non duet range.
  • Options
    vining wrote: »
    That's in the range for duet mod virtuals. Duet mods virtuals won't work in the non duet range.

    Looking at the example, since he's using a DUET module, changing the virtual to 41001 should fix the problem.
  • Options
    viningvining Posts: 4,368
    Looking at the example, since he's using a DUET module, changing the virtual to 41001 should fix the problem.
    Yeah that's what I was eluding too but I wasn't out of bed yet and my brain was partially still in la la land so maybe my phrasing should have been better.
  • Options
    mpullinmpullin Posts: 949
    I've always done the second option that Dave is suggesting. You have one bargraph with one level, copy/paste it on top of itself, make it transparent and give it a second level. The bargraph that is behind (that you can see) becomes your display value and the one that's on top (that you cannot see) is your input.
  • Options
    viningvining Posts: 4,368
    mpullin wrote: »
    I've always done the second option that Dave is suggesting. You have one bargraph with one level, copy/paste it on top of itself, make it transparent and give it a second level. The bargraph that is behind (that you can see) becomes your display value and the one that's on top (that you cannot see) is your input.
    I normally do both just the avoid the tp offline level event with a 0 value.
  • Options
    depsdeps Posts: 27
    Found the simpliest way to avoid feedback loop:

    LEVEL_EVENT[VDVMAUDIO, VDV_LEVELS]
    {

    local_var INTEGER LEV_NUM
    local_var integer value

    value=LEVEL.VALUE
    LEV_NUM=GET_LAST(VDV_LEVELS)

    cancel_wait 'mroom2panels'
    wait 5 'mroom2panels'
    SEND_LEVEL MVP, LEVELS[LEV_NUM], value
    }
    vining wrote: »
    I normally do both just the avoid the tp offline level event with a 0 value.

    Please, what exactly helps to avoid tp offline zero level?
  • Options
    deps wrote: »
    Please, what exactly helps to avoid tp offline zero level?

    I believe he's referring to the level event you receive when a panel goes offline/online. If you're simply catching the level event (no PUSH event flag) then you will inadvertently mute your audio, or whatever your level is for.
Sign In or Register to comment.