Working from home

So this is day 2 of the creative pact thing in which I try to work from home on my gf’s day off from work. Alas, I have no sketches to upload.
Paper graphic scores can either be single page or multi-page. Bogusław Schaeffer’s colour pieces, Anthony Braxton’s Falling River pieces and Carl Testa’s squiggles are all examples of single page pieces that work well. When I’ve done these pieces, performers have either taken the page as a whole, or picked different spots on the page to concentrate on. (I only saw very early versions of Testa’s pieces, so his instructions may have become more directed since then.) This interpretation has not required things be done in any particular order. Someone might start with a set of symbols or notation at the bottom right, then go on to the top left, then do something outline a large shape across the whole page.
Some good multipage scores are, obviously, Cardew’s Treatise and also Lektura by Schaeffer and Concerto by Lauren Redhead. Because these pieces progress regularly from one page to the next, a certain tendency towards chronological order is introduced. The pages therefore seem to need a structure that holds them together and allows them to progress. Schaeffer and Redhead use boxes. Their pieces are also divided into parts. So the performer can look at a box, know whether or not it belongs to them and know it’s timing relative to other boxes other people are interpreting. The box itself seems to be often taken as a whole, with performers able to decide on whatever ordering seems to make most sense in context. By contrast, Treatise is not in parts and the entire ensemble reads from the score, on the same page at the same time. His pages are held together by the ‘lifeline.’ This is a horizontal line across nearly every page that performers can orient themselves along. Mark Applebaum’s Medium is a multi-part piece that does not have a consistent structure, but even it has the vertical ordering of parts and many parts do have something lifeline-like. Some sort of line or box structure seems to be extremely helpful to performers of multi-page scores.
My piece will be on a single, changing screen, which I think makes it more like a multi-page piece than a single page piece. It will be a non-divided score like Treatise. My intention at the moment is to devise a gamut of symbols and then put those symbols in boxes, like Schaeffer or Redhead. Some of these symbols will be based on existing musical symbols, but in differing contexts. They may also be rotated within the bounding boxes, like Redhead.
Because this will be in javascript, I need a way to render them in a web browser. Rather than work out exactly how to draw a notehead in code (yikes), this situation seems to call for a font-based solution. I have not yet worked out what musical fonts I can count on to be available, but I have found the unicode specifications for musical symbols in fonts and how to represent those in HTML. Also, should you wish to type a unicode symbol on an ubuntu computer, you would first hit ctrl-shift-u and then type the hex code and then a space. So to type a bass clef, hit ctrl-shift-u 1D122 space. I have no idea what application this might have, but there you go.
What I’m imaging will happen is that the program will render an image using lines and curves and polygons, some musical font stuff and some text, then rotate that image some amount from 0-360 degrees, then clip it to a bounding box, then draw the clipped portion on the screen with a black outline around it.
I pondered putting a web server on the main, listening computer, in order to get it to render the images. It could then tell the clients to download and display them in the proper place, which would make sure everybody was doing the same thing. This might be the right idea, especially if I want to use one of LilyPond’s music fonts, which I spent too long trying to find on my system. Right now, though, it seems like an extra layer of work that hopefully I can avoid.
I’ve upgraded to the latest version of processing and downloaded the javascript and coffee script modes. The next step is to read the quick start guide for folks experienced with processing.

Picking a Graphics Library

There’s some Creative Pact thing that people do for the month of September. I’ve decided that I should work on my commission for the Vocal Constructivists. I’m going to generate some graphics notation for them. When I say ‘generate,’ that’s pretty literal. My plan is to computer generate graphics notation in real time, in response to computer listening to what the choir is doing, so as to create a feedback loop of sorts.
Obviously, there are a lot of parts for this. I have some vague ideas of how to do the listening (SCMIR and some other feature extraction with SuperCollider). But as this is a feedback loop, there’s also a question of how people will tend to respond to various notation, so I’m starting with the notation aspect first.
There have been some very interesting live notation projects I’ve seen. They often use LilyPond as the rendering engine. There are some SuperCollider libraries that interface with this system. However, the Constructivists are more about graphic notation, so unless lilypond lets you disassemble notation symbols like Cardew’s Treatise, it’s not quite what I need. I really need a vector graphics library that I can communicate with via OSC.

Practising and Performing

