Two data units are selected from main information, such as
MIDI data, into which additional information is to be incorporated, to calculate a difference between respective values of the two data units. A particular
data segment to be incorporated into one of the
MIDI data units is selected from a group of data of additional information. The size of the
data segment to be incorporated into one of the data units may be either one bit or two or more bits. Substitute data to replace the content of one
MIDI data unit is generated on the basis of a predetermined function using, as variables, the data-related value and a value of the particular
data segment, and the content of the data unit corresponding to a predetermined one of the two MIDI data units is replaced by the generated substitute data. Thus, through such an electronic watermarking technique, any desired additional information can be incorporated into the MIDI data without changing the MIDI
data format. In another implementation, data of encoding information, representative of an encoding procedure, are incorporated dispersedly into particular data units belonging to a predetermined first data group of the main information, and data belonging to a predetermined second data group of the main information are encoded by the encoding procedure represented by the encoding information.