The SynthDefs for my Christmas EP

As threatened, I have once again made some Christmas music.

If you enjoy (or hate it, or are indifferent), please consider donating to the UKLGIG. cafdonate.cafonline.org/111#/DonationDetails They support LGBTQI+ people through the asylum and immigration process. Their vision is a world where there is equality, dignity, respect and safety for all people in the expression of their sexual or gender identity.

Or, if you are in the US, please donate to the National Center for Transgender Equality secure2.convio.net/ncftge/site/Donation2;jsessionid=00000000.app268b?df_id=1480&mfc_pref=T&1480.donation=form1&NONCE_TOKEN=C5EA18E62F736227261DC4CE5C50ADBE

The notes in the 5 movements all come from the same pop song, but in 4 of the movements, they pass through a class I (accidentally) wrote called MidiMangler. It’s undocumented, but the constructor expects the kind of midi events that come from SimpleMIDIFile in wslib and the .p method spits out a pbind.

The instruments are some of the sample I used a couple of years ago, but the organ is new. It’s based on one from http://sccode.org/1-5as but modified to be played with a PmonoArtic.

SynthDef(\organ, {| freq = 440, gate=1, amp=0.25, pan=0 |
    // from http://sccode.org/1-5as
    var lagdur, env, saw, panner;

    lagdur = 0.4;

    saw = VarSaw.ar(Lag.kr(freq-440)+440,
        width:LFNoise2.kr(1).range(0.2, 0.8) *
        SinOsc.kr(5, Rand(0.0, 1.0)).range(0.7,0.8));

    env = EnvGen.kr(Env.asr(Rand(0.5, 0.7), 1, Rand(1.0, 2.0), Rand(-10.0, -5.0)), gate, doneAction:2);

    amp = Lag.ar((amp / 4) * (Lag.ar(LFClipNoise.ar(lagdur.reciprocal, 0.1), lagdur) + 1)); // tremolo

    panner = Pan2.ar(saw, Lag.kr(pan,1), env * amp);

    Out.ar(0, panner);
}).add;

The other instruments are the default synthdef *cough*, a Risset bell and Karplus Strong – taken directly from a help file with no changes. These are presented at the bottom for the sake of completion. The other sound is a bomb sample I found on freesound.

The video is taken from an atom bomb test video, but slowed down and stretched. I used ffmpeg to do this. The original film was 24 frames per second. I used a ffmpeg filter to create a lot of extra in-between frames and then, separately, changed the frame rate to be much slower. The original film was a bit over 20 seconds and got stretched out to 15 minutes. The really low frame rate is a bit choppy, but I think more tweening would have just increased distortion. The commands for that were:

% ffmpeg -i trees-bomb.mp4 -filter:v "minterpolate='fps=180'" 180trees.mkv
% ffmpeg -i 180trees.mkv -filter:v "setpts=33.4*PTS" strch180.mk

The other day, I read someone putting for the idea that apocalyptic thinking is so profoundly unhelpful as to be self-indulgent. Climate change is not going out with a bang, but a very prolonged whimper, whilst, for the duration, failing to make any significant changes. We can address it and avoid many of the worst impacts, but we need to get very serious about it immediately. If we can build thousands of expensive, terrifying bombs just in case there might be a war nobody wants, surely, we can afford to spend some of that resource averting a disaster that we know is actually coming.

