Data hiding techniques for steganography, which embed secret data in multimedia imperceptibly, are useful for protecting information security. By taking advantage of the popularity of MIDI files on the Internet, a new data hiding method via MIDI files is proposed, which modifies the velocities of musical note sequences to embed secret data. Initially, musical note sequences with monotonic pitches, each consisting of at least three consecutive notes with pitches either entirely non-decreasing or entirely non-increasing, are found from an input MIDI file. Next, for each of such musical note sequences, a reference velocity is generated for each non-end note in the sequence by a linear interpolation scheme. Then, a number of data bits are embedded into each non-end note by adding the decimal value of the bits to or subtracting the value from the corresponding reference velocity value to yield a new velocity for the note. The new velocity value does not differ much from the original one and fits the velocity trend in the musical note sequence, so that the resulting stego-MIDI file does not yield abnormal note strengths and the musical expression is kept. Moreover, a melody humanization scheme is proposed for modifying the velocity values in strength-invariant MIDI channels to create data embeddability without producing unreasonable melodies. The original MIDI file size is also kept unchanged after data embedding, avoiding attracting attentions from hackers. Experimental results show the feasibility of the proposed method. Also, a comparison with five other methods show that the method has the merit of reducing the resulting melody distortion or file-size change while yielding a reasonable secret-bit embedding rate.