Home AMX User Forum AMXForums Archive Threads AMX Applications and Solutions

NXC-VOL4 and Bargraphs

Hi guys,
I have to control a NXC-VOL4 unit...nice!
I'm going to use 4 bargraphs, one for each channel (used as mono channel), but have some trouble making all the things together. Here's some code...
DEFINE_DEVICE
 vTP2         = 33002:1:0
 vVOLUME = 33003:1:0
 MIXER_CH1 = 32001:1:1 // NXC-VOL4
 MIXER_CH2 = 32001:2:1 // NXC-VOL4

DEFINE_VARIABLE
 DEVLEV dvlVolume[] =
 {
   { MIXER_CH1, 1 },{ MIXER_CH1, 2 },{ MIXER_CH2, 1 },{ MIXER_CH2, 2 }
 }

DEFINE_START
 COMBINE_LEVELS(vVOLUME,1,vTP2,2,dvlVolume[0])
 COMBINE_LEVELS(vVOLUME,2,vTP2,3,dvlVolume[1])
 COMBINE_LEVELS(vVOLUME,3,vTP2,4,dvlVolume[2])
 COMBINE_LEVELS(vVOLUME,4,vTP2,5,dvlVolume[3])


DEFINE_EVENT

 LEVEL_EVENT[vTP2,2] // 2= level assigned to bargraph1
 LEVEL_EVENT[vTP2,3] // 3= level assigned to bargraph2
 LEVEL_EVENT[vTP2,4] // 4= level assigned to bargraph3
 LEVEL_EVENT[vTP2,5] // 5= level assigned to bargraph4
 {
     SEND_LEVEL dvlVolume[LEVEL.INPUT.LEVEL-1],LEVEL.VALUE
 }

No signs of life from the VOL4 unit...am i missing something?

Tks

ps: screenshot of gui attached

Comments

  • JustinCJustinC Posts: 74
    Well the way I see you have it setup with COMBINE_LEVELs doesn't follow the format in the Keywords description.


    You are supposed to use two DEVLEVs

    It looks like you are trying to use the keyword

    DEFINE_CONNECT_LEVEL
  • JustinCJustinC Posts: 74
    I think using the G4 touchpanel is a more troublefree approach.

    DEFINE_DEVICE
    
    
     vTP2=    33002:1:0
     MIXER_CH1 = 32001:1:0
     MIXER_CH1 = 32001:2:0
    
    vdvVOLUME= 33001:1:0
    
    
    DEFINE_START
    
    DEFINE_CONNECT_LEVEL
    (vdvVOLUME,1,dvTP2,2,MIXER_CH1,1)
    (vdvVOLUME,2,dvTP2,3,MIXER_CH1,2)
    (vdvVOLUME,3,dvTP2,4,MIXER_CH2,1)
    (vdvVOLUME,4,dvTP2,5,MIXER_CH2,2)
    


    Other than the mute structure, that is all I basically use, then use the levels in the TP, to do the rest.


    BTW, that is a nice graphic of the volume, did you design that ?
  • lattanzilattanzi Posts: 22
    Works!

    Thanks for your advice...now it works correctly!

    Yes: i made the graphics by myself...want to see something more? See files attached ;-)
Sign In or Register to comment.