Online Precoding And Signal Shaping For Digital Transmission