The Science of Sound

I’m not teaching any more, but I don’t want to just bin a decade worth’s of lecture notes, so here’s part of the first lecture tech students get in their first week of university:

To talk about sound, we must first talk about air. This is made up of about 78% nitrogen, 21% oxygen and various other gases. At 20 degrees Celsius (that is, room temperature), each air molecule is moving all the time at 500 metres per second. They are constantly colliding with each other and with anything in their path.

If a football hit you at 500 m/s, you’d be in trouble, but air molecules are tiny. Force = mass* acceleration. The force of a football is huge in comparison to a single nitrogen atom. But if you pump a lot of air into a tyre, say 6 bar (87 psi), the force of all the colliding air molecules will make the tyre very stiff. At sea level, the pressure of the atmosphere is about 1.03 bars (14.7 psi).

So how does sound propagate in air? Let’s say Adam Kryński hits his Bodhrán with a stick.

This causes the drum membrane to move very suddenly. He pushes the membrane and, on the other side of the drum, the membrane pushes on all the air molecules. They get packed in together. This creates a band of high pressure, that starts at the drum and moves outwards. All the molecules are moving at 500 m/s. But they’re not all going in the same direction. Some are going away from the drum, but some are going sideways or backwards. They’re all crowded though, and colliding into the molecules around them, so that wave of intense collisions, the high pressure wave, is moving away from the drum at 340 m/s, at room temperature.

If we were in Death Valley when it was 20 degrees out, the air pressure would be higher, so there would be more collisions. However, the air molecules would still be moving at their normal speed, so the pressure wave would still move at 340 m/s. If we were on Mount Everest at 20 degrees, there would be fewer collisions, but the speed would still be the same.

However, at 30 degrees, air moves faster, so sound moves faster. And at 10 degrees, air is slower so sound is slower.

Kryński’s drum head has creates a high pressure wave when it moved from being hit, but it doesn’t stay in that position. The drum head snaps back in the other direction, passing it’s mid point. This movement backwards creates a space where there are fewer air molecules. A low pressure wave follows the high one, moving at the same speed.

The head, still out of place snaps back forwards again, creating another, smaller, pressure wave and then another smaller wave of low pressure.

We can see a simulation of this drum head via Falstad.

Alternating light and dark lines fan out from the top of the image towards the bottom.
Figure 2: A ripple tank simulation of a vibrating plane with a short wall on either side, generated via Falstad

You can see the high and low pressure waves. In this simulation, the drum head vibrates forever, but it does give you an idea of the sound waves moving away from the drum.

These sound waves might reach your ear. But what is the amount of pressure change that your ear is actually perceiving? At sea level, the pressure of the atmosphere is 101.3 kilo pascals. The pressure change created by sound waves is in micro pascals, a tiny amount. It’s possible for air pressure to vary by more than that. A 1% change in pressure travelling at the speed of sound is, essentially, an explosion that can knock over a building. Atmospheric pressure, such as high and low pressure fronts you hear about in the weather forecast, has big variances relative to sound, but these changes happen very slowly.

Live-Blogging Dorkbot #2

More #Dorkbot
Kooman Samani

Lovotocs = Love + Robotics

This came out of social robots.
Western dualism includes both body and mind but also emotion and reason. This is falling out of favour towards monoism.

Love is covered by psychology philosophy etc.

Robots: industrial, service, social, and love?

There is a risk of the uncanny valley. Creepiness is also cultural. He decided to go for an abstract design and a simple looking interface.

Most people don’t think they could love a robot but are fine with robots loving them.

This project was fed by robots and AI but also by psychology.

Why do we fall in love? Repeat exposure is a factor.

His AI system emulated an endocrine system.

The state of the robot depends on the previous state, the endocrine emulation and the input.

This is slightly problematic … Like, one of the persistent problems in both AI and robots is that people want to assume emotion from the machine and this is just encouraging that.

Live-Blogging Dorkbot #1

Sarah Angliss wrote an opera. She did composition and sound design. She had to learn to write for other people and make everything reliable.

