Algorithmic composition of musical pieces is one of the most popular areas of computer aided music research. Various attempts have been made successfully in the area of music composition. Artificial intelligence methods have been extensively applied in this area. Representation of musical pieces in a computer-understandable form plays an important role in computer-aided music research. This paper presents a neural network-based knowledge representation schema for representing notes, melodies, and time in first-species counterpoint pieces. A musical note is composed of pitch and duration in this representation schema. The proposed representation technique was tested using the backpropagation algorithm to generate two-voice counterpoint pieces. Keywords Algorithmic composition, artificial neural networks, counterpoint, pitch, duration.