SynthDef(\bell, // a church bell (by Risset, described in Dodge 1997)
    {arg freq=440, amp=0.1, dur=4.0, out=0, pan;
        var env, partials, addPartial, son, sust, delay;

        freq = freq * 2;
        sust = 4;
        amp = amp/11;
        partials = Array.new(9);
        delay = Rand(0, 0.001);

        //bell = SinOsc(freq);

        addPartial = { |amplitude, rel_duration, rel_freq, detune, pan=0|
            partials.add((
                Pan2.ar(
                    FSinOsc.ar(freq*rel_freq+detune, Rand(0, 2pi), amp * amplitude* (1 + Rand(-0.01, 0.01))), pan)
                * EnvGen.kr(
                    Env.perc(0.01, sust*rel_duration* (1 + Rand(-0.01, 0.01)), 1, -4).delay(delay), doneAction: 0))
            ).tanh /2
        };

        //addPartial.(1, 1, 0.24, 0, Rand(-0.7, 0.7));
        addPartial.(1, 1, 0.95, 0, Rand(-0.7, 0.7));
        addPartial.(0.67, 0.9, 0.64, 1, Rand(-0.7, 0.7));
        addPartial.(1, 0.65, 1.23, 1, Rand(-0.7, 0.7));
        addPartial.(1.8, 0.55, 2, 0, 0); // root
        addPartial.(2.67, 0.325, 2.91, 1, Rand(-0.7, 0.7));
        addPartial.(1.67, 0.35, 3.96, 1, Rand(-0.7, 0.7));
        addPartial.(1.46, 0.25, 5.12, 1, Rand(-0.7, 0.7));
        addPartial.(1.33, 0.2, 6.37, 1, Rand(-0.7, 0.7));

        son = Mix(partials).tanh;
        son = DelayC.ar(son, 0.06, Rand(0, 0.02));
        EnvGen.kr(Env.perc(0.01, sust * 1.01), doneAction:2);

        Out.ar(out, son);
}).add;
SynthDef("plucking", {arg amp = 0.1, freq = 440, decay = 5, coef = 0.1, pan=0;

    var env, snd, panner, verb;

    freq = freq + Rand(-10.0, 10.0);
    env = EnvGen.kr(Env.linen(0, decay, 0).delay(Rand(0, 0.001)), doneAction: 2);
    snd = Pluck.ar(
        in: WhiteNoise.ar(amp),
        trig: Impulse.kr(0),

        maxdelaytime: 0.1,
        delaytime: freq.reciprocal,
        decaytime: decay,
        coef: coef);

    //verb = FreeVerb.ar(snd);
    panner = Pan2.ar(snd, pan);
    Out.ar(0, panner);
}).add;


Canon Fodder

I’ve made Christmas albums the last two years and I feel sort of obligated to do another one, although this year is rather a late start.

I’m just listening to what spotify is telling me were my top tracks of 2018 and one lurking in there is the 1812 Overture, which is incredibly cheesy, but is redeemed by it’s cannon fire. I only know of two pieces with canons in them, which suggests there is rather a shortage.

Obviously, as a composer who feels vaguely compelled to put out an album at short notice, I’m well-positioned to address this dire shortage. Indeed, I can think of no Christmas songs with cannons in them at all.

The other piece I know of with cannons in it is Beethoven’s Wellington’s Victory, which doesn’t wait for the end for the big payout, but has cannons starting early and booming often. I almost hate to admit this, but they get really boring. The more heteronormative* model of music structure seems to work best for explosions. Although, the piece is just terrible throughout, with themes from God Save the [Monarch], Rule Britannia and For He’s a Jolly Good Fellow, it is unbearable. The lack of adequate build-up for the cannon fire is only one of it’s sins – although certainly the one with the greatest grinding, grating duration.

This extremely through analysis of the use of cannons in music implies that extremely bombastic Christmas music is called for.

This isn’t the world we dreamed of, but it’s the world we’ve got.

* Yeah, I went there. I’ve got a critique of Feminine Endings, in which I make the argument that some of it is inspired by TERF attacks on Sandy Stone, but I was advised that this would not be a brilliant career move and I should let the dated past stay there. But, I dunno, some of that text actually is useful – the metaphors are really apt when it comes to things like this piece in particular.

The Election is Over (Let’s Go Back to Postcards)

Democrats control the House now, which is fantastic news! However, most of the assaults on trans rights have been coming straight from Trump, so we need to keep fighting.

In my previous post, I asked people to participate in a post card campaign. This is still ongoing. Please chip in! If you are outside the US, you can print the postcards in A6 format. Or, if you are in the US and going to Kinkos or the like, you might find that 2×2 is the best format.

Stack of stamped postcards

I’ve had my best luck getting people to put their names down by talking to people and asking them. Response has been overwhelmingly positive. My spouse says that these conversation are more important than the cards themselves. She says that by asking well-meaning liberals to consider trans rights, I’m asking them to think about things they haven’t previously considered, helping them gain empathy and converting them into allies. I’ve certainly seen people go from politely curious to fully engaged after only a very brief chat. As a part of this, I’ve been mostly going to parties and talking to friends of friends. I have not been disclosing during these conversation, but sharing worries about my friends in the US.