Fifteen years ago she went to the Hunter Museum in London, including a skeleton of Charles Burn, who did not want his skeleton exhibited. His body was stolen after his death by Hunter. Her opera was about Burn. She spent seven years writing the opera, during which time the Hunter museum responded to pressure and removed the display.

Some of the instruments in the opera are her robots, including a carillon. She also used theremin. But mostly 18th century instruments used in weird ways.

Theatre uses some software called Q Lab.

She’s got a live looping device that does subtle weird stretching. There are several loop points on the phrase.

She got really into 1969s spectralism. Her stuff is based on the nightingale. The problem with mapping an FFT to a violin is that violins also have spectrums. She wrote software to take into account the violin’s spectrum. IRCAM’s software OrkIdea does this well.

Changes

When my mother died, it was just as the dot com bubble was bursting. I was between jobs. Tech was pivoting to spyware and I felt burned out by Silicon Valley. I decided to move to music full time. I applied for Masters programmes and started playing in a flute-fronted rock band.

My dad died in June and I’ve realised how burned out I feel from my teaching job. Years of Tory cuts are hitting British higher education hard. Kent decided to stop offering music and I decided not to participate in the teach out. My other university Goldsmiths, is also doing major cuts. I haven’t asked if my job there will exist next year, but I’d bet that it won’t. I saw an advert for a band and answered it. They’re a flute-fronted rock band.

(Honestly not sure how I feel about that.)

What’s next? I don’t know. I went back to uni to get better at writing music and instead I threw all my energy at teaching. I want to write music.

A friend of mine, only a few years older than me, just died of cancer. Her funeral is the day after tomorrow.

And I keep thinking of the composer of my favourite string quartet. Ruth Crawford Seeger got diverted into musicology for several years, due to her association with Charles Seeger. And at some point, she had enough of it and decided to return to composing. She felt her best music was still ahead of her. Then she got cancer and died. No music was ahead of her.

I feel like I’m stepping off a cliff into an unknown, with death nipping at my heels. Will I survive this change? Probably. Probably. Probably.

Book me for a gig. I need to stay busy.

Obituary for Edward Hutchins

Edward Hutchins passed away on June 19th at the age of 83 in McKinney, TX, after a short illness.

Ed was born to Esther and Bert in St Louis, MO, in 1939, but the family soon relocated to Phoenix, AZ. After a brief stint at Arizona State, Ed joined the Army and was stationed in Alaska and then San Francisco. After being discharged, he earned a Bachelor and Masters degree in Electrical Engineering from Santa Clara University. In 1974, he married Eileen Forge and they raised two children in Cupertino, CA.

Ed worked as a chip designer at several Silicon Valley companies, including AMI, Chips and Technologies, IDT and SST. After retiring, he travelled the country on a motorcycle for two years with his tour ending in Vancouver, WA, where he became an avid square dancer with partner Elsie Bartling. He moved to Texas during the pandemic to be closer to his son and grandson.

Ed is predeceased by his parents and his wife Eileen. He is survived by his sons Charles and Edward Paul Jr and grandson William.

Funeral services were be held at St Joseph of Cupertino on August 14 at 1pm. Interment was the following day at Gate of Heaven Cemetery at 10am.

Teen Idols

Once upon a time, 33 years ago, I was clearly a troubled youth. I was 14. My parents wanted to help. Could I just tell them what was going on?

In a terrible miscalculation, I told them. I came out as questioning.

My mum panicked and sought out advice. She turned to her mother’s Catholic friends who suggested a hard line approach. My mum could push me towards heterosexuality by the strategic use of homophobic harassment. Her contacts further urged her to use “tough love” and throw me out of the house.

She tended to agree with the bigots, but she balked at making me homeless. I look back and know now that it’s possible to love and hate at the same time, in the same breath, as the same gesture. I spent four years in a perfect synthesis of maternal Catholic love and hate.

Things improved dramatically after I left home. My mother eventually, mostly came around. And then, with little warning, in 2002, she died.

My dad, who had virtually no speaking part in this drama, never talked about this. I don’t even know if he knew what was going on. I’ll never know. He died in June.

According to Kiddushin 17b, there is a Rabbinic law that allows a Jewish convert to inherit from his gentile father. He splits the inheritance with his brother so that the gentile gets the religious items and the convert gets money.

