Main_MIDIout changes

applied the same changes made to the Main_sampler