Another way to get people to fill these out is to just leave them around. They don’t use normal stamps from the UK, so I come back to collect them. I’ve left them with some text:

Stand up for the trans community in the US!

The Trump administration plans to ‘define transgender people out of existence.’ Put your name on a postcard to let them know that this is unacceptable.

Then either post the card yourself (don’t forget to attach a £1.25 stamp) or drop it in the box here, and we’ll post it for you.

Thank you for your help.

Contact: [My email address]

I’ve done some regrettable shoebox painting for this (I’m lying and telling people it was done by children.) A cereal box is roughly the same dimensions as a sheet of paper and can be tacked to a notice board. Cereal box with postcards

The election was just the beginning of the work we need to do to make the US safe for vulnerable people. This project has been easier than I thought it was going to be and has built meaningful connections. I’ve sent more than 160 postcards since I started. Before this, I spent months sitting in front of my computer fretting at the news. If we all took the time we spent doing that and directed half of it to campaigns like this, we could build a tremendous mass movement to oust Trump, to protect trans rights, migrant rights, and the environment. We are the ones we have been waiting for. We won’t be erased because we will stand up and demand to be seen.

Ways to support trans rights!

There’s a lot of good actions people can do to try to counter the latest Trump attack on trans people. Marching is good. Writing letters to all your local papers is very good. Like really all of them from the regular paper, to the free advertiser to the Bingo Bugle. When the letters get published, forward them to your elected representatives, the White House and the Department of Health and Human Services. You can also write to those people directly. A paper letter carries more weight than an email, especially if you’re writing to somebody on the other side. (Here is the DHHS’s address.)

You probably know some people who are well-meaning allies, but are not going to show up to a march or write any kind of letter. (No hate. Not everybody can do everything.) These folks, however, would be willing to sign a postcard. This is less good than a letter, but it’s better than nothing.

Linked here are two PDFs of postcards. Postcard4x6.pdf is a standard American 4×6 postcard format. PostcardA6.pdf is a metric A6 format postcard (in the size and shape used by every other country on earth). These are grayscale, so printing is relatively cheap.

If you print these out and take them to things, allies who don’t have the spoons for bigger actions will probably be willing to help with this one. If a lot of post starts arriving at DHHS, this will help. I went to a cabaret tonight and got like 50 of these filled out. I’ll take a stack to work tomorrow. I’m going to give a bunch to my friend who is active in a lefty church, so he can pass them out on Sunday. None of these folks would have done anything if I hadn’t asked for this easy thing.

We #WontBeErased

P.S. Also, please don’t forget to vote.

Hello American Allies

The New York Times is reporting that the Trump administration is trying to ‘define trans out of existence’. Of course, you can’t erase people by changing definitions, but it is certainly within the federal government’s powers to make the lives of trans people significantly more difficult. The consequences of the Trump administration’s actions would be extremely dire.

This change in definition is coming from the Department of Health and Human Services. They have an Office of Civil Rights. Alas, this is is headed by a Trump political appointee, but they are reachable by the public. While emailing them is possible, I suspect it’s more useful to send snail mail or fax. The pile of documentation is harder to ignore. There is a service that allows users to send a limited number of free faxes per day. Upload a PDF and send it to your regional office. I’ve put my own letter at the bottom of this post.

I’d also like to suggest you contact your representatives and two senators. Even if you know they agree that trans people deserve civil rights, it’s helpful to them if they can say there’s been an outpouring of concern. And if they don’t agree, an outpouring may help change their minds, especially so close to an election.

Speaking of which, I’d like to encourage you to vote – and to do so strategically. This is an emergency situation for trans people and many other vulnerable groups. Voting for a Democrat won’t overthrow capitalism, but a lot of people live in the wedge issues that separate the parties. Vote for the people who can’t vote.

Fellow Americans abroad, it’s not too late. You can still request your absentee ballot. If you’ve requested your ballot and haven’t received it, you can get a backup ballot for overseas voters called the Federal Write-in Absentee Ballot. Depending on where you are elligible to vote, some states will accept this ballot even if you have not previously registered.

 

 

