The Musical Offering (German title Musikalisches Opfer or Das Musikalische Opfer), BWV 1079, is a collection of several pieces of music by Johann Sebastian Bach. It consists of canons, fugues, ricercars and a trio sonata. All the music is based on a tune made up by King Frederick II of Prussia (Frederick the Great). Bach dedicated the work to him.