# Measuring musical dissonance

#### An empirical approach

When we hear two musical notes played together (either in succession, or simultaneously), we often characterize those notes as “dissonant” or “consonant”. But instead of having a sharp dichotomy between dissonance and consonance, it might be more useful to speak of a spectrum between the two. Then, the question before us is how to quantify the dissonance of any pair of notes.

12tone is a cool music theory channel, and he recently published a video discussing the solution thought up by the 18th century mathematician Leonhard Euler. I include the video below, but be warned that I’m going to trash Euler’s answer. I believe that any measure of musical dissonance must, at some point, refer to empirical observations of dissonance. Euler’s answer relies on mathematical supposition, and thus I would deride it as numerology.

# Origami: Spiral creases

Four 45 degree spiral creases

This is going to be one of those origami posts where I talk way too much about math.  But before I get to the math, I will explain how you can make one of these things entirely with ordinary arts and craft tools.

“Ordinary tools” is the relevant bit here, since my understanding is that experts in curved-crease origami don’t use ordinary tools, they use things like vinyl cutters.  When I first tried making these, I could not find any instructions for how to make these models using ordinary tools (I later found an article by Ekaterina Lukasheva), so when I finally figured out a method, I wanted to share it.

#### Making a template

Before we draw the creases directly on the paper, we need to make a template.  The template ensures that each of the four curves are identical to each other.

# What does a DW-NOMINATE score of zero mean?

In an earlier post, I talked about the asymmetrical polarization of US congress, and how DW-NOMINATE is used to quantify it. In this post, I’m going to discuss more technical details.  I’ll explain why I was initially skeptical, and why I came to accept the argument.

But before I get into the math, I should first emphasize that there are many arguments demonstrating that the US congress has become more polarized, and that the Republican party in particular is more extreme. I think those arguments stand on their own, with or without using any evidence from DW-NOMINATE. You can read some of those arguments here, or watch the Vox video I linked last time. It’s not just liberals who are saying this–one of the big proponents of asymmetrical polarization theory is Norman Ornstein, member of the conservative think tank American Enterprise Institute;

# The math behind political polarization

#### The asymmetry of US politics

Vox recently had a good video talking about “asymmetrical polarization”. Basically, this means that the two political parties in the US are moving further apart, and this is mostly driven by the Republican party, rather than the Democrats.

There are many aspects to this argument. Republicans have been more obstructionist than democrats, less likely to negotiate or compromise, and more likely to use filibusters. Their agenda has become more extreme over time. Democrats have also moved further left (despite complaints hereabouts that Democrats are too moderate), but in a way that trails the motion of the Republican party.

These many arguments stand on their own. But I want to address the very first argument that Vox presents, which comes from the following graph:

Image credit: Voteview. I abridged the graph to only show history after 1900. Red dots represent Republicans, blue dots represent Democrats, and the solid lines represent party medians.

# More on the food truck game

In an earlier post, I was talking about the economics of entertainment media. As a way of starting that discussion, I introduced a very basic model which I called the Food Truck game. Several food trucks park along a single street, and each customer patronizes the nearest food truck. It’s a neat little problem, similar to the cake-cutting problem, but it’s not a very realistic model of entertainment media.

So I thought about it some more, and came up with some possible adjustments. With these adjustments, I hope to tease out some real implications. The question I want to answer is, what is it like to have fringe tastes in entertainment media, vs having mainstream tastes? How many businesses will cater to your preferences?  What prices will they charge you?

This also plays into a larger discussion I’ve been having, about the differences between capitalist systems, utilitarian systems, and fair systems.  Here I will show that each system leads to a different solution to the food truck game.

# Evolutionary Prisoner’s Dilemma sim

This is a small programming project I worked on in 2013-2014.  Although I wrote a blog series about it at the time, this is not a repost of that series.  Instead, this is a repost of the explanation I wrote earlier this year, when I uploaded the project to github.  If you liked this article, you might also enjoy this interactive game, although I had nothing to do with that one.

The Prisoner’s Dilemma is an important concept in game theory, which captures the problem of altruism. Each of the two players chooses to either cooperate or defect. Cooperating incurs a personal cost, but benefits the other player. If both players cooperate, then they are better off than if they had both defected. In a single Prisoner’s Dilemma, it seems that it’s best to defect. However, if there are multiple games played in succession, it’s possible for players to punish defectors in subsequent games. When multiple games are played in succession, it is called the Iterated Prisoner’s Dilemma (IPD).

The best approach to the IPD is highly nontrivial. In 2012, William Press and Freeman Dyson proved that there is a class of “zero-determinant” strategies that seem dominant, and which would lead to mostly defection. However, Christoph Adami and Arend Hintze showed that the zero-determinant strategies are not dominant in the context of evolution. Understanding this issue could elucidate why humans and other creatures appear to be altruistic.

#### How the simulation works

1. We have a population of 40 individuals. Each individual has 4 parameters that govern how they play IPD.
2. Each individual plays IPD against 2 other individuals in the population, and their fitness is calculated from their average score.
3. One individual dies, and another reproduces. The probability of reproduction increases with fitness, and the probability of death decreases with fitness.
4. All the parameters of the individuals are mutated by small amounts.
5. Steps 2-4 are repeated a million times. Each repetition is called a “generation”.

# A toy model of media economics

One thing I’m interested in is the theoretical economics of entertainment media. For instance, we know that people have a wide variety of tastes in movies, but movie producers aren’t necessarily interested in catering to everyone’s tastes, they’re just interested in maximizing profit. You can imagine situations where this would lead most movie producers to cater to the most popular tastes, and to ignore fringe tastes.

Economists would describe this system as a kind of monopolistic competition. The problem is, monopolistic competition is super complicated and dependent on details, and I for one don’t understand it. So in order to better understand monopolistic competition, I want to build a toy model–the very simplest model that vaguely resembles monopolistic competition. The goal is not to build a realistic model, it’s more of a conversation piece.

Disclaimer: I have no education in economics, I’m more of a game theory guy.

#### Movies, democracies, and food trucks

Monopolistic competition is a system where different firms produce goods that are differentiated from each other. To make the very simplest model, we’re going to imagine that goods are differentiated from each other along only a single axis. For example, suppose that each movie falls along a one-dimensional spectrum from “drama” to “comedy”. And where a movie falls along this spectrum is the only thing that could differentiate it from other movies. Some viewers prefer comedies, and some prefer dramas, and some prefer dramedies.