Example Letter

Dear Sir or Madam,

I am writing to oppose the proposed change with regard to gender. Making this fixed, genetic, and unchangeable flies in the face of medical opinion and common sense. A significant minority of people do change their genders. Trying to prevent this is a serious violation of their civil rights with no discernable state interest. This is unamerican.

Relying on genetics is also unscientific, as there are many people who’s physical sex characteristics are at odds with their genes. The Olympics quit using this definition after a woman who was found to be genetically male later gave birth – thus showing that the tests are not reliable even for people who are not transgender.

I strongly encourage the department of health and human services to do it’s job of protecting health instead of going out of it’s way to harm transgender people.

Thank you very much for your time and consideration.

Sincerely,

More on the Federation

Previously, I posted about the Federation – that is, the social network running on the Diaspora* protocol. In that post I mentioned that moderation, in general, is not great on many pods.

The very next post to show up on my stream was a transphobic meme. On the federation, the strong anti-censorship position means that for some users, the block button is controversial! Unfortunately, the mobile app I use(d) for that network was developed by somebody who felt that way, and thus I saw the meme and had no means to block it from my phone client.

But I also claimed that rolling your own pod is fairly difficult and this turns out to be not entirely correct! If you run a small(ish) pod, you (and some community members) can set the moderation rules to be as strict or lenient as you’d like. If you moderate against transphobia, users on your pod won’t see transphobia in the LGBT hashtag unless one of your users posts it, which you can take action on. Or they’re following a transphobe, which, again, they or you can block. Pods are communities, so it’s possible to establish a respectful community of a manageable size.

The easy way to deploy a pod, which I just learned of, is on a raspberry pi, via syncloud.

It’s also possible to join the federation of Diaspora pods via Hubzilla and Friendica, but you may find that the look and feel of a regular Diaspora pod is a bit more user friendly, especially if you’re hoping to attract your non-technical friends.

Because Diaspora is designed around privacy concerns, if you are running an online support group or something similar, rolling your own pod for that usage is an example of a good use-case. There is a lot right in how Diaspora was designed and small pods, deployed for communities offer a lot of good functionality. If you want a social hook on your project and you don’t want to use trumpbook, putting up a pod might be the right choice for you.

The Federation

Remember the days before Facebook, when people were on MySpace or Classmates Reunited, or Friendster? Alas, all those sites lost too many users and stopped making money and shut down. And the sites that were supposed to kill Facebook, like Ello, which failed to gain critical mass, never made any money and shutdown. Or Diaspora*, which everyone was on for 5 minutes, but it was kind of alpha, so people mostly wandered away from and then it didn’t shut down.

Diaspora* wasn’t a commercial project and never needed to make money for investors. It just needed to fundraise enough to keep the servers turned on, which it did. Some people kept using it. And that’s all it takes for a non-corporate network: some interested users and paying the server fees.

Diaspora’s software is still being developed and is a lot more robust and faster than it was during it’s 15 minutes of fame. Of course, the servers have fewer users than they did back then, but are still fairly gigantic.

Facebook’s active user base is a lot bigger than many countries, so they have a lot of computers behind the scenes, working together so that, to you, it looks like everything is one one computer. This requires a lot of central control. Diaspora doesn’t follow this model. Instead, it’s more like email. If I use hotmail and you use gmail, we can still send each other letters, we just know that our email address is our users name AND the server name. Diaspora is like that, so my diaspora address is celesteh@joindiaspora.com. It looks like an email address because it has a user name and a server name, but it’s not for email, it’s for social networking.

Hotmail and gmail are operated separately, but they both understand how to send email. Similarly, all the diaspora servers, called ‘pods’, are separate from each other and are run by different people or groups of people. There are less than 300 pods, many of which have tens or hundreds of thousands of user accounts. (Maybe including your account from back in the day, waiting for you to log back in.) All of these pods, together with their ability to communicate is called ‘The Federation.’

