Dating

Because life goes on and that, I posted a personal ad on a dating site that I’m not going to name here. And so I went on a date. With a straight woman.
She seems like a nice woman and may one day read this, so I’m not going to talk about her here, but I do want to talk about the evening.

Yes, seriously

Back when I was a lesbian, I knew to stay away from straight girls because of straight girl syndrome. Some straight women will treat lesbians as a lark or an experiment or a distraction, which can be bad if you get your feelings caught up in. Better to stay away.
But I’m not in that position anymore. I’m a man who likes women. And I’ve limitted myself to bi women, but that’s a small population of people, in comparison with the larger pool of all women who like men. There are just a hell of a lot of straight women around; many of them are good looking; many of them are good people, so why not give it a go?

Did she know?

So, when to disclose? There are a lot of people who have never knowingly met a trans person. And there’s a whole lot of negative stereotypes, misunderstanding and transphobia in society. I suspect that many people would reject a trans person out of hand, motivated by ignorance, rather than malice. (Of course, these two things can be hard to tell apart.) Therefore, I decided I’d rather be evaluated on my merits or lack thereof and thus not disclose on my personal ad. And If I say something on the first date, it would overwhelm any other get-to-know-you blahblahblah. So my current plan is to disclose on the third date or before serious snogging, whichever comes first.

What happened

So I was sat across from my date and we were talking about our pasts. But this thing about who I was and who I am runs through my past like a mighty river. My queer identity is fundamental to my sense of self. And yet, apparently, I’m also straight.
The jacket I wear most often (but not that night) has a badge on it that says “transgender.” I hate discolsing. But more, I hate not disclosing. It’s unnerving. And it’s even more unnerving, when I try to talk about what I’m doing with my life. I joined the London Gay Winds, because, um, I wanted to play tuba, and um. I go to a queer bar because it’s fun and um, my band has played there a few times.
I feel that my presentation of heterosexuality is not credible. And so I was unnerved.
Both I and my date have both been divorced and so we talked a bit about that:
Me: So I was married too.
Her: You got married in the States?
Me: In Canada, actually.
Her: Why did you get married in Canada?
The real answer is because same sex marriage was legal there but not at home. Which I probably should have remembered before automatically saying “in Canada.” Normally, it’s a pretty good story. It ends with the first same sex divorce in the state of California. But, since I’m not discolsing, I now need a dfferent answer to something that I shouldn’t have brought up.
Me: For the Elvis impersonator!
It felt like lying. And probably made me look like a nutter. But, I mean, that chapel employs the best Elvis impersonator in Canada, so . . . yeah, I looked like a nutter.
And because we had been talking a bit about how marriage interacts with legal residency status:
Her: Was that valid in the states, then?
Hahahaha, well, it should be according to international law, but the Defense of Marriage Act had been interpretted to mean that the US can ignore international same sex marriages, which, since it’s a treaty violation, makes that application of DOMA unconstitutional. But it was good enough for a divorce, so:
Me: More or less

And

In the bad old days, being trans was like joining the witness protection program. You had to change your name, leave town and lie about your past. You weren’t supposed to tell anybody, or doctors could retaliate by taking away your hormones, which has serious health consequences. In these more enlightned times, the NHS just makes you change your name, but you don’t need to move or be stealth. And, god, how could I? I went to a women’s uni for my undergrad.
But really, I don’t know if the unnerving bit is trying to pass for straight. Or that I seem to be succeeding at it. Or that it’s what I might be now.
A man and a woman out on a date. What could be more heteronormative than that?

Ian Mackey Newman