The LilyPond stuff works really well because the notation is already very widely understood. There are a lot of ways a performer can interpret a crotchet on B-flat, but the pitch and duration are already set, at least, Other dynamics markings, phrase markings, etc give a lot of data to a performer. In essence, the perofrmer has thousands of hours spent already learning the notational symbols. Many or most of these elements may be absent or modified in graphical notation. Therefore, a performer of a graphical score must learn the notations they learn the piece. If the notation is changing in real time, this sets up a serious issue as to how they should practice.
There’s a chasing-one’s-tail problem with feedback loops, so for now some set process will generate the notation. Performers need to be able to see the notation while they practice and perform. This implies that either I’ll need to create some static printed sheets, which are in danger of beocming a fixed score, or else I need to be able to send notation to the laptops, tablets or other devices that they can then take home with them and look at.
I was considering using Open Frameworks or Cinder, but there are some issues that prevent this. These issues are political, not technical. And they have to do with Apple, who have deicded that free software is not welcome on their platforms. A tablet is exactly the form factor that’s needed, but as the real owner of all iPads is Apple computer, who sees fit to dictate what consumers can do with something they spend a small fortune on, I’m out of luck unless I want to write multiple versions in multiple languages and pay a fee to Apple for the privilege of wasting my time. So I’m going to have to do it in javascript.
If anybody is wondering why javascript is so popular right now, the answer is because Apple are wankers.
Right, ok, I hate javascript and I hate browser plaforms but sometimes art forces one to gaze down into muck so as to better appreciate the stars overhead. Anyway. So there’s a version of Processing for javascript, which I’m leaning towards because I’ve got some processing experience and there is a lot of documentation. Alas, somehow processing in the past has had the power to make even single rendered lines look ugly. But you know, sometimes you need to trade off things like aesthetics and performance and joy in life to make some Silicon Valley billionaires happy.
If I want to try something new, there are actually quite a few javascript vector graphics libraries on offer. One seemingly popular one is called Raphaë1 and then there is one with fun demos Bonsai and then one designed for ‘creative coding’ called Sketch.js, (which works with Coffee Script, which seems to be less painful than normal java script) and then there’s the very old school looking JSGL. I have no idea which one to use.
I’m hoping somebody gives me some suggestions, but barring that, Processing has a lot of documentation and a large user base. Also, since this is a piece for performers, I’d like it to have a longer self-life than I would expect out of a purely digital piece. If people are going to go to the trouble of learning it, they shouldn’t be forced to abandon it before they’re ready.
So my next task is to dig out my art supplies and start sketching out ideas. What might a snapshot of the notation look like? What are elements on the page and how might they transform?

Vigils and Protests

Hate crimes against trans* people now outnumber hate crimes against LGB people. Because of the increasing globalisation of our struggle, it’s appropriate and important to hold vigils for those killed, whether they were local or half a world away. Let’s be clear, these vigils are protests

Some issues arise. If vigils were not protests, it would be right and appropriate that the family have complete control of the speakers and what happens. This is the case at all funerals and memorial services. However, hate crimes are not isolated incidents. A hate crime is an act meant to target and terrorise an entire community. A vigil is a more public event that must therefore address the larger context in which the person was killed. These events therefore, should have input from the family, but also belong to the community effected.

Anyone can plan a protest or a vigil in regards to hate crimes. Alas, there are many opportunities. Yesterday, I went to a protest/vigil outside the Jamaican High Commission in London in response to the murder of Dwayne Jones. The planners of this event see hate crimes as a global problem and plan many such protests. This is unquestionably a good thing to do. They are fantastic. I’m glad they exist and they take these things on.

However, groups working to call for justice do need to have a bit of training, as was illustrated recently in New York. This is some of what you need to know:

If the person killed was trans, it’s appropriate to have signs and chants that mention homophobia, but you must prominently mention transphobia. These two things are linked, but if somebody was murdered for being trans, it’s confusing and incorrect to make signs that they were murdered for being gay. ‘Trans’ is not a type of ‘gay’. Certainly homophobia is also a problem in places where trans people are murdered, but the issue at hand is transphobia. Again, its ok to link these things. A vigil for a victim of a hate crime is always about the larger climate, but it’s important not to accidentally erase what happened to the individual in question.

Use the correct pronouns. If the pronouns are unclear, go for ‘they’ or something gender neutral. Do not assume that somebody’s birth assignment is the correct way to refer to them.

If you have a trans group in your area, reach out to them or their leaders as soon as you decide to start planning and invite them to the meetings.

At least one of the speakers you have must be trans. If you are in the UK, the Camden LGBT forum may be able to help you find somebody, or the Peter Tatchell Foundation may also be able to help. Also, some of the trans people involved in the planning may be able to speak or know somebody who can.

If the person is a member of a racial or ethnic minority, this should be reflected in who speaks. If they were located overseas, a person from that country or their diaspora should speak.

Remember to invite trans people and trans groups to the protest. If you’re in the UK, send a message to Protest Transphobia.

Reach out to potential allies. If you were planning to protest against hate crimes in Greece, you could reach out to other groups recently targeted there, such as migrants and sex workers. Or a protest about Russia could also include drug addicts, as they also suffer brutal repression under Putin.

What if you can’t do all of these things? Don’t worry. As long as you use the right pronouns and mention transphobia, you’re ok. If you’ve made mistakes about this in the past, don’t worry about them. Now you know.

Edit to add: solidarity

The important key here is solidarity. LGBT-phobia is a problem not unique to any religion or culture. Speakers at the event must not place blame on a either. They can call for social change a change in government policy, but they should not compare any other country negatively to their own. For those based in the UK, remember that homophobia and transphobia in most commonwealth countries came from the colonial law imposed by Britain. If you are in the US, full equality is still lagging. If you’re in Australia, you’ve got major issues with asylum seekers. Etc. There is no country I know of that’s completely safe from hate crimes, so focus on what you want to see change, not on how anybody else should be more like privileged countries or classes. If you are feeling at all smug about your country, just don’t get up to speak. We’re there in solidarity, not judgement.

