I am currently planning a tournament with 32 players who will match up in 4 rounds of 4 8-player standard games. I want to shuffle the players so that they, more or less, play a unique set of opponents each round. Is there a simple formula I can use to quickly do this?

One more element: players are organized into teams of 4 (8 teams), and players from the same team cannot compete against each other. Don't know if this will make things easier or harder.