{"id":345,"date":"2025-01-07T14:56:16","date_gmt":"2025-01-07T14:56:16","guid":{"rendered":"https:\/\/jonayre.uk\/blog\/?p=345"},"modified":"2025-01-07T14:56:16","modified_gmt":"2025-01-07T14:56:16","slug":"understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky","status":"publish","type":"post","link":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/","title":{"rendered":"Understanding neural networks &#8211; Part 6: The machine that loved Myaskovsky"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you don\u2019t know who Myaskovsky is, please don\u2019t be concerned. Neither did I. Not, that is, until my son, Nathan introduced me to him. He&#8217;s only sixteen, but his musical taste is already significantly more sophisticated than mine. I love alternative rock; he prefers the late-romantic composers, and even more specifically, the Russian ones. I\u2019m a fan of four basic chords and a punchy riff; he\u2019s more a chromatic progression, half diminished chord kind of guy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We do, however, have a point where our musical preferences coincide. That point is Muse\u2019s second album, Origin of Symmetry. Interestingly, this album has all the alternative rock elements that I like, and is also influenced by those Russian composers my son listens to. This led me to wonder, would it be possible to teach a machine to appreciate music? Could I create a virtual Nathan that liked Myaskovsky and Rachmaninoff, but wasn\u2019t keen on Rick Astley or Kylie Minogue?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Spoiler warning<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The short answer is yes!&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Well, to be accurate, I managed to create an AI Avatar that was able to score pieces of music on a scale from 0 (dislike) to 1 (like) in a way that emulated the scores given by my son. To suggest it \u201cappreciated\u201d that music or \u201cliked\u201d it in any way would be incorrect.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s fair to say I was very pleased with this outcome, but not entirely surprised. I\u2019d already done something similar for film preferences based on textual synopses so I knew it was possible in theory. However, in the film example I had a head start. Language processing is a well established discipline with many different tried and tested approaches.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One of these approaches uses something known as an \u201cembeddings model\u201d. There are many of these models available for a variety of different written languages, but I had no idea if such a model was available for music, or even if one could be created. Before I dive into how I solved this problem, first I should explain what an embeddings model is.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Embedded meanings<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When is a word not a word? When it\u2019s an embedding.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019ve read the earlier parts of this series, you\u2019ll know that artificial neural networks take numbers as their inputs. Also, they work on the principle that two similar numbers can be treated as similar inputs. Words are not something you can just present to such a network, and similar words don\u2019t always have similar meanings.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Take the words \u201chill\u201d and \u201cpill\u201d for example. They vary in only one letter and sound almost the same, but they have very different meanings. What we need is a way to convert words into numbers that can be fed into a neural network while still retaining their relative meanings. We need pill and hill to result in different numbers, but we want pill and tablet to produce similar numbers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The problem with language is that it\u2019s complicated. A single number can be represented as a straight line drawn on a piece of paper. If we write the word \u201cwarm\u201d in the middle of that, we might write \u201ccool\u201d to its left and hot to its right. We might then write boiling even further to the right and freezing further to the left. So far, so good. We can give each of those words a number based on its position on the line.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we now introduce words like \u201chip\u201d, \u201ctrendy\u201d, and \u201cchill\u201d and try to associate them with the word \u201ccool\u201d we can\u2019t position them on the original line. We need to introduce a new line cutting across the original at the word \u201ccool\u201d and assign numbers based on that line. Each word now needs two numbers to position it on a two dimensional surface. Extending that model further to represent the complexity of language we need many more dimensions, and each word becomes a multi-dimensional vector. This vector is known as an embedding.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Words that play together stay together<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The beauty of using vectors like this to represent words is that there are easy ways to work out which vectors point in the same direction and have the same length. This means they can be used to work out how related two words are to each other. It also means we can feed words into neural networks as sets of numbers without losing the relationships between the words. In other words, a neural network can be trained to respond to a concept regardless of the specific word used to describe it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The downside is that there are a lot of words in a language, and every single one needs to be assigned a multi-dimensional vector based on how it relates to all the other words. If we had to do this by hand it would be a huge undertaking. Some estimates place the number of words in the English language around the one million mark. The Oxford English Dictionary is more conservative in estimating that there are around 170,000 words in current use.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Luckily, there\u2019s a way to automate the process of assigning embedding vectors to words, and perhaps not surprisingly, it involves using a neural network. For reasons I\u2019m not going to expand on in this blog post, it turns out that if you train a two layer feed forward neural network to predict the next word based on a current word, the first layer of that network produces those very embeddings we need.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The language of music<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To do this effectively, you need to feed the model a lot of text so it can experience all of the different ways that the words are used. Even with the automation available with a neural network, this is still a significant task. If you\u2019re fortunate enough to be working with words, other people have already done the hard work for you. There are plenty of models out there that you can use without having to create your own.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When it comes to music, however, there\u2019s less to go on. My research into embeddings models for music yielded no concrete results. I did find one paper discussing the concept, but nothing relating to existing models. It was clear that if I was going to succeed in my endeavour I would need to create an embeddings model for music from scratch. It wasn\u2019t clear at the outset if that was even possible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I intend to write up the process I followed in more detail at some point, but for now I\u2019ll summarise the approach I took in the following sections.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Extracting the musical words<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I started by defining a musical word to be the note content of a single sampled moment in a piece of music of duration one quarter of a second. My assumption was that this sampling time would be short enough to capture the important details of the music while still maintaining sufficient accuracy to separate the musical notes by frequency.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For each sample, I performed a fast fourier transform to convert the sample into a frequency spectrum. I then converted this linear frequency spectrum to an exponential note spectrum. In music, each semitone is larger than the previous one by a fixed multiple, not a fixed increment. For the western scale, that multiple is 2<sup>1\/12<\/sup> which results in the frequency doubling for each octave (12 semitone) increase.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I then applied a threshold to the note levels. All notes that exceeded the threshold were represented by 1.0 and all those below the threshold by 0.0. This gives me a binary 120 bit \u201ctoken\u201d containing a 1.0 for each of the significant notes present in the sample in the range C0 (16.351Hz) to B9 (15804.264Hz).&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The result of this processing can be seen in the following screenshot. The lower half of the diagram shows the frequency spectrum created by the fast fourier transform. The upper half shows the identified notes as short bars, which scroll up as the music progresses. One row of bars represents one sample, and each bar represents a single note. The cyan bars indicate where the note \u201cC\u201d is in each of the ten octaves, and the remaining bars are coloured either white or black to match the key colours of a piano keyboard.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXeJ3dn6T03K7QmSGmU2GNwRrTdS8Zm0Dzjv6KAXFtu1DqkDNGn37Tz2cW6daPRdzEMsD_gkKtZ5Z5Q4X93TyF0l7-ej2IkYDRRHrCV08NktNCPRWmoBx6UF-wDMadk4CAxfpPCJ?key=NMAVwgWb2e-d7VXY5kDc9OHZ\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Figure 1: Example of output from the note extraction process for a single sample of music<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Creating the embedding training set<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Next, I took a training set of ~1500 musical pieces made up of a roughly 50\/50 split between \u201cwestern\u201d orchestral music and rock\/pop bands. Each piece was broken down into words (as defined in Step 1) and each word was paired with its nearest neighbours to create input\/output word prediction pairs. Each selected word forms the training input, and each of the neighbouring words forms the output to be predicted. (This is known as a skip-gram model). I chose an initial window size of 2 either side to ensure I included enough notes to identify simple arpeggios.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Embeddings training processes typically recommend that the input vectors are sparsely encoded. This is often done using one-hot encoding, in which each word in the dictionary is represented by one input. However, for a word size of 120 bits, one hot encoding would result in an unmanageable dictionary size (2 to the power of 120 different tokens). I therefore made the assumption that the process of digitising and normalising the notes would create a form of semi-sparse encoding suitable for use as direct input into my embeddings model.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Training the embedding model<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To generate the embedding model I created a feed forward neural network consisting of 2 layers. The first layer (the embeddings layer) contained 50 neurons in order to produce an embeddings vector of dimension 50. The second layer (the output layer) consisted of 120 neurons representing the 120 notes in the predicted output musical word.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The network was designed to take 120 inputs (representing 1 context word) and produce 120 outputs representing one predicted associated word.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each input\/output pair in the training set was presented to the network and the back-propagation learning rule was used to reduce the error between the actual output and the desired output. This was repeated until the overall error converged.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Extracting the embeddings<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once trained, the embedding model takes input samples and predicts output samples. The result of this process is that the output from the first layer is the embedding vector for the presented word. Hence, to extract embeddings we simply present the network with a musical word and take the outputs from each of the neurons in the first layer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To generate the embedding for a section of music (a musical paragraph or document) I adopted a simple averaging approach that is commonly used to get document embeddings from word embedding models. In this approach, the overall embedding vector for a piece of music, is calculated by taking the average of the embeddings for each of the musical words in the piece.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My hypothesis was that this averaged vector would contain the dominant features of the piece of music and would therefore be suitable for comparing different pieces of music with each other and for training a music recommender for an individual. The resulting embeddings were used to generate similarity scores for a set of test pieces. These scores were then compared with the similarity rankings of a human observer.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The model showed good correlation with the human rankings as can be seen from the table below. (The numbers represent how different the embedding ranking was from the human ranking. A score of zero means the rankings were the same). This gave me the confidence to believe I had created a working embeddings model for music.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXd51xAcvH72Jtn8QZbjuH7e_rks6x7QZayTCLYy1KzN6NU8sw7Ct7yfewDVg4IjxaJG9J6ETj9lo-bkXCVm90TAclRuh3n-qZPrtXM10pC9RvCFWv2ax48JGd6TMKwod66wLQ6w7g?key=NMAVwgWb2e-d7VXY5kDc9OHZ\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Figure 2: Comparison of similarity rankings between a human subject and their AI avatar<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Training an AI avatar<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To create an AI avatar capable of reproducing the musical preferences of a human subject, I constructed a feed forward neural network consisting of three layers of 50, 50 and 2 neurons respectively. I then trained this network to emulate the preferences of a human subject for a test set consisting of 15 pieces of music.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Training inputs were provided to the network in the form of embeddings for each of the pieces of music in the training set, and the avatar was trained to duplicate the user\u2019s \u201cpreference\u201d score.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once trained, the avatar was presented with the document embeddings for 12 unseen pieces of music and its output was used as an indication of whether the music should be recommended or not. These outputs were compared with those of the human subject to see if the avatar was capable of making reasonable recommendations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When comparing at a like\/dislike level, the avatar managed to match the human preferences for all of the training set, and 11 out of 12 of the unseen set.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Pushing the avatar a little harder<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Overall, I was very happy with the outcome of this experiment. I\u2019d managed to create a music embeddings model (which as far as I can tell is a rare, if not unique outcome). I\u2019d also managed to use that model to create an avatar capable of reproducing the musical likes and dislikes of a human subject with a high level of correlation. I\u2019d also managed to do this based purely on the musical content, and not on any tagging information describing the music.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, as a final test, I wanted to push it a little harder. I wanted to see how the avatar would compare with the human subject over the full course of a piece of music. I asked the human reviewer to assign scores to each 30 seconds of a musical piece, and the avatar was used to produce like\/dislike scores for the same time slices. Neither the human subject nor the recommender had \u201cheard\u201d the piece previously. The following graph shows the two score sets overlaid for comparison purposes:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXeWv7o4w9gJd4OqPMlshGOnFWe41FC7NxHJlZnfqqcEuE0zJARzjIu-D08NTz95GTMQYpINtkLb2ddEfTPVUcNx0KH5Qk--TCRgtH57xEAEqsdcewDpvQZD_d7O1iMO7IQSe4p1?key=NMAVwgWb2e-d7VXY5kDc9OHZ\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Figure 3: Comparison of real time scoring of a piece over time between a human subject and their AI avatar<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As can be seen, there is reasonable correlation between the human and the avatar for the preferred sections. Taking into account the very limited data set that the avatar was trained on (just 15 pieces of music), this is a very encouraging result that indicates the approach is worth pursuing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A successful experiment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Overall, I\u2019m really happy with the outcome of this experiment. I set out with the unlikely hypothesis that a simple neural network could be trained to emulate the musical preferences of a human subject. I ended up with a far better result than my anticipated \u201cbest case\u201d and furthermore achieved that with a tiny training set.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The neural networks involved in this exercise were also tiny (170 neurons for the embeddings model and 52 neurons for the avatar) and the training times were measured in minutes rather than hours or days. The avatar is even quicker, and can score a musical pieces in under a second.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As a final note, if you looked closely at Figure 2, you might have noticed that one of the pieces in the training set was a well known song by Rick Astley. I am therefore guilty of rick-rolling an AI. I hope our future robot overlords see fit to forgive me when the time comes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It has been said that music is a universal means of communication. It transcends language, and could be said to be a language of its own. With all its mystery and emotion could a machine ever understand it? Maybe not, but this is the story of how I taught one to like Myaskovsky.<\/p>\n","protected":false},"author":1,"featured_media":347,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,106,107,10],"tags":[6,108,104],"class_list":["post-345","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence","category-machine-learning","category-music","category-technology","tag-ai","tag-music","tag-neural-networks"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"It has been said that music is a universal means of communication. It transcends language, and could be said to be a language of its own. With all its mystery and emotion could a machine ever understand it? Maybe not, but this is the story of how I taught one to like Myaskovsky.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Jon Ayre\"\/>\n\t<meta name=\"google-site-verification\" content=\"GNUfbu2X2sx5KHq1VLY1lNoJNPLL14bqZzfm3FE-5co\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_GB\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Jon Ayre - Business, technology and strategic thinking\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Understanding neural networks \u2013 Part 6: The machine that loved Myaskovsky - Jon Ayre\" \/>\n\t\t<meta property=\"og:description\" content=\"It has been said that music is a universal means of communication. It transcends language, and could be said to be a language of its own. With all its mystery and emotion could a machine ever understand it? Maybe not, but this is the story of how I taught one to like Myaskovsky.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/jonayre.uk\/blog\/wp-content\/uploads\/2025\/01\/93a5fb7a-714e-46c3-ba75-a3702882861a-scaled.jpeg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/jonayre.uk\/blog\/wp-content\/uploads\/2025\/01\/93a5fb7a-714e-46c3-ba75-a3702882861a-scaled.jpeg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t\t<meta property=\"og:image:height\" content=\"1752\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2025-01-07T14:56:16+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2025-01-07T14:56:16+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@jon_ayre\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Understanding neural networks \u2013 Part 6: The machine that loved Myaskovsky - Jon Ayre\" \/>\n\t\t<meta name=\"twitter:description\" content=\"It has been said that music is a universal means of communication. It transcends language, and could be said to be a language of its own. With all its mystery and emotion could a machine ever understand it? Maybe not, but this is the story of how I taught one to like Myaskovsky.\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@jon_ayre\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/jonayre.uk\/blog\/wp-content\/uploads\/2025\/01\/93a5fb7a-714e-46c3-ba75-a3702882861a-scaled.jpeg\" \/>\n\t\t<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t\t<meta name=\"twitter:data1\" content=\"Jon Ayre\" \/>\n\t\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/2025\\\/01\\\/07\\\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\\\/#blogposting\",\"name\":\"Understanding neural networks \\u2013 Part 6: The machine that loved Myaskovsky - Jon Ayre\",\"headline\":\"Understanding neural networks &#8211; Part 6: The machine that loved Myaskovsky\",\"author\":{\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/93a5fb7a-714e-46c3-ba75-a3702882861a-scaled.jpeg\",\"width\":2560,\"height\":1752,\"caption\":\"A small robot, dressed in formal attire, sits at a piano. He is playing to an audience who are sitting in the background and he is smiling.\"},\"datePublished\":\"2025-01-07T14:56:16+00:00\",\"dateModified\":\"2025-01-07T14:56:16+00:00\",\"inLanguage\":\"en-GB\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/2025\\\/01\\\/07\\\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/2025\\\/01\\\/07\\\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\\\/#webpage\"},\"articleSection\":\"Artificial Intelligence, Machine learning, Music, Technology, AI, Music, Neural networks\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/2025\\\/01\\\/07\\\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jonayre.uk\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/category\\\/technology\\\/artificial-intelligence\\\/#listItem\",\"name\":\"Artificial Intelligence\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/category\\\/technology\\\/artificial-intelligence\\\/#listItem\",\"position\":3,\"name\":\"Artificial Intelligence\",\"item\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/category\\\/technology\\\/artificial-intelligence\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/2025\\\/01\\\/07\\\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\\\/#listItem\",\"name\":\"Understanding neural networks &#8211; Part 6: The machine that loved Myaskovsky\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/2025\\\/01\\\/07\\\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\\\/#listItem\",\"position\":4,\"name\":\"Understanding neural networks &#8211; Part 6: The machine that loved Myaskovsky\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/category\\\/technology\\\/artificial-intelligence\\\/#listItem\",\"name\":\"Artificial Intelligence\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/#person\",\"name\":\"Jon Ayre\",\"image\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/DSC_1812-edited-scaled.jpg\",\"sameAs\":[\"https:\\\/\\\/twitter.com\\\/jon_ayre\",\"https:\\\/\\\/linkedin.com\\\/in\\\/jonayre\",\"https:\\\/\\\/bsky.app\\\/profile\\\/jonayre.uk\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Jon Ayre\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/2025\\\/01\\\/07\\\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7c8576be04234ab90e9cee63987dbd6b60d3dd7a1838950fe4c09088e0fb0f82?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Jon Ayre\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/2025\\\/01\\\/07\\\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\\\/#webpage\",\"url\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/2025\\\/01\\\/07\\\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\\\/\",\"name\":\"Understanding neural networks \\u2013 Part 6: The machine that loved Myaskovsky - Jon Ayre\",\"description\":\"It has been said that music is a universal means of communication. It transcends language, and could be said to be a language of its own. With all its mystery and emotion could a machine ever understand it? Maybe not, but this is the story of how I taught one to like Myaskovsky.\",\"inLanguage\":\"en-GB\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/2025\\\/01\\\/07\\\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/author\\\/admin\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/93a5fb7a-714e-46c3-ba75-a3702882861a-scaled.jpeg\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/2025\\\/01\\\/07\\\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\\\/#mainImage\",\"width\":2560,\"height\":1752,\"caption\":\"A small robot, dressed in formal attire, sits at a piano. He is playing to an audience who are sitting in the background and he is smiling.\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/2025\\\/01\\\/07\\\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\\\/#mainImage\"},\"datePublished\":\"2025-01-07T14:56:16+00:00\",\"dateModified\":\"2025-01-07T14:56:16+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/\",\"name\":\"Jon Ayre\",\"description\":\"Business, technology and strategic thinking\",\"inLanguage\":\"en-GB\",\"publisher\":{\"@id\":\"https:\\\/\\\/jonayre.uk\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Understanding neural networks \u2013 Part 6: The machine that loved Myaskovsky - Jon Ayre","description":"It has been said that music is a universal means of communication. It transcends language, and could be said to be a language of its own. With all its mystery and emotion could a machine ever understand it? Maybe not, but this is the story of how I taught one to like Myaskovsky.","canonical_url":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"GNUfbu2X2sx5KHq1VLY1lNoJNPLL14bqZzfm3FE-5co","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/#blogposting","name":"Understanding neural networks \u2013 Part 6: The machine that loved Myaskovsky - Jon Ayre","headline":"Understanding neural networks &#8211; Part 6: The machine that loved Myaskovsky","author":{"@id":"https:\/\/jonayre.uk\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/jonayre.uk\/blog\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/jonayre.uk\/blog\/wp-content\/uploads\/2025\/01\/93a5fb7a-714e-46c3-ba75-a3702882861a-scaled.jpeg","width":2560,"height":1752,"caption":"A small robot, dressed in formal attire, sits at a piano. He is playing to an audience who are sitting in the background and he is smiling."},"datePublished":"2025-01-07T14:56:16+00:00","dateModified":"2025-01-07T14:56:16+00:00","inLanguage":"en-GB","mainEntityOfPage":{"@id":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/#webpage"},"isPartOf":{"@id":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/#webpage"},"articleSection":"Artificial Intelligence, Machine learning, Music, Technology, AI, Music, Neural networks"},{"@type":"BreadcrumbList","@id":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/jonayre.uk\/blog#listItem","position":1,"name":"Home","item":"https:\/\/jonayre.uk\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/jonayre.uk\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/jonayre.uk\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/jonayre.uk\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/jonayre.uk\/blog\/category\/technology\/artificial-intelligence\/#listItem","name":"Artificial Intelligence"},"previousItem":{"@type":"ListItem","@id":"https:\/\/jonayre.uk\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/jonayre.uk\/blog\/category\/technology\/artificial-intelligence\/#listItem","position":3,"name":"Artificial Intelligence","item":"https:\/\/jonayre.uk\/blog\/category\/technology\/artificial-intelligence\/","nextItem":{"@type":"ListItem","@id":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/#listItem","name":"Understanding neural networks &#8211; Part 6: The machine that loved Myaskovsky"},"previousItem":{"@type":"ListItem","@id":"https:\/\/jonayre.uk\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/#listItem","position":4,"name":"Understanding neural networks &#8211; Part 6: The machine that loved Myaskovsky","previousItem":{"@type":"ListItem","@id":"https:\/\/jonayre.uk\/blog\/category\/technology\/artificial-intelligence\/#listItem","name":"Artificial Intelligence"}}]},{"@type":"Person","@id":"https:\/\/jonayre.uk\/blog\/#person","name":"Jon Ayre","image":"https:\/\/jonayre.uk\/blog\/wp-content\/uploads\/2022\/08\/DSC_1812-edited-scaled.jpg","sameAs":["https:\/\/twitter.com\/jon_ayre","https:\/\/linkedin.com\/in\/jonayre","https:\/\/bsky.app\/profile\/jonayre.uk"]},{"@type":"Person","@id":"https:\/\/jonayre.uk\/blog\/author\/admin\/#author","url":"https:\/\/jonayre.uk\/blog\/author\/admin\/","name":"Jon Ayre","image":{"@type":"ImageObject","@id":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/7c8576be04234ab90e9cee63987dbd6b60d3dd7a1838950fe4c09088e0fb0f82?s=96&d=mm&r=g","width":96,"height":96,"caption":"Jon Ayre"}},{"@type":"WebPage","@id":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/#webpage","url":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/","name":"Understanding neural networks \u2013 Part 6: The machine that loved Myaskovsky - Jon Ayre","description":"It has been said that music is a universal means of communication. It transcends language, and could be said to be a language of its own. With all its mystery and emotion could a machine ever understand it? Maybe not, but this is the story of how I taught one to like Myaskovsky.","inLanguage":"en-GB","isPartOf":{"@id":"https:\/\/jonayre.uk\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/#breadcrumblist"},"author":{"@id":"https:\/\/jonayre.uk\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/jonayre.uk\/blog\/author\/admin\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/jonayre.uk\/blog\/wp-content\/uploads\/2025\/01\/93a5fb7a-714e-46c3-ba75-a3702882861a-scaled.jpeg","@id":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/#mainImage","width":2560,"height":1752,"caption":"A small robot, dressed in formal attire, sits at a piano. He is playing to an audience who are sitting in the background and he is smiling."},"primaryImageOfPage":{"@id":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/#mainImage"},"datePublished":"2025-01-07T14:56:16+00:00","dateModified":"2025-01-07T14:56:16+00:00"},{"@type":"WebSite","@id":"https:\/\/jonayre.uk\/blog\/#website","url":"https:\/\/jonayre.uk\/blog\/","name":"Jon Ayre","description":"Business, technology and strategic thinking","inLanguage":"en-GB","publisher":{"@id":"https:\/\/jonayre.uk\/blog\/#person"}}]},"og:locale":"en_GB","og:site_name":"Jon Ayre - Business, technology and strategic thinking","og:type":"article","og:title":"Understanding neural networks \u2013 Part 6: The machine that loved Myaskovsky - Jon Ayre","og:description":"It has been said that music is a universal means of communication. It transcends language, and could be said to be a language of its own. With all its mystery and emotion could a machine ever understand it? Maybe not, but this is the story of how I taught one to like Myaskovsky.","og:url":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/","og:image":"https:\/\/jonayre.uk\/blog\/wp-content\/uploads\/2025\/01\/93a5fb7a-714e-46c3-ba75-a3702882861a-scaled.jpeg","og:image:secure_url":"https:\/\/jonayre.uk\/blog\/wp-content\/uploads\/2025\/01\/93a5fb7a-714e-46c3-ba75-a3702882861a-scaled.jpeg","og:image:width":2560,"og:image:height":1752,"article:published_time":"2025-01-07T14:56:16+00:00","article:modified_time":"2025-01-07T14:56:16+00:00","twitter:card":"summary","twitter:site":"@jon_ayre","twitter:title":"Understanding neural networks \u2013 Part 6: The machine that loved Myaskovsky - Jon Ayre","twitter:description":"It has been said that music is a universal means of communication. It transcends language, and could be said to be a language of its own. With all its mystery and emotion could a machine ever understand it? Maybe not, but this is the story of how I taught one to like Myaskovsky.","twitter:creator":"@jon_ayre","twitter:image":"https:\/\/jonayre.uk\/blog\/wp-content\/uploads\/2025\/01\/93a5fb7a-714e-46c3-ba75-a3702882861a-scaled.jpeg","twitter:label1":"Written by","twitter:data1":"Jon Ayre","twitter:label2":"Est. reading time","twitter:data2":"13 minutes"},"aioseo_meta_data":{"post_id":"345","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2025-01-07 14:40:32","updated":"2025-11-10 07:56:29","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/jonayre.uk\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/jonayre.uk\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/jonayre.uk\/blog\/category\/technology\/artificial-intelligence\/\" title=\"Artificial Intelligence\">Artificial Intelligence<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tUnderstanding neural networks \u2013 Part 6: The machine that loved Myaskovsky\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/jonayre.uk\/blog"},{"label":"Technology","link":"https:\/\/jonayre.uk\/blog\/category\/technology\/"},{"label":"Artificial Intelligence","link":"https:\/\/jonayre.uk\/blog\/category\/technology\/artificial-intelligence\/"},{"label":"Understanding neural networks &#8211; Part 6: The machine that loved Myaskovsky","link":"https:\/\/jonayre.uk\/blog\/2025\/01\/07\/understanding-neural-networks-part-6-the-machine-that-loved-myaskovsky\/"}],"_links":{"self":[{"href":"https:\/\/jonayre.uk\/blog\/wp-json\/wp\/v2\/posts\/345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jonayre.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jonayre.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jonayre.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jonayre.uk\/blog\/wp-json\/wp\/v2\/comments?post=345"}],"version-history":[{"count":4,"href":"https:\/\/jonayre.uk\/blog\/wp-json\/wp\/v2\/posts\/345\/revisions"}],"predecessor-version":[{"id":350,"href":"https:\/\/jonayre.uk\/blog\/wp-json\/wp\/v2\/posts\/345\/revisions\/350"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jonayre.uk\/blog\/wp-json\/wp\/v2\/media\/347"}],"wp:attachment":[{"href":"https:\/\/jonayre.uk\/blog\/wp-json\/wp\/v2\/media?parent=345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jonayre.uk\/blog\/wp-json\/wp\/v2\/categories?post=345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jonayre.uk\/blog\/wp-json\/wp\/v2\/tags?post=345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}