How to talk about Pvt Manning

Some news outlets seem to have absolutely no idea how to talk about Chelsea Manning, who was known until last week as Bradley Manning and has been sentenced to 35 years in prison after she sent classified documents to wikileaks. They’re confused on how to describe her actions before she announced her social transition and which pronouns they should use to talk about the period in her life when she identified as a gay man.
(hint: see previous paragraph)
Chelsea Manning is already famous under a different name, so it’s fine to mention her former name. But really, don’t get cute about pronouns. It is more confusing, not less, to have a jumble of ‘he’s and ‘she’s. You know from her press release that she wants to go by ‘she’, so use ‘she’ whenever you’re writing about her, no matter what period of her life.
If you want to talk about something inherently gendered, then you might want a wee bit of vocabulary. She identified as a gay man for a while, meaning that’s what she told people she was. Other people at the time read her as male, because that’s how she presented herself. If ‘read’ is too jargony, try ‘viewed’, or ‘perceived.’
You can talk about her childhood, but again, avoid being cute about it. For example, if you want to use the word ‘boyhood’, is there a good reason for it? Is it somehow very important to the sentence or is it a word she used herself? Don’t project gender unless you’re using the subject’s own words or unless its needed. ‘She was a quiet child’ is fine. ‘She was a quiet boy.’ is confusing and unnecessary. ‘She seemed like a normal boy.’ is ok for two reasons – one is that the gender is an important part of the sentence. She didn’t just seem like a normal child, she seemed like a normal boy. The other reason that it’s acceptable is the word ‘seemed.’ She was perceived as a normal boy, which is about how she was viewed, not what she actually was. ‘She was a normal boy’ is not ok because it is factually incorrect (she already knew she wasn’t really a boy) and because it’s confusing and because it’s contrary and coercively assigning a gendered identity that the subject has not assigned themselves.
In summary, use ‘she’ all the time. If you have to use gendered terms to refer to the past, put wiggle words around it: seemed, appeared. (I’m sure journalists are well familiar with such words.)
If Manning keeps making headlines, at some point, it will become appropriate to drop the “who was previously known as Bradley Manning,” much like it’s no longer necessary to mention Wendy Carlos’s former first name. The point of mentioning the old name is not to draw attention to it, but to ensure that the reader knows who is meant.
Normally it’s rude and somewhat irrelevant to talk about the medical aspects of a person’s transition. However, because Manning is going to a prison that has specifically said it plans to violate her rights with regard to appropriate treatment, it’s definitely on topic in this case. Manning has said she wants hormones. She has not said that she wants surgery. It is not necessary to mention that she doesn’t currently want surgery. At some point, the repetition of this fact may become problematic. While media likes to make a big deal of ‘the operation,’ the reality for trans people is that hormones are much more important and that there is not one single dramatic moment during which transition occurs. Not all trans people have operations and there are a variety of operations available, rather than a single, monolithic process. The discourse around ‘the operation’ is a media construction. Which is not to say that trans people don’t often need operations, just that the context has been distorted in popular culture. This distorted context can cause statements about anyone’s lack of plan for surgery to make them seem as if they lack legitimacy or authenticity or further other them. Most trans people start out by seeking hormones and don’t immediately make further plans. Therefore Manning’s statement is entirely unremarkable and should not be treated otherwise.
Finally, and this should be obvious, people have a right to their gender identity that is inherently their own human right, unconnected to whatever else they’ve done in their lives. Whether you think Manning is a hero or a traitor, the only correct way to refer to her is through her current name and pronouns, as she has publicly requested.

New Flat!

First of all, I loved my old room in the co-op. The kitchen was chaotic and had moths and rodents and finally kittens, but the people were lovely. Having 18 housemates meant that it never got lonely, even if it occasionally was loud at times I wanted to be asleep. However, Sonia and I wanted to do the heteronormative couple-y thing and got a flat together.

It’s the newly-renovated top floor of a Victorian house, just around the corner form my previous room. The landlord just converted a single family home into three smaller flats. As far as I can tell we’re the first (not related to him) tenants in the house. Clues include the smell of paint and that I cannot seem to locate a phone jack anywhere in the flat.

We moved in and the management agent gave us two sets of keys to the house a a key to a meter. Well, sort of. When the removal van finally showed up and got all of my worldly possessions to to my new flat at 6pm on Friday, it emerged that the keys they gave me do not actually open the door. I tried calling the letting agency and the property manager, but they’d all gone home for the weekend. So I told the mover to leave all my stuff on the pavement outside the flat and then I waited for Sonia to get home. Thank goodness it wasn’t raining.