My friend Ian died, very recently. I’ve known him for about 10 years, since he was 16.
When I met him, he was a student at UC Berkeley. I just read that he got admitted at age 14. Obviously, he was incredibly smart. His mom moved to Berkeley with him and lived a few doors down from me in the same building as me.
I’m not sure what to write about him. During his years at Berkeley, I hung around with him and his mom a lot. We went to parties at each other’s houses. We had them around for brunch. We went there for dinner. They were the neighbors we were closest with.
I want to talk about how outstanding he was. Brilliant, charming, witty, just a great guy. I had fallen out of contact with him after he and I both stopped living in Berkeley. A couple of years ago, I ran into him in Berkeley and it turned out he was back to study law. We connected on facebook. So last August, I had a pint with him at Saturn and we caught up.
When I had last seen him, he was still kind of a kid, but meeting him again, he was, of course, all grown up. Even more charming. Wearing a fabulous hat. We talked about this and that. Then I heard that he passed the bar.
He was going into disability rights law and he would have been such a fantastic lawyer. People have stereotypes about what disabled people are like and he was none of those things. When he was a kid, he drove his chair like it was a tank. Actually, he drove it at alarming speeds. Whenever I mentioned him to my father, my dad would say, “is that the guy who races down the sidewalk?” He used to bolt a stick on to the side and play street hockey. I was invited to play also, but after watching him and his friends smash into each other, I feared for my safety.
One time, I was talking to him and he was complaining about how, because of Stephen Hawking, everybody thought a really smart guy in a chair must be studying physics and this was really annoying, because he was majoring in the classics. And I felt really bad, because I had been under the impression that he was doing physics. Over the course of the conversation, it turned out that he had started with physics and then changed his major. It was too funny.
A few months before we both left, he rented out the café down the street and had a huge graduation party. It felt like a hundred people came. His mom asked my band to play, but had already booked other bands for the night, so we ended up playing to the cleaning crew. It was out first gig and I blogged about it, back in the day.
It’s hard to believe he’s gone. I’ve been trying to think how best to remember him and I don’t know, but it’s so easy to imagine what he would say in response to some things I’ve thought about doing. He was just such a great guy.

Taking Your Ball and Going Home

Who owns online communities?

First, a case study.

Jeff Harrington, the founder of New New Music has been pushed too far / is having a strop. He’s renamed the site to “New Music Shit Hole” and deleted a lot of the content. He sort of explains why in a post, in which he complains about trolling. The money quote is, “The big picture is that this online new music scene is basically 200 guys in their basements with MIDI synthesizers.”
What’s mostly surprising about this development is the timing, as the community had been surprisingly active lately. Last week, they released a compilation CD which they were selling will all proceeds going to benefit Haiti. Shortly before that, there was some sort of contest in which a great number of one minute pieces were created. The site actually was mostly populated by hobbyists (in their basement with synthesizers), which is why I wandered off. But aesthetically, some of the stuff that was going on there was worth paying attention to.
On the other hand, the number of people in the world who actually have interesting things to say about music is very small. The number of people who have interesting musical thoughts is less small, but putting those thoughts into words is notoriously difficult and can distract attention from putting those thoughts into music. So when composers (or wannabe composers) start talking about stuff, they most often start talking about sort of side issues like technology or gossip about composers or economic issues related to music or some kind of ideological whatever.
Tech talk abounds on the internet. It should be avoided if you actually want to make anything. Hobbyists don’t tend to have any good gossip and their economic interests are sometimes contrary to mine. As for ideology, well, this is probably where the flame wars came from.
So, in frustration, Mr Harrington renamed the site and deleted a bunch of content. There were no other moderators, and possibly no backups. The site, which was clearly valuable enough to have been doing projects even last week, is dead.

Community Projects are Hard

I worked for a couple of years on one for my day job, back when I was a music hobbyist and then, after enough time has passed for me to kind of forget the horror, I spent a year or so helping moderate a high traffic community on live journal. There is practical advice that helps: Have a team of moderators, enough so that if one or two of you wander a way for a bit, things keep going. Replace moderators when they burn out, which will take two years max. Have rules against stupid flamey crap and enforce them. Ban disruptive people – even if somebody is a god of music, it doesn’t mean they can participate well in a community.
One person trying to run a large community site is pretty much a guarantee that it will go up in flames. Which it did. And with it went the content. But any number of other things could have gone wrong. Ning, the company that hosts it, could have inexplicably decided to shut down this particular site (maybe they’re uptown). Or they could have decided to cease operations entirely. These scenarios expose a fundamental flaw in the way that community sites are structured.

Pyramid Shapes

