<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Music on Junrui Liu</title><link>https://junrui-liu.github.io/blog/music/</link><description>Recent content in Music on Junrui Liu</description><generator>Hugo</generator><language>en-US</language><copyright>Copyright © 2026, Junrui Liu.</copyright><lastBuildDate>Sat, 11 Jun 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://junrui-liu.github.io/blog/music/index.xml" rel="self" type="application/rss+xml"/><item><title>Solver-aided chorale composition</title><link>https://junrui-liu.github.io/choco/</link><pubDate>Sat, 11 Jun 2022 00:00:00 +0000</pubDate><guid>https://junrui-liu.github.io/choco/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Composing music is hard: if you hit the keys on a piano randomly, chances are, it won&amp;rsquo;t sound great. A music theory aims to distill a musical &lt;em&gt;syntax&lt;/em&gt; such that a syntactically correct composition will not sound &amp;ldquo;wrong.&amp;rdquo; Under this view, composition becomes a constraint satisfaction problem: given a background theory, find a sequence of composition actions that does not violate the theory&amp;rsquo;s syntax.&lt;/p&gt;
&lt;p&gt;To illustrate this view, here&amp;rsquo;s a toy project called &lt;a href="https://github.com/junrui-liu/choco"&gt;Choco&lt;/a&gt; that I built for composing music in the style of &lt;a href="https://en.wikipedia.org/wiki/Four-part_harmony"&gt;Baroque four-part chorales&lt;/a&gt;. It was originally developed as a course project for &lt;a href="https://github.com/fredfeng/CS292C/tree/spring-2022"&gt;CS 292C - Computer Aided Reasoning for Software&lt;/a&gt;, and was motivated by my earlier memory of doing four-part voice leading in a music theory class. I felt at that time that the rules of four-part harmony were rigid enough, and the process mechanical enough, that it would be possible to automate the process of composing a chorale. Choco is my attempt at doing just that.&lt;/p&gt;</description></item></channel></rss>