My American readers may be wondering why one would need a key to a meter. Remember reading Pygmalion in high school? Eliza Doolittle went home to her room and put an extra penny in the heater because the professor had overpaid her for her flowers. It all seemed so terribly Victorian that you would have a meter that you needed to put pennies into before you could run your heat. Well, they never quite got rid of this system in England, just updated it. Now it’s a fob system. Somebody gives you a ‘key.’ You take the key to a corner shop – the kind of store that mostly sells cheap alcohol to adults and magazines and candy to kids. You hand them the key and some cash (really, cash only) and they add money to the key. Them, when you get home, you stick the key in your meter and it will allow you to spend exactly that much money. Imagine if you were running it a bit tight on the electric bill. Under this system, your power might be cut a few days before every pay day. The bonus is that you don’t need to pay extra to turn it back on. The downside is that all your food spoils. Plus you get to pay loads more than middle class people get with their normal power bills. The Victorians were masters of screwing poor people. When conservatives in this country speak of ‘Victorian values’ they do so with nostalgic pride, not the deep shame the phrase deserves.

So I went down to the Londis and put all of my cash on the key and went back to the flat and looked everywhere for the meter. It was Saturday and the property manager was having his day off. I was slightly concerned that the power might turn off at any moment, but I had gig-related activities and anyway, there was no hot water and needed to find the boiler. Finally, I found a mysterious electrical switch in the bathroom and turned it on. There was a gurgling behind the wall. Aha! This must be the boiler. Of course, it would need time to heat up. So we gave it time. And Then more time. It was sealed behind a wall. So I took a cold shower and was grateful it’s August.

Maybe I could just do a load of laundry in the mean time. Augh! Water everywhere!

Meanwhile, Sonia asked the guy downstairs if he had any insight and it turned out he was the landlord’s brother. He came up and used a pen knife to get open the bit of the wall with the boiler behind it and thus we discovered that whoever had redone the bathroom had thought it was a good idea to seal the boiler behind a wall, having first left it in the ‘off’ position. So we waited again for it to heat up. Also, the power meter was located. In the basement flat, which is rented by yet another guy. So, we need to put money on the card, then knock on the door of the guy living in the basement, hope he’s home and charge up our power. Obviously, this will not do, so today Sonia rung up the power company and had a series of confusing conversations with them. And a series of conversations with the property manager. It gradually and painfully emerged that the card we had been given was actually for the gas meter, which is also in the basement apartment, locked behind a door that even the man who lives in the basement does not have a key for. So the reason we’ve got no hot water is because the gas meter was completely out of money. Meanwhile, the electric meter also has a key, which we don’t have. There was all of £3 left on the meter by the management company, so I’m just waiting for everything to turn off at any moment. Meanwhile, the guy in the basement has gotten extremely pissed off, as it took a few trips to his flat to figure out which meter was which and what’s going on.

Apparently, not having access to a gas valve is also something of a safety issue, but nevermind.

On the positive, I was able to arrange an appointment with the phone company to come and install internet and a phone line. In three weeks.

But at least there are no mice. And, this is not a phrase I’m ever likely to repeat, thank goodness the cooker is electric. And at least partly works

Linux Midi on SuperCollider

This is just how I got it to work and should not be considered a definitive guide.
I started Jack via QJackCntrl and then booted the SuperCollider server.
I’ve got a drum machine connected via a MIDI cable to an m-audio fast track ultra.
This code is Making some noises:

(
var ultra;

MIDIClient.init;
"init".postln;
MIDIClient.destinations.do({|m, i|
 //m.postln;
 //m.name.postln;
 m.name.contains("Ultra").if({
  ultra = MIDIOut(i);
  ultra.connect(0);
  i .postln;
 });
});

//u = ultra;

Pbind(
 midinote, Pseq((36..53), inf),
 amp, 1,
 type, midi,
 midiout, ultra,
 chan, 1,
 foo, Pfunc({|e|"tick % %n".postf(e[chan], e[midinote])}),
 dur, 0.2
).play


)

California time Table

Hello California friends. I am in your state. This is my schedule for the next few days:
Tonight, 28 May, I am going to the SF Sound show. Maggi Payne is playing, so it will be awesome. It’s at 55 taylor :: san francisco :: $10/7 :: 7:49p.
29 May, I will be going to see ReCardiacs Fly at the Hemlock Tavern. This is Polly Moller (and friends) new project, so it will be awesome. It’s at 1131 Polk St :: san francisco :: $7 :: 8:30p.
30 May, I will be playing as half of the duo No More Twist at the Berkeley Arts Festival Space. Jörg Hiller is also playing, so it will be awesome. It’s at 2133 University :: berkeley :: $10-20 (sliding scale) :: 7:30p.
I have a minor injury which makes it slightly painful for me to bicycle, so I’m being intentionally vague about my schedule. I hope to head down to the South Bay for a short while and available for socialising.
On June 3rd, my girlfriend flies in to San Francisco, so I’ll be back in the SF/Oakland part of the bay and doing tourist stuff and available for socialising.
On June 6th, I will be playing the piece Cloud Drawings at the Luggage Store Gallery. It’s at 1007 Market Street (by 6th) :: san francisco :: $6-$10 :: 8p.
On 7 June, I will be playing the piece Cloud Drawings at the SubZero festival in San Jose and will be around the South Bay and available for socialising. I also want to do some touristy stuff down there, so if anyone has any suggestions or wants to go to something, please let me know. I think we should probably see the Winchester Mystery House. We’ll also head for scruz at some point.
More details as they arise. contact me if you want to hang out.

