Long playing for 1000 years

December 10, 2016 at 6:29 pm (computers, music) (, )

I first stumbled across the Longplayer project when I saw a mention of their Longplayer for Voices on Kickstarter.  Then I completely forgot about it until Christian Payne (Documentally) mentioned that he’d caught up with the originator of the project on his long-form, email newsletter, ‘Backchannel’ at which point I looked it up again.

The project is great – a very long-term musical project (a bit like As Slow as Possible) conceived and composed by Jem Finer.  The one line summary is that he has recorded a sequence of music for some ‘singing bowls’ and the project combines various processed versions of this 20 minute piece in a range of different ways, resulting in a piece of music that will play continuously for 1000 years without repeat.  The long version can be found on the about page for the project (its worth a read).

To listen along, there is a live stream available from the website or listening stations in a couple of locations in London and San Francisco.  There are a series of live performances too where players play extracts of the piece.

And more recently there is now an iOS app that uses the same 20 minute piece, the same time-driven algorithm and a sense of shared time via the Internet to make the app play exactly the same part of the music available in the physical spaces and via the web.

The ‘score’ is a simple representation, with six concentric rings showing the sounds in six variations of the 20 minute piece.  But the algorithm behind Longplayer will play each ring at different speeds – with one of the rings taking 1000 years to complete.

There is a visual representation of the score with an indication of which part of each ring is currently playing.  This is available via the web and the iOS app.  The following show four stages of the app over a 24 hour or so period.

Notice how the second ring progresses the quickest, but some of the others hardly at all.  The third ring is the 1000 year ring, so over 24 hours there is no movement at all

2016-05-06 21.00.352016-05-06 23.15.362016-05-07 06.15.482016-05-07 13.13.332016-05-07 17.27.24

A great app, a great project and fascinating music!

Kevin

 

Advertisements

Permalink Leave a Comment

MIDI Arp

December 1, 2015 at 11:17 pm (computers, internet, music) (, , , , )

I wanted to do something with MIDI and Arduino.  I’ve just picked up some cheap Arduino Nano Ethernet shields, based on the Microchip ENC28J60, so thought I’d combine the two.  The ENC28J60 and a cheap Arduino Nano makes for a very compact and economical Ethernet ready microcontroller and I have a nice Roland MT-32 Synth module gathering dust that I wanted to try again.

2015-12-01 21.16.05

My initial idea was to use MIDI to trigger sounds based on arp requests received by the Arduino, (hence the name MIDI Arp), but then decided that on my home network arp requests wouldn’t give a lot of variation, so I decided to see if I could trigger on the destination IP address of any packet received.

First I needed the MIDI interface.  I followed the simple circuit and example provided on the Arduino website, but wanted it all self-contained inside a MIDI plug rather than on a breadboard, so I soldered up the 220 resistor inside a 5 pin MIDI DIN plug as follows (MIDI pins are number 1, 4, 2, 5, 3 for some reason):

  • Arduino GND – Brown – MIDI Plug pin 2
  • Arduino 5v – Red – 220 Ohm resistor – MIDI Plug pin 4
  • Arduino TX (Pin 1) – Orange – MIDI Plug pin 5

This was then connected to the Arduino and the MIDI test programme showed that all works fine.

2015-12-01 21.16.212015-12-01 21.19.13

So, to the Ethernet side of things.  The following is an excellent starting place for the ENC28J60 based nano shield:

After reading this, I decided to use the UIPEthernet library as my starting point as I liked the idea of a plug-in replacement to the standard Arduino Ethernet library.  There was two major things to work out – first, how to set the device into some kind of promiscuous mode, assuming it supports it at all; second how to grab the destination IP address from any received packets.

From the ENC28J60 data sheet, the key register that controls the receiver filtering is the Ethernet Receive Filter Control Register – ERXFCON (see section 8 ‘Receive Filters’).  There are a number of modes for filtering and the UIPEthernet library is set up to filter for the unicast address associated with the MAC address configured for the module, for broadcasts, and to use the pattern matching filter to spot arp packets.  It turns out that to set the receiver into promiscuous mode, this register just has to be set to zero.

Now this is where things got lazy.  I just dived into the UIPEthernet library sitting in my Arduino library folder and hacked about. I might tidy this up one day and do it properly.

