(not solved) issues with the SPI bus music (full code provided)

Probably related to both the SD card and the 74HC595 being on the same SPI bus. It may not be possible to do through a shift register for that reason...