WordPress function with attribute pass to template

You can use set_query_var('playlist_id', $tp_atts['id']);.

When you later call locate_template with $load = true, it will call load_template, which extracts the query variables making them global, and accessible to the template file (in this case, as $playlist_id).