The low-level driver code can be found in utility/Enc38j60Network.cpp.  In the Enc28J60Network::init function, there is a line that sets up the ERXFCON register:

writeReg(ERXFCON, ERXFCON_UCEN|ERXFCON_CRCEN|ERXFCON_PMEN|ERXFCON_BCEN);

This needs to simply be changed to clear the register:

writeReg(ERXFCON, 0);

Next, how to store the destination IP address.  Again, simplicity ruled this one too.

The high-level interface to the library can be found in UIPEthernet.cpp and UIPEthernet.h.  I added two public functions and two private variables to the UIPEthernetClass class in UIPEthernet.h:

public:
  IPAddress lastSrcIP();
  IPAddress lastDestIP();
private:
  static uip_ipaddr_t uip_lastipsrc;
  static uip_ipaddr_t uip_lastipdest;

Then in the UIPEthernet.Cpp file, added the code to store the last source and destination IP addresses from received packets.

First, define a structure to dig into to the IP header (a bit of a layer violation, but I wasn’t after neat designs really).  Add the following after the definition of ETH_HDR near the top of the file.

#define IPBUF ((struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN])

Then add two (static) global variables to the file:

uip_ipaddr_t UIPEthernetClass::uip_lastipsrc;
uip_ipaddr_t UIPEthernetClass::uip_lastipdest;

Add two accessor methods to retrieve the last source and destination IP addresses (with appropriate conversion to the Arduino Ethernet friendly IPAddress format):

IPAddress UIPEthernetClass::lastSrcIP()
{
  return ip_addr_uip(uip_lastipsrc);
}
IPAddress UIPEthernetClass::lastDestIP()
{
  return ip_addr_uip(uip_lastipdest);
}

Finally add the code to save the addresses to the UIPEthernetClass::tick() function, on reception of a packet.

          Enc28J60Network::readPacket(in_packet,0,(uint8_t*)uip_buf,UIP_BUFSIZE);
          if (ETH_HDR ->type == HTONS(UIP_ETHTYPE_IP))
            {
              uip_packet = in_packet; //required for upper_layer_checksum of in_packet!
#ifdef UIPETHERNET_DEBUG
              Serial.print(F("readPacket type IP, uip_len: "));
              Serial.println(uip_len);
#endif
              uip_arp_ipin();
              uip_input();
              if (uip_len > 0)
                {
                  uip_arp_out();
                  network_send();
                }
                // Extra code added here
                uip_ipaddr_copy(uip_lastipsrc, IPBUF->srcipaddr);
                uip_ipaddr_copy(uip_lastipdest, IPBUF->destipaddr);
                // Extra code ends
            }

That should be all that is required to expose the destination IP address of any received packet via the UIPEthernet class (ok, breaking compatibility now with the standard Arduino Ethernet library).

The arduino sketch file now consists of the following:

/*
MIDI based on 
 http://www.arduino.cc/en/Tutorial/Midi

UIPEthernet Examples used for rest
NB: Requires hacked UIPEthernet Library!
 */
#include <SPI.h>
#include <UIPEthernet.h>
#include "IPAddress.h"

int lastIP;
int thisIP;

// Initialise note array with whole tone scales in octaves 3 through to 6
// C3 = 36
// C4 = 48
// C5 = 60
// C6 = 72
// C7 = 84
#define NOTES 24
int notes[NOTES] = {
  // C3  D3  E3  F#3 G#3 A#3
     36, 38, 40, 42, 44, 46,
  // C4
     48, 50, 52, 54, 56, 58,
  // C5
     60, 62, 64, 66, 68, 70,
  // C6
     72, 74, 76, 78, 80, 82
};

void setup() {
  //  Set MIDI baud rate:
  Serial.begin(31250);

  // Initialise the uIP and UIPEtherent stacks
  uint8_t mac[6] = {0x00,0x01,0x02,0x03,0x04,0x05};
  IPAddress myIP(192,168,0,6);
  
  lastIP = 0;
  thisIP = 0;

  Ethernet.begin(mac,myIP);
  
  // Initialise patch using program change
  // 32 = Synth 1, Fantasy
  midiCmd (0xC0, 32);
}

