The field of music enjoys many opportunities thanks to artificial intelligence with the possibilities of automatic classifications of styles or automatic generations of music from examples. The generation of music by artificial intelligence poses the problem of being able to take into account events in time. Conventional machine learning models such as feedforward neural networks are not suitable for this. As shown in the diagram below, such a model whose role would be to generate a note following an existing melody would make exactly the same prediction if given Do-Ré-Mi-Fa-Sol input or if given Sol-Fa-Mi-Ré-Do, because the notes are the same and this model does not consider the order in which they appear. But obviously, for a musician, these are two different melodies and the possibilities that come to the ear to continue them are of course not the same.