   //Set the desired volume levels
   myTympan.volume_dB(0);                   // headphone amplifier.  -63.6 to +24 dB in 0.5dB steps.
   myTympan.setInputGain_dB(input_gain_dB); // set input volume, 0-47.5dB in 0.5dB setps
+  gain1.setGain_dB(digital_gain_dB);       //set the digital gain of the Left-channel
+  gain2.setGain_dB(digital_gain_dB);       //set the digital gainof the Right-channel gain processor  
 
   //setup BLE
   while (Serial1.available()) Serial1.read(); //clear the incoming Serial1 (BT) buffer

// Please don't put commas or colons in your ID strings!
void printTympanRemoteLayout(void) {
  if (myGUI.get_nPages() < 1) createTympanRemoteLayout();  //create the GUI, if it hasn't already been created
  myTympan.println(myGUI.asString());
  ble.sendMessage(myGUI.asString());
  setButtonText("gainIndicator", String(digital_gain_dB));
}

#include <Tympan_Library.h>  //include the Tympan Library

//create audio library objects for handling the audio
Tympan                    myTympan(TympanRev::E);     //do TympanRev::D or TympanRev::E
AudioInputI2S_F32         i2s_in;                     //Digital audio in *from* the Teensy Audio Board ADC.
AudioEffectGain_F32       gain1;                      //Applies digital gain to audio data.  Left.
AudioEffectGain_F32       gain2;                      //Applies digital gain to audio data.  Right.
AudioOutputI2S_F32        i2s_out;                    //Digital audio out *to* the Teensy Audio Board DAC.

//Make all of the audio connections
AudioConnection_F32       patchCord1(i2s_in, 0, gain1, 0);    //connect the Left input
