I know the Black Flute repulses enemy pokemon, but how? Does it lower the chances of an encounter, or stop them completely for a certain number of steps? If so, how many? How often do you have to use the Flute to maintain the effect?

Also, how effective is the White Flute? I care a little less about that one, all things considered... I'd just get Sweet Scent if I wanted to fight.