Due to the extensive use of Musical Instrument Digital Interface (MIDI) music in education, entertainment and business, copyright infringements of MIDI music are increasing rapidly. The low robustness of existing MIDI music watermarking is the main problem. Therefore, this paper proposes two novel MIDI music watermarking algorithms to comprehensively protect the copyright of MIDI music. We first propose a dual threshold audio watermarking algorithm based on MIDI note time difference and velocity value. It extracts a main melody audio track of MIDI music through a Ho-Kashyap (H-K) algorithm, generates an adaptive em-bedding double threshold for the main melody audio track, and uses a time fluctuation algorithm to embed the watermark information. We also propose a MIDI music watermarking algorithm in frequency domain using Discrete Cosine Transform (DCT). It converts the pitch of MIDI music to the fundamental frequency, obtains the Direct Current (DC) component of the fundamental frequency by DCT transform, combines the watermark information and the DC component to obtain the secret pitch, and takes the difference between the secret pitch and the original pitch as the new watermark information. Finally, a general attack experiment was conducted on the two watermarking algorithms to verify the feasibility and security. In this paper, the mean square error method and the normalized correlation coefficient method are selected to evaluate the quality of MIDI music objectively. An absolute information entropy evaluation model is proposed to evaluate MIDI music quality. Experimental results show that the proposed algorithms can extract effective watermark after MIDI command attacks with a MIDI music cutting rate of more than 88% and tampering rate of less than 5%, which means that the proposed algorithms are robust against attacks.