{
  proc_dict:
  {
    audio_in: {
       help: "Audio input device.",
       vars: {
         device: { type:string, flags:['init'],  doc:"Audio device" },
	 # 'init' inidcates that this value may only be set when the proc instance is created
         out:    { type:audio, doc:"Audio output" }
       }      
    },

    audio_out: {
      help: "Audio output device.",
      vars: {
        device: { type:string, flags:['init'], doc:"Audio device" },
	in:     { type:audio,  doc:"Audio input" }
      }
    },

    audio_gain: {
      help: "Audio gain control.",
      vars: {
        in:   { type:audio,             doc:"Audio input." },
        gain: { type:real, default:1.0, doc:"Gain value." },
        out:  { type:audio,             doc:"Audio output." }
      }
    },

    poly_audio_split: {
      help: "Audio poly split.",
      vars: {
        in:  { type:audio, doc: "Audio input." },
	out: { type:audio, doc: "Audio output.", duplicate: { port:'in', source:'audio_ch_cnt' }
      }
    },

    poly_audio_merge: {
      help: "Audio poly merge.",
        in:  { type:audio, duplicate: { source:'poly_src'}  doc: "Audio input." },
	# 'poly_src' duplicate 'in' for each poly instance on the other side of th input connection
	
	out: { type:audio, doc: "Audio output." }
    }

  },

  subnet_dict:
  {
     multi_ch_gain: {
        ports: {
	  in:   { proc: split, var: in }
	  gain: { proc: gain,  var: gain },
	  out:  { proc: merge, var: out },
	}

       procs: {
         split: { type: poly_audio_split },
         gain:  { type: audio_gain,       in: { in:split.out }, poly:{ port: 'in', source: 'audio_ch_count' }  },
         merge: { type: poly_audio_merge, in: { in:gain.out  }  }
       }
     }
  }

  network_dict:
  {
    procs: {
      ain: { type:  audio_input, device:"USB Audio Device" },
      gain: { type: mulit_ch_gain, in: { in:ain.out } args: { default:{ gain:0.5 }} }
      aout: { type: audio_output, device:"USB Audio Device", in: { in:gain.out } }
    }
    
  }
  
}