A lot of people make content, but a few people own the distribution of it. I’m not talking about copyright, since a lot of the more casual content, like playlists, that populate this kind of site shouldn’t be under copyright anyway. But users spend time creating these and their discussions and comments and this is what actually forms the substance of the community. Yet, a very small number of people – the admins, the moderators, the hosting company – are actually the ones directly in control of the integrity of the content. The power of a community is it’s distributed user base, but all of it ends up concentrated in a single point of weakness, vulnerable to the whims of a few.
Web pages make for very nice front ends, and they can be a great way to organize how content is accessed, but in terms of actually working well with actual people who are not being paid to run them: usenet has a way better model. All the pre-web stuff was better designed for working with communities and had robust implementations. IRC and usenet are distributed. The content lives across many servers. There is no master copy. No one person can destroy a group. And yet groups can still be moderated.
The web was originally exciting because of inline images and some formatting stuff. It looked pretty. This might not sound like much, but back in those days, you couldn’t open a windows-created word file on a macintosh computer because there was nothing in common for different platforms of home users (a situation we are happily skipping back towards with phones, but that’s another post). The web let you actually all look at the same document. And it had pictures!
There’s a lot of reason to love that. We can all have our own little space which is ours and put up pictures of our pets and it was centralized in that we controlled our own space. Corporations loved the control aspect. They could entirely run some service and get users to pay for it and show them ads and if any user becomes annoying, they can be expelled. It’s sort of feudal, but, ooh, pictures! The major trend of web 2.0 is not user-generated content, since the early days of the web were all user generated. The major trend is centralization and corporate control. This transfers ownership of our content to a much smaller groups of people or individuals. They may treat it appropriately, or they might get really tired of trolls and delete all of it.
Everything old is new again in 2010. We need to go back to usenet and use it the basis for how community back ends work. If Net New Music wants to get going again, they should probably reconvene there.

Resolution Interview: Temporary Vegan

A resolution is basically an attempt to change one’s own behaviour. Often these are made for reasons of self-improvement (ie, “I will go to the gym at least 3 times a week from now on.”) but sometimes they are made with a more communal goals. The impact of these is greater if more people participate. I sent out some questions to people I’ve known that have tried to do world-improving resolutions. First up is Sarah, who went vegan for a month over the summer.
I got email from her then, explaining what she was doing and asking if people wanted to go along and do it too. I wondered what had become of the project. This is what she told me.

I originally started the Vegan-for-a-month project to try and get my close friends and family members to eat less beef. Beef consumption is a major cause of global warming and of rainforest destruction and if we want to do anything about either of these problems we actually all have to decide to stop eating beef entirely. I also wanted to see what kind of response I would get just based on peer pressure.

The response was overwhelming! I sent the original request out to several hundred people and I got about 50 responses back indicating that my friends and family were in support of my decision. One person wrote that he and his girlfriend ordered the organic veggie box from a local CSA, one person agreed to give up cheese, and another didn’t eat beef the whole month! Best of all, my boss brought me a vegan chocolate bar.

All in all, I think about 50 people participated, but I never did a follow up to find out what they did.

It started to fail near the end of the month for several reasons. I went to a formal dinner and was served items containing dairy. Additionally, I gained a ton of weight. Some people have naturally high metabolisms, but I metabolize protein differently and in order to get enough protein I had to ingest a quantity of beans and rice that also provided me with too many carbs. I am familiar with vegan cooking, and I eat vegan most of the time, but I cannot figure out how not to become protein deficient without ingesting small amounts of non-fat dairy from time to time. I love tofu, ate a whole bunch of it, but it also causes me to gain weight. Additional exercise only makes the problem worse because then I need more protein.

I consulted several vegans before I started and most were very unhelpful and told me things that I already knew. I think people’s bodies react differently to changes in diet.

I learned that being vegan is really hard to maintain in social situations. You are very limited to what you can eat if you go out which means cooking all the time and if you go out to someone’s house you can’t eat most of what they serve. They become offended easily. I hated going to a birthday party and telling the host that I didn’t want any of their birthday cake. It made me feel bad. I think veganism can work very well for people who are not as social or don’t have as eclectic of a group of friends as I do. I also travel too much to be vegetarian let alone vegan.