A better script for Wacom with screen geometry changes

Why and how

This is a better script to set your stylus setting to match a changed resolution, like if you plugged in to a projector. If you are mirroring screens, the geometry may change, so that instead of using your whole 16/9 ratio screen, you’re only using a 4/3 box in the middle. The problem you may run into is that your stylus does not adjust and so where you’re pointing the stylus may differ significantly from where the pointer appears on the screen. This script fixes that.
There are some dependencies: xsetwacom xrandr, and wcalc. Make sure you have xsetwacom by typing:

which xsetwacom

If it doesn’t give you a path, you need to:

sudo apt-get install xsetwacom

Do the same for xrandr. Finally, you need wcalc, which is not installed by default. Type:

sudo apt-get install wcalc

The script is below. To save it, copy it to the clipboard starting from just below the ‘Script’ subheader and ending just above the ‘Commentary’ subheader. Then type the following in the terminal:

cd
mkdir bin
cd bin
touch stylus_script.sh
chmod +x stylus_script.sh
gedit stylus_script.sh

Don’t worry if you get an error saying bin already exists. Just carry on.

Gedit should open with a blank file. Paste the script into that file. Then save and quit. You may not need to make any changes. (See commentary.)
You’ll want to run this script when you plug into a projector (after you set the resolution you’re going to use) and then again when you unplug from it. Do this in the terminal by typing:

~/bin/stylus_script.sh

You can run these from any terminal window, at any time and it should work. If you get errors or it just doesn’t do anything, see the commentary below.

Script

#!/bin/bash


function touch_ratio {
 #get pen geometry
 LINE=`xsetwacom get "Wacom ISDv4 E6 Pen stylus" area`
 echo ${LINE}
 TabTx=`echo ${LINE} | awk '{ print $1 }'`
 TabTy=`echo ${LINE} | awk '{ print $2 }'`
 TabBx=`echo ${LINE} | awk '{ print $3 }'`
 TabBy=`echo ${LINE} | awk '{ print $4 }'`

 TouchHeight=$((${TabBy} -${TabTy}))
 TouchWidth=$((${TabBx} -${TabTx}))

 TouchRatio=`wcalc -q ${TouchWidth}/${TouchHeight}`

}



# get screen geometry
LINE=`xrandr -q | grep Screen`
WIDTH=`echo ${LINE} | awk '{ print $8 }'`
HEIGHT=`echo ${LINE} | awk '{ print $10 }' | awk -F"," '{ print $1 }'`
RATIO=`wcalc -q ${WIDTH}/${HEIGHT}`



touch_ratio

# is the touch ratio different from the screen ratio?
change=`wcalc -q abs(${TouchRatio}-${RATIO})>0.01`
wcalc -q abs(${TouchRatio}-${RATIO})
if [[ ${change} != 0 ]] 
  then

 #they differ

 # first try resetting
 xsetwacom set "Wacom ISDv4 E6 Pen stylus" ResetArea
 xsetwacom set "Wacom ISDv4 E6 Pen eraser" ResetArea 
 xsetwacom set "Wacom ISDv4 E6 Finger touch" ResetArea

 # how about now?
 touch_ratio
 
 if [[ `wcalc -q abs(${TouchRatio}-${RATIO})>0.01` != 0 ]] #they differ
   then

  if [[ ${TouchRatio} > ${RATIO} ]] # width has shrunk
    then
   # use existing height values
   TYOFFSET=${TabTy};
   BYOFFSET=${TabBy};

   # calculate new width values
   # width = ratio * height
   
   NewTabWidth=`wcalc -q -P0 ${RATIO}*${TouchHeight}`
   TabDiff=$(( (${TouchWidth} - ${NewTabWidth}) / 2));

   TXOFFSET=$((${TabTx} + ${TabDiff}));
   BXOFFSET=$((${TabBx}- ${TabDiff}));

    else # height has shrunk

   # use existing width values
   TXOFFSET=${TabTx};
   BXOFFSET=${TabBx};

   # calculate new height values
   # height = width / ratio

   NewTabHeight=`wcalc -q -P0 ${TouchWidth}/${RATIO}`
   TabDiff=`wcalc -q (${TouchHeight}-${NewTabHeight})/2`
   
   TYOFFSET=`wcalc -q ${TabTy}+${TabDiff}`
   BYOFFSET=`wcalc -q ${TabBy}-${TabDiff}`

    fi


  echo ${TXOFFSET} ${TYOFFSET} ${BXOFFSET} ${BYOFFSET}
  xsetwacom set "Wacom ISDv4 E6 Pen stylus" Area ${TXOFFSET} ${TYOFFSET} ${BXOFFSET} ${BYOFFSET}
  xsetwacom set "Wacom ISDv4 E6 Pen eraser" Area ${TXOFFSET} ${TYOFFSET} ${BXOFFSET} ${BYOFFSET}
  xsetwacom set "Wacom ISDv4 E6 Finger touch" Area ${TXOFFSET} ${TYOFFSET} ${BXOFFSET} ${BYOFFSET}

   fi
 #gnome-control-center wacom
  else
 echo normal resolution
