{
  test: {
        audio_midi:
	{
	      record_dir: "/home/kevin/temp/shiau_uen",
	      //record_dir: "/home/kevin/src/currawong/audio/video_trailer/beck"
	      //record_dir: "/home/kevin/temp/audio_midi_record"
	      record_folder: "record",
	      record_fn_ext: "am",
	      max_midi_msg_count: 32768, 
	      //midi_timer_period_micro_sec: 15000,
	      //midi_out_device: "Fastlane",
	      //midi_out_port: "Fastlane MIDI A",
	      audio_in_ch_map:  [4  5 ],
	      audio_out_ch_map: [0, 1 ]

	      midi_play_record: {	      
	      	      max_midi_msg_count: 32768, 
	      	      midi_timer_period_micro_sec: 15000,
		      all_off_delay_ms: 0, // delay after stop time to turn off all  notes
		      log_in_flag: false,
		      log_out_flag: false,
		      half_pedal_flag: false,
		      min_damper_down_time_ms: 0,
		      
	      	      midi_device_list: [
		      // piano
	              {
		        enableFl: true,
		        //midi_out_device: "MIDIFACE 2x2",
			//midi_out_port: "MIDIFACE 2x2 Midi Out 1",

		        //midi_out_device: "Scarlett 18i20 USB",
			//midi_out_port: "Scarlett 18i20 USB MIDI 1",

			midi_out_device: "iRig MIDI 2", 
			midi_out_port: "iRig MIDI 2 MIDI 1",

			//midi_out_device: "Fastlane", 
			//midi_out_port: "Fastlane MIDI A",

			force_damper_down_fl: false,
			force_damper_down_threshold: 35,
			force_damper_down_velocity: 80,

			// do not play damper values that are in this range
			damper_dead_band_enable_fl: true,
			damper_dead_band_min_value: 1,
			damper_dead_band_max_value: 55,

		        //midi_out_device: "PipeWire-RT-Event",
			//midi_out_port: "input",

			// pedal down velocity input/output mapping
			//pedal: {
			//  down_id: 127,
			//  down_vel: 75,
			//  half_down_id:  64,
			//  half_down_vel: 43,
			//  half_up_id: 63,
			//  half_up_vel: 43
			//  
			//},

                        //            0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  
			// spirio vel_table: [  1,  4, 10, 12, 12, 18, 24, 24, 30, 36, 36, 44, 48, 52, 58, 64, 64, 70, 76, 82, 88, 94,100,106,112 ]
			
			// vel_table: [  1,  5  10, 16, 21, 26, 32, 37, 42, 48, 53, 58, 64, 69, 74, 80, 85, 90, 96,101,106,112,117,122,127 ] ,

			//scale_chord_notes_enable_fl: true,
			//scale_chord_notes_factor: 0.5,

		      }		      
	              //{ midi_out_device: "PipeWire-RT-Event",  midi_out_port: "input" },
		],
	       }


	    io: {
	      callbackMutexTimeOutMs: 100,
	    }
	    
            ui: {
                  physRootDir: "/home/kevin/src/cwtest/src/libcw/html/audio_midi",
                  dfltPageFn:  "index.html",
                  port: 5687,
                  rcvBufByteN: 2048,
                  xmtBufByteN: 2048,
                  fmtBufByteN: 4096,
                  websockTimeOutMs: 50,  // max time out while blocking for a websock event
		  idleMsgPeriodMs: 50,    // period without messages before an idle message is generated		  
                  uiCfgFn: "ui.cfg",      // default UI resource description
		  asyncFl: false
            },

        
            serial: 
                {
		   pollPeriodMs: 50,
		   recvBufByteN: 512,
                   array: [
		     {
		     enableFl: false,
		     asyncFl: false,
                     label:   "port1",        // User label
                     device: "/dev/ttyACM0",  // Serial device name
                     baud:   38400,
                     bits:   8,
                     stop:   1,
                     parity: no,
		   }
		   ]
                },
              
              
              midi: {
                 parserBufByteN: 1024,
		 asyncFl: true,
              },
          
              audio: {
                  meterMs: 50,          // audio meter filter length and meter callback period
		  threadTimeOutMs: 50,  // audio thread cond var time out

		  groupL: [
		    {
		      enableFl:       true,   // (req)
		      asyncFl:        true,
		      label:          "main", // (req) User label 
		      id:                0,   // (req) User id (can also be set at runtime)
                      srate:         48000,   // (req) Sample rate used by all devices in this group
		      dspFrameCnt:      64    // (req) Size of DSP processing buffers 
		    }
		  ],
                  
                  deviceL: [
                  {
		    // System device name
                    device:       "Scarlett 18i20 USB USB Audio",
		    //device:       "USB Audio CODEC USB Audio",
		    //device:       "HDA Intel PCH CS4208 Analog",
		    //device: "ICUSBAUDIO7D USB Audio",
		    
                    activeFl:      true,    // (req) 
		    label:         "main",  // (req) User label
		    userId:            0,   // (opt) User id (can also be set at runtime)
		    framesPerCycle:  512,   // (req) Samples per audio device cycle
                    cycleCnt:          3,   // (req) Count of device cycle buffers.		    
		    inGroup:      "main",   // (opt) All devices in a group must be 'ready' to source
		    outGroup:     "main",   // (opt) or sink data before an audio callback is made for that group
                  }
                ]
            },

	    socket: {

	       asyncFl: false,
               maxSocketCnt: 10,
	       recvBufByteCnt: 4096,
	       threadTimeOutMs: 50,
	       socketL: [],
	       
	    }
         }
  } 	 
}