I also missed cheese a lot. I have now mostly cut cheese out of my diet, but every once in a while I really like to have some. I also just can’t get used to coffee without a tiny splash of real milk in it.

I don’t think I would try it again based on the way that my body reacted. I’m still trying to loose some of the weight I gained. I try to eat mostly vegan, and when I cook for myself I almost always eat vegan, but when friends come over or I go out, vegetarian is just fine and please pass the birthday cake thank you very much.

I think I accomplished my goals. My main goal was to get other people to think about their beef consumption. I’m going to continue to do this via other means such as publishing pictures I took in Peru of cattle eating rainforests.

I have asked her to send a picture of a cow in a rainforest! And I’ll post it when it comes up.
Incidentally, Sarah is the second person I’ve spoken to recently who had health problems with doing a vegetarian or vegan diet. It works for me, but everybody is different. Multivitamins seem to help. If you’re vegan, also, you need to take B vitamins, or else eat loads of marmite. But if you can’t manage to be a vegetarian, you can still get local, organic, free range meat and eat it in moderation.

It’s that time of year

At the very end of December people’s minds turn to two things. Submissions for ICMC and New Years Resolutions!

Resolutions

Every year I resolve to do the same things. Play more gigs, write more music, work harder, etc. But I know a few people who have made much more extreme, massively life-style altering resolutions. I’ve contacted them recently to see how those went and will be reporting on it, citizen-journalist interview style, in the next few days. If you made a major resolution and want to tell people about it via my blog, please contact me.

ICMC