We delayed my dad’s funeral for a few weeks due to travel difficulties. My brother proposed stretching this out to at least five months. Instead, I took over planning. I booked a Catholic church, a priest, an organist, a florist, and a caterer and made arrangements with the cemetery. The priest asked which readings to use. The organist asked what hymns to play. My brother did not respond to these questions, so I did. I listened to hymns on YouTube and read gospel verses, searching for something at least inoffensive.

My dad was Catholic. His friends were Catholic. I stayed close to the community norms of what he would have expected and presumably wanted.

The sages say, in the case of ‘a convert and a gentile who inherited the property of their father, a gentile: the convert can say to his gentile brother: “You take the idols and I will take the money.”’ But I took the idols and placed them for the funeral. I wrote a check to the Catholic church, whose schools educated but harmed me. Whose followers tormented me and loved me. Whose hospitals are allegedly right now gambling that they can safely but illegally deny every kind of healthcare to trans people, because they have deep pockets and trans people don’t.

I didn’t want the idols, but I couldn’t escape them while also doing right by my dad. I tried to pass them off to my brother, but didn’t. Kiddushin says, ‘Once idols have come into the convert’s possession, it is prohibited for him to exchange these objects with his brother, as he would thereby be benefiting from idolatry.’ They’re mine now, but any benefit is counterbalanced by harm. I could atone for this on Yom Kippur, but I feel I shouldn’t have to. This is the opposite of what I felt when actually doing the planning. It had to be done, so I did it.

The end of a difficult relationship brings intense focus to the difficulty. Here is a murky not-knowing. But the missed conversation about my teen years feels like a relief. It’s better not to know. There were no good answers. I took only those idols that I had to take.

Shiva

My dad’s funeral is delayed for a few weeks due to logistics reasons. So, going out of order, I’ll be sitting shiva in London Tuesday and Wednesday of this week. Please email, text or signal for my address. I have very recently moved house.

A friend suggested I also do an online session. I am considering logistics and will post further details if I go ahead with that.

Graphic Notation Teaching Tool

This is designed for students with no experience of improvising. The idea is to start with just having one note and dots. Then dots and flat lines. Then gradually adding more notes.

It’s meant to fir the window width, so you may need to scroll sideways if you’re looking at this page with a sidebar.

Your browser does not support the HTML5 canvas tag.
<form id="formElem">
  <label for "notes">Notes:</label>
  <input type="text" name="notes" id="notes" value="C, G">
  
  <label for "dots">Dots:</label>
  <input type="checkbox" id="dots" name="dots" value="1" checked>
  
   <label for="lines">Lines:</label>
<select name="lines" id="lines">
  <option value="0">None</option>
  <option value="1">Flat</option>
  <option value="2">Sloped</option>
</select> 
  <label for "circles">Circles:</label>
  <input type="checkbox" id="circles" name="circles" value="1">

  <input type="submit">
</form>
<canvas height="310" id="canvas_images" style="border: 1px solid #d3d3d3;" width="1280">
    Your browser does not support the HTML5 canvas tag.</canvas>

