completed script for music/ldp integration