void loop() {
  Ethernet.maintain();
  IPAddress sip = Ethernet.lastSrcIP();
  IPAddress dip = Ethernet.lastDestIP();
  thisIP = 256*dip[2] + dip[3];
  
  if (thisIP != lastIP)
  {
    lastIP = thisIP;
  
    int note = (thisIP & 0xff) % NOTES;  // Scale to number of notes
    int vel  = ((thisIP & 0xff00) >> 8)/4;        // Scale to val between 0 and 64

    //Note on channel 1 (0x90), some note value (note), middle velocity (0x45):
    noteOn(0x90, notes[note], 16+vel);
  }
}

//  plays a MIDI note.  Doesn't check to see that
//  cmd is greater than 127, or that data values are  less than 127:
void noteOn(int cmd, int pitch, int velocity) {
  Serial.write(cmd);
  Serial.write(pitch);
  Serial.write(velocity);
}

void midiCmd(int cmd, int val) {
  Serial.write(cmd);
  Serial.write(val);
}

The final byte of the IP address determines which note from the array of notes to play (modulo the number of notes) and the third byte determines the volume to be used, scaled and with a minimum specified.

There is a control message to set the voice on the MT-32 to Synth1-Fantasy as this sounds suitably ambient. There are no note-off messages, so notes are allowed to keep ringing. As the note array defines four octaves of whole tone scales, the running-on notes create quite an interesting effect.

2015-12-01 21.40.12

There seems to be a regular drone set up, which I think is due to the IP address of my PC and router. These two addresses provide a sort of default back-drop of sound to anything else going on.

In order to get anything useful though, it would be no good just using a port on the router, as even the dumbest, cheap modern router will tend to do some MAC level filtering on ports. I had a laptop and the Arduino plugged into an old Netgear En104 4-port Ethernet hub, which has no intelligence (as far as I know) built in – so the Arduino could see everything coming out of the laptop.

The results were quite pleasing. Google has a nice enhanced drone to it. You can really hear the clutter of a site that is pulling in ads from all over the Internet – such as Amazon or YouTube or a news site.

Edited to add:  Here is a short video below showing them being opened.  It’s a bit crude but you get the general idea.

 Maybe next, I’ll see if I can do the same with a Wi-Fi link for the Arduino instead of wired Ethernet.  It might also be worth trying different scales and alternative mappings of notes to addresses.

Kevin

Permalink Leave a Comment

Rule 34 for Music

March 22, 2015 at 1:37 pm (music) (, , , )

If you’ve been around on the Internet for a while, you’ve probably heard of Rule 34, which I tend to paraphrase as “if you can think of it, there is porn of it” to which there is the corollary comment “if there isn’t yet, then there soon will be”.  Well, I think there is a version of Rule 34 for music, which could be stated thus:

If you can think of the style and the tune, then somewhere there exists a cover of that tune in that style.

In short, if you can imagine it, it probably exists on YouTube somewhere.  Here are some recent examples:

Red Hot Chili Pipers.  Think rock and bag pipes.  Particularly be sure to look at their covers of Smoke on the Water/Thunderstruck and We Will Rock You.

Andrea Vedrucci.  Covers just about anything imaginable from classical to game theme tracks.  Look out for the Mario Triology!

Dr Pez.  Guitar and accordion covers of a whole range of music.  Some of the game theme tunes are great!  Look out for Animal Crossing (Bossa Guitar and Accordion duet) and the Wii Shop channel (smooth jazz guitar and accordion).

Brett Domino. I’m sure I’ve mentioned Brett Domino before, but his covers of songs are amazing.  Look out for Bad Romance and the Justin Timberlake Medly.

You can even get technology in on the act.  Here are some drones performing the James Bond Theme.

As I said. If you can imagine it, there is probably a cover of it.  Google will almost certainly provide.

Kevin.

Permalink Leave a Comment

I’ll name that tune in …

January 14, 2015 at 11:10 pm (internet, music) (, , , , , , )

Whilst studying music at school some(mumble, mumble) years ago (pre Internet really) I remember there being an old book on the shelves alongside the vinyl recordings of classical music that fascinated me.  It was a music dictionary.  Not in the sense of a dictionary of music words, but in the sense of being a dictionary of musical themes.

