Image copyright I Am Other / YouTube Image caption Pharrell Williams was taken aback by Maggie Rogers' blend of folk and dance music

Maggie Rogers has been making albums since she was in school, but she suddenly became famous last year when a video of her meeting Pharrell went viral.

Rogers was studying songwriting and production in New York last March, when the star dropped into her class to give some tips.

As he listened to her song Alaska - a supple blend of acoustic rhythms and soaring harmonies - Pharrell's eyes grew wider, then wider still.

"Wow, I have zero, zero, zero notes," he told her when the track finished, his socks well and truly blown off (not that Pharrell wears socks - but if he did, they would have been vaporised.)

"Your whole story, I can hear it in the music. I've never heard anyone like you before."

Image copyright Courtesy of the artist Image caption Maggie Rogers: "I'm a hiker and an environmentalist. I'm an optimist. I'm loud."

The video of their encounter, which has been watched 2.5 million times on YouTube, changed Rogers' life.

Alaska is nudging 30 million streams on Spotify; while the singer-songwriter has won rave reviews for her new EP, Now That The Light Is Fading, all around the world.

"I've been studying and preparing to do this my entire life [but] I never imagined in a million years that this is the way it would happen," she tells the BBC.

Excruciating

The 22-year-old had no warning that Pharrell would be attending her class that day. She simply brought along her latest demo, the way she did every week.

"It was our regular homework to bring in songs, or you'd be failed," she says.

There are a lot worse things to be than 'the Pharrell girl' Maggie Rogers

Although she was used to having her work critiqued, the whole experience was excruciating. While the song played, all eyes (and a camera crew) were focused on the musician. Wisely, Rogers picked a point on the floor and stared at it for a full three minutes.

"It's always really important to me that when other people are listening to my song, I'm really still and quiet so I'm not influencing them," she explains.

"But then there's this weird dichotomy between making sure you don't look too interested in your song, but not looking like you're bored. So halfway through I remembered I was on camera and that I needed to look confident in my work!"

She was pleased with the feedback she received, but didn't expect anything more. When class finished, she turned off her phone, went for a walk in Chinatown, then ended up at her friends' house, where she worked on a new song.

"I don't have a lot of memories from that day," she says. "I was pretty much in a daze."

Image copyright Getty Images Image caption The singer says she's ready to start work on her next full-length album

It was three months before the video went viral. Rogers was inevitably dubbed "the Pharrell girl" - but she isn't too bothered.

"There are a lot worse things to be," she says. "I have a lot of respect for Pharrell and the way he handles public life with such incredible grace and humanity.

"He always continues to creatively challenge himself, whether it's in music or film or fashion. I have all the same ambitions, so I find it really inspiring."

Rural pop

Born in rural Maryland, Rogers started playing harp and piano at the age of seven, and wrote her first song by the time she was 13.

"It became this thing that was just how I processed my life," she says. "I would write a song about however I was feeling and then just play it over and over again to make myself feel better, until I was feeling something else and then I'd write another song."

We're getting to a point where computers and technology don't define electronic music any more Maggie Rogers

While attending boarding school in Delaware, she fell in love with the banjo and turned a school broom cupboard into a prototype recording studio.

Her early records leaned towards folk, inspired by her art teacher's record collection. ("There wasn't really any internet, so I'd listen to a lot of Bob Dylan, Carole King and Cat Stevens," she says).

She submitted those demos as part of her application to New York University's Clive Davis Institute of Recorded Music - which is where that fateful meeting with Pharrell took place.

But, having worked towards the goal of becoming a professional musician for a decade, she suddenly found herself unable to create.

"I was changing, just like most people do in college," she says. "I was going through a lot and I wasn't really sure what I wanted to sound like. I had a lot of difficulty writing or reflecting.

"It was really stressful. I was 21 and thinking, 'I spent my entire life being really focused on this one thing. What happens if this isn't for me?'"

Media playback is unsupported on your device Media caption Maggie Rogers plays an acoustic version of her song On + Off for BBC Radio 1

A term studying abroad in Europe set her back on track. There, the musician encountered dance music for the first time after friends dragged her to the clubs of Paris and Berlin.

"Going to a club in New York meant high heels and expensive cocktails, or at least that was my impression. But to watch all these different people - age, race, gender - moving in the exact same way to the music was incredible.

"It filled me with so much joy, to dance. It was such a release."

Re-energised, she resolved to marry her instinct for melody to something more rhythmical. "I had made quiet music my entire life," she says. "I was ready to make something that was loud."

"I really love pop music, It was Carly Rae Jepsen's last record [2015's E•MO•TION] that inspired me to make pop in the first place. That record is so good. I'd call that slumber party pop," she enthuses

But rather than replicate Jepsen's retro pop sounds, or churning out cheap imitations of the EDM she'd heard in Europe, Rogers aimed to make "pop music that feels as organic as possible".

So the rhythm on Alaska was created by patting her jeans; while her EP is peppered with sounds and imagery she discovered on her regular hiking trips (around her neck, she wears two elk vertebrae she discovered in Oregon - they'll be used as percussion in a future recording).

"I studied natural sounds and bird sounds," says the musician. "The Smithsonian has a really incredible catalogue of indigenous music. I was looking at the ways in which rhythm appeared in daily life - because I didn't really have any experience of pop music, but I did have experience of being outside.

"So I was looking for the ways in which rhythm most appears naturally. I also thought that if I could replicate the rhythms we hear every day in my music, it would already sound warm and familiar when you started listening."

Image copyright Courtesy of the artist Image caption "I've been studying and preparing to do this my entire life," says the singer

Listening to the EP proves her instincts were correct. There's a startling intimacy to Rogers' rural pop, as the airy arrangements complement her graceful, multi-tracked vocals.

As Pharrell observed, it's completely unique. But Rogers is certain that other pop artists share her way of thinking.

"I think we're getting to a point where computers and technology don't define electronic music any more. Like James Blake's record, The Colour In Anything, there's so many wonderful moments on that record where electronic production is an accessory without dominating his work.

"Electronic integration is something that will change the sound of music."

Fans clamouring to hear more from Rogers might have a long wait on their hands, though. She's not written a note since last March, when she completed the songs on the current EP. Since then, life has been too hectic.

"I can't write on the road," she says. "It takes a lot of quiet and a lot of alone time.

"If I have four days to write, I'll sleep, or be really quiet, for three days in a row and write on the fourth.

"But I really, really feel very urgent about writing right now. Hopefully soon."

Hopefully soon.

Maggie Rogers' EP Now That The Light Is Fading is out now.

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.