Update main.py

Fix for TMS and white noise synchronization