Basically, how it worked, was you thought of a tune, transposed it to start on a C, and then spelt out the letter names of the tune and looked it up.  So, for example, the National Anthem would go CCDBCDEEFEDCDCBC once transposed, so you’d flick through for the C section, then find the entry CCD… and so on, as they were all listed in alphabetical order, and it would tell you it is the National Anthem.

There were tens of thousands of well known classical themes in that book and I always wanted a copy, but never, ever found one to buy.

As I started to find my way onto the largely textual Internet in the early 1990s, I always thought that this kind of thing would make a great website, but instead of typing in letter names, why not submit a MIDI file with the pitch values, do the transposition automatically and then return the results.  Of course, this never happened, it got binned in my “might think about it one day” pile and forgotten.

Well technology has a habit of spawning useful applications and of course, these days there are now a number of services that let you look up a tune by various means.  I heard a tune over a tannoy system today that I’m sure is a fairly recent pop song, but not one I know.  The kids didn’t recognise my poor rendition of it either, so I turned to the Internet.

If you have a mobile handy to record an extract, then you have a number of very good apps that will tell you what it is.  Shazam is one of the most popular, and available on the major platforms.  However, I belive it will only work for the actual legitimate recording of the song – I don’t think you can play the tune on a piano, for example, and ask it to recognise that.

However, musicpedia and MelodyCatcher do aim to do just that.  You can play in the tune on a virtual keyboard, creating the equivalent of the CCDBCD… above and if it recognises it, it will tell you what results have come back in its search. Musicpedia is best for classical themes whereas MelodyCatcher appears to support a wider range of styles.

But the applications that have given me the most entertainment this evening are WatZatSong and Name My Tune.  These both allow you to record and extract, post it on the site and wait until someone listens to it and posts and answer if they recognise it.  WatZatSong has a number of snippets of poor quality, but largely recognisable recordings.  There are people singing, playing guitar, capturing recordings on their phones.  And the site allows you to browse both submissions and answers and vote to agree or dissagree with the identification.

But nothing beats Name My Tune for shear entertainment value. It will only accept uploads via a microphone, and it is quite amusing listening to all the attempts at whistling, huming, singing in “la”s or “dum”s, playing on old casiotone keyboards, playing on a recorder, penny whistle … you name it.  I’m sure I heard a stylophone for one!  It is great!  The only downside is that it doesn’t have any of the social features of other sites.  You click though the sound clips (a bit like a one-way, audio version of chatroulette) and if you know one, can fill in the author and title and click “send” and off it goes on its merry way.  There is no way to know if you were correct or satisfied the questioner’s query as far as I can tell.

But if you want a peculiar way to spend an evening, that is guaranteed to make you smile, do take a look.  It was quite a lot of fun.

But I still don’t know what my tune is …

Kevin.

Permalink Leave a Comment

Gareth Wood and Gilbert Vinter Music for Brass Band

May 18, 2013 at 3:01 pm (music) (, , , , , , , , )

It’s been a while since I played in a brass band, but one lasting memory is the dedicated concentration you’d find coming up to a competition. A singular focus on a single piece of music to get it sounding the best it could possibly be. There are lots of composers of brass band “test pieces” but two of my personal favourites are Gareth Wood and Gilbert Vinter, largely because their music is very descriptive, interesting to play and interesting to listen to. Their writing doesn’t feel like music that is written just to test the band, but music to convey an idea.

These days there are lots of modern composers writing for brass band or wind orchestra who write in this symphonic, thematic way, but 20 odd years ago there was still a lot of arrangements of classical music being used in contests. I personally don’t have any decent recordings of many of these works, but in the days of the Internet, YouTube can provide.

Except when it can’t!  I’ve looked everywhere I can think of so far and can’t a recording of my favorite Gareth Wood piece – The Margam Stones, so I’ve had to upload a slightly dodgy MP3 from tape from tape from tape from vinyl recording that I’ve had for ages.  The playing quality is not bad, but there are a few dodgy moments and the sound is very wobbly, so I’m not sure it really does the piece justice, but it’s all I have for now.  If you know of a better recording, please let me know!

I also couldn’t find a recording of Variations on a Ninth by Gilbert Vinter, so again I’ve uploaded a slightly better, but still a bit iffy version of that too.

So here, with links to videos, are my favorite Gareth Wood and Gilbert Vinter pieces, all of which I’ve been fortunate to play at various times (although not all in actual performances).

Gareth Wood

