From c4b96cdd87738e9f0cba695904d2d484b4335e7f Mon Sep 17 00:00:00 2001 From: Richard Knight Date: Fri, 29 Oct 2021 22:32:21 +0100 Subject: initial --- BUG3/bussing.udo | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 BUG3/bussing.udo (limited to 'BUG3/bussing.udo') diff --git a/BUG3/bussing.udo b/BUG3/bussing.udo new file mode 100644 index 0000000..78755ce --- /dev/null +++ b/BUG3/bussing.udo @@ -0,0 +1,62 @@ +#ifndef UDO_BUSSING +#define UDO_BUSSING ## + + +/* + Get the stereo L and R names for a singular bus name + + SnameL, SnameR bus_name Sbus + + SnameL left bus identifier + SnameR right bus identifier + + Sbus bus name +*/ +opcode bus_name, SS, S + Sbus xin + xout sprintf("%sL", Sbus), sprintf("%sR", Sbus) +endop + + +/* + Mix to a stereo bus + + bus_mix Sbus, aL, aR + + Sbus bus name + aL left channel + aR right channel +*/ +opcode bus_mix, 0, Saa + Sbus, aL, aR xin + SbusL, SbusR bus_name Sbus + chnmix aL, SbusL + chnmix aR, SbusR +endop + + + +/* + Read from a stereo bus, and then clear the bus + + aL, aR bus_read Sbus + + aL left channel + aR right channel + + Sbus bus name +*/ +opcode bus_read, aa, S + Sbus xin + SbusL, SbusR bus_name Sbus + aL chnget SbusL + aR chnget SbusR + chnclear SbusL + chnclear SbusR + xout aL, aR +endop + + + + +#end -- cgit v1.2.3