fi

Commentary

If this script doesn’t work, it may be because the name of your wacom devices differs from mine. To find the names of your devices, type:

xsetwacom --list

You will get a list of your wacom devices. Mine looks like this:

Wacom ISDv4 E6 Pen stylus        id: 10 type: STYLUS    
Wacom ISDv4 E6 Finger touch      id: 11 type: TOUCH     
Wacom ISDv4 E6 Pen eraser        id: 15 type: ERASER    

In this script, I use the information at the far left: ‘Wacom ISDv4 E6 Pen stylus’ and the two identifiers below that. If your device list has different names, then replace the names in the script with the names of your devices. So if you have, ‘Wacom ISDv7 E13 Pen Stylus’, you would use that instead. These lines show up multiple places in the script, so if you need to change it, make sure you get it every time, down to the bottom of the file.

How it works

This script gets the geometry of your screen and the geometry of your stylus and calculates the width/height ratio for each. If this differs by more than a fractional amount, it calculates a new width or height for your stylus.

Anxiety and Musical Form

My gf asked me why I don’t blog about having anxiety. There’s a few reasons I haven’t mentioned it much of late. Part of the reason for this is that while it shapes a certain amount of my experience, I absolutely do not want it to become a point of identity. Partly, I’d rather talk about things that are more interesting, like music. (There’s nothing quite so boring as other people’s health problems.) And maybe most importantly, I’m embarrassed about it.
But yeah, something about my fight-or-flight response is not working correctly and I get panic attacks.
I’m going to get a referral for CBT – cognitive behavioural therapy, which has been shown to be effective. I kind of know what leads to them. If I’m stressed or not eating right or especially if I’m short on sleep, I’m much more likely to get them. I read some place that they normally last about half an hour and I don’t know if this is true or not, but I do know that if I wait and take deep breaths, they tend to go away.
In case you’ve never had a panic attack, (lucky you), I shall attempt to describe it. For me, it is what it sounds like, a sudden stab of panic. You know when you go out and you’re nearly to the tube station and think, ‘oh my god, did I leave the stove on?!’ It’s like that, but I tend to think maybe I have cancer or something. While one can turn around and go home and check if they’ve forgotten a pan of beans bubbling away, one can’t do that with a sudden fear of dread disease. So I try to talk myself out of it, but can get into a loop: ‘I’m fine because of X. But what about Y?’ Repeat for several minutes. This is very annoying. Especially when I know I’m in a loop. I know I’m being irrational. But I can’t seem to shake it. Because what about Y??! And maybe it just goes away quietly, or maybe I start shaking and phone NHS Direct.
What sets these off? Sometimes it’s because something is actually wrong with me. And, indeed, when I said I phone NHS Direct, this is actually not entirely true – I have a stone in one of my spit glands. It hurts occasionally and once in a great while, it blocks something and swells a bit. Eventually, somebody is going to remove it. But anyway, one day, before it was x-rayed, my neck swelled slightly and I saw it in the mirror and went into a panic. Sure, the dentist said he thought it was probably a stone, but what if it’s actually a terrible infection that’s spread to something important in my neck before it turns into blood poisoning or gets into my brain and might kill me by morning. (‘I’m fine because if I had a horrible infection, I would have a fever. But what about my swollen neck?’ Repeat for several minutes.) It was a Friday evening, so I phoned NHS Direct and they said it sounded like something that might happen with a spit gland stone and if it hadn’t gone down by Monday morning, I should ring my dentist. This was exactly the calm reassurance I wanted from the NHS. (God bless the NHS.) Then, unexpectedly, they started reading a list of diseases that might be associated with swollen necks. Glandular fever. (Mononucleosis to Americans.) ‘No, I already had that.’ Mumps. ‘I’m vaccinated.’ Meningitis. ‘Doesn’t that usually have a fever?’ I was starting to get alarmed. The woman on the phone was starting to get annoyed. She just had a script to read through (I guess so nobody can say they weren’t warned?) and didn’t want to be interrupted. Lupus. ‘Wait, what? How do I know if I have lupus??’ I hadn’t even considered this possibility. The woman sighed in an irritated manner. I have not rung the NHS Direct since.
Most often what sets off a panic attack is that I’m trying to ignore some emotion I’m having. Something has upset me. I don’t want to deal with it. I tell myself I’m fine and carry on. And then: ‘Wait, what if that cat I just pet has rabies?’ Sometimes, I can identify what emotion or thought I’m trying to nullify and go deal with it and be fine. Often it’s just some really small erasure. Very often, I’m not even aware that I’m doing it. Some part of my brain has intercepted my experience and tried to overwrite it and I haven’t even noticed. This is what I hope CBT can help with, since I really want to stop doing that. I mean, I don’t like having negative emotions, but they’re vastly preferrable to panic attacks.
Also, these erased emotions are sometimes important ones, but often are fairly small. So let’s say I’ve read something that reminds me of LGBT-phobia in schools and its affecting and I just don’t feel like thinking about that at the moment, so there’s an erasure. ‘What if that friendly cat is actually rabid?’ I try to ignore the thought, so there’s another avoidance. ‘I am feeling panicked about this cat and this is stupid, so I must try to hide it or else everyone will know I’m crazy.’ And thus something small builds.