Gilbert Vinter

All amazing pieces of music from two very talented composers.

Kevin.

 

Permalink Leave a Comment

Some Quirky Videos

December 24, 2012 at 12:16 am (art, interesting, internet, music, odds) (, , , , , , , , , )

I’ve recently got into Twitter, after having an account sitting unused for around 5 years and in that time some rather interesting, but slightly quirky videos have wandered past my twitter feed.

The Christmas Almost Number 1

First of all, a great candidate for a Christmas #1, but unfortunately they didn’t make it. They should have done.  Funny, slightly tongue in cheek, a little humble, and musically very accomplished, is “Christmas Gets Worse Every Year” by ‘The Other Guys’ – 12 students from St Andrew’s University, in Scotland.  See it for yourself here: http://www.youtube.com/watch?v=9YvZn1hgIvo

Thanks to the QI Elves (@qikipedia) for that one.

A Pale Blue Animation

This is a nice animation to accompany Carl Sagan’s monologue ‘A Pale Blue Dot’, itself inspired by the most distant photograph taken of Earth – a photograph from Voyager 1 from a distance of almost 4 billion miles away .  A thought provoking, perspective giving monologue with a slick animation to nicely drive home the meaning. See it here: http://vimeo.com/51960515

Thanks to Robin Ince (@robinince) posting in Brian Cox’s Twitter feed (@ProfBrianCox).

A Father-Daughter Yearly Pilgrimage

This is a nice story – every year Steve Addis takes his daughter to the same street corner in New York and takes a photo of him holding her.  Something that started when she was a year old.  This is a TED talk he shares his 15 most treasured photos from doing this, and the experience of getting a random stranger to take their picture – and how no-one has ever declined.  See it here: www.ted.com/talks/steven_addis_a_father_daughter_bond_one_photo_at_a_time.htm

I can’t remember where I first saw that one retweeted, but now I subscribe to TED Talks (@tedtalks) to make sure I don’t miss any more.

Don’t Assume Anything

This is another one that I saw courtesy of a retween from someone and then followed up.  It took me to the site of Richard Wiseman, that contains a number of very well done videos that challenge your views of the world – this is a particularly nice optical illusion.  See it here: http://richardwiseman.wordpress.com/2012/12/20/do-you-make-assumptions/

Now I follow Richard Wiseman (@RichardWiseman) too.

The Boy and His Robot

This is a lovely tale about a boy and is robot companion.  It combines the imaginary with the real, an idea of a fantasy future with the here-and-now and love, hate and dependency.  You might be tempted to click back after a couple of minutes to whatever you were doing before, but don’t – I thoroughly recommend watching the full 12 minutes.  Its sensitively surprising.  See it here: http://io9.com/5970839/a-lovely-short-film-about-a-boy-and-the-robot-he-cant-get-rid-of

Thanks to IO9 (@io9) for that one.

So a very interesting first few weeks on twitter – long may it continue.

Kevin.

 

Permalink Leave a Comment

Listening to Numbers

October 31, 2012 at 11:19 pm (art, computers, interesting, internet, music) (, , , , , , , , , )

I get Make Magazine and from time to time find something that peaks my (software related) curiosity.  This time it was an article about making synthesized music from data using the algorithms from Dr Jonathan Middleton’s Music Algorithms website – http://musicalgorithms.ewu.edu/

Basically this takes a sequence of numbers, scales it to a pitch range you select, gives you options for translating pitch – e.g. scale backwards, replace specific notes with another note, use division or modulo arithmetic, etc – and then gives you options for applying a duration to each note – either a fixed duration or using a scaling formula.

Finally you have the option to play it, download it as a MIDI file or see it in a crude representation of notation.

There are a number of ‘preset’ options to get you going – I experimented listening to pi, the Fibonacci sequence and their ‘chaos algorithm‘ using ranges of 0 to 88 (a full piano range) and 40 to 52 (basically an octave starting from middle C).  I tended to use a fixed duration of 0 or 1 as it went by suitably quickly and kept things interesting.

Then I thought I’d try something a little different.  Using the option to ‘import your own sequence’ I took a wander over to Google Trends.  This plots the frequency of people searching for specific terms over time.  If you login with your Google account you can download the results as a CSV and then its trivial to open it in a spreadsheet, select the column of results and paste it into the Music Algorithms form and listen to what something sounds like.

