You need to distinguish between what the agent learns and its policy. This is a way to organise its policy (through ordering activations) then that will lead it to learn about the environment better. so the ultimate goal is to learn about the environment, not the music.
If your measure of goodness is consonance then it is looking for simple ratios between notes.
I donât see that this will teach it very much about the underlying rules of music. Please read the link about the 43-note Partch scale to see the considerations that go into music theory, in particular, the role of consonance and ratios. Starting with the frequency of vibrations of different lengths of a string under tension and using the fitness function of consonance; you will learn the ratios I am describing.
I will read it.
i just thought that scales and music theory was an emergent feauture of considering the ratios. For instance if you consider consonance then an interval of fifth becomes optimal as well as a thirdâŚthen you have a major chord. the circle of fifths is then waiting to be discovered from that realisation.
Also scales emerge naturaly as consonance domains if you will.
The âcircle of fifthsâ is an illusion, a human invention. Itâs like âdiscoveringâ horizontal and vertical. Given an auditory sense organ with the evolved capability to recognise pitch, it is inevitable it will also recognise pitch pairs related by a simple maths ratio. We give them names like octave and fifth but those are just labels for a particular sensory input.
And there is no circle. Given the maths, it is inevitable that 1.5 raised to some power will eventually yield a value that is close to some power of two. It was the human invention of the tempered scale in the days of Bach that produced the neat result that we now take for granted.
There is no AI that could discover this from first principles. But there is plenty of AI to discover these ratios in works of music created by people.
David do you agree that if i had an agent that played random âchordsâ and optimised for harmony it would end up realising that an interval of a fifth is the next most harmonious interval after an octave?
No. Harmonious is a value judgment, and not science. I was very specific about the science.
With the kind of auditory apparatus we have evolved, we get a specific sensory input for musical tones (as against white noise or voice etc) and we get a specific sensory input for pairs of tones at harmonically related frequencies, that is frequencies in ratios such as 2:1, 3:2, 4:3 and so on. We have evolved to recognise these ratios.
Music goes back well over 10,000 years, based on archaeological evidence, and you can be sure musicians of the day recognised pitch pairs that we now refer to as octave, perfect fifth, perfect fourth and so on. The tempered scale is a much later invention.
The ratios are maths, the sensory inputs are evolved, music is a human invention laid on top.
But an interval of a fifth represents the greatest mathematical consonance apart from an octave.
It will most surely play with intervals of a fifth preferably if its maximizing consonance.
Cant you see this ?
Im not talking of subjective harmony, but that modeled by mathematics, so this way it is science.
Im not making harmony for the sake of people, but for the sake of optimising a pattern.
i beleive you still think i am making a music making algorithm for human appreciation.
No
A neural network may consist of nodes that fire in a pattern. if we map each node to a note on a keyboard we may optimise the pattern the nodes fire with using music theory.
I see that a pair of musical sounds with frequencies in the ratio 2:3 triggers a sensory response in the human ear. Thatâs science. The words you are using are not.
All i want it to do is find the ratios that are simplest, from that chords , scales and music theory arises. We dont need a human listener anywhere near this system
at each time step it is first filled with random values
then depending on the step
statesize=12
def env(step):
s=np.random.randn(statesize,statesize)
for i in range(1,statesize):
for t in range(int(statesize/i)+1):
s[i:i+1,t:t+1]=step
return s
So the cells s[1:2,:] are all filled with values equal to step.
And the other cells in the first dimension are also filled with step with decreasing proportion going up till its not there in the final cell.
So the agent has to move between the arrays in the first dimension. These ALL change at each time step (as step changes too), but the one that changes with the lowest entropy is the one filled with step all the way through.
So if this works, the agent will learn to navigate to that cell and stay put using such an agent as i have described.
That made me laugh⌠havnât you seen jungle book ?
Is traditional Shakuhachi completely different to western perception of âmusicâ, which makes music purely in the human behaviour category ? Is music more about the surprise response to an expected pattern turning out different but not âtooâ chaotic (consonance). - try Shakuhachi [The Japanese Flute] - Kohachiro Miyata on youtube. Math is just a language to describe another language (pattern state) we canât otherwise externalise and all math is only âtrueâ when proven and traditional Shakuhachi may poses a particular problem to any formal math unless it is then culturally bounded.
The dependency upon the pattern bounds of âconsonanceâ would have to be learnt ? Looking at language the patterns involved in different cultures or legal language and poetry pose very different perspectives as to âconsonanceâ of a concept sequence (sentence) that would also vary depending on the prior temporal relativity (context) that may have an indeffinate bound (open ended state) ? Triangles create artificial bounds and perceptions of ratioâs, unless you then allow them to fold in 3D and then allow pattern entry at any point on the surface.
Or the math just tries to explain the basic harmonic resonance of the fibres in the ear⌠or other body parts (e.g. heart beat) that can provide sensory pattern feedback when the amplitude of the pressure waves is sufficient. No math as such specific to âmusicâ rather just discovering basic physics response ot human anatomy ? Which for a non body intelligence, music may well be perplexing.
The correspondence between the rise of music theory from maximising consonance and the mathematical formalism of music is a coincidence brought about by the fact that both D12, the group and the chromatic scale consist of 12 elements that cycle mod 12.
If you construct a musical system based of D17 for example, then the correspondence between what is being opimised for human perception and the math formalism mismatch and they describe two different systems.
I noticed that in order to induce the math we want. I.e. some sort of grammar. All we need to do is treat D12 as a musical system and optimise consonance. because of the congruency of the two systems it will inadvertently learn the math even though it is posed as a music optimisation problem.
Once I had a very long lunch conversation with a Dean of FIne Arts (and an accomplished horn player), I noticed that there seem to be three kinds of musicians. The first i will call natural. They are the ones that take to an instrument quickly and become performance artists. Then there are the âmathematicalâ ones, the ones that ace the music theory course and wind up writing music, conducting, etc⌠Then there are the combinations, the Beethovenâs
Music is just another language, as is math, but has an underlayment of neural preconsciousness, the cycles and resonances brought on by the fundamental neural structure of the brain.