Function works everywhere, how to keep it to execute when creating a new post

save_post accepts one more parameter $update.

$update : Whether this is an existing post being updated or not.

So in your code

add_action( 'save_post', 'analyze_mp3', 10, 3 );

function analyze_mp3( $post_id, $post, $update ){
    if($update)
        return;
    //your code
}

Please check syntax/documentation. Have not tried or tested this.