  We propose a system for contrapuntal music generation based on a Neural
Machine Translation (NMT) paradigm. We consider Baroque counterpoint and are
interested in modeling the interaction between any two given parts as a mapping
between a given source material and an appropriate target material. Like in
translation, the former imposes some constraints on the latter, but doesn't
define it completely. We collate and edit a bespoke dataset of Baroque pieces,
use it to train an attention-based neural network model, and evaluate the
generated output via BLEU score and musicological analysis. We show that our
model is able to respond with some idiomatic trademarks, such as imitation and
appropriate rhythmic offset, although it falls short of having learned
stylistically correct contrapuntal motion (e.g., avoidance of parallel fifths)
or stricter imitative rules, such as canon.