The Federation is still going and has more active users than you might guess. A lot of people leaving facebook found their old diaspora accounts and logged back in! But they probably found that most of their old contacts weren’t still active. I still have my old account, but I don’t log in every day. Diaspora is built to protect privacy and I can think of some great use cases, but it’s hard to deploy. It’s also built to resist censorship, which was a major issue at the time it was designed, which means also that it’s hard to moderate.

Part of the difficulty of moderation is the size. It would take a large team to deal with tens of thousands of users, since figuring out if somebody is misbehaving requires a lot of time and looking at context. But also, the anti-censorship values have lead to a lot of moderators to take a hands-off approach and thus they tolerate racist posts and hate speech because they don’t want to censor. They say people can block each other, but I don’t find this to be sufficient. Of course, somebody setting up their own pod could take a different approach, but, again, they’re still difficult to deploy.

The Federation, for all it’s faults, does respect your privacy and isn’t trying to make money off your data. It’s not my favourite part of the internet, but it’s better than facebook. I do still log in. It is possible for communities of respectful groups to arise and most of the conversations I have on there are pleasant.

If we know each other on twitter or facebook, do connect to me on diaspora and say hi. I’ll give a Blessing to anybody leaving facebook!

Introducing Blessings – a new kind of #shitcoin

#ICO Announcement!

Introducing Blessings – a new kind of #shitcoin.

Coins are minted when I [henceforth: the issuer] ‘bless’ a person [henceforth: the owner]. This is worth one coin, which belongs to the person who receives the blessing – the owner. This blessing takes place via a post to social media which @s the account who receives the blessing. An entry for this is entered into the ledger.

Coins can be sold and traded, also via social media, by making a post announcing that this has occurred. This must @ the new owner and also the entity acting as the banker, who will update the #ledger.

Coins may also be redeemed – in this process, they are returned to the issuer in exchange for short musical compositions. Owners of coins may occasionally be asked for favours by the issuer, but, as is usual with favours, have a right to refuse.

There will be a staged rollout of gradually upgrading the ledger backend.

[first brain] A shitcoin monetising relationships on social media. [second brain] A shitcoin with the ledger in a google doc. [third brain] A shitcoin with the ledger managed by a fediverse server. [fourth brain] A shitcoin where every coin has an identity on the scuttlebutt mesh network with a activitypub bridge

In version 1.0, the issuer will also act as the banker. The ledger will be manually updated in google docs. This ledger is viewable to all. It will contain: the URL of the ledger, all issuer accounts and all banker accounts. This is currently online at: https://docs.google.com/spreadsheets/d/1VhEIdQ8lya6BxS8IzljquTQ5MkAP8qtpZfK_J4FfXEw/edit?usp=sharing

Every coin will have a unique ID, the owner’s social media account, and the URL of the post in which the change of ownership occurred. Each coin will maintain a history of owners and transactions. Coins are atomic units and can not be split.

Version 2.0 will automate banker activities – each coin and the banker will have an #activitypub account on a server dedicated to the currency. Each coin will post a status as it’s ownership changes and be able to respond to queries about it’s current status.

In version 3.0, each coin will have a #scuttlebutt ledger and thus their record of existence will be maintainable over mesh, and they won’t require a server or network. However, there will be a bridge to activitypub to mirror all ownership changes to the #fediverse.

FAQ

  1. Q: How does someone get blessings?

    A: People who wish for blessings may ask for them. They may also be minted in response to especially good shitposting or acts of friendship.

  2. Q: How are they redeemed for musical compositions?

    A: Owners wishing to redeem their blessings should contact the issuer to discuss what sort of music they would like.

  3. Q: Will there be support for additional social media platforms?

    A: By design, coins can only be minted on platforms used by the issuer.

  4. Q: Will there be a Diaspora* mirror for when the coins get their own social media presence?

    A: The issuer will happily deploy a Diaspora* mirror if one gets written, but has no current plans to develop one.

  5. Q: What if an owner moves to a new social media account?

    A: This would be handled just as if it were a trade between two people on separate accounts.

  6. Q: What if an owner’s server goes offline and they cannot make a post about the coin’s new ownership?

    A: The owner must contact the banker or issuer with evidence that they are the same person.

  7. Q: Are the coins susceptible to hacking or impersonation?

    A: Just like every other digital currency, there are many vectors in which coins can be permanently lost or stolen.

  8. Q: What is the crypto aspect of this currency?

    A: Blessings are digital currency shitcoins, but will not be until version 3.0.

  9. Q: Blessings rely on a single authority to facilitate trades. What happens if the issuer dies or leaves social media?

    A: All relationships end eventually and when they do, their value lives on in memory. The value of blessings will also be in their record and memory, but will no longer generate new records or memories.