Musical Forms

I did my undergraduate music education sort of the wrong way around. I didn’t expect to want to get a degree in it, so I started by taking all the upper division classes and seminars because they were most interesting. So I learned about how John Cage rejected all the old way of doing things that were not useful any more in the 20th century. Music theory is a old and unneeded! I accepted this at face value. (Never mind how a lot of minimalists, who I loved, worked a lot with harmony.) Then, after I decided I wanted to get a music degree, I had to take all the first year classes in counterpoint, history and all of this stuff I had already rejected. I insisted that John Cage had said it was useless. My teachers disagreed, but since they were the same ones who had told me a few months earlier that this was the stuff of the past, I felt their position was somewhat weakened. Anyway, I graduated, having learned as little traditional stuff as possible.
It wasn’t long after graduation that I became aware that perhaps I had been overzealous in my embracing of Cagean values. I wanted to write something harmonic, but all I actually knew how to do were chorales and I didn’t even know most of the rules for them. How to structure anything was a mystery. I know that forms existed and they had names, but what those meant, I had no idea.
I got to grad school (a decade ago) and somebody commented that everything I wrote was in sonata form. I had no idea. Maybe I should mix this up a bit more? I didn’t know any other forms.
Obviously the thing to do about this gap in my knowledge was to feel deep shame and attempt to hide it. So rather than read a book or ask a teacher, I just hoped nobody noticed how I was nowhere near good enough to actually be qualified to be in an MA program. (To be fair, I was REALLY busy trying to learn every other thing that everybody around me already seemed to know.)
At some point, I finally learned that while there are named forms that exist, form is arbitrary. It’s just any structure you can use to make sense of things. It can sometimes be implied by the material, or it can be decided in advance. Some Cage pieces are all about form. They are vessels into which you can pour any material and the structure somehow causes the material to sound better. Forms are like that. I don’t feel worried about them any more and while my classical vocabulary is still a bit lacking, I’m not overly concerned about this. Anyway, since I moved to England, I don’t even know note names any more, so not knowing how to organise a minuet is somewhat less important than not being able to remember the duration of a semi-quaver or a minim.
If you are hoping for some insight: The important thing to remember about structures is that they fix musical problems. This is how to write a piece of music: Put your material into a structure, then get the ending perfect, then get the beginning nice, then do the middle bits. Then write some glue to hold everything together. If your middle section is supposed to be 5 minutes long but is getting dull by minute three, you can either make it shorter or subdivide it – so instead of being one long thing, it’s got an ABA or ABC structure within it, so it moves between related ideas. That is to say, add some stuff.
As I recall, Cage didn’t talk much about the importance of structure directly, but he implied the hell out of it. Lecture on Nothing is nothing but structure. This is much more vital than the ‘ignore harmony’ that I first got from my youthful introduction. I was over-eager to be freed from a prison I’d never even been in. But aren’t we all? Especially when we’re young.

What’s the Connection?

This post is in AB form, with a small coda.

My Talk at the Sc Symposium

Picking Musical Tones

One of the great problems in electronic music is picking pitches and tunings.

The TuningLib quark helps manage this process.

First, there is some Scale stuff already in SuperColider.
How to use a scale in a Pbind:

(
s.waitForBoot({
     a = Scale.ionian;

     p = Pbind(
          degree, Pseq([0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, rest], 2),
          scale, a,
          dur, 0.25
     );

     q = p.play;
})
)

Key

Key tracks key changes and modulations, so you can keep modulating or back out of modulations:

k = Key(Scale.choose);
k.scale.degrees;
k.scale.cents;
k.change(4); // modulate to the 5th scale degree (we start counting with 0)
k.scale.degrees;
k.scale.cents;
k.change; // go back

k.scale.degrees;

This will keep up through as many layers of modulations as you want.

It also does rounding:

quantizeFreq (freq, base, round , gravity )
Snaps the feq value in Hz to the nearest Hz value in the current key

gravity changes the level of attraction to the in tune frequency.

k.quantizeFreq(660, 440, down, 0.5) // half way in tune

By changing gravity over time, you can have pitched tend towards being in or out of tune.

Scala

There is a huge library of pre-cooked tunings for the scala program. ( at http://www.huygens-fokker.org/scala/scl_format.html
) This class opens those files.

a = Scala("slendro.scl");
b = a.scale;

Lattice

This is actually a partchian tuning diamond (and this class may get a new name in a new release)

l = Lattice([ 2, 5, 3, 7, 9])

The array is numbers to use in generated tuning ratios, so this gives:

1/1 5/4 3/2 7/4 9/8   for otonality
1/1 8/5 4/3 8/7 16/9  for utonality

otonality is overtones – the numbers you give are in the numerator
utonality is undertones – the numbers are in denominator

