If you mean by a melody, a sequence of note identifiers and durations (or alternatively a sequence of note-identifiers (or numbers) that start (and finish) at specific times, or perhaps just a sequence of note identifiers that start at specific times (assuming the start of the next note marks the end of the previous one), then what you are asking could be translated as "is it possible to reproduce a sequence of values " with a neural network. And that to me sounds like a time-series, so the answer is "yes": it is possible to make a neural network reproduce a time-series. But like any time-series system there has to be something that enables time to be coded: this might be done using a recurrent network (and perhaps a clock as well), or using node-to-node links characterised by .
On the other hand if you mean actually producing an oscillating electrical signal directly, so that the network directly produces the melody (complete with timbre etc.) rather than being used to control an oscillator, then the answer is probably still yes, but the network would need to have a variety of different time-constants (some for producing sounds, some for switching between sounds): might be more challenging.
If you mean by a melody, a sequence of note identifiers and durations (or alternatively a sequence of note-identifiers (or numbers) that start (and finish) at specific times, or perhaps just a sequence of note identifiers that start at specific times (assuming the start of the next note marks the end of the previous one), then what you are asking could be translated as "is it possible to reproduce a sequence of values " with a neural network. And that to me sounds like a time-series, so the answer is "yes": it is possible to make a neural network reproduce a time-series. But like any time-series system there has to be something that enables time to be coded: this might be done using a recurrent network (and perhaps a clock as well), or using node-to-node links characterised by .
On the other hand if you mean actually producing an oscillating electrical signal directly, so that the network directly produces the melody (complete with timbre etc.) rather than being used to control an oscillator, then the answer is probably still yes, but the network would need to have a variety of different time-constants (some for producing sounds, some for switching between sounds): might be more challenging.
Iamus is a computer program that recently "wrote" an entire symphony on its own that was then performed by the London Symphony Orchestra. The following is excerpted from an article on Iamus:
Iamus composes music by mutating simple starting material in a manner analogous to biological evolution. The compositions each have a musical core, a "genome", that gradually becomes more complex. Iamus generates an initial population of compositions automatically, but their genomes are so simple that they barely develop into a handful of notes, lasting just a few seconds. As evolution proceeds, mutations alter the content and size of this primordial genetic material, and we get longer and more elaborated pieces. All the researchers specify at the outset is the rough length of the piece and the instruments it will use.
More generally the question that you ask is "Can one reproduce (exactly) an arbitrary long time sequence with a neural network ?". This is possible on theoretical grounds since neural networks (with firing rate and one hidden layer) are universal approximators (see the nice work by Gallant-White http://dss.ucsd.edu/~hwhite/pubs.html). It is also possible to reproduce exactly spike time series with a spiking network (see e.g. H. Rostro-Gonzalez, , B. Cessac, T. Viéville, “ Parameter estimation in spiking neural networks: a reverse-engineering approach », J. Neural Eng. 9 (2012) 026024). On practical ground, as far as I now, the main problem is that the larger the duration of the sequence, the more you need neurons to reproduce exactly the sequence (without mistake). It might be that people working on reservoir computing or liquid state machine have optimal methods for that. You could have a look on the web page of Herbert Jaeger (https://www.jacobs-university.de/directory/hjaeger) or Wolfgang Maass (http://www.igi.tugraz.at/maass/).
well, you redefined my question in a very clear manner just in my sense. I think the reproduction or simulation of a time based data set (music is a simple example) is a key question to understand the human brain function and the human mind.
I followed Brain Pike's link to Guardian, and listened excerpts from Iamus. Sorry to say, I found little redeeming qualities in this "musical" noise. This is not a comment on "network-based" approaches to music composition.
Thank you for your very much appreciated responses.
I would like to change the question a little. It's more about the storage and reactivation of a sequence of sounds or other data. Music is not just only a sequence of sounds, but of their interaction, the harmony, the sound. Thus there is a close connection with a sentence which does not consists of a sequence of (random) words.
This problem has connections to the mind / consiousness problem an the question of the mechanism we understand meaningful sentences.
Do you mean an ordered sequence, as in A_i, i=1...N, where A_i precedes A_{i+1}, (where each A_i is a "sound or other datum"; or do you mean a sequence A(t), with t an element of something more continuous than the integers (and A(t) marks the time of the (start of the?) "sound or other datum"). The distinction I am after is between a sequence where order is all that matters, and a timed sequence where the actual time between the events matters.
In the first case, there have been attempts at solution ever since Hopfield networks (see e.g. Donq-Liang Lee's paper from IEEE Trans NNs, from 2002 DOI 10.1109/72.991419, which has references back to Amari in 1972).
Putting the actual timing in is generally a little harder. But certainly not impossible.
The extent to which "This problem has connections to the mind / consiousness problem and the question of the mechanism (by which) we understand meaningful sentences." is debatable (!): certainly sentences are sequential, and, to some extent, so is thought. Yet these come out of a highly parallel system. But I think that's a different question!
many thanks for your high quality answer. I appreciate your answers very much, because my vague questions are answered extremely competent.
Well, I mean an ordered sequence A_i, i=1...N, with distinguishable data A_i.
If the data is a sequence of non random sounds it may be like a Markoff-chain. Each sound A_i has a special probable following sound A_{i+1}. But what will happen, if two melodies will have some equal sequences of sounds. Which melody will continuing?