AS CJ said, it's very easy to implement with a DPDT switch. That may not be strictly necessary because most DAW's offer the possibility to reverse polarity ("phase"). Opting between a hard switch or a soft button is a matter of taste.mutterd said:a phase reverse is important for sure,
The question of ground lift is nort as simple as it seems. There are potentially two loops that may generate hum. That happens when the guitar is connected to both an amp and the DI box. The two loops are:and ground lift...
one between the amp and DI "grounds"
one between the mixer and the DI box
The switch shown by CJ in his new version can break only the latter loop.
In fact, since the output is floating, a ground switch is not strictly necessary. I would install a low-impedance RC there (typically 100 ohms in parallels with 0.1uF, one side to pin 1, the other to chassis ground - not to audio ground).
In order to solve any problems related to amp-to-DI loop, the audio ground of the DI box should be made floating.
A switch should be installed between the audio ground and the chassis of the DI box.
CAVEAT: I'm not saying it is entirely safe and legal...