The pan flute has been a folk instrument , and is considered the first mouth organ , ancestor of both the pipe organ and the harmonica . The pan flute has long been popular as a folk instrument , and is considered the first mouth organ , ancestor of both the pipe organ and the harmonica .