Source code for Christmawave – overlap, duration and repetition

This is the fourth part of a series of posts about how I created my album Christmaswave. Previously, part 1 posted a list of questions and answered the first two of them: ‘What sample am I going to play?’ and ‘How many times am I going to divide it in half?’. Part 2 answered the question, ‘Once it’s chopped into little (or not-so-little) pieces, which one of them am I going to play?’. Part 3 talked endlessly in the meandering way of hangovers about playback rates.

One thing I have not addressed is how I picked which parts of source material to use. Unless the words were compelling in some way, I tended to go for phrases that were instrumental. In some songs, this left me only the intro and the outro. This is why most of the pieces have source material taken from multiple versions of the same song.

How much should an event overlap whatever comes after?

Normally, you would do this by setting the \legato part of the event, which is ‘The ratio of the synth’s duration to the event’s duration.’ I set this to 1.1 in most of the pieces, which helped make up a bit in case the slicing was in slightly the wrong place.

Most I varied:


\legato, Pwhite(0.8, 1.5)

Some depended on the duration of the it of sample I’m playing. This is what I did with Sledge Trudge


\legato, Pfunc({|evt|
var dur, legato;
dur = evt[\dur];
legato = 1;
(dur < 0.01).if({ legato = 2}, { (dur < 0.07). if({ legato = 1.5}, {legato = 1}) }); legato })

How long should I wait before going to the next thing (which might be a repetition of what I just did)?

This is a question as to what to put for the \dur part of the event, which depends on the number of frames of sample that we're playing, the sample rate of it, and the playback rate.

I pulled a lot of my source material from youtube - by using a browser plugin to download and convert to mp4 and the using audacity to convert to wav files. These files were often 48k, which is the standard for film, but audio is generally at 44.1k, so I did have to take the source file's sample rate into account.

It makes sense to calculate the start frame and duration together. This example is from Out in the Cold:


[\startFrame, \dur], Pfunc({|evt|
var buf, startFrame, dur, div, start, frames;
start = evt[\start];
div = evt[\div];
buf = evt[\buf];
frames = buf.numFrames;
startFrame= frames * (start/div);
rate =evt[\rate];
dur = (frames / buf.sampleRate) / rate * div.reciprocal;

[startFrame, dur]
})

How many times should I repeat this thing?

The glitchy repeating of the same event multiple times is a repetition of the entire event, not just some parts of it. I did this with Pclutch, which has a slightly weird syntax.


Pclutch(
pattern,
connected
).play

The pattern is just your Pbind or similar, but the connected part is slightly odd. If it's true, the Pbind is evaluated to produce a new value. It's it's false, the previous event is repeated. It's possible to use a pattern to control this.

This is the pattern I used for Walking in a Winter No Man's Land. 0 is equivalent to false and 1 is equivalent to true.


Pseq([0, 0, 0, 0, 1,
Prand([
Pseq([Pn(0,2), 1],1),
Pseq([Pn(0, 3),1],1),
Pseq([Pn(0,4), 1], 1)
],100)
])

Starting with the Pseq means that the Pclutch will repeat 4 times, then make a new event. After that, it picks randomly from 3 Pseqs. The first repeats twice, the second 3 times and the third 4 times. It will randomly pick between these repetitions for 100 times and then stop.

Source code for Christmawave – picking playback rates

This is part 3 of a series about how I created my album Christmaswave. Previously, part 1 posted a list of questions and answered the first two of them: ‘What sample am I going to play?’ and ‘How many times am I going to divide it in half?’. Part 2 answered the question, ‘Once it’s chopped into little (or not-so-little) pieces, which one of them am I going to play?’

