Have you always secretly wanted to spend your evenings writing symphonies, learning about teeth or analysing secret codes? Studying niche subjects has traditionally been for a niche group of students. But that's all changing; you can now study almost any subject online.

For David Evans, of the University of Virginia, the online courses he runs have attracted a new generation of students to his specialist subject – cryptography.

"Open online classes provide a way to reach an amazing group of students that do not have access to traditional higher education," says David Evans, associate professor of computer science at the University of Virginia.

He says: "Most of the content is presented in short videos, with lots of interactive quizzes and exercises between them. There are also problem sets that involve solving some more challenging problems, as well as puzzles that apply ideas from the course."

Although distance learning is not a new idea, the range of subjects you can study has taken off since the rise of online courses. Amy Woodgate, project coordinator of distance education initiative and Moocs at the University of Edinburgh says: "Many people think that there are certain programmes that you can't do online and others that are better geared to online study, but actually we haven't found that."

"You can learn almost anything online nowadays," says Lloyd Bingham, who did an online preparatory course for a diploma in translation, run by London Metropolitan University.

Living miles from the nearest city, Lloyd discussed his work with his tutor over Skype. "These courses are incredibly useful for people in rural areas," he says.

For Tracy McLaughlin, flexible online learning allowed her to delve into obscure subjects such as a study of death and dying. Fitting her work around getting married and raising a family, she did an open degree from the Open University over ten years.

"My course was pick-and-mix; it had modules from lots of different subjects," she says.

"When you look at prospectuses for conventional universities, they normally just offer the same handful of subjects - so I liked being able to study all these different things."

But it's not just about gaining qualifications. Distance learning has opened doors to niche subjects for casual learners – people who are just interested in a subject and want to find out more.

"Lots of people would like to learn a bit more about what is happening when they go to the dentist," says Dr Christopher Stokes of the University of Sheffield, who is teaching an online Mooc course promising to "explore the impact dentistry has had on our lives".

For eight years, Stokes has helped run workshops for students from under-represented backgrounds who are interested in a dentistry career.

He says: "The scheme is over-subscribed, and also limited by geography. The team have always known that there are lots of students out there who would benefit from the information an online version would offer."

By running the course online, Stokes says he hopes to attract an international audience. "It will allow discussion between learners about their perception and experiences of dentistry around the world."

But are all subjects as suited to online learning? With Moocs in particular, student work is typically marked by a computer, or by fellow students – it means that marking creative subjects can be a particular problem.

"The online environment does place limitations on how I can teach the class," says Peter Edwards, who runs an online course on classical music composition. "Composition isn't well suited for multiple choice quizzes.

Edwards admits that a Mooc course "isn't a substitute for a university course," but says it provides "a space for curious people to learn something".

But some students say that online courses don't always work effectively with certain subjects. With Moocs, only 10% of students finish the courses they have signed up to.

Daniela Rudloff dropped out of a Mooc course about Beethoven. Online activity hampered the teaching, rather than helping it, she says.

"I found the sheer volume of information and ongoing discussion overwhelming. There was no way I would be able to read or listen to all of it, or participate in all the discussions, some of them referencing other discussion.

"The assessments were peer-marked, so the quality of assessment and feedback was very varied."

Staff at the Mooc admit to students that the grading process was "far from ideal" for "measuring the learning of thousands of students".

They say: "We encourage you to measure your experience in the course by what you learned, the interactions with your classmates, and your response to the music, rather than by a grading formula."

Online courses can offer a pathway into the most obscure and specialist subjects out there. But, like conventional courses, whether they work well still depends on who is running it, and what they do to help you learn.