For my own entertainment, I had a listen to the following:

  • Default ‘swine flu‘ search that Google Trends offers.  This works well scaled 0 to 88, as the pitch then mirrors the graph quite well.  I didn’t paste in all the zeros, just the portion with the shape and got a nice quickly peaking and decaying piece.
  • Facebook is a good one … it goes from continuous low through a slowly rising scale, increasing in pitch and frequency of change as time moves on, finally tinkling along in the high register as search frequency fluctuates.  This would be a really interesting one to do with number of users, scaling from Mark Zuckerberg as #1 up to user 1 billion …
  • Considering the date, Halloween was an interesting one – you get a random sounding very quickly rising and falling scale and then silence … the ration of silence to scale is around 1 in 12 funnily enough and the pattern repeats 8 times (for 2004 to the present day) … this works well with a duration of 0 across the full piano range – nice and quick.
  • The text ‘music algorithms‘ generated a curious pattern – reasonably random around a specific value, but that value has slowly decayed over time.
  • Then I tried a whole range of whatever came into my head looking for an interesting graph – seeing fluctuating searches, lots of rising trends – then finally settled on Tim Berners-Lee.  Not sure why!  But that gives a nice, angry sounding (especially on duration zero) left-hand piano line for the majority of the data set, generally getting slightly lower, adding to the angry nature, until there is a quick high flourish representing him appearing in the Olympics opening ceremony!

I only played the MIDI files back using the standard instrument, i.e. a basic piano sound. It would be really interesting to actually use some of these data sets to define a synthesized timbre too.  Could be the start of a very interesting musical piece.

What would be really interesting is to hook it up live to some Google or other Internet stats and then allow you to hear what is going on, say on Twitter.  A bit like a musical version of The Listening Post.  Maybe that could be a job for my Raspberry Pi

Kevin.

 

Permalink Leave a Comment

Tenori-on

January 20, 2011 at 10:07 pm (music) (, , , , )

Had the great chance to go and watch Bill Bailey recently as part of his Dandelion Mind tour, at the Wyndhams Theatre in London.  Absolutely fantastic (his cover of Gary Newman’s Cars was just great).

One thing that really caught my attention though, was his use of a curious Japanese digital Instrument.  Its a grid of LEDs and switches.  You touch the switch and that LED will activate a note when it lights up.  Then as the instrument keeps sweeping across the grid, the lit LED will keep playing the note.  Its a really curious effect.

Well, others seem to have thought so too as a Google search for Bill Bailey Japanese instrument reveals all – its a Tenori-on, made by Yamaha – and you can have your own for the cool price of around £600!

Well, Tenori-on or an iPad … hmm.  Still, would be a really neat instrument to have … maybe time to dig out that old R.A.Penfold book of MIDI projects …

Kevin.

 

Permalink 1 Comment

Adagio Cantabile with a rock tempo feel …

August 20, 2010 at 1:54 pm (music, odds) (, )

So reads the first of many performance directions for John Stump‘s Faeries Aire and Death Waltz.

If you’ve never seen this piece of music, claimed to have been ‘arranged by accident’, then you should take a minute out to study it.  Claimed to be unplayable, but even so there is a version on YouTube.  If nothing else, the build up is entertaining in its own right.

Look out for the other musical directions ‘release the penguins’, ‘cool timpani with small fan’, ‘add bicycle’, ‘remove valve’ and as it reaches its conclusion, ‘gradually slide from 12-bar blues to a more vivaldi like cadenza’.

Quite impressive.  Full score (courtesy of wikipedia) attached.

Kevin.

Permalink Leave a Comment

Video games inspire art

June 20, 2010 at 7:42 pm (art, computers, interesting, music) (, , , , , , )

I’ve seen one or two musical items inspired by video games.  There was Andrea Vadrucci who drums along to Mario Bros.  Just found a violinist who plays the mario game music and sound effects in real time along to a game as its being played.  I’ve seen opera in virtual worlds.

But I think the animation I’ve just found is quite excellent.  It’s 80’s video games animated out of everyday objects.  I particularly like the pacman near the end.  Very well done. Its called Game Over and you can see it here on YouTube.

Kevin.

Kevin.

Permalink Leave a Comment

Next page »