From 6d45663d8215dd2d2fbacb9b95ef2f363b1be285 Mon Sep 17 00:00:00 2001
From: kevin <kevin@larke.org>
Date: Sat, 18 Feb 2023 14:00:24 -0500
Subject: [PATCH] cfg updates

---
 src/cwtest/cfg/flow_proc_dict.cfg             |  12 +-
 .../preset_sel/preset_sel_fragments/m1-7.txt  | 415 +++++++++++++++++-
 .../preset_sel_fragments/m1_196.txt           |   9 +-
 .../preset_sel_fragments/m302-325.txt         |  34 +-
 src/cwtest/cfg/video/audio_midi_record.cfg    |  40 +-
 src/cwtest/cfg/video/beck_video_3.cfg         |  74 +---
 src/cwtest/cfg/video/video.cfg                |  46 +-
 7 files changed, 530 insertions(+), 100 deletions(-)

diff --git a/src/cwtest/cfg/flow_proc_dict.cfg b/src/cwtest/cfg/flow_proc_dict.cfg
index 96ceb9e..d69164a 100644
--- a/src/cwtest/cfg/flow_proc_dict.cfg
+++ b/src/cwtest/cfg/flow_proc_dict.cfg
@@ -125,8 +125,8 @@
       pv_analysis: {
         vars: {
           in:		{ type:audio,    flags:["src"],   doc:"Audio input." },
-	  maxWndSmpN:	{ type:uint,     value: 1024,  doc:"Maximum window sample count." },
-          wndSmpN:	{ type:uint,     value:  512,  doc:"Window sample count." },
+	  maxWndSmpN:	{ type:uint,     value: 512,  doc:"Maximum window sample count." },
+          wndSmpN:	{ type:uint,     value: 512,  doc:"Window sample count." },
           hopSmpN:	{ type:uint,     value:  128,  doc:"Hop sample count." },
           hzFl:		{ type:bool,     value: false, doc:"Calculate frequency via the method of phase changeof each bin." },
           out:		{ type:spectrum,               doc:"Spectrum output." }
@@ -165,22 +165,22 @@
           }
 
           f_1: {
-	    wndSmpN:  [512,1024]
+	    wndSmpN:  512,
 	    hopSmpN:  128
           }
 	  
           f_2: {
-	    wndSmpN:  [1024,512]
+	    wndSmpN:  512,
 	    hopSmpN:  128
           }
 
           f_3: {
-	    wndSmpN:  [512,1024]
+	    wndSmpN:  512,
 	    hopSmpN:  128
           }
 
           f_4: {
-	    wndSmpN:  [1024,512]
+	    wndSmpN:  512,
 	    hopSmpN:  128
           }
 
diff --git a/src/cwtest/cfg/preset_sel/preset_sel_fragments/m1-7.txt b/src/cwtest/cfg/preset_sel/preset_sel_fragments/m1-7.txt
index 9756d1d..5ecfc74 100644
--- a/src/cwtest/cfg/preset_sel/preset_sel_fragments/m1-7.txt
+++ b/src/cwtest/cfg/preset_sel/preset_sel_fragments/m1-7.txt
@@ -1 +1,414 @@
- { "fragL" :  [  { "fragId" : 1, "endLoc" : 13, "endTimestamp_sec" : 0, "endTimestamp_nsec" : 0, "inGain" : 1.000000, "outGain" : 1.000000, "wetDryGain" : 0.500000, "fadeOutMs" : 500.000000, "begPlayLoc" : 1, "endPlayLoc" : 13, "note" : "", "presetN" : 13, "presetL" :  [  { "order" : 0, "preset_label" : "dry", "play_fl" : false } ,  { "order" : 0, "preset_label" : "a", "play_fl" : false } ,  { "order" : 3, "preset_label" : "b", "play_fl" : false } ,  { "order" : 1, "preset_label" : "c", "play_fl" : true } ,  { "order" : 0, "preset_label" : "d", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f1", "play_fl" : false } ,  { "order" : 2, "preset_label" : "f2", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f3", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f4", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g", "play_fl" : false } ,  { "order" : 0, "preset_label" : "ga", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g1a", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g1d", "play_fl" : false }  ]  } ,  { "fragId" : 2, "endLoc" : 20, "endTimestamp_sec" : 0, "endTimestamp_nsec" : 0, "inGain" : 1.000000, "outGain" : 1.000000, "wetDryGain" : 0.500000, "fadeOutMs" : 500.000000, "begPlayLoc" : 14, "endPlayLoc" : 20, "note" : "", "presetN" : 13, "presetL" :  [  { "order" : 0, "preset_label" : "dry", "play_fl" : false } ,  { "order" : 0, "preset_label" : "a", "play_fl" : false } ,  { "order" : 0, "preset_label" : "b", "play_fl" : false } ,  { "order" : 0, "preset_label" : "c", "play_fl" : true } ,  { "order" : 0, "preset_label" : "d", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f1", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f2", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f3", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f4", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g", "play_fl" : false } ,  { "order" : 0, "preset_label" : "ga", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g1a", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g1d", "play_fl" : false }  ]  } ,  { "fragId" : 3, "endLoc" : 28, "endTimestamp_sec" : 0, "endTimestamp_nsec" : 0, "inGain" : 1.000000, "outGain" : 1.000000, "wetDryGain" : 0.500000, "fadeOutMs" : 500.000000, "begPlayLoc" : 21, "endPlayLoc" : 28, "note" : "", "presetN" : 13, "presetL" :  [  { "order" : 0, "preset_label" : "dry", "play_fl" : false } ,  { "order" : 0, "preset_label" : "a", "play_fl" : false } ,  { "order" : 0, "preset_label" : "b", "play_fl" : false } ,  { "order" : 0, "preset_label" : "c", "play_fl" : false } ,  { "order" : 0, "preset_label" : "d", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f1", "play_fl" : false } ,  { "order" : 1, "preset_label" : "f2", "play_fl" : true } ,  { "order" : 0, "preset_label" : "f3", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f4", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g", "play_fl" : false } ,  { "order" : 0, "preset_label" : "ga", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g1a", "play_fl" : false } ,  { "order" : 2, "preset_label" : "g1d", "play_fl" : false }  ]  } ,  { "fragId" : 4, "endLoc" : 47, "endTimestamp_sec" : 0, "endTimestamp_nsec" : 0, "inGain" : 1.000000, "outGain" : 1.000000, "wetDryGain" : 0.500000, "fadeOutMs" : 500.000000, "begPlayLoc" : 29, "endPlayLoc" : 47, "note" : "", "presetN" : 13, "presetL" :  [  { "order" : 0, "preset_label" : "dry", "play_fl" : false } ,  { "order" : 0, "preset_label" : "a", "play_fl" : false } ,  { "order" : 0, "preset_label" : "b", "play_fl" : false } ,  { "order" : 2, "preset_label" : "c", "play_fl" : false } ,  { "order" : 0, "preset_label" : "d", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f1", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f2", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f3", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f4", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g", "play_fl" : false } ,  { "order" : 0, "preset_label" : "ga", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g1a", "play_fl" : false } ,  { "order" : 1, "preset_label" : "g1d", "play_fl" : true }  ]  } ,  { "fragId" : 5, "endLoc" : 59, "endTimestamp_sec" : 26, "endTimestamp_nsec" : 685000000, "inGain" : 1.000000, "outGain" : 1.000000, "wetDryGain" : 0.500000, "fadeOutMs" : 500.000000, "begPlayLoc" : 29, "endPlayLoc" : 59, "note" : "", "presetN" : 13, "presetL" :  [  { "order" : 0, "preset_label" : "dry", "play_fl" : false } ,  { "order" : 0, "preset_label" : "a", "play_fl" : false } ,  { "order" : 0, "preset_label" : "b", "play_fl" : false } ,  { "order" : 0, "preset_label" : "c", "play_fl" : false } ,  { "order" : 0, "preset_label" : "d", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f1", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f2", "play_fl" : true } ,  { "order" : 0, "preset_label" : "f3", "play_fl" : false } ,  { "order" : 0, "preset_label" : "f4", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g", "play_fl" : false } ,  { "order" : 0, "preset_label" : "ga", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g1a", "play_fl" : false } ,  { "order" : 0, "preset_label" : "g1d", "play_fl" : false }  ]  }  ] , "fragN" : 5, "masterWetInGain" : 1.500000, "masterWetOutGain" : 1.000000, "masterDryGain" : 1.000000, "masterSyncDelayMs" : 400.000000 } 
\ No newline at end of file
+{
+    "masterSyncDelayMs": 400.0,
+    "masterDryGain": 1.0,
+    "masterWetOutGain": 1.0,
+    "masterWetInGain": 1.5,
+    "fragN": 5,
+    "fragL": [
+        {
+            "presetL": [
+                {
+                    "play_fl": false,
+                    "preset_label": "dry",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "a",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "b",
+                    "order": 3
+                },
+                {
+                    "play_fl": true,
+                    "preset_label": "c",
+                    "order": 1
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "d",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f1",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f2",
+                    "order": 2
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f3",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f4",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "ga",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g1a",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g1d",
+                    "order": 0
+                }
+            ],
+            "presetN": 13,
+            "note": "",
+            "endPlayLoc": 13,
+            "begPlayLoc": 1,
+            "fadeOutMs": 500.0,
+            "wetDryGain": 0.5,
+            "outGain": 1.0,
+            "inGain": 1.0,
+            "endTimestamp_nsec": 0,
+            "endTimestamp_sec": 0,
+            "endLoc": 13,
+            "fragId": 1
+        },
+        {
+            "presetL": [
+                {
+                    "play_fl": false,
+                    "preset_label": "dry",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "a",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "b",
+                    "order": 0
+                },
+                {
+                    "play_fl": true,
+                    "preset_label": "c",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "d",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f1",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f2",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f3",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f4",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "ga",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g1a",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g1d",
+                    "order": 0
+                }
+            ],
+            "presetN": 13,
+            "note": "",
+            "endPlayLoc": 20,
+            "begPlayLoc": 14,
+            "fadeOutMs": 500.0,
+            "wetDryGain": 0.5,
+            "outGain": 1.0,
+            "inGain": 1.0,
+            "endTimestamp_nsec": 0,
+            "endTimestamp_sec": 0,
+            "endLoc": 20,
+            "fragId": 2
+        },
+        {
+            "presetL": [
+                {
+                    "play_fl": false,
+                    "preset_label": "dry",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "a",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "b",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "c",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "d",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f1",
+                    "order": 0
+                },
+                {
+                    "play_fl": true,
+                    "preset_label": "f2",
+                    "order": 1
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f3",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f4",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "ga",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g1a",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g1d",
+                    "order": 2
+                }
+            ],
+            "presetN": 13,
+            "note": "",
+            "endPlayLoc": 28,
+            "begPlayLoc": 21,
+            "fadeOutMs": 500.0,
+            "wetDryGain": 0.5,
+            "outGain": 1.0,
+            "inGain": 1.0,
+            "endTimestamp_nsec": 0,
+            "endTimestamp_sec": 0,
+            "endLoc": 28,
+            "fragId": 3
+        },
+        {
+            "presetL": [
+                {
+                    "play_fl": false,
+                    "preset_label": "dry",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "a",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "b",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "c",
+                    "order": 2
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "d",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f1",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f2",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f3",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f4",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "ga",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g1a",
+                    "order": 0
+                },
+                {
+                    "play_fl": true,
+                    "preset_label": "g1d",
+                    "order": 1
+                }
+            ],
+            "presetN": 13,
+            "note": "",
+            "endPlayLoc": 47,
+            "begPlayLoc": 29,
+            "fadeOutMs": 500.0,
+            "wetDryGain": 0.5,
+            "outGain": 1.0,
+            "inGain": 1.0,
+            "endTimestamp_nsec": 0,
+            "endTimestamp_sec": 0,
+            "endLoc": 47,
+            "fragId": 4
+        },
+        {
+            "presetL": [
+                {
+                    "play_fl": false,
+                    "preset_label": "dry",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "a",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "b",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "c",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "d",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f1",
+                    "order": 0
+                },
+                {
+                    "play_fl": true,
+                    "preset_label": "f2",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f3",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "f4",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "ga",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g1a",
+                    "order": 0
+                },
+                {
+                    "play_fl": false,
+                    "preset_label": "g1d",
+                    "order": 0
+                }
+            ],
+            "presetN": 13,
+            "note": "",
+            "endPlayLoc": 59,
+            "begPlayLoc": 29,
+            "fadeOutMs": 500.0,
+            "wetDryGain": 0.5,
+            "outGain": 1.0,
+            "inGain": 1.0,
+            "endTimestamp_nsec": 685000000,
+            "endTimestamp_sec": 26,
+            "endLoc": 59,
+            "fragId": 5
+        }
+    ]
+}
diff --git a/src/cwtest/cfg/preset_sel/preset_sel_fragments/m1_196.txt b/src/cwtest/cfg/preset_sel/preset_sel_fragments/m1_196.txt
index 9db9f15..faf5958 100644
--- a/src/cwtest/cfg/preset_sel/preset_sel_fragments/m1_196.txt
+++ b/src/cwtest/cfg/preset_sel/preset_sel_fragments/m1_196.txt
@@ -1,5 +1,4 @@
-
-    {
+{
     "masterSyncDelayMs": 400.0,
     "masterDryGain": 1.0,
     "masterWetOutGain": 1.0,
@@ -11425,7 +11424,7 @@
           "order": 0
         }
       ]
-    },    
- ]
     }
-    
\ No newline at end of file
+ ]
+ }
+    
diff --git a/src/cwtest/cfg/preset_sel/preset_sel_fragments/m302-325.txt b/src/cwtest/cfg/preset_sel/preset_sel_fragments/m302-325.txt
index b563649..1bbb1b8 100644
--- a/src/cwtest/cfg/preset_sel/preset_sel_fragments/m302-325.txt
+++ b/src/cwtest/cfg/preset_sel/preset_sel_fragments/m302-325.txt
@@ -91,7 +91,7 @@
       "note": "",
       "begPlayLoc": 9188,
       "endPlayLoc": 9304,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -172,7 +172,7 @@
       "note": "",
       "begPlayLoc": 9305,
       "endPlayLoc": 9351,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -253,7 +253,7 @@
       "note": "",
       "begPlayLoc": 9352,
       "endPlayLoc": 9429,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -334,7 +334,7 @@
       "note": "",
       "begPlayLoc": 9430,
       "endPlayLoc": 9498,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -415,7 +415,7 @@
       "note": "",
       "begPlayLoc": 9499,
       "endPlayLoc": 9564,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -496,7 +496,7 @@
       "note": "",
       "begPlayLoc": 9565,
       "endPlayLoc": 9577,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -577,7 +577,7 @@
       "note": "",
       "begPlayLoc": 9578,
       "endPlayLoc": 9627,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -658,7 +658,7 @@
       "note": "",
       "begPlayLoc": 9628,
       "endPlayLoc": 9647,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -739,7 +739,7 @@
       "note": "",
       "begPlayLoc": 9648,
       "endPlayLoc": 9707,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -820,7 +820,7 @@
       "note": "",
       "begPlayLoc": 9708,
       "endPlayLoc": 9789,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -901,7 +901,7 @@
       "note": "",
       "begPlayLoc": 9790,
       "endPlayLoc": 9862,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -982,7 +982,7 @@
       "note": "",
       "begPlayLoc": 9863,
       "endPlayLoc": 9886,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -1063,7 +1063,7 @@
       "note": "",
       "begPlayLoc": 9887,
       "endPlayLoc": 9921,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -1144,7 +1144,7 @@
       "note": "",
       "begPlayLoc": 9922,
       "endPlayLoc": 9938,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -1225,7 +1225,7 @@
       "note": "",
       "begPlayLoc": 9939,
       "endPlayLoc": 9953,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -1306,7 +1306,7 @@
       "note": "",
       "begPlayLoc": 9954,
       "endPlayLoc": 9984,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
@@ -1387,7 +1387,7 @@
       "note": "",
       "begPlayLoc": 9985,
       "endPlayLoc": 10007,
-      "fadeOutMs": 500.0,
+      "fadeOutMs": 50.0,
       "wetDryGain": 0.5,
       "outGain": 1.0,
       "inGain": 1.0,
diff --git a/src/cwtest/cfg/video/audio_midi_record.cfg b/src/cwtest/cfg/video/audio_midi_record.cfg
index 6258536..48ec7ce 100644
--- a/src/cwtest/cfg/video/audio_midi_record.cfg
+++ b/src/cwtest/cfg/video/audio_midi_record.cfg
@@ -2,36 +2,38 @@
   test: {
         audio_midi:
 	{
-	      record_dir: "/home/kevin/temp/video_trailer",
+	      //record_dir: "/home/kevin/temp/shiau_uen",
+	      record_dir: "/home/kevin/src/currawong/audio/video_trailer/beck"
 	      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:  [0, 1 ],
+	      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: 2500, // delay after stop time to turn off all  notes
+		      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 2",
+		        //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: "iRig MIDI 2", 
+			midi_out_port: "iRig MIDI 2 MIDI 1",
 
 			//midi_out_device: "Fastlane", 
 			//midi_out_port: "Fastlane MIDI A",
@@ -41,7 +43,7 @@
 			force_damper_down_velocity: 80,
 
 			// do not play damper values that are in this range
-			damper_dead_band_enable_fl: true,
+			damper_dead_band_enable_fl: false,
 			damper_dead_band_min_value: 1,
 			damper_dead_band_max_value: 30,
 
@@ -63,12 +65,20 @@
 			// 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",
@@ -77,7 +87,9 @@
                   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		  
+                  uiCfgFn: "ui.cfg",      // default UI resource description
+		  asyncFl: false
             },
 
         
@@ -87,7 +99,8 @@
 		   recvBufByteN: 512,
                    array: [
 		     {
-		     enable_flag: false,
+		     enableFl: false,
+		     asyncFl: false,
                      label:   "port1",        // User label
                      device: "/dev/ttyACM0",  // Serial device name
                      baud:   38400,
@@ -101,6 +114,7 @@
               
               midi: {
                  parserBufByteN: 1024,
+		 asyncFl: true,
               },
           
               audio: {
@@ -109,7 +123,8 @@
 
 		  groupL: [
 		    {
-		      enableFl:       true,   // (req) 
+		      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
@@ -138,6 +153,7 @@
 
 	    socket: {
 
+	       asyncFl: false,
                maxSocketCnt: 10,
 	       recvBufByteCnt: 4096,
 	       threadTimeOutMs: 50,
diff --git a/src/cwtest/cfg/video/beck_video_3.cfg b/src/cwtest/cfg/video/beck_video_3.cfg
index 52561a2..49cf90b 100644
--- a/src/cwtest/cfg/video/beck_video_3.cfg
+++ b/src/cwtest/cfg/video/beck_video_3.cfg
@@ -5,8 +5,7 @@
 
             params: {
 	      //score_fn: "~/src/currawong/audio/video_trailer/beck/record_3/play_score.csv",
-	      score_fn: "~/src/currawong/audio/video_trailer/taka/record_3/play_score.csv",
-
+	      score_fn: "unknown"
 	      record_dir: "~/src/cwtest/src/cwtest/cfg/preset_sel/preset_sel_fragments",
 	      record_fn: "m302-325",
 	      record_fn_ext: "txt",
@@ -17,7 +16,7 @@
 	      crossFadeCount: 3,
 
 	      beg_play_loc: 9187,
-	      end_play_loc: 0,
+	      end_play_loc: 10109,
 
 	      presets: {
 	        preset_labelL: [ "dry", "a", "b", "c", "d", "f1", "f2", "f3", "f4", "g", "ga", "g1a", "g1d" ],
@@ -81,8 +80,11 @@
     	                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: "MIDIFACE 2x2",
+			//midi_out_port: "MIDIFACE 2x2 Midi Out 2",
+			
+		        midi_out_device: "iRig MIDI 2",
+			midi_out_port: "iRig MIDI 2 MIDI 1",
 			
 			//midi_out_device: "PC-300",
 			//midi_out_port: "PC-300 MIDI 1",
@@ -101,53 +103,14 @@
 		],
 	       }
 	       
-	      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" }
-		     }
-		     
-		  }
-		}
-	      },
-	      
+	      	      
 	    },
 
+
+	    io: {
+	      callbackMutexTimeOutMs: 100,
+	    }
+
             ui: {
                   physRootDir: "~/src/cwtest/src/libcw/html/preset_sel",
                   dfltPageFn:  "index.html",
@@ -156,7 +119,9 @@
                   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
+                  uiCfgFn: "ui.cfg",      // default UI resource description
+		  asyncFl: false
             },
 
             serial: {
@@ -165,7 +130,8 @@
 
 		   array: [
 		     {
-		       enable_flag: false,
+		       enableFl: false,
+		       asyncFl: false,
                        label:   "port1",        // User label
                        device: "/dev/ttyUSB0",  // Serial device name
                        baud:   115200,
@@ -180,6 +146,8 @@
               
               midi: {
                  parserBufByteN: 1024,
+		 asyncFl: false
+
               },
           
               audio: {
@@ -189,6 +157,7 @@
 		  groupL: [
 		    {
 		      enableFl:       true,   // (req) 
+		      asyncFl:        false,  // (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
@@ -216,6 +185,7 @@
 
 	    socket: {
 
+	       asyncFl: false,
                maxSocketCnt: 10,
 	       recvBufByteCnt: 4096,
 	       threadTimeOutMs: 50,
diff --git a/src/cwtest/cfg/video/video.cfg b/src/cwtest/cfg/video/video.cfg
index ab5a768..d5bf84c 100644
--- a/src/cwtest/cfg/video/video.cfg
+++ b/src/cwtest/cfg/video/video.cfg
@@ -13,7 +13,7 @@
 	      //record_fn: "preset_sel_20220507",
 	      record_fn: "unknown",
 	      //record_fn: "m302-325",
-	      //record_fn: "m350-458",
+	      record_fn: "m350-458",
 	     
 	      //record_fn: "m1-7",
 	      record_fn_ext: "txt",
@@ -46,6 +46,7 @@
 		      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,
 		      min_damper_down_time_ms: 250,
 
@@ -175,6 +176,21 @@
                   meterMs: 50,          // audio meter filter length and meter callback period
 		  threadTimeOutMs: 50,  // audio thread cond var time out
 
+		  files: [
+		    {
+		      enableFl: true, 
+		      device_label:"recording_file",
+		      
+		      //in_fname: "/home/kevin/temp/coda_0_a_new.wav",
+		      //in_rewindow_on_start_fl: true,
+		      
+		      out_fname: "/home/kevin/temp/background_audio.wav",
+		      out_rewind_on_start_fl: true,
+		      out_ch_count: 6,
+		      
+		    }
+		  ],
+		  
 		  groupL: [
 		    {
 		      enableFl:       true,   // (req)
@@ -195,12 +211,27 @@
 		    
                     enableFl:      true,    // (req)
 		    meterFl:       true,    // (opt)
-		    label:         "main",  // (req) User label
+		    label:         "dev",  // (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
+                  },
+                  {
+		    // System device name
+		    device: "recording_file",
+		    clockSrcDev: "dev",
+		    syncToClockSrcDevInputFl: false,  // false = sync to clockSrcDev output
+		    
+                    enableFl:      true,    // (req)
+		    meterFl:       true,    // (opt)
+		    label:         "dev_file",  // (req) User label
+		    userId:            1,   // (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
                   }
                 ]
             },
@@ -224,10 +255,10 @@
 	      
 	       
 	     network: {
-	       aud_in:   { class: audio_in,   args:{ default:{dev_label:"main"} } },
+	       aud_in:   { class: audio_in,   args:{ default:{dev_label:"dev"} } },
 
-	       // select the first six channels: ivory, mic, vsl
-	       split_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[1,1,1,1,1,1 ]}} }
+	       // select the first four channels: ivory, vsl
+	       split_in: { class: audio_split, in:{ in:aud_in.out } args:{ default:{select[1,1,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 } }}
@@ -262,11 +293,12 @@
 	       // 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, in2:mstr_wet_out_gain.out, in3:mstr_dry_out_gain.out }  },
 
-               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:"dev"} } },
 
 	       //af_merge { class: audio_merge, in:{ in0:mstr_wet_out_gain.out, in1:sync_delay.out }  },
 
-	       //af_out: { class: audioFileOut, in:{ in:af_merge.out }, args:{ default:{fname:"/home/kevin/temp/temp.wav"}}},
+
+	       //af_out: { class: audio_out, in:{ in:sync_delay.out }, args:{ default:{dev_label:"dev_file"} }}
 
       	     }