<script>  
  
  function drawCircle(ctx, x, y, radius, fill, stroke, strokeWidth) {
  	ctx.beginPath()
  	ctx.arc(x, y, radius, 0, 2 * Math.PI, false)
  	if (fill) {
    	ctx.fillStyle = fill
    	ctx.fill()
  	}
  	if (stroke) {
    	ctx.lineWidth = strokeWidth
    	ctx.strokeStyle = stroke
    	ctx.stroke()
  	}
	}
	
	function scoreCircle(ctx, x, y, radius, fill) {}
  
  function drawDot(ctx, x,y) {
    var dots = document.getElementById("dots").value;
    
    if (dots ==0) {
      return false;
    }
    drawCircle(ctx, x, y, 5, 'black', 'black', 2);
    return true;
  }
  
  function drawLine(ctx, x1, y1, x2, y2) {
    ctx.strokeStyle = 'black';
    ctx.lineWidth = 5;

    // draw a red line
    ctx.beginPath();
    ctx.moveTo(x1, y1);
    ctx.lineTo(x2, y2);
    ctx.stroke();
  }
  
  
  function scoreLine(ctx, x1, y1, x2, height) {
  
    var lines = document.getElementById("lines").value;
    if( lines == 0) {
      return false;
    }
    
    if( lines == 1) {
    
      drawLine(ctx, x1, y1, x2, y1);
    } else {
  
      var slopes = [-1, 1, 0, 0, 0, 0, 0]
      var diagonal = slopes[Math.floor(Math.random()*slopes.length)]
  
      if (diagonal != 0) {
        x2 = x2 + height;
      }
    
      var y2 = y1 + (height * diagonal);
      drawLine(ctx, x1, y1, x2, y2);
    }
    
    return true;
  }


  function pickItem(ctx, x1, y1, x2, height, radius, fill) {
  
    index = Math.floor(Math.random() * options.length);
    switch (options[index]) {
      case 0:
        drawDot(ctx, x1, y1);
        break;
      case 1:
        scoreLine(ctx, x1, y1, x2, height);
        break;
      case 3:
        scoreCircle(ctx, x, y, radius, fill);
        break;
      }
  }
  
  
  function drawScore(ctx, staves, dots, lines, circles){
    var canvas_width = ctx.canvas.clientWidth;
		var canvas_height = ctx.canvas.clientHeight;
    var height = 0;
    var stave_height = Math.floor(canvas_height / ( staves + 1));
    var num_items;
  
    var range = canvas_width / 20;
    
   
		
		
    for (let i = 0; i < staves; i++) {
  		num_items = Math.floor(Math.random() * 5) + 5;
      height += stave_height;
      //drawDot(ctx, Math.floor(Math.random * canvas_width), height);
      for(let j=0; j < num_items; j++) {
        //  pickItem(ctx, x1, y1, x2, height, radius, fill)
     		//drawDot(ctx, Math.floor(Math.random() * canvas_width), height);
     		var x1 = Math.floor(Math.random() * canvas_width);
     		var x2 = x1 + Math.floor(Math.random() * range) + 20;
     		var radius = Math.floor((Math.random() * (stave_height / 2)) + (stave_height / 2));
     		pickItem(ctx, x1, height, x2, stave_height, radius , Math.floor(Math.random()  * 2));
      }
		} 
  }
  
  function parseForm(ctx) {
     ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
     
    var allnotes = document.getElementById("notes").value;
    context.fillText(allnotes, 30, 60);
    var notes = allnotes.split(",");
    
    options = [];
    
    //var dots = document.getElementById("dots").value;
    //console.log(dots);
    if (document.getElementById("dots").checked) {
      options.push(0);
    }
    var lines = document.getElementById("lines").value;
    if( lines != 0) {
      options.push(1);
    }
    
   var circles = document.getElementById("circles").value;
    if( circles != 0) {
      options.push(2);
    }
    
    console.log(options);
    
    if (options.length > 0 ) {
      drawScore(ctx, notes.length, 1, 0, 0, 0);
    }
  }
  

    var c = document.getElementById("canvas_images");
    c.width = 0.99 * window.screen.availWidth; 
    c.height = Math.max(c.height, 0.4 * window.screen.availHeight);
    var context = c.getContext("2d");
    //var numGlyphs = Math.floor((Math.random() * 3) + 1) + 1;
    //var blob = new Image();
    //var x, y;

    context.font = "300% Bravura";
    //blob.src = "https://farm8.staticflickr.com/7322/9736783860_4c2706d4ef_m.jpg"
    //blob.onload = function() {
    //    context.drawImage(blob, 0, 0);
    //    for (var i = 0; i < numGlyphs; i++) {
    //        x = Math.floor((Math.random() * i * 50) + 1) + 5;
    //        y = Math.floor((Math.random() * 205) + 1) + 7;
    //        //1f49b
    //        context.fillText("<3", x, y);
    //    };

    //};
    //context.fillText("<3", 100, 100);
    
    //drawScore(context, 1, 1, 0, 0);
    
    var options = [];
    
    parseForm(context);
    
    formElem.onsubmit = async (e) => {
    	e.preventDefault();
			parseForm(context);
    }

</script>