Get the title of custom post type in another loop

You can pass a post ID to get_the_title(). So instead of using the_title() to display it, fetch it first like this.

$artist_title = get_the_title( $artistID );
echo $artist_title;

You could do that in one line of course but you might need it somewhere else, too.