{

  a:1,
  b:2,
  c:[1.23,4.56,7.89],


  datasets: {
    dataL: [
      { name: mnist, inDir: "~/src/datasets/mnist" }
    ]
    
  }

  test: {

    variadicTpl: {},

    fileSys: {},
    numbCvt: {},
    object: {},
    vop:{},
    time:{},
    thread: {},
    kbTest1: {},
    kbTest2: {},
    kbTest3: {},
    spscBuf: {},
    spscQueueTmpl: {},
    
    websockSrv: {
      physRootDir: "~/src/cwtest/src/libcw/html/websockSrvTest",
      dfltHtmlPageFn: "test_websocket.html",
    },

    serialSrv: {},
    midiDevice: {}, // print a list of midi devices and send a MIDI note
    textBuf: {},
    audioBuf: {},
    audioDev: {},
    audioDevAlsa: {},
    audioDevRpt: {}, // print a list of audio device

    socket: {},
    socketTcp: {},
    socketSrvUdp: {},
    socketSrvTcp: {},
    sockMgrTest: {},
    
    uiTest: {
       ui: {
         physRootDir: "/home/kevin/src/cwtest/src/libcw/html/uiTest",
         dfltPageFn:  "index.html",
         port: 5687,
         rcvBufByteN: 2048,
         xmtBufByteN: 2048,
         fmtBufByteN: 4096,
         websockTimeOutMs: 50,   // max time out while blocking for a websock event
         uiCfgFn: "ui.cfg",       // default UI resource description
	 idleMsgPeriodMs: 50
       },

       listEle: {

         row: {  
           check:  { name: playCheckId, title:"Play", value: false },
           select: { name: preMenuId,  title:"Preset",
                   children:
                    {
                      option:{ name: psOpt1, title:"Sel 1" },
                      option:{ name: psOpt2, title:"Sel 2" },
                      option:{ name: psOpt3, title:"Sel 3" }
                    },
           }
        },
         
       }
    },

    socketMdns: {},
    dnssd: {},
    eucon: {},
    dirEntry: {},
    io: {
            ui: {
                  physRootDir: "/home/kevin/src/cwtest/src/libcw/html/ioTest",
                  dfltPageFn:  "index.html",
                  port: 5687,
                  rcvBufByteN: 2048,
                  xmtBufByteN: 2048,
                  fmtBufByteN: 4096,
                  websockTimeOutMs: 50,  // max time out while blocking for a websock event
                  uiCfgFn: "ui.cfg"      // default UI resource description
            },

        
            serial: {

                pollPeriodMs: 50,
                recvBufByteN: 512,
                
                array: [
                  {
                    enable_flag: true,
                    label:   "port1",        // User label
                    device: "/dev/ttyACM0",  // Serial device name
                    baud:   115200,
                    bits:   8,
                    stop:   1,
                    parity: no
                  }
                ],
              },
              
              midi: {


                 parserBufByteN: 1024,


              },
          
              audio: {
                  meterMs: 50,          // audio meter filter length and meter callback period
                  threadTimeOutMs: 50,  // audio thread cond var time out

                  groupL: [
                    {
                      enableFl:       true,   // (req) 
                      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",
                    
                    enableFl:      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: {

               maxSocketCnt: 10,
               recvBufByteCnt: 4096,
               threadTimeOutMs: 50,
               
               socketL: [
               {
                 enableFl: true,     // (req) 
                 label:    "sock0", // (req)
                 userId:   0,        // (opt) 
                 port:     5687,     // (req) This sockets port number
                 timeOutMs: 50,      // (req) Timeout used for blocking sockets.
                 
                 // Attributes:
                 // blocking or non-blocking,
                 // udp or tcp, 
                 // listen, broadcast
                 // reuse_addr, reuse_port, multi_cast_ttl, multi_cast_loop
                 // stream 
                 attrL: [ udp, blocking ],
                 
                 // Automatically connect to this remote socket.
                 // remoteAddr: "192.168.0.10", // (opt)
                 // remotePort: 5687           // (opt)
               },

               {
                 enableFl: true,     // (req) 
                 label:    "sock1", // (req)
                 userId:   1,        // (opt) 
                 port:     5688,     // (req) This sockets port number
                 timeOutMs: 50,      // (req) Timeout used for blocking sockets.
                 
                 attrL: [ udp, blocking ],               
               }



               ]
               
            
            }
         },


    io_minimal: {

        },


    audio_midi: {

            audio_midi: {
              record_dir: "/home/kevin/temp/audio_midi_app",
              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",

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

              audio_in_ch_map:  [0, 1 ],
              audio_out_ch_map: [0, 1 ]
            },

            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
                  uiCfgFn: "ui.cfg"      // default UI resource description
                  idleMsgPeriodMs: 50,    // period without messages before an idle message is generated
                  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: false
              },
          
              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",
                    
                    enableFl:      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: [],
               
            }
         },


    audioDevRpt: {},
    
    audioDevTest: {
     srate: 48000,
     bufN: 3,
     framesPerCycle: 512,
     inDev: "USB Audio CODEC USB Audio",
     outDev: "USB Audio CODEC USB Audio",
     meterMs: 50,
     amHz: 1,
     amMaxGain: 0.8
    },

    audioDevFileTest: {
      //inAudioFname: "~/temp/temp_sine_100_hz.wav",
      inAudioFname: "~/temp/headphone_temp_0.wav",
      outAudioFname: "~/temp/test.wav",
      framesPerCycle:1024,
      
    },
    

    
    mtx:
    {
      m0: [ [0,3], [1,4], [2,5]  ],
      m1: [ [0,1,2],[3,4,5] ],
      
      m2: [ [[0,1],[2,3]], [[4,5],[6,7]], [[8,9],[10,11]] ],
      m3: [ 0,1,2 ],

      m4: [ [10,13], [11,14], [12,15]  ],

      y0: [ [5,14],[14,50] ],
      y1: [ [9,12,15],[12,17,22],[15,22,29] ],
    },

    midifile:
    {
      //rpt0: { midiFn:"~/media/audio/midi/988-v25.mid" }
      //rpt: { midiFn:"~/src/currawong/audio/workshop/demare2/record_5/midi.mid"}
      // csv: { midiFn:"~/src/currawong/audio/workshop/demare2/record_5/midi.mid", csvFn: "midi.csv" }
      //csv0: { midiFn:"~/src/currawong/site/web_part_selection/GUTIM part 1 no colors, single system all sections correcting staves distance.mid",
      //               csvFn: "~/temp/midi.csv" }

      batch_convert: {
         io_dir: "~/src/currawong/audio/workshop",
         session_dir: "beck1",
         take_begin: 0,
         take_end: 9,
         print_warnings_flag: false
      },

      batch_convert: {
         io_dir: "~/src/currawong/audio/workshop",
         session_dir: "beck2",
         take_begin: 0,
         take_end: 9,
         print_warnings_flag: false
      },

      batch_convert: {
         io_dir: "~/src/currawong/audio/workshop",
         session_dir: "taka1",
         take_begin: 0,
         take_end: 10,
         print_warnings_flag: false
      },

      batch_convert: {
         io_dir: "~/src/currawong/audio/workshop",
         session_dir: "taka2",
         take_begin: 0,
         take_end: 16,
         print_warnings_flag: false
      },

      batch_convert: {
         io_dir: "~/src/currawong/audio/workshop",
         session_dir: "nonken1",
         take_begin: 0,
         take_end: 18,
         print_warnings_flag: false
      },

      batch_convert: {
         io_dir: "~/src/currawong/audio/workshop",
         session_dir: "nonken2",
         take_begin: 0,
         take_end: 12,
         print_warnings_flag: false
      },

      batch_convert: {
         io_dir: "~/src/currawong/audio/workshop",
         session_dir: "demare1",
         take_begin: 0,
         take_end: 13,
         print_warnings_flag: false
      },

      batch_convert: {
         io_dir: "~/src/currawong/audio/workshop",
         session_dir: "demare2",
         take_begin: 0,
         take_end: 10,
         print_warnings_flag: false
      },

    },

    audiofile:
    {
      //rpt:  { fn:"~/temp/temp_sine.wav", begIdx: 0, frmCnt: 10 }
      rpt:  { fn:"~/src/currawong/site/web_part_selection/html/static/audio/GUTIM_Part_1_20200711_48k_24bit.wav", begIdx: 0, frmCnt: 10 }
    },

    afop:
    {
      sine: { fn:"~/temp/temp_sine_100_hz.wav", srate: 48000, bits: 0, hz: 100, gain: 0.5, secs: 10.0 },
    },

    mnist: {
      desc: "Print the MNIST images to an SVG/HTML file.",
      inDir: "~/src/datasets/mnist",
      outHtmlFn: "~/temp/image_svg_0.html"
    },


    dataset_wtr: {
        outFn: "~/temp/temp.ds"
    },

    dataset_rdr: {
        inFn: "~/temp/temp.ds",
        cacheByteN: 146,
    },

    dataset_adapter: {
         inFn: "~/temp/temp.ds",
         cacheByteN: 154,
         batchN: 3,
    },


    dataset: {
      desc: "Read MNIST native file -> write dataset file -> read datasetf le -> write SVG file",
      inDir: "~/src/datasets/mnist",
      dsFn: "~/temp/temp_dataset.ds",
      outHtmlFn: "~/temp/image_svg.html",
      batchN: 3500,
      cacheByteN: 2800000
    },

    dataset0: {
    dsLabel: mnist,
    batchN: 32,
    validPct: 10,
    testPct: 10,
    dataL:[
     { name: mnist, inDir: "~/src/datasets/mnist" }
    ],
    
    },


    svg: {
      desc:"Create an SVG/HTML test file.",
      notes:"If no CSS file name is given then the style information will be written inline.",
      outHtmlFn: "~/temp/test_svg.html",
      outCssFn:  "~/temp/test_svg.css"
    },

    audio_mix:
    {
      test_label: audio_mix,
      
      outFn: "~/temp/temp_mix.wav",
      outBits: 0,
      srcL: [
      { gain: 0.6, src:"~/temp/temp_sine_100_hz.wav" },
      { gain: 0.4, src:"~/temp/temp_sine_1000_hz.wav" } ]
    },

    audio_mix_a:
    {
      test_label: audio_mix,
      
      outFn: "~/temp/kc_record/xform_only/mix_6_4/preset_a_mix.wav",
      outBits: 24,
      srcL: [
      { gain: 0.6, src:"~/temp/kc_record/xform_only/dry/preset_a_dry.aiff" },
      { gain: 0.4, src:"~/temp/kc_record/xform_only/wet/preset_a_wet.aiff" } ]
    },

    audio_mix_b:
    {
      test_label: audio_mix,

     outFn: "~/temp/kc_record/xform_only/mix_6_4/preset_b_mix.wav",
      outBits: 24,
      srcL: [
      { gain: 0.6, src:"~/temp/kc_record/xform_only/dry/preset_b_dry.aiff" },
      { gain: 0.4, src:"~/temp/kc_record/xform_only/wet/preset_b_wet.aiff" } ]
    },

    audio_mix_c:
    {
      test_label: audio_mix,

      outFn: "~/temp/kc_record/xform_only/mix_6_4/preset_c_mix.wav",
      outBits: 24,
      srcL: [
      { gain: 0.6, src:"~/temp/kc_record/xform_only/dry/preset_c_dry.aiff" },
      { gain: 0.4, src:"~/temp/kc_record/xform_only/wet/preset_c_wet.aiff" } ]
    },

    audio_mix_d:
    {
      test_label: audio_mix,

      outFn: "~/temp/kc_record/xform_only/mix_6_4/preset_d_mix.wav",
      outBits: 24,
      srcL: [
      { gain: 0.6, src:"~/temp/kc_record/xform_only/dry/preset_d_dry.aiff" },
      { gain: 0.4, src:"~/temp/kc_record/xform_only/wet/preset_d_wet.aiff" } ]
    },

    audio_mix_f1:
    {
      test_label: audio_mix,
    
      outFn: "~/temp/kc_record/xform_only/mix_6_4/preset_f1_mix.wav",
      outBits: 24,
      srcL: [
      { gain: 0.6, src:"~/temp/kc_record/xform_only/dry/preset_f1_dry.aiff" },
      { gain: 0.4, src:"~/temp/kc_record/xform_only/wet/preset_f1_wet.aiff" } ]
    },

    audio_mix_f2:
    {
    
      test_label: audio_mix,
      
      outFn: "~/temp/kc_record/xform_only/mix_6_4/preset_f2_mix.wav",
      outBits: 24,
      srcL: [
      { gain: 0.6, src:"~/temp/kc_record/xform_only/dry/preset_f2_dry.aiff" },
      { gain: 0.4, src:"~/temp/kc_record/xform_only/wet/preset_f2_wet.aiff" } ]
    },

    audio_mix_f3:
    {
    test_label: audio_mix,

      outFn: "~/temp/kc_record/xform_only/mix_6_4/preset_f3_mix.wav",
      outBits: 24,
      srcL: [
      { gain: 0.6, src:"~/temp/kc_record/xform_only/dry/preset_f3_dry.aiff" },
      { gain: 0.4, src:"~/temp/kc_record/xform_only/wet/preset_f3_wet.aiff" } ]
    },

    audio_mix_f4:
    {
      test_label: audio_mix,

      outFn: "~/temp/kc_record/xform_only/mix_7_3/preset_f4_mix.wav",
      outBits: 24,
      srcL: [
      { gain: 0.7, src:"~/temp/kc_record/xform_only/dry/preset_f4_dry.aiff" },
      { gain: 0.3, src:"~/temp/kc_record/xform_only/wet/preset_f4_wet.aiff" } ]
    },

    audio_mix_g1a:
    {
      outFn: "~/temp/kc_record/xform_only/mix_7_3/preset_g1a_mix.wav",
      outBits: 24,
      srcL: [
      { gain: 0.7, src:"~/temp/kc_record/xform_only/dry/preset_g1a_dry.aiff" },
      { gain: 0.3, src:"~/temp/kc_record/xform_only/wet/preset_g1a_wet.aiff" } ]
    },

    audio_mix_g1d:
    {
      outFn: "~/temp/kc_record/xform_only/mix_7_3/preset_g1d_mix.wav",
      outBits: 24,
      srcL: [
      { gain: 0.7, src:"~/temp/kc_record/xform_only/dry/preset_g1d_dry.aiff" },
      { gain: 0.3, src:"~/temp/kc_record/xform_only/wet/preset_g1d_wet.aiff" } ]
    },

    audio_mix_ga:
    {
      outFn: "~/temp/kc_record/xform_only/mix_7_3/preset_ga_mix.wav",
      outBits: 24,
      srcL: [
      { gain: 0.7, src:"~/temp/kc_record/xform_only/dry/preset_ga_dry.aiff" },
      { gain: 0.3, src:"~/temp/kc_record/xform_only/wet/preset_ga_wet.aiff" } ]
    },

    audio_mix_g:
    {
      outFn: "~/temp/kc_record/xform_only/mix_7_3/preset_g_mix.wav",
      outBits: 24,
      srcL: [
      { gain: 0.7, src:"~/temp/kc_record/xform_only/dry/preset_g_dry.aiff" },
      { gain: 0.3, src:"~/temp/kc_record/xform_only/wet/preset_g_wet.aiff" } ]
    },

    select_to_file_0:
    {
      outDir: "~/temp/kc_record/xform_only/cut",
      outBits: 32,
      selectL: [
        { begSec: 1743.3, endSec:  1816.44, dst: "dry.wav", src: "~/temp/kc_record/xform_only/dry/a.aiff" },
        { begSec: 1743.3, endSec:  1816.44, dst: "a.wav",   src: "~/temp/kc_record/xform_only/wet/a.aiff" },
        { begSec: 1743.3, endSec:  1816.44, dst: "b.wav",   src: "~/temp/kc_record/xform_only/wet/b.aiff" },
        { begSec: 1743.3, endSec:  1816.44, dst: "c.wav",   src: "~/temp/kc_record/xform_only/wet/c.aiff" },
        
        { begSec: 1743.3, endSec:  1816.44, dst: "d.wav",   src: "~/temp/kc_record/xform_only/wet/d.aiff" },
        { begSec: 1743.3, endSec:  1816.44, dst: "f1.wav",  src: "~/temp/kc_record/xform_only/wet/f1.aiff" },
        { begSec: 1743.3, endSec:  1816.44, dst: "f2.wav",  src: "~/temp/kc_record/xform_only/wet/f2.aiff" },

        { begSec: 1743.3, endSec:  1816.44, dst: "f3.wav",  src: "~/temp/kc_record/xform_only/wet/f3.aiff" },
        { begSec: 1743.3, endSec:  1816.44, dst: "f4.wav",  src: "~/temp/kc_record/xform_only/wet/f4.aiff" },
        { begSec: 1743.3, endSec:  1816.44, dst: "g.wav",   src: "~/temp/kc_record/xform_only/wet/g.aiff" },
        
        { begSec: 1743.3, endSec: 1816.44, dst: "ga.wav",  src: "~/temp/kc_record/xform_only/wet/ga.aiff" },
        { begSec: 1743.3, endSec: 1816.44, dst: "g1a.wav", src: "~/temp/kc_record/xform_only/wet/g1a.aiff" },
        { begSec: 1743.3, endSec: 1816.44, dst: "g1d.wav", src: "~/temp/kc_record/xform_only/wet/g1d.aiff" },

        ]
      
    },


    select_to_file_1:
    {
        
      outDir: "~/src/currawong/site/web_part_selection/html/static/audio/sel_score",
      markerFn: "~/temp/audacity_scratch/labels.txt",  // write a marker file
      outBits: 16,
      fadeInSec: 0.1,
      fadeInPreFl: true,  // start selection at 'begSec-fadeInSec' else start at 'begSec'
      fadeOutSec: 0.1,
      fadeOutPostFl: true, // end selection at 'endSec+fadeOutSec' else end end at 'endSec'
      srcFn: "~/src/currawong/site/web_part_selection/html/static/audio/GUTIM_Part_1_20200711_48k_24bit.wav",


      // Optional selectL[] args:  "src"
      selectL: [
      
      { dst:"1_00_0.wav", begSec:0.0,    endSec:23.23 },
      { dst:"1_01_0.wav", begSec:23.23,  endSec:46.4 },
      { dst:"1_02_0.wav", begSec:46.4,   endSec:65.79 },
      { dst:"1_03_0.wav", begSec:65.79,  endSec:84.05 },
      { dst:"1_04_0.wav", begSec:84.05,  endSec:111.15 },
      { dst:"1_05_0.wav", begSec:111.15, endSec:125.9 },
      { dst:"1_06_0.wav", begSec:125.9,  endSec:164.1 },
      { dst:"1_07_0.wav", begSec:164.1,  endSec:185.87 },
      { dst:"1_08_0.wav", begSec:185.87, endSec:220.15 },
      { dst:"1_09_0.wav", begSec:220.15, endSec:237.3 },
      { dst:"1_10_0.wav", begSec:237.3,  endSec:275.75 },
      { dst:"1_00_1.wav", begSec:275.75, endSec:314.4 },
      { dst:"1_11_0.wav", begSec:314.4,  endSec:348.73 },
      { dst:"1_12_0.wav", begSec:348.73, endSec:369.05 },
      { dst:"1_06_1.wav", begSec:369.05, endSec:385.16 },
      { dst:"1_13_0.wav", begSec:385.16, endSec:406.06 },
      { dst:"1_14_0.wav", begSec:406.06, endSec:421.71 },
      { dst:"1_13_1.wav", begSec:421.71, endSec:433.85 },
      { dst:"1_08_1.wav", begSec:433.85, endSec:452.0 },
      { dst:"1_03_1.wav", begSec:452.0,  endSec:476.08 },
      { dst:"1_02_1.wav", begSec:476.08, endSec:489.2 },
      { dst:"1_10_1.wav", begSec:489.2,  endSec:504.98 },
      { dst:"1_12_1.wav", begSec:504.98, endSec:535.55 },
      { dst:"1_11_1.wav", begSec:535.55, endSec:549.78 },
      { dst:"1_14_1.wav", begSec:549.78, endSec:569.68 },
      { dst:"1_04_1.wav", begSec:569.68, endSec:588.63 },
      { dst:"1_01_1.wav", begSec:588.63, endSec:615.25 },
      { dst:"1_09_1.wav", begSec:615.25, endSec:647.83 },
      { dst:"1_05_1.wav", begSec:647.83, endSec:678.44 },
      { dst:"1_07_1.wav", begSec:678.44, endSec:740.85 },
      ]
      
    },


    select_to_file:
    {
        
      outDir: "~/src/currawong/site/web_part_selection/html/static/audio/sel_score",
      markerFn: "~/temp/audacity_scratch/labels.txt",  // write a marker file
      outBits: 16,
      fadeInSec: 0.1,
      fadeInPreFl: true,  // start selection at 'begSec-fadeInSec' else start at 'begSec'
      fadeOutSec: 0.1,
      fadeOutPostFl: true, // end selection at 'endSec+fadeOutSec' else end end at 'endSec'
      srcFn: "~/src/currawong/site/web_part_selection/html/static/audio/GUTIM_All_20200711_48k_24bit.wav",


      // Optional selectL[] args:  "src"
      selectL: [
      { dst:"2_01_0.wav", begSec:737.13, endSec:764.36 },
      { dst:"2_14_0.wav", begSec:764.36, endSec:782.60 },
      { dst:"2_12_0.wav", begSec:782.60, endSec:792.90 },
      { dst:"2_05_0.wav", begSec:792.90, endSec:818.15 },
      { dst:"2_00_0.wav", begSec:818.15, endSec:831.27 },
      { dst:"2_13_0.wav", begSec:831.27, endSec:851.90 },
      { dst:"2_09_0.wav", begSec:851.90, endSec:868.08 },
      { dst:"2_04_0.wav", begSec:868.08, endSec:899.88 },
      { dst:"2_02_0.wav", begSec:899.88, endSec:934.34 },
      { dst:"2_11_0.wav", begSec:934.34, endSec:952.62 },
      { dst:"2_12_1.wav", begSec:952.62, endSec:970.05 },
      { dst:"2_03_0.wav", begSec:970.05, endSec:1007.70 },
      { dst:"2_01_1.wav", begSec:1007.70, endSec:1035.94 },
      { dst:"2_13_1.wav", begSec:1035.94, endSec:1059.35 },
      { dst:"2_05_1.wav", begSec:1059.35, endSec:1087.29 },
      { dst:"2_07_0.wav", begSec:1087.29, endSec:1106.16 },
      { dst:"2_08_0.wav", begSec:1106.16, endSec:1144.80 },
      { dst:"2_11_1.wav", begSec:1144.80, endSec:1161.65 },
      { dst:"2_14_1.wav", begSec:1161.65, endSec:1187.05 },
      { dst:"2_04_1.wav", begSec:1187.05, endSec:1231.25 },
      { dst:"2_06_0.wav", begSec:1231.25, endSec:1249.20 },
      { dst:"2_02_1.wav", begSec:1249.20, endSec:1299.71 },
      { dst:"2_10_0.wav", begSec:1299.71, endSec:1318.82 },
      { dst:"2_09_1.wav", begSec:1318.82, endSec:1333.50 },
      { dst:"2_06_1.wav", begSec:1333.50, endSec:1359.28 },
      { dst:"2_12_2.wav", begSec:1359.28, endSec:1381.63 },
      { dst:"2_05_2.wav", begSec:1381.63, endSec:1419.31 },
      { dst:"2_07_1.wav", begSec:1419.31, endSec:1430.36 },
      { dst:"2_13_2.wav", begSec:1430.36, endSec:1444.80 },
      { dst:"2_01_2.wav", begSec:1444.80, endSec:1476.36 },
      { dst:"2_10_1.wav", begSec:1476.36, endSec:1505.92 },
      { dst:"2_03_1.wav", begSec:1505.92, endSec:1551.75 },
      { dst:"2_14_2.wav", begSec:1551.75, endSec:1579.75 },
      { dst:"2_08_1.wav", begSec:1579.75, endSec:1599.79 },
      { dst:"2_11_2.wav", begSec:1599.79, endSec:1627.85 },
      { dst:"2_04_2.wav", begSec:1627.85, endSec:1651.23 },
      { dst:"2_00_1.wav", begSec:1651.23, endSec:1680.52 },
      { dst:"2_07_2.wav", begSec:1680.52, endSec:1709.35 },
      { dst:"2_08_2.wav", begSec:1709.35, endSec:1729.75 },
      { dst:"2_03_2.wav", begSec:1729.75, endSec:1744.20 },
      { dst:"2_00_2.wav", begSec:1744.20, endSec:1759.82 },
      { dst:"2_02_2.wav", begSec:1759.82, endSec:1769.92 },
      { dst:"2_09_2.wav", begSec:1769.92, endSec:1779.57 },
      { dst:"2_14_3.wav", begSec:1779.57, endSec:1793.72 },
      { dst:"2_07_3.wav", begSec:1793.72, endSec:1802.88 },
      { dst:"2_03_3.wav", begSec:1802.88, endSec:1819.58 },
      { dst:"2_10_2.wav", begSec:1819.58, endSec:1832.89 },
      { dst:"2_06_2.wav", begSec:1832.89, endSec:1850.93 },
      { dst:"2_04_3.wav", begSec:1850.93, endSec:1867.80 },
      { dst:"2_01_3.wav", begSec:1867.80, endSec:1888.17 },
      { dst:"2_11_3.wav", begSec:1888.17, endSec:1914.85 },
      { dst:"2_13_3.wav", begSec:1914.85, endSec:1934.81 },
      { dst:"2_08_3.wav", begSec:1934.81, endSec:1955.66 },
      { dst:"2_12_3.wav", begSec:1955.66, endSec:1970.00 },
      { dst:"2_00_3.wav", begSec:1970.00, endSec:1982.46 },
      { dst:"2_06_3.wav", begSec:1982.46, endSec:2014.06 },
      { dst:"2_05_3.wav", begSec:2014.06, endSec:2042.40 },
      { dst:"2_09_3.wav", begSec:2042.40, endSec:2078.88 },
      { dst:"2_10_3.wav", begSec:2078.88, endSec:2111.29 },
      { dst:"2_02_3.wav", begSec:2111.29, endSec:2205.00 },
      ]
      
    },

    // Extract a section of source audio, apply fade in/out ramps, and mix it into a destination file.
    cut_and_mix:
    {
        dstFn:  "~/temp/test_xfade.wav",
        dstBits: 24,
 
        srcDir: "~/temp",
        crossFadeSec: 0.5,
        
        argL: [
        { srcBegSec: 1.0, srcEndSec: 2.0, srcFn: "temp_sine_100_hz.wav",  dstBegSec:0.0, gain:1.0 },
        { srcBegSec: 3.0, srcEndSec: 4.0, srcFn: "temp_sine_1000_hz.wav", dstBegSec:0.5, gain:1.0 }
        ]
    },

    // Given a set of overlapping source files of identical length solo a given source during a specified time interval.
    parallel_mix:
    {
        dstFn:  "~/temp/test_pmix.wav",
        dstBits: 24,

        srcDir: "~/temp/kc_record/xform_only/cut",
        
        argL: [
        { srcBegSec: 0.0,   srcEndSec:  4.2,  srcFn: "dry_mix.wav",  fadeOutSec:0.5, gain:1.0 },
        { srcBegSec: 4.2,   srcEndSec:  8.6,  srcFn: "d_mix.wav",    fadeOutSec:0.5, gain:1.0  }
        { srcBegSec: 8.6,   srcEndSec: 15.67, srcFn: "ga_mix.wav",   fadeOutSec:0.5, gain:1.0  }
        { srcBegSec: 15.67, srcEndSec: 17.98, srcFn: "dry_mix.wav",  fadeOutSec:0.0, gain:1.0  }
        ]
    },

    convolve_file:
    {
        dstFn:  "~/temp/test_convolve.wav",
        dstBits: 32,
        srcFn: "~/temp/select_to_file/preset_f1.wav",
        irFn: "~/sdk/freeverb3/samples/IR/IR_theater.wav",
        irScale: 1.0,
        
    },

    generate_audio:
    {
      dstFn:    "~/temp/click.wav",
      dstBits:  32,
      dstSrate: 48000,
      dstSecs:  711.0,  // file duration in secs
      op: "click",

      sine:  { gain:0.7, hertz:440.0 },
      click: { gain:0.8, decay:0.9, msL:[ 61000,117000,181000,241500,280500,312000,357300,419800,480000,535500,584200,646100,678000,709500 ] }
    },

    transform_app:
    {
        srcDir: "~/temp/kc_record/xform_only/cut",             // location of 'wet' source files
        dryFn: "~/temp/kc_record/xform_only/cut/concert.wav",  // dry source file
        
        dstPreFn:  "~/temp/test_xform_app.wav",     // the output file prior to reverb
        dstRevFn:  "~/temp/test_xform_app_rev.wav", // the output file with reverb
        
        dstBits: 32,

        irEnableFl: false,
        irScale: 0.25,
        irFn: null, //"~/media/audio/IR/freeverb3/101-cup.wav"

        
        argL: [
        { srcBegSec: 0.0,   srcEndSec:  4.2,  srcFn: "a.wav",  fadeOutSec:0.5, wetGain:0.3  },
        { srcBegSec: 4.2,   srcEndSec:  8.6,  srcFn: "b.wav",  fadeOutSec:0.5, wetGain:0.3  },
        { srcBegSec: 8.6,   srcEndSec: 15.67, srcFn: "c.wav",  fadeOutSec:0.5, wetGain:0.3  },
        { srcBegSec: 15.67, srcEndSec: 17.98, srcFn: "d.wav",  fadeOutSec:0.0, wetGain:0.3  },
        
        ]
    },

    fft: {},
    ifft: {},
    convolve: {},

    piano_score:{
      filename: "/home/kevin/src/currawong/projects/score_proc/data/play_file.cfg",
    }
    

    audio_transforms: {},
    
    am_to_midi_file: { inDir: "~/src/currawong/audio/workshop/nonken2" },

    audio_file_proc: {
      srcFn: "/home/kevin/src/currawong/audio/GUTIM_All_20200711_96k_float.wav",
      dstFn: "/home/kevin/temp/audio_out.wav",
      cfg: "tremelo",
      
      recordChN: 0,
       recorder: {
         enableFl: true,
         frameN: 1024,
         sigN:   10,
         filename: "~/temp/temp.csv",
         colLabelL: [ "mean0", "mean1", "db0", "db1", "db2", "db3", "db4" ]
       }

      tremelo: {
        wndSmpN: 1024,
        hopSmpN: 1024,
        program: "tremelo",
        args: {
          hz: 1.0
          depth: 1.0
        }
      }

      pvoc: {
        wndSmpN:  512,
        hopSmpN:  512,
        program: "pvoc",
        args: {
          procSmpN:  512,
          wndSmpN:  2048,
          hopSmpN:   512            
        }
      }
     }

     pvoc_file_proc: {
       srcFn: "/home/kevin/temp/audio.wav",
       dstFn: "/home/kevin/temp/audio_out.wav",
       program: "spec_dist",

       recordChN: 2,
       
       recorder: {
         enableFl: false,
         frameN: 1024,
         sigN:   10,
         filename: "~/temp/temp.csv",
         colLabelL: [ "mean0", "mean1", "db0", "db1", "db2", "db3", "db4", "db5", "db6" ]
       }

       pvoc_template: {
         wndSmpN: 2048,          // required  FT window size in samples
         hopSmpN:  512,          // required  Sample offset between successive FT windows
         procSmpN: 512,          // required  Output samples for each FT frame processed
         presetLabel: preset_1,  // required 
         inGain:   1.0,          // optional  
         outGain:  1.0,          // optional
         
         function: pvoc_template,
         
         args: 
          {
          foo: 1, 
          blah: 2,
          }
        
        
      }

      spec_dist: {
        wndSmpN: 2048,
        hopSmpN:  512,
        procSmpN: 512,
        inGain:   1.0,     // optional        
        outGain:  1.0,     // optional
        
        function: spec_dist,
        
        args: {
          ceiling:  30.0,
          expo:      2.0,
          thresh:   54.0,
          upr: -0.7,
          lwr:  2.0,
          mix:       0.0
        }
      }
    }


    flow_proc_dict: {

      balance: {
        vars: {
           in:      { type:real, value:0.5, doc:"Input vaue" },
           out:     { type:real, doc:"Ouput value. Same as input value."},
           inv_out: { type:real, doc:"1.0 minus output value."}
        }
      }

      audio_in: {
        vars: {
          dev_label: { type:string,  doc:"Audio device label." },
          out:       { type:audio,   doc:"Audio output" },
          }
      }

      audio_out: {
        vars: {
          dev_label: { type:string,            doc:"Audio device label." },
          in:        { type:audio, srcFl:true, doc:"Audio input." }
          }
      }
      
      audioFileIn: {
        vars: {
          fname: { type:string, doc:"Audio file name." },
          out:{    type:audio,  doc:"Audio file output" },
          eofFl:{  type:bool,  eofFl: true, doc:"Set the system 'halt' flag when the audio is completely read."},
          }
      }

      audioFileOut: {
        vars: {
          fname: { type:string,            doc:"Audio file name." },
          bits:  { type:uint, value:32,    doc:"Audio file word width. (8,16,24,32,0=float32)."},
          in:    { type:audio, srcFl:true, doc:"Audio file input." }
          }
      }

      audio_gain: {
        vars: {
           in:   { type:audio, srcFl:true, doc:"Audio input." },
           gain: { type:real, value:1.0, doc:"Gain coefficient." }
           out:  { type:audio,             doc:"Audio output." },
        }
      }

      audio_split: {
         vars: {
           in:     { type:audio, srcFl:true, doc:"Audio input." },
           select: { type:bool,              doc:"Enable/Disable each channel" }
           gain:   { type:real, value:1.0,   doc:"Audio gain for each selected (output) channel." }
           out:    { type:audio,             doc:"Audio output." },
         }

        presets:
        {
           mute_off: { gain:1   },
           mute_on:  { gain:0 },
        }
      }

      audio_duplicate: {
         vars: {
           in:        { type:audio, srcFl:true, doc:"Audio input."},
           duplicate: { type: uint,            doc:"Count of times to repeat this channel." },
           gain:      { type: real, value:1.0, doc:"Audio gain." },
           out:       { type:audio,             doc:"Audio output containing repeat * input channel count channels."}
         }
      }

      audio_merge: {
         vars: {
           in0:  { type:audio, srcFl:true, doc:"First audio input." },
           in1:  { type:audio, srcFl:true, doc:"Second audio input." },
           gain: { type:real, value:1.0, doc:"Audio gain for each selected (output) channel." }
           out:  { type:audio,             doc:"Audio output. Channel count is the sum of the input channel count." },
         }
      }

      audio_mix: {
         vars: {
           in0:   { type:audio, srcFl:true, doc:"First audio input." },
           in1:   { type:audio, srcFl:true, doc:"Second audio input." },
           gain0: { type:real, value:0.5,   doc:"Audio gain for input 0." },
           gain1: { type:real, value:0.5,   doc:"Audio gain for input 1." },
           out:   { type:audio,             doc:"Audio output. Channel count is the sum of the input channel count." },
         }
      }

      audio_delay: {
        vars: {
           in:         { type:audio, srcFl:true,   doc:"Audio input." },
           maxDelayMs: { type:real, value:1000.0   doc:"Maximum possible delay in milliseconds." },
           delayMs:    { type:real,                doc:"Delay in milliseconds." },
           out:        { type:audio,               doc:"Audio output." },
        }
      }


      sine_tone: {
        vars: {
          srate:     { type:real, value:48000.0, doc:"Sine tone sample rate."}
          chCnt:     { type:uint, value:2,       doc:"Output signal channel count."},
          hz:        { type:real, value:440.0,   doc:"Frequency in Hertz."},
          gain:      { type:real, value:0.8,     doc:"Signal frequency."},
          out:       { type:audio,               doc:"Audio output" },
          }

        presets: {
          a: { hz:220 },
          b: { hz:880 },
        }
      }

      pv_analysis: {
        vars: {
          in:      { type:audio,    srcFl:true,   doc:"Audio input." },
          hopSmpN: { type:uint,     value:  128,   doc:"Hop sample count." },
          wndSmpN: { type:uint,     value:  512,   doc:"Window sample count." },
          hzFl:    { type:bool,     value: false, doc:"Calculate frequency via the method of phase changeof each bin." },
          out:     { type:spectrum,               doc:"Spectrum output." }
          }
      }

      pv_synthesis: {
        vars: {
          in:  { type:spectrum,  srcFl:true,  doc:"Spectrum input." },
          out: { type:audio,                  doc:"Audio output." }
          }
      }

      spec_dist: {
        vars: {
          in:       { type:spectrum, srcFl:true, doc:"Spectrum input." },
          
          ceiling:  { type:real, value: 30.0, doc:"Ceiling parameter."},
          expo:     { type:real, value:  2.0, doc:"Exponent parameter."},
          thresh:   { type:real, value: 54.0, doc:"Threshold parameter."},
          upr:      { type:real, value: -0.7, doc:"Upper slope parameter."},
          lwr:      { type:real, value:  2.0, doc:"Lower slope  parameter."},
          mix:      { type:real, value:  0.0, doc:"Basic/Bump Mix parameter."},

          out:      { type:spectrum,          doc:"Spectrum output." },

          }
          
        presets: {

          dry: {
               
          }

          kc: {
            ceiling:  20.0,
            expo:      2.0,
            thresh:   65.0,
            upr:       0.0,
            lwr:       2.0,
            mix:       0.0
          }
          
          a: {
            ceiling:  20.0
            expo:     2.0
            thresh:   60.0
            upr:      [   -1.1, -0.99],
            lwr:      2.0
            mix:      0.0
          }

          b: {
            ceiling:  20.0
            expo:      2.0
            thresh:   [   77.0, 74.0 ], 
            upr:      -0.5
            lwr:      [    3.0,  2.0 ],
            mix:       0.0
          }

          c: {
            ceiling:  20.0
            expo:      2.0
            thresh:   80.0
            upr:      -0.5
            lwr:       5.0
            mix:       0.0
          }

          d: {
            ceiling:  20.0
            expo:      2.0
            thresh:   70.0
            upr:    [ -3.9, 04.5]
            lwr:       4.0
            mix:       0.0
          }

          f_1: {
            ceiling:  20.0
            expo:      2.0
            thresh:   50.0
            upr:      -3.0
            lwr:       1.0
            mix:       0.0
          }
          
          f_2: {
            ceiling:  20.0
            expo:      2.0
            thresh:   60.0
            upr:      -3.0
            lwr:       1.0
            mix:       0.0
          }

          f_3: {
            ceiling:  20.0
            expo:      2.0
            thresh:   55.0
            upr:      -3.0
            lwr:       1.0
            mix:       0.0
          }

          f_4: {
            ceiling:  20.0
            expo:      2.0
            thresh:   55.0
            upr:      -5.0
            lwr:       1.0
            mix:       0.0
          }

          g: {
            ceiling:  40.0
            expo:      8.0
            thresh:   [60.0 64.0]
            upr:      -0.7
            lwr:       8.0
            mix:       1.0
          }
          
          g_a: {
            ceiling:  40.0
            expo:      2.0
            thresh:   [50.0 54.0]
            upr:      -0.7
            lwr:       2.0
            mix:       1.0
          }

          g_1_a: {
            ceiling:  20.0
            expo:      2.0
            thresh:   [50.0 54.0]
            upr:      -0.7
            lwr:       8.0
            mix:       1.0
          }

          g_1_d: {
            ceiling:  [60.0 64.0]
            expo:     [ 7.0  5.0]
            thresh:   [40.0 34.0]
            upr:      [-0.4 -0.3]
            lwr:      [ 7.0  5.0]
            mix:        1.0
          }
        }  
      }

      compressor: {
        vars: {
          in:        { type:audio, srcFl:  true, doc:"Audio input." },    
          bypass:    { type:bool, value:  false, doc:"Bypass the compressor."},
          igain:     { type:real, value:    1.0, doc:"Input gain."},
          thresh:    { type:real, value:    0.0, doc:"Attack threshold in dB."},
          ratio:     { type:real, value:    2.0, doc:"Compression ratio."},
          atk_ms:    { type:real, value:   20.0, doc:"Attack time in milliseconds."},
          rls_ms:    { type:real, value:   20.0, doc:"Release time in milliseconds."},
          wnd_ms:    { type:real, value:  200.0, doc:"RMS calc. window length in milliseconds."},
          maxWnd_ms: { type:real, value: 1000.0, doc:"Maximim (allocated) window length in milliseconds."},
          ogain:     { type:real, value:    1.0, doc:"Output gain."},     
          out:       { type:audio,               doc:"Audio output." }, 
        }
        
        presets: {
          dflt: {
             igain:   3.0
             thresh: 60.0
             ratio:   5.0
             atk_ms:  5.0
             rls_ms: 20.0
             wnd_ms:100.0
             ogain:   1.0
          }
          
          kc: {
             bypass:   false
             igain:     3.0
             thresh:   80.0
             ratio:     2.0
             atk_ms:   20.0
             rls_ms: 1000.0
             wnd_ms:  200.0
             ogain:     1.0
          }

          dry: {
               
          }

           a: {
             igain: 6.0
             ogain: 1.0
          }

           b: {
             igain: 10.0
             ogain: 1.0
          }

           c: {
             igain: 11.0
             ogain: 1.0
          }

          d: {
             igain: 9.0
             ogain: 1.0
          }

          f_1: {
             igain: 6.0
             ogain: 1.0
          }

          f_2: {
             igain: 6.0
             ogain: 1.0
          }

          f_3: {
             igain: 6.0
             ogain: 1.0
          }
          
          f_4: {
             igain: 6.0
             ogain: 1.0
          }
          
          g: {
             igain: 10.0
             ogain: 0.25
          }
          
          g_a: {
             igain: 10.0
             ogain: 0.25
          }

          g_1_a: {
             igain: 10.0
             ogain: 0.25
          }

          g_1_d: {
             igain: 10.0
             ogain: 0.25
          }


        }
      }
    }
    
    flow_test: {
        framesPerCycle:64,
        maxCycleCount:15000,
	flow_proc_fname: "~/src/cwtest/src/cwtest/cfg/flow_proc_dict.cfg",
        
        network: {
          srcFn: { class: audioFileIn,   argLabel:"default",  args:{  default:{fname:"/home/kevin/temp/audio.wav", eofFl:false, on_off:true } } },

               wet_in_gain: { class: audio_gain, in:{ in:srcFn.out }, args:{}},

               pva:   { class: pv_analysis,      in:{ in:wet_in_gain.out },  args:{ default:{ wndSmpN:512, hopSmpN:128, hzFl:false } } },
               sd:    { class: spec_dist,        in:{ in:pva.out },  preset:kc   },            
               pvs:   { class: pv_synthesis,     in:{ in:sd.out  },              },
               cmp:   { class: compressor,       in:{ in:pvs.out },  preset:kc   },

               wet_out_gain: { class: audio_gain, in:{ in:cmp.out }, args:{}},


          dstFn: { class: audioFileOut,  in:{ in:wet_out_gain.out }, args:{  default:{fname:"/home/kevin/temp/audio_flow_out.wav"} } },
        }        
    }

    flow_pv: {
      framesPerCycle:64,
      maxCycleCount:15000,
      
      network: {
        srcFn: { class: audioFileIn,   argLabel:"default",  args:{  default:{fname:"/home/kevin/temp/audio.wav", eofFl:true } } },
        pva:   { class: pv_analysis,   in:{ in:srcFn.out }, args:{  default:{ wndSmpN:512, hopSmpN:64, hzFl:false } } },
        pvs:   { class: pv_synthesis,  in:{ in:pva.out   }, args:{  default:{  } } },
        dstFn: { class: audioFileOut,  in:{ in:pvs.out },   args:{  default:{fname:"/home/kevin/temp/audio_flow_out.wav"} } },
      }
        
    }

    
    flow_spec_dist: {
      framesPerCycle:      64,  // time-domain audio cycles frame per cycle
      maxCycleCount:        0,  // 0 disables maxCycleCount
      printNetworkFl:   false,  // print the network instance
      printClassDictFl: false,  // print the class description dictionary
       
      network: {
        ain:
        {
          class: audioFileIn,
          argLabel:"compare",
          
          args:{
             default:{ fname:"/home/kevin/temp/audio.wav",                                       eofFl:true },
             kc:     { fname:"/home/kevin/src/currawong/audio/GUTIM_All_20200711_96k_float.wav", eofFl:true }
             compare:{ fname:"/mnt/zinger02k/zonk/temp/kc_record/xform_only/cut/dry.wav", eofFl:true }  
          }
       },


        pva:   { class: pv_analysis,   in:{ in:ain.out },           args:{  default:{ wndSmpN:[2048,1024], hopSmpN:[512,256], hzFl:false } } },
        sd:    { class: spec_dist,     in:{ in:pva.out },   preset:[kc b]   },
        pvs:   { class: pv_synthesis,  in:{ in:sd.out  },              },
        cmp:   { class: compressor,    in:{ in:pvs.out },  preset:[kc b]  },
        aout:  { class: audioFileOut,  in:{ in:cmp.out },             args:{  default:{fname:"/home/kevin/temp/kc_compare/b.wav"} } },
      }
        
    }


    preset_sel: {

            params: {
              //score_fn: "~/src/currawong/projects/score_proc/data/play_file.csv",
              //score_fn: "~/src/cwtest/src/cwtest/cfg/preset_sel/score/20220423/temp.csv",
              //score_fn: "~/src/currawong/projects/score_follow/play_score.csv",
              score_fn: "~/src/currawong/audio/workshop/beck1/record_4/play_score.csv"

              record_dir: "~/src/cwtest/src/cwtest/cfg/preset_sel/preset_sel_fragments",
              
              //record_fn: "preset_sel_20220423",
              record_fn: "preset_sel_20220507",
              //record_fn: "temp_frag",
              record_fn_ext: "txt",


              crossFadeSrate: 48000.0,  // TODO: move to flow cfg. and set via 'system default sample rate'
              crossFadeCount: 3,

              beg_play_loc: 0,
              end_play_loc: 0,

              presets: {
                preset_labelL: [ "dry", "a", "b", "c", "d", "f1", "f2", "f3", "f4", "g", "ga", "g1a", "g1d" ],
                default_gain:           1.0,
                default_wet_dry_gain:   0.5,
                default_fade_ms:      500.0,
                default_preset:       "dry",

                default_master_wet_in_gain:   1.0,
                default_master_wet_out_gain:  1.0,
                default_master_dry_gain:      1.0,
                default_master_sync_delay_ms: 400,  // spirio 400

              },

              midi_play_record: {             
                      max_midi_msg_count: 32768, 
                      midi_timer_period_micro_sec: 15000,
                      all_off_delay_ms: 2500, // delay after stop time to turn off all  notes
                      log_in_flag: false,
                      log_out_flag: false,
                      half_pedal_flag: false,
                      
                      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: "Fastlane", 
                        //midi_out_port: "Fastlane MIDI A",

                        //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 ] ,
                                                
                      },
                      {

                        enableFl: true,
                        //midi_out_device: "Fastlane", 
                        //midi_out_port: "Fastlane MIDI A",
                        midi_out_device: "MIDIFACE 2x2",
                        midi_out_port: "MIDIFACE 2x2 Midi Out 2",
                        
                        //midi_out_device: "PC-300",
                        //midi_out_port: "PC-300 MIDI 1",
                        
                        //            0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  34
                        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 ] ,
                      },
                      
                      //{ midi_out_device: "PipeWire-RT-Event",  midi_out_port: "input" },
                ],
               }
               
              frag_panel: {

                panel: {
                
                  name: fragPanelId
                  addClassName: fragPanel

                  row: {
                     name: fragPanelRowId
                     addClassName: fragPanelRow
                     
                     col: {
                        numb_disp: { name: fragBegLocId,    title:"Beg Loc", value: 0 },
                        numb_disp: { name: fragEndLocId,    title:"End Loc", value: 0 },
                        number:    { name: fragInGainId,    title:"In Gain",    min:0.0, max:100.0, step:0.1, decpl:1 },
                        number:    { name: fragOutGainId,   title:"Out Gain",   min:0.0, max:100.0, step:0.1, decpl:1 },
                     },
                     col: {
                        row: {
                           name: fragPresetRowId,
                           addClassName: fragPresetRow,
                        },
                        
                        row: {
                           string: { name: fragNoteId, addClassName: fragNote, title:"Note" },
                        }
                     },
                     col: {
                          number:{ name: fragWetDryGainId,  title:"Wet/Dry", min:0.0, max:1.0,  step:0.1, decpl:2 },
                          number:{ name: fragFadeOutMsId,   title:"Fade Ms", min:0.0, max:5000, step:1,   decpl:0 },
                          row: {
                               button:{ name: fragPlaySeqBtnId,  title:"Play Seq" },
                               button:{ name: fragPlayAllBtnId,   title:"Play All" },
                               }
                     },
                     col: {
                        number:    { name: fragBegPlayLocId, title:"Begin", min:0, max:1000000, step:1, decpl:0 },
                        number:    { name: fragEndPlayLocId, title:"End",   min:0, max:1000000, step:1, decpl:0 },
                        button:    { name: fragPlayBtnId,    title:"Play" }
                     }
                     
                  }
                }
              },
              
            },

            ui: {
                  physRootDir: "~/src/cwtest/src/libcw/html/preset_sel",
                  dfltPageFn:  "index.html",
                  port: 5687,
                  rcvBufByteN: 2048,
                  xmtBufByteN: 2048,
                  fmtBufByteN: 4096,
                  websockTimeOutMs: 50,  // max time out while blocking for a websock event
                  uiCfgFn: "ui.cfg"      // default UI resource description
            },

            serial: {
                   pollPeriodMs: 50,
                   recvBufByteN: 512,

                   array: [
                     {
                       enable_flag: false,
                       label:   "port1",        // User label
                       device: "/dev/ttyUSB0",  // Serial device name
                       baud:   115200,
                       bits:   8,
                       stop:   1,
                       parity: "no",
                     }
                   ]
                   
                },
              
              
              midi: {
                 parserBufByteN: 1024,
              },
          
              audio: {
                  meterMs: 50,          // audio meter filter length and meter callback period
                  threadTimeOutMs: 50,  // audio thread cond var time out

                  groupL: [
                    {
                      enableFl:       true,   // (req) 
                      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",
                    
                    enableFl:      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: {

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



            flow: {
              framesPerCycle:      64,  // time-domain audio cycles frame per cycle
              maxCycleCount:    15000,  // 0 disables maxCycleCount
              printNetworkFl:   false,  // print the network instance
              printClassDictFl: false,  // print the class description dictionary
              

              // Simulate SPIRIO with Synchron
             non_spirio_network: {
               aud_in:   { class: audio_in,   args:{ default:{dev_label:"main"} } },

               // select the first two channels (this reduces the channel count if there are more than 2 incoming channels)
               ivory_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[1,1]}} }

               
               vsl_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[0,0,1,1]}} }

               // delay the incoming audio signal to sync it with the piano
               sync_delay: { class: audio_delay, in: { in:vsl_in.out }, args:{ default:{ delayMs:0 } }}

               mstr_wet_in_gain: { class: audio_gain, in:{ in:ivory_in.out }, args:{}}
               
               // wet signal processing chain
               wet_in_gain: { class: audio_gain, in:{ in:mstr_wet_in_gain.out }, args:{}},
               pva:   { class: pv_analysis,      in:{ in:wet_in_gain.out },  args:{ default:{ wndSmpN:512, hopSmpN:128, hzFl:false } } },
               sd:    { class: spec_dist,        in:{ in:pva.out },  preset:kc   },            
               pvs:   { class: pv_synthesis,     in:{ in:sd.out  },              },
               cmp:   { class: compressor,       in:{ in:pvs.out },  preset:kc   },

               wet_out_gain: { class: audio_gain, in:{ in:cmp.out }, args:{}},

               mute_wet: { class: audio_gain, in:{ in:wet_out_gain.out }, args:{}},


               // apply the wet/dry gain balance
               wd_bal:       { class: balance, args{}},
               wet_bal_gain: { class: audio_gain, in:{ in:wet_out_gain.out,   gain:wd_bal.out },     args:{}},
               dry_bal_gain: { class: audio_gain, in:{ in:vsl_in.out, gain:wd_bal.inv_out }, args:{}},

               mstr_wet_out_gain: { class: audio_gain, in:{ in:wet_bal_gain.out }, args:{}}
               mstr_dry_out_gain: { class: audio_gain, in:{ in:dry_bal_gain.out }, args:{}},

               // merge the wet/dry signals into a single 4 channel signal
               merge0: { class: audio_merge,   in:{ in0:mstr_wet_out_gain.out, in1:mstr_dry_out_gain.out }, args:{} },

               merge1: { class: audio_merge,   in:{ in0:mstr_wet_out_gain.out, in1:sync_delay.out }, args:{} },
               //merge1: { class: audio_merge, in:{ in0:ivory_in.out, in1:vsl_in.out }, args:{} },

               aout:  { class: audio_out,     in:{ in:merge1.out }, args:{ default:{dev_label:"main"} } },
             }

             // SPIRIO network
             network: {
               aud_in:   { class: audio_in,   args:{ default:{dev_label:"main"} } },

               // select the first two channels (this reduces the channel count if there are more than 2 incoming channels)
               split_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[1,1]}} }

               // delay the incoming audio signal to sync it with the piano
               sync_delay { class: audio_delay, in: { in:split_in.out }, args:{ default:{ delayMs:400 } }}

               mstr_wet_in_gain: { class: audio_gain, in:{ in:sync_delay.out }, args:{}}
               
               // wet signal processing chain
               wet_in_gain: { class: audio_gain, in:{ in:mstr_wet_in_gain.out }, args:{}},
               pva:   { class: pv_analysis,      in:{ in:wet_in_gain.out },  args:{ default:{ wndSmpN:512, hopSmpN:128, hzFl:false } } },
               sd:    { class: spec_dist,        in:{ in:pva.out },  preset:kc   },            
               pvs:   { class: pv_synthesis,     in:{ in:sd.out  },              },
               cmp:   { class: compressor,       in:{ in:pvs.out },  preset:kc   },

               wet_out_gain: { class: audio_gain, in:{ in:cmp.out }, args:{}},

               mute_wet: { class: audio_gain, in:{ in:wet_out_gain.out }, args:{}},


               // apply the wet/dry gain balance
               wd_bal:       { class: balance, args{}},
               wet_bal_gain: { class: audio_gain, in:{ in:mute_wet.out,   gain:wd_bal.out },     args:{}},
               dry_bal_gain: { class: audio_gain, in:{ in:sync_delay.out, gain:wd_bal.inv_out }, args:{}},

               mstr_wet_out_gain: { class: audio_gain, in:{ in:wet_bal_gain.out }, args:{}}
               mstr_dry_out_gain: { class: audio_gain, in:{ in:dry_bal_gain.out }, args:{}},

               // merge the wet/dry signals into a single 4 channel signal
               merge: { class: audio_merge,   in:{ in0:mstr_wet_out_gain.out, in1:mstr_dry_out_gain.out }, args:{} },
                       
               //aout:  { class: audio_out,     in:{ in:merge.out }, args:{ default:{dev_label:"main"} } },
               aout:  { class: audio_out,     in:{ in:merge.out }, args:{ default:{dev_label:"main"} } },
             }

             // stereo network
             stereo_network: {
               aud_in:   { class: audio_in,   args:{ default:{dev_label:"main"} } },

               // select the first two channels (this reduces the channel count if there are more than 2 incoming channels)
               split_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[1,1]}} }

               // delay the incoming audio signal to sync it with the piano
               sync_delay { class: audio_delay, in: { in:split_in.out }, args:{ default:{ delayMs:400 } }}

               mstr_wet_in_gain: { class: audio_gain, in:{ in:sync_delay.out }, args:{}}
               
               // wet signal processing chain
               wet_in_gain: { class: audio_gain, in:{ in:mstr_wet_in_gain.out }, args:{}},
               pva:   { class: pv_analysis,      in:{ in:wet_in_gain.out },  args:{ default:{ wndSmpN:512, hopSmpN:128, hzFl:false } } },
               sd:    { class: spec_dist,        in:{ in:pva.out },  preset:kc   },            
               pvs:   { class: pv_synthesis,     in:{ in:sd.out  },              },
               cmp:   { class: compressor,       in:{ in:pvs.out },  preset:kc   },

               wet_out_gain: { class: audio_gain, in:{ in:cmp.out }, args:{}},

               mute_wet: { class: audio_gain, in:{ in:wet_out_gain.out }, args:{}},


               // apply the wet/dry gain balance
               wd_bal:       { class: balance, args{}},
               wet_bal_gain: { class: audio_gain, in:{ in:mute_wet.out,   gain:wd_bal.out },     args:{}},
               dry_bal_gain: { class: audio_gain, in:{ in:sync_delay.out, gain:wd_bal.inv_out }, args:{}},

               mstr_wet_out_gain: { class: audio_gain, in:{ in:wet_bal_gain.out }, args:{}}
               //mstr_dry_out_gain: { class: audio_gain, in:{ in:dry_bal_gain.out }, args:{}},

               // merge the wet/dry signals into a single 4 channel signal
               //merge: { class: audio_merge,   in:{ in0:mstr_wet_out_gain.out, in1:mstr_dry_out_gain.out }, args:{} },
                       
               //aout:  { class: audio_out,     in:{ in:merge.out }, args:{ default:{dev_label:"main"} } },
               aout:  { class: audio_out,     in:{ in:mstr_wet_out_gain.out }, args:{ default:{dev_label:"main"} } },
             }

             presets: {
               dry:   {
                        mute_wet: { gain:0 },
                      },
               a:     { sd:a,     cmp:a,     mute_wet:{ gain:1 } },
               b:     { sd:b,     cmp:b,     mute_wet:{ gain:1 } },
               c:     { sd:c,     cmp:c,     mute_wet:{ gain:1 } },
               d:     { sd:d,     cmp:d,     mute_wet:{ gain:1 } },
               f1:    { sd:f_1,   cmp:f_1,   mute_wet:{ gain:1 } },
               f2:    { sd:f_2,   cmp:f_2,   mute_wet:{ gain:1 } },
               f3:    { sd:f_3,   cmp:f_3,   mute_wet:{ gain:1 } },
               f4:    { sd:f_4,   cmp:f_4,   mute_wet:{ gain:1 } },
               g:     { sd:g,     cmp:g,     mute_wet:{ gain:1 } },
               ga:    { sd:g_a,   cmp:g_a,   mute_wet:{ gain:1 } },
               g1a:   { sd:g_1_a, cmp:g_1_a, mute_wet:{ gain:1 } },
               g1d:   { sd:g_1_d, cmp:g_1_d, mute_wet:{ gain:1 } }
               
             }
           }

                
    },

    stereo_network: {
      ain:   { class: audio_in,                                   args:{ default:{dev_label:"main"} } },

      // split the input channels to create a wet and dry signal path
      split_wet: { class: audio_split,   in:{ in:ain.out },      args:{ default:{ select:[1,0]} }},
      split_dry: { class: audio_split,   in:{ in:ain.out },      args:{ default:{ select:[0,1]} }},

      // duplicate the channels on the wet/dry signal path to simulate a 4 channel audio interface
      dupl_wet:  { class: audio_duplicate, in:{ in:split_dry.out }, args:{ duplicate:2 } },
      dupl_dry:  { class: audio_duplicate, in:{ in:split_wet.out }, args:{ duplicate:2 } },

      // wet signal processing chain
      pva:   { class: pv_analysis,   in:{ in:dupl_wet.out },        args:{ default:{ wndSmpN:512, hopSmpN:128, hzFl:false } } },
      sd:    { class: spec_dist,     in:{ in:pva.out },  preset:kc   },        
      pvs:   { class: pv_synthesis,  in:{ in:sd.out  },              },
      cmp:   { class: compressor,    in:{ in:pvs.out },  preset:kc   },

      // reduce the wet and dry signal path to 1 channel each because we are using a 2 channel interface
      osplit_wet: { class: audio_split,   in:{ in:cmp.out },      args:{ default:{ select:[1,0]} }},
      osplit_dry: { class: audio_split,   in:{ in:dupl_dry.out }, args:{ default:{ select:[0,1]} }},

      // apply the wet/dry gain 
      wd_bal: { class: balance, args{}},
      wet_gain: { class: audio_gain, in:{ in:osplit_wet.out, gain:wd_bal.out },     args:{}},
      dry_gain: { class: audio_gain, in:{ in:osplit_dry.out, gain:wd_bal.inv_out }, args:{}},

      // merge the wet/dry signals back into a single signal
      merge: { class: audio_merge,   in:{ in0:wet_gain.out, in1:dry_gain.out }, args:{} },
      
      aout:  { class: audio_out,     in:{ in:merge.out },           args:{ default:{dev_label:"main"} } },
      },

      sine_network: {
        framesPerCycle:      64,  // time-domain audio cycles frame per cycle
        maxCycleCount:    15000,  // 0 disables maxCycleCount
        printNetworkFl:   false,  // print the network instance
        printClassDictFl: false,  // print the class description dictionary
        
        
        
        network: {
          sin:    { class: sine_tone,                                            args:{ default:{ hz:[220,880]} }},
          splitL: { class: audio_split,   in:{ in:sin.out },                     args:{ default:{ select:[1,0]} }},
          splitR: { class: audio_split,   in:{ in:sin.out },                     args:{ default:{ select:[0,1]} }},

          delay:  { class: audio_delay,   in:{ in:splitL.out },                  args:{ default:{ delayMs:1}    }},
          bal:    { class: balance,                                              args:{}                        },
          mix:    { class: audio_mix,     in:{ in0:delay.out, in1:splitL.out, gain0:bal.out, gain1:bal.inv_out },  args:{ }},
          
          merge:  { class: audio_merge,   in:{ in0:mix.out, in1:splitR.out }, args:{}},
          aout:   { class: audio_out,     in:{ in:merge.out },                   args:{ default:{dev_label:"main"} } },
          },

          presets: {
            a: { splitL:hi, splitR:lo },
            b: { splitL:lo, splitR:hi }
            }

        },

    score_follow: {
      srate: 48000,  
      out_dir: "~/temp/score_follow_test",

      pre_test_fl: true,
      show_muid_fl: false,

      // each of these files will be written to the dir: <out_dir>/<perf_label>
      out_svg_fname:           "sf_results.html",
      out_cm_score_rpt_fname:  "cm_score_report.txt",
      out_midi_csv_fname:      "midi.csv",

      cfg: {
        cm_score_csv_fname: "~/src/cwtest/src/cwtest/cfg/gutim_full/cm_score.csv",
        search_area_locN: 10,
        key_wnd_locN:     7,
       }

       //1. first notes in shiau-uen 11 are duplicated.
       //   show muid in perf-notes to check if the duplicates are caused by backtracking
       //	  
       //2. valgrind shows a write error
       

      perfL: [
      
        {
	  label: shiau_uen_5,
	  enable_fl: false,
	  start_loc: 327,
	  midi_fname: "~/temp/shiau_uen/record_5/midi.mid",
	  
	},      
        {
	  label: shiau_uen_7,
	  enable_fl: false,
	  start_loc: 2547,
	  midi_fname: "~/temp/shiau_uen/record_7/midi.mid",	  
	},      
        {
	  label: shiau_uen_11,
	  enable_fl: true,
	  start_loc: 5361,
	  midi_fname: "~/temp/shiau_uen/record_11/midi.mid",	  
	},      
        {
	  label: shiau_uen_13,
	  enable_fl: false,
	  start_loc: 8291,
	  midi_fname: "~/temp/shiau_uen/record_13/midi.mid",	  
	},      
        {
	  label: shiau_uen_17,
	  enable_fl: false,
	  start_loc: 11456,
	  midi_fname: "~/temp/shiau_uen/record_17/midi.mid",	  
	},      
        {
	  label: shiau_uen_23,
	  enable_fl: false,
	  start_loc: 13565,
	  midi_fname: "~/temp/shiau_uen/record_23/midi.mid",	  
	}
      ]
      
      }

    svg_midi_file: {
      "src_file_type": "midi",
      "src_fname": "~/temp/shiau_uen/record_5/midi.mid",
      
      //"src_file_type": "piano_score",
      //"src_fname": "~/src/cwtest/src/cwtest/cfg/gutim_full/score/temp.csv",
      //"src_fname": "/home/kevin/src/cwtest/src/cwtest/cfg/preset_sel/score/20220423/temp.csv"
      
      "out_fname":  "~/temp/score_follow_test/midi_svg.html"
      "midi_state_args": {
         "cache_enable_fl": true,      
         "cache_block_msg_count": 128,
         "pedal_up_midi_value": 64,
         "pedal_half_min_midi_value": 40,
         "pedal_half_max_midi_value": 50
      }
    }
    
    svg_score: {
      "piano_score_fname":"~/src/cwtest/src/cwtest/cfg/gutim_full/score/temp.csv",
      "cm_score_fname":"~/src/cwtest/src/cwtest/cfg/gutim_full/cm_score.csv",
      "css_fname":"~/src/cwtest/src/cwtest/cfg/gutim_full/score/svg/score.css",
      "out_fname":"~/src/cwtest/src/cwtest/cfg/gutim_full/score/svg/score.html"
      "midi_state_args": {
         "cache_enable_fl": true,
         "cache_block_msg_count": 128,
         "pedal_up_midi_value": 64,
         "pedal_half_min_midi_value": 43,
         "pedal_half_max_midi_value": 45
      }
    },

    midi_state: {
      "midi_fname": "~/src/currawong/audio/workshop/beck1/record_4/midi.mid",
      "cache_enable_fl": true,
      "args": {
         "cache_enable_fl": true,
         "cache_block_msg_count": 128,
         "pedal_up_midi_value": 64,
         "pedal_half_min_midi_value": 43,
         "pedal_half_max_midi_value": 45
      }
    },

    csv: {
      fname: "~/src/cwtest/src/cwtest/cfg/gutim_full/cm_score.csv",
      titleL: [ "status","d0","d1" ]
      // titleL: []
    },

    sfscore: {
      //cm_score_fname: "~/src/cwtest/src/cwtest/cfg/gutim_full/cm_score.csv",
      cm_score_fname: "/home/kevin/src/currawong/projects/score_proc/score_out.csv"
      srate: 48000,
      
      dyn_ref: {
      "silent": 1,
      "pppp":10,
      "ppp_m":20,
      "ppp":25,
      "ppp_p":30,
      "pp_m":30,
      "pp":35,
      "pp_p":40,
      "p_m":40,
      "p":45,
      "p_p":50,
      "mp_m":50
      "mp":55
      "mp_p":60,
      "mf_m":60,
      "mf":65,
      "mf_p":70,
      "f_m":70,
      "f":75,
      "f_p":80,
      "ff":85,
      "fff":100,
      "ffff":120
      }
    }
    
    sfmatch: {

      gen_perf_example:
      {
        enable_fl: false,
	beg_loc_idx: 0,
	loc_cnt: 10    
      }
    
      cm_score_fname: "/home/kevin/src/currawong/projects/score_proc/score_out.csv"
      srate: 48000,
      maxScWndN:10,   // max size of the score alignment window
      maxMidiWndN:7,  // max counf of the performance (MIDI) alignment window
      
      dyn_ref: {
      "silent": 1,
      "pppp":10,
      "ppp_m":20,
      "ppp":25,
      "ppp_p":30,
      "pp_m":30,
      "pp":35,
      "pp_p":40,
      "p_m":40,
      "p":45,
      "p_p":50,
      "mp_m":50
      "mp":55
      "mp_p":60,
      "mf_m":60,
      "mf":65,
      "mf_p":70,
      "f_m":70,
      "f":75,
      "f_p":80,
      "ff":85,
      "fff":100,
      "ffff":120
      }

      perf: [
      { muid:0 smpIdx:0 pitch:65 vel:44 },
      { muid:1 smpIdx:3600 pitch:63 vel:64 },
      { muid:2 smpIdx:7200 pitch:45 vel:64 },
      { muid:3 smpIdx:10800 pitch:30 vel:64 },
      { muid:4 smpIdx:14400 pitch:37 vel:64 },
      { muid:5 smpIdx:18000 pitch:65 vel:112 },
      { muid:6 smpIdx:21600 pitch:87 vel:100 },
      { muid:7 smpIdx:21600 pitch:36 vel:88 },
      { muid:8 smpIdx:21600 pitch:46 vel:30 },
      { muid:9 smpIdx:193028 pitch:85 vel:30 },
      { muid:10 smpIdx:330171 pitch:100 vel:88 },
      { muid:11 smpIdx:638742 pitch:80 vel:100 },
      ]

    },

    sftrack: {

      cm_score_fname: "/home/kevin/src/currawong/projects/score_proc/score_out.csv"
      srate: 48000,
      maxScWndN:10,   // max size of the score alignment window
      maxMidiWndN:7,  // max counf of the performance (MIDI) alignment window

      report_midi_file_fl: false,
      report_score_fl: false,
      report_track_fl: true
      
      dyn_ref: {
      "silent": 1,
      "pppp":10,
      "ppp_m":20,
      "ppp":25,
      "ppp_p":30,
      "pp_m":30,
      "pp":35,
      "pp_p":40,
      "p_m":40,
      "p":45,
      "p_p":50,
      "mp_m":50
      "mp":55
      "mp_p":60,
      "mf_m":60,
      "mf":65,
      "mf_p":70,
      "f_m":70,
      "f":75,
      "f_p":80,
      "ff":85,
      "fff":100,
      "ffff":120
      }

      perf:{
        enable_fl:true,
	loc_idx: 120,
        midi_fname:"/home/kevin/temp/shiau_uen/record_5/midi.mid"
	
      }
    }
    

}