One thing I’ve talked about in both posts is balancing a desire for predictability in running the code and in allowing for random variation. This may seem strange for a studio album, but with my previous Christmas album, 12 Days of Crimbo, I did end up playing one of the pieces, Little Dubstep Boy live at an algorave in Birmingham, so it is possible some of these pieces may have a live afterlife.

Perhaps more importantly, allowing for variation allows the discovery of good juxtapositions, which can be made more likely in subsequent revisions of the code. It also makes making the pieces themselves more interesting. Listening to the same thing over and over again in a DAW can get tedious, but subtle changes give something to listen carefully for, keeping one’s ears fresh. I have way more skill in coding pieces than trying to piece them together manually and allowing randomness is an important part of my process.

What speed am I going to play the next bit at?

Having decided which sample to play, how small to chop it up and which subsection of the sample to play, the next question is what speed to play it back at. This is a question the rate at which I playback the buffer, such that both speed and pitch are effected.

A lot of the Vaporwave I’ve listened to seems to play back their samples at slower than the original speed. It also sometimes switches speeds, so that both pitch and timing jump. I like this effect and chose to copy it.

I thought of the timing changes in terms of scales. In Just Intonation, scale steps are given as fractions between the ratios 1/1 and 2/1, where 2/1 is one octave higher than 1/1. Because I wanted slower speeds, I adjust downwards, so that the ratios I used were either between 1/2 and 1/1 or between 1/4 and 1/2. These ratios can then be used directly as the rate parameter in a PlayBuf.ar ugen.

Obviously, almost all of the source material is in 12TET – that is to say: 12 tone equal temperament, the tuning one finds across the white and black keys of a standardly-tuned piano. Any tuning I apply on top of that is more or less in conflict with the original. This can be minimised by only using one rate at a time and repeating it across several subsequent bits. By sticking to one rate for a while, a change later on becomes roughly analogous to a key change. It would have been possible to have a set of sensible key changes that work with the standardised harmony conventions of the original song, but this is not what I did.

Long story short: I picked some scales and tunings

The first piece I worked on, Have Yourself a Scary Christmas is based on Have Yourself a Merry Little Christmas, sung by Judy Garland. That piece and especially that performance of the piece has quite a bit of emotional complexity. The ambiguity of the piece is apparent even in the title, which is not ‘Have a Merry Christmas’, but a more emotionally strangled ‘Have Yourself a Merry Little Christmas’, like someone trying unsuccessfully to be friendly to an ex they’re desperately not over. The music itself is ambiguous about whether it’s in a major key or in it’s relative minor. Garland’s performance adds to this further, soundling slightly drunken and sliding the tuning around in a way that sounds like she’s papering over crushing unhappiness. This effect is especially apparent if you listen to the song slowed down by a factor of 4 with Paulstretch.

In order to draw out the sadness a bit, I used a Romainian minor scale. This is part of the included scale library that comes with the SuperCollider Scale object. I then randomly picked ratios from the scale.


\scale, Scale.romanianMinor(\just),
\rate, Pfunc({|evt|
var scale, degree, rate;

scale = evt[\scale];
degree = (Array.series(scale.ratios.size, 0, 1) ++ [0, 0, 0, 0, 1, 1, 1, 2, 2, 3]).choose;
rate = scale.ratios[degree] * [0.25, 0.5, 0.5].choose;
rate
})

Support for scales is built into Patterns, but it’s most commonly used to compute frequencies, not playback rates.

Almost all the pieces I made used minor scales. I used trial and error to pick which scale worked best with which samples. For all the pieces, I picked degrees randomly and never used anything like a Finite State Machine or a random walk, even those are usually well-suited to picking scale degrees.

In most pieces I repeated the chosen rate, using Pstutter. This is code from Santa Loves You:


\scale, Scale.hungarianMinor(\just),
\degree, Pstutter(8, Pfunc({|evt| evt[\scale].degrees.size.rand}),1),
\rate, Pfunc({|evt| evt[\scale].degreeToRatio(evt[\degree])}) * (2/3),

The Pstutter on the scale degree repeats the degree 8 times before picking a new one with the Pfunc. The rate is calculated from the degree. Because this piece uses voices, I’ve decided to stay closer to a normal playback rate. Using 2/3 instead of 0.5 or smaller means that the samples will sometimes play out faster than their original pitch.