Synthetic dimensions for cold atoms from shaking a harmonic trap