Home AMX User Forum AMX General Discussion
Options

BSS Soundweb London include file

Is there anyone out there who has successfully used this include file that would be willing to help me figure out what I'm doing wrong?

My feedback arrays get 4 extended ASCII characters in the 1st 4 positions of each subscribed slot.

Here's what I have in my main source
DEFINE_CONSTANT

CHAR IO_CARD1[] = {$0F,$DE,$03,$00,$00,$01};// I/O CARD SLOT A IS ALWAYS OBJECT ID $00,$00,$01
CHAR IO_CARD2[] = {$0F,$DE,$03,$00,$00,$02};// I/O CARD SLOT B IS ALWAYS OBJECT ID $00,$00,$02
CHAR IO_CARD3[] = {$0F,$DE,$03,$00,$00,$03};// I/O CARD SLOT C IS ALWAYS OBJECT ID $00,$00,$03
CHAR IO_CARD4[] = {$0F,$DE,$03,$00,$00,$04};// I/O CARD SLOT D IS ALWAYS OBJECT ID $00,$00,$04

INTEGER TL1 =1								// TIMELINE FOR FEEDBACK
CHAR CHAPEL_GAIN[] = {$70,$97,$03,$00,$01,$15}  	// Chapel room GAIN N-INPUT dsp5FIRE
CHAR MULTI_GAIN[] 	  = {$0F,$DE,$03,$00,$01,$3B}		// Multi purpose room GAIN N-INPUT dsp3FIRE
INTEGER GAIN_STEP_PER 	 = 1						// GAIN STEP IF USING SET_GAIN_PERCENT
INTEGER MAX_RAMPGAIN_PER = 100 				// THESE ARE VALUES USING SUBSCRIBE%
INTEGER MIN_RAMPGAIN_PER = 0

DEFINE_VARIABLE

VOLATILE CHAR FB_PREV[4][12]
LONG REPEAT_TIME[1] = 500 	// BSS - 500ms TO UPDATE FEEDBACK

INCLUDE 'BSS_Soundweb_London.axi'

DEFINE_FUNCTION SUBSCRIBE_ALL()
{
   CALL 'SUBSCRIBE%'(CHAPEL_GAIN,N_GAIN,0,1,GAIN)	// FB[1][10] SUBSCRIBE %'S ALWAYS HELD IN COLUMN 10
   CALL 'SUBSCRIBE' (CHAPEL_GAIN,N_GAIN,0,1,MUTE)	// FB[2]
   CALL 'SUBSCRIBE%'(MULTI_GAIN,N_GAIN,0,1,GAIN)	// FB[3][10] SUBSCRIBE %'S ALWAYS HELD IN COLUMN 10
   CALL 'SUBSCRIBE' (MULTI_GAIN,N_GAIN,0,1,MUTE)	// FB[4]
}

DEFINE_START

TIMELINE_CREATE(TL1, REPEAT_TIME, 1, TIMELINE_ABSOLUTE,TIMELINE_REPEAT)	// BSS FEEDBACK TIMELINE


TIMELINE_EVENT[TL1]	// BSS AUDIO GAIN FEEDBACK
{
   // L O C A L  G A I N
   // Compare value to previously stored value - only send if changed
   IF(MID_STRING(FB[1],10,1) <> MID_STRING(FB_PREV[1],10,1))
   {
	STACK_VAR INTEGER lvl 
	
	// Convert level to integer value
	lvl = ATOI(MID_STRING(FB[1],10,1))
	
	// Send to chapel & mpr panels
	SEND_LEVEL dvTP_Chapel_P3, 1, lvl
	SEND_LEVEL dvTP_MultiPurpose_P3, 1, lvl
	
	// Store the new level to compare next time around
	FB_PREV[1][10] = FB[1][10]
   }
   
   // S A N C T U A R Y  G A I N
   // Compare value to previously stored value - only send if changed
   IF(MID_STRING(FB[3],10,1) <> MID_STRING(FB_PREV[3],10,1))
   {
   	STACK_VAR INTEGER lvl 
	
	// Convert level to integer value
	lvl = ATOI(MID_STRING(FB[3],10,1))

	// Send to chapel & mpr panels
	SEND_LEVEL dvTP_Chapel_P3, 2, lvl
	SEND_LEVEL dvTP_MultiPurpose_P3, 2, lvl
	
	// Store the new level to compare next time around
	FB_PREV[3][10] = FB[3][10]
   }
}

DATA_EVENT [dvSOUNDWEB]
{
   ONLINE:
   {
   	STARTUP = 1; //BEGIN LOGGING FEEDBACK VARIABLES:  THESE ARE THE ONLY VARIABLES 	
		    //THAT WILL BE COMPARED TO RECEIVED STRINGS FOR TRUE FEEDBACK
	T = 0; //initialization
      
	SUBSCRIBE_ALL();
      
      
	STARTUP = 0; //END LOGGING FEEDBACK VARIABLES
   }
}

Comments

  • Options
    BigsquatchBigsquatch Posts: 216
    I found some mistakes in my code for volume handling. Hopefully those were the source of the problem. In digging further through the London Architect help file, I think what I'm seeing in the arrays are the values for the channels polarity "P-" and the symbol used for a fader set to it's lowest level ( -¥ )
  • Options
    AuserAuser Posts: 506
    // FB[1][10] SUBSCRIBE %'S ALWAYS HELD IN COLUMN 10
    

    Is the feedback you're looking for not in index 10 of the array? That would explain why you're not seeing what you expect in the first four indices?

    As an aside, the BSS provided code for the Londons is terrible. They're a nice product but the protocol is difficult to work with and the BSS code exacerbates the situation.

    If you get stuck send me a PM and I'll have a look for you.
  • Options
    Auser wrote: »
    // FB[1][10] SUBSCRIBE %'S ALWAYS HELD IN COLUMN 10
    

    Is the feedback you're looking for not in index 10 of the array? That would explain why you're not seeing what you expect in the first four indices?

    As an aside, the BSS provided code for the Londons is terrible. They're a nice product but the protocol is difficult to work with and the BSS code exacerbates the situation.

    If you get stuck send me a PM and I'll have a look for you.

    I've never seen anything in column 10 so far (in debug). And I'm getting an error when I call ATOI(FB[1][10])
Sign In or Register to comment.