This is a follow up to my previous sequencer.
Version 2 can be built from the NXT2.0 kit, and you can download the instructions and program here
The program is quite straightforward, just takes in a colour sensor reading (0-5) which feeds a 'value' switch. Each tab in the switch corresponds with a particular colour/note combination. Black (carpet) gives no note.