all of the other numbers are powers of 2. You could change that with an optional second argument to any other number, such as 3:

l = Lattice([ 2, 3, 5, 7, 11], 3)

Lattices also generate a table:

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

It is possible to walk around this table to make nice triads that are harmonically related:

(
s.waitForBoot({

 var lat, orientation, startx, starty, baseFreq;

 SynthDef("sine", {arg out = 0, dur = 5, freq, amp=0.2, pan = 0;
  var env, osc;
  env = EnvGen.kr(Env.sine(dur, amp), doneAction: 2);
  osc = SinOsc.ar(freq, 0, env);
  Out.ar(out, osc * amp);
 }).add;

 s.sync;


 lat = Lattice.new;
 orientation = true;
 startx = 0;
 starty = 0;
 baseFreq = 440;

 Pbind(
  instrument, sine,
  amp, 0.3,
  freq, Pfunc({
   var starts, result;
     orientation = orientation.not;
     starts = lat.d3Pivot(startx, starty, orientation);
     startx = starts.first;
     starty = starts.last;
   result = lat.makeIntervals(startx, starty, orientation);
   (result * baseFreq)
  })
 ).play
})
)

Somewhat embarrassingly, I got confused between 2 and 3 dimensions when I wrote this code. A forthcoming version will have different method names, but the old ones will still be kept around so as not to break your code.

DissonanceCurve

This is not the only quark that does dissonance curves in SuperCollider.

Dissonance curves are used to compute tunings based on timbre, which is to say the spectrum.

d = DissonanceCurve([440], [1])
d.plot

The high part of the graph is highly dissonant and the low part is not dissonant. (The horizontal access is cents.) This is for just one pitch, but with additional pitches, the graph changes:

d = DissonanceCurve([335, 440], [0.7, 0.3])
d.plot

The combination of pitches produces a more complex graph with minima. Those minima are good scale steps.

This class is currently optimised for FM, but subsequent versions will calculate spectra for Ring Modulation, AM Modulation, Phase Modulation and combinations of all of those things.

(

s.waitForBoot({

 var carrier, modulator, depth, curve, scale, degrees;

 SynthDef("fm", {arg out, amp, carrier, modulator, depth, dur, midinote = 0;
  var sin, ratio, env;

  ratio = midinote.midiratio;
  carrier = carrier * ratio;
  modulator = modulator * ratio;
  depth = depth * ratio;

  sin = SinOsc.ar(SinOsc.ar(modulator, 0, depth, carrier));
  env = EnvGen.kr(Env.perc(releaseTime: dur)) * amp;
  Out.ar(out, (sin * env).dup);
 }).add;

 s.sync;

 carrier = 440;
 modulator = 600;
 depth = 100;
 curve = DissonanceCurve.fm(carrier, modulator, depth, 1200);
 scale = curve.scale;


 degrees = (0..scale.size); // make an array of all the scale degrees


// We don't know how many pitches per octave  will be until after the
// DissonanceCurve is calculated.  However, deprees outside of the range
// will be mapped accordingly.


 Pbind(

  instrument, fm,
  octave, 0,
  scale, scale,
  degree, Pseq([
   Pseq(degrees, 1), // play one octave
   Pseq([-3, 2, 0, -1, 3, 1], 1) // play other notes
  ], 1),

  carrier, carrier,
  modulator, modulator,
  depth, depth
 ).play
});
)

The only problem here is that this conflicts entirely with Just Intonation!

For just tunings based on spectra, we would calculate dissonance based on the ratios of the partials of the sound. Low numbers are more in tune, high numbers are less in tune.

There’s only one problem with this:
Here’s a graph of just a sine tone:

d = DissonanceCurve([440], [1])
d.just_curve.collect({|diss| diss.dissonance}).plot

How do we pick tuning degrees?

We use a moving window where we pick the most consonant tuning within that window. This defaults to 100 cents, assuming you want something with roughly normal step sizes.

Then to pick scale steps, we can ask for the n most consonant tunings

t = d.digestibleScale(100, 7); // pick the 7 most consonant tunings
(
var carrier, modulator, depth, curve, scale, degrees;
carrier = 440;
modulator = 600;
depth = 100;
curve = DissonanceCurve.fm(carrier, modulator, depth, 1200);
scale = curve.digestibleScale(100, 7); // pick the 7 most consonant tunings
degrees = (0..(scale.size - 1)); // make an array of all the scale degrees (you can't assume the size is 7)

Pbind(
 instrument, fm,
 octave, 0,
 scale, scale,
 degree, Pseq([
  Pseq(degrees, 1), // play one octave
  Pseq([-7, 2, 0, -5, 4, 1], 1)], 1), // play other notes
 carrier, carrier,
 modulator, modulator,
 depth, depth
).play
)

Future plans

  • Update the help files!
  • Add the ability to calculate more spectra – PM, RM AM, etc
  • Make some of the method names more reasonable

Comments

Comments from the audience.

  • key – does it recalc the scale or not? Let the user decide
  • just dissonance curve – limit tuning ratios
  • lattice – make n dimensional
  • digestible scale – print scale ratios