When I was working on my MA, I actually had a much better method of workflow. When I was writing a piece, I would blog drafts of it and solicit feedback and I would make presentations of it as a work in progress at public venues. I need to start doing this again. Now, I mostly work alone, only demo-ing my stuff for my supervisor and then submit it to things that want a premiere. And I don’t write about my ideas as often. This results in me having weaker pieces that take longer to write.
Unfortunately, these kind of CV boosting events, like ICMC do want premieres. I’m submitting to the piece plus paper category and I haven’t quite work out what to write about what I’ve written. Heck, the piece doesn’t even have a name yet.
Like most of the pieces I’ve written since my MA, it actually started out as several unrelated ideas that coalesced together. For a long time, I’d been thinking that I should record the sounds of trains, so when I was home for my uncle’s funeral, I recorded CalTrains and Amtrak to go with my collections of UK and EU train sounds. Also, I had been listening to a lot of drone music, especially the music of composer David Seidel. I noticed that though his music was drony, it was not at all static, but had a lot of variation. It was also calming when I was having anxiety issues. It seemed to involve FM tones and I had just coded up some libraries to deal with Dissonance Curves and FM tones, so I wanted to do something that could tune drones on-the-fly based on randomly generated FM parameters. Finally, I analyzed some of the bell sounds I recorded with trains and used those also for tuning.
So basically, I just took a bunch of sounds that I like and put them together. I don’t know if it’s interesting to talk about why I like train sounds. My flat in Berkeley is a block from the tracks and I could hear train whistles blowing through the night. Some of my neighbors object tot his, but I found the whistles kind of mournful and haunting. They are a bit siren-like to me. Sometimes, when I hear the train whistle blow, I get an incredible longing, that I wish I was on the train as a passenger or a hobo, going someplace – anywhere the train is going.
One day late in 2001, or early 2002, I was sitting at a café near the tracks and a freight train started to go by, loaded with hundreds of army tanks. They were clearly going to be deployed to Afghanistan. The café fell silent as well started uneasily at the military cargo.
I focused on my California train sounds instead of European ones just because American train sounds are just much more train-y. My mom used to complain that the “new” diesels sounded dull in comparison to the old steam engines, but the diesels are more interesting than the electric ones. Also, the signals and many of the trains have bells on them. CalTrains, in particular is loud and full of very characteristic old-fashioned train noises. There’s something kind of ironic about such old-timey-sounding trains serving Silicon Valley.
But there’s also something kind of not-ironic. Infrastructure and transit in America has been neglected for decades. Like, trains are the future, I think. But the glass-topped observation decks of the Pacific Starlight Express, while being a good way to get to Oregon or Washington, is more of an antique than the future. The romance of train sounds comes from it’s sort of time capsule quality.
I took my train recordings and put them through feedback and comb filters and plate reverb and other things to make them slightly less obviously field recordings. I used the drone tunings for tuning these effects also, which has hopefully created a bit of glue between the train sounds and the drone sounds.
Perhaps, I should also talk about Dissonance Curves. Tones are considered consonant if they are close enough together in pitch to have slow beating or if they are far enough apart to be outside of each other’s critical band. (http://jjensen.org/DissonanceCurve.html) Any sound is made up 1 or more tones, so if you want to know if two sounds are consonant, you can compare all of the tones of sound A with all of the tones of sound B. In order to create a Dissonance Curve, you compare a sound with itself at a shifted tuning, and then graph how relatively dissonant all of the possible tunings are. The minima on the curve are places where consonance is high, and thus make good tunings. (http://eceserv0.ece.wisc.edu/~sethares/consemi.html)
I wrote and published some code for computing Dissonance Curves in SuperCollider, which I used in this piece. I like open source code and I like sharing, which, incidentally, I think it related to why I like trains, because they both involve collectivized solutions and building useful infrastructure.
So the underlying drone sounds are FM tones which are tuned according to their dissonance curve. On top, there are train recordings, run though filtering processes using the same tuning. Then, closer to the end, the tuning and timbre both shift to one based on some of the bell sounds. Some of the tuning is kind of fudged, though, because I detuned the left and right by 10Hz. I did this because of dubious claims that such a detuning effects brain waves and makes people feel more relaxed. I wanted ot write music that would do good things for my general anxiety levels. This makes the tuning not work in one channel, but it’s only slightly off and this isn’t rocket science.
I need 4 or 8 pages in proceedings. How many words go on a proceeding page?

How To Data Bend

I got email asking me how to do data bending for audio. (If you want to know how to do it with images, check out Hello Catfood’s posts.) Databending means taking one kind of data and using it as another kind of data. For example, playing an image file as a sound. Or processing an audio file with an image program and then returning it to it’s audio format. This post will focus on how to open non-audio files as if they were audio.
There are two different programs I’ve used for databending. One is Sound Hack, which is free, but mac-only and the other is Audacity, which is also free and cross-platform. For mac users, I suggest running 1.2.6 instead of the beta version.

Data Files

Opening data files with either Sound Hack or Audacity is easy. A data file is a file used by an application, for example a text file created by Word or Open Office or an image file or anything you might find in your Documents folder. With Sound Hack, under the File menu, select “Open Any” and pick a file. The go to the Hack menu and select “Header Change.” You can try a few different headers and listen to them until you pick one that you like. Once you’ve found a good one, go to the File menu and select “Save a Copy.” That will open a new dialog. At the top is the file name. Add a “.aiff” (without the quotes) to the end of the file name, no matter what you decide to name it. At the bottom, make sure to set the Format to “Audio IFF” and the Encoding to “16 bit linear.” I’ve found that Sound Hack does not save reliably into other formats.
To open a data file with Audacity, under the Project menu, select “Import Raw Data.” Pick the file you want to open. A dialog will pop up asking what header you want. I usually go with the default values, but you can try playing around with that. You can then modify the file with Audacity, using the Effects or whatever. When you think you’re done, first go to Preferences and then go to the File Format tab. Make sure that the format you want (Aiff, WAV, etc) is selected. Then, go to the File menu and “Export As” that file type.

Applications

You can also open applications as audio, but this is a bit weird on the mac. Go to the finder and find the application you want to open. Control-click on it. (by holding down the control key as you click). In the menu that pops up, select, “Show Package Contents” A new window should open with a folder in it called Contents. Open that folder, and you should find some stuff in it including a subfolder called MacOS. In that folder, you’ll find, probably, a file with the same name as the program. Like in Garage Band, under Contents/MacOS/ there’s a file called GarageBand and two other files, all of which may be interesting. Control-click on the file and select “Open With”. Then select “Other . . .”. A new dialog will open. In the Bottom part of the window, change the menu from “Recommended Applications” to “All Applications”. (Do NOT check the box under that!) Then find Audacity or Sound Hack, select it and click the Open button. If you use Sound Hack, you can try out different headers, by doing a Header Change under the Hack menu. Save these files is the same as described above.

Examples

I haven’t used this technique for years, but if you’re searching for examples of how it sounds, I’ve got some pieces. My supervisor, Scott Wilson, also uses this on his CD Muellmusik, in the track Photo Shopped Music. Other examples abound. You’ll find that if you do this a bit, you’ll not only be able to recognize other people doing it, but also sometimes be able to recognize what kind of file they’re using. Stochastic Synthesis also sounds quite a lot like data bending.

Angie’s Persimmon Cookies

Here in California, persimmons (known to Brits as sharon fruit) are getting to be ripe. When I was a child, the elderly Italian couple across the street had a huge persimmon tree and every year Angie, half of the couple, would make amazing cookies from them. This was her recipie:
Preheat your oven to 375 F (190 C, gas mark 5)

  • 1 Cup (240 mL, 200 g) sugar
  • 1/2 Cup (120 mL, 120 g) shortening or butter
  • 1 beaten egg
  • 1 tsp (5 mL) baking soda
  • 1 Cup (240 mL) persimmon pulp
  • 2 Cups (480 mL, 240 g) flour
  • 1 tsp (5 mL) salt (I use less than Angie did)
  • 1/2 tsp cinnamon
  • 1/2 tsp cloves
  • 1/8 tsp nutmeg
  • 1 Cup (240 mL) nuts

cream 1/2 of sugar with shortening. Mix remaining with egg. Combine. Dissolve soda in pulp and put fruit through strainer and beat into sugar mixture. Mix dry ingredients and blend in. Finally, mix in the nuts.

Soon it on to a baking sheet with a big spoon. They rise a lot when you cook them, like tiny cakes.

Bake 10 -15 minutes.
These cookies are super fantastic. After Angie passed, my mom would make these every year. I got the recipe from her when I was at university. These cookies will make you feel happy.

Letters to State Represenatives

Dear Honourable _,

I am writing to ask that more resources are allocated to higher education in the state of California. I’ve read that the regents of the UC system are voting to hugely increase fees. I’ve also read that the CSUs have been cutting services like library hours and doing no new admissions this spring.

While I understand that the state is having a budget crisis, the degree of cuts to the university systems and the size of fee increases is alarming. It’s actually cheaper for California students seeking a professional graduate degree to go out of state or even overseas. Our universities are excellent, but they must also be affordable to the populations they were established to serve. Raising fees may also have a detrimental effect on their standards as some of the most qualified students are simply unable to afford to attend and those that do attend can’t access the libraries except during limited hours.

Cutting the university system is short-sighted and foolhardy. It plunges middle class families into severe debt and puts education out of reach for much of the working class. Given that the Bay Area economy essential runs on brain power, this is not only dooming the would-be-students who cannot afford an education, it potentially harms all of the industries of the area. Our short-term downturn will become a long term one if we squander our human resources in a sort-sighted attempt to save money.

If we have to cut something, why not the prison system? It costs far more to house a convict for a year than to educate a student for year. Furthermore, every execution costs millions of dollars. Surely that money would be better spent on a young person’s future than ending a life. How many millions or billions of dollars do we spend on enforcing nonsensical anti-marijuana laws? Again, wouldn’t it be better to reduce student fees than to put somebody found possessing a joint through our justice system. If we neglect education in favour of prisons, I fear that over time we’ll need more and more prisons and have less and less for education until the outstanding know-how of the Bay Area is just a distant memory.

Thank you for your time,

C. Hutchins
You can find your two state legislators here.

I write letters

Dear Honorable Senator,

I am writing to encourage you to protect meaningful health care reform by protecting the public option and women’s access to reproductive health services. In order to be meaningful, the public option must be available to everyone, even if their employers offer health insurance. I would chose government-run health care and would like the right to do so no matter what my employment situation.

I’m alarmed about the abortion amendment tacked on to the house version of the bill. I hope that the senate is able to protect women’s rights to access abortion.

Thank you for your leadership on health issues.

Sincerely,
C Hutchins

TuningLib

Yesterday, I added a new Quark to Supercollider, called TuningLib. It requires a recent version of MathLib, one with the Bessel.sc file included. There are several classes in the new Quark, all realted to tuning.

Stuff from Jascha

Scala – This class is based on the SCL class from Jascha Narveson, but updated so it’s a subclass of the newer Tuning class. It opens Scala Files, which means you can use the large and interesting scala file library of thousands of tunings.
Key – Jascha’s SCL file also did a bunch of other interesting tuning-related things that the newer Tuning class does not, so I put these features in Key. It tracks your key changes and can interpolate between a given frequency or tuning ratio and the current active Scale.

Dissonance Curves

DissonanceCurve – is, I think, the most interesting part of the TuningLib. It generates Tunings, on the fly, for a given timbre. Give it your spectrum as lists of frequencies and amplitudes, or as a FFT buffer or as the specs for an FM tone, and it makes two different scales.
The first kind of scale it makes is the sort described by Bill Sethares. If you want to see the generated curve, you can plot it. Or you can get a Tuning from it. Or, you can get a scale made up of the n most consonant Tuning ratios. This is used in the second section of my piece Blakes 9
The other sort of tuning it does is based on a similar idea, but using the classic Just Intonation notions of consonance. Like with Sethares’ algorithm, every partial of a timbre’s spectrum is compared against every partial of the proposed tuning. It calculates the ratio between the frequencies. This could be 3/2, for example, or 115/114 or any whole number ratio. The numerator and denominator of that ratio are summed. In just intonation, smaller numbers are considered more consonant, so the smaller the sum, the more consonant the ratio. (This sum is related to Clarence Barlow‘s ideas of ‘digestibility.’) Then, the resultant sum is scaled by the amplitude of the quieter of the two partials. So if they are 3/2 and one has an amplitude of 0.2 and the other of 0.1, the result will be 0.5 ( = (3 + 2) * 0.1). This process repeats for every partial, and the results for each are summed, giving the level of dissonance (or digestibility) of the proposed tuning.
After computing the relative dissonance of all 1200 possible tunings in an octave, the next step is to figure out which ones to select as members of a scale. For this, the algorithm uses a moving window of n potential tunings. For a given tuning, if it is the most consonant of the n/2 tunings below it and the n/2 tunings above it, then it gets added to the Tuning returned by digestibleTuning.
I don’t have any sound examples for this usage yet, but I’m working on some. I don’t know of any pieces by anybody else using this algorithm either, but I’m sure I’m not the first person to think of it. If you know of any prior work using this idea, please leave a comment.

Tuning Tables

Lattice – This is based on some tuning methods that Ellen Fullman showed me a few years ago. Based on the numbers you feed it, which should be an array of 2 and then odd numbers, it generates a tuning table. for [2, 5, 3, 7, 9], it creates:

 1/1  5/4  3/2  7/4  9/8
 8/5  1/1  6/5  7/5  9/5
 4/3  5/3  1/1  7/6  3/2
 8/7  10/7 12/7 1/1  9/7
 16/9 10/9 4/3  14/9 1/1

You can use this class to navigate around in your generated table. For otonality, adjacent fractions are horizontal neighbors, so they share a denominator. For utonality, neighbors are on the vertical axis, so they have the same numerator. Three neighboring ratios make up a triad. You can walk around the table, so that you’re playing a triad, and then pick a member f that triad to be a pivot. Then, create a new triad on the other axis that contains your pivot as one of the members.
For example, one possible walk around the table, starting at 0,0 would be [1/1, 5/4, 3/2], [5/4, 1/1, 5/3], [3/2, 4/3, 5/3], [8/5, 4/3, 8/7], [8/7, 9/7, 1/1] etc. As you can (hopefully) see, the table wraps around at the edges.
I’ve done several pieces using this class, usually initializing it with odd numbers up to 21. Two examples are Beep and Bell Tolls

Undocumented

There is also a class FMSpectrum that will compute the spectrum for a FM tone if given the carrier frequency, the modulation frequency and depth (in Hz). I would like to also add in a class to calculate the spectrum of phase-modulated signals, but I don’t have the formula for this. If you know it (or where to find it), leave a comment!