dotnet / csharplang

The official repo for the design of the C# programming language
11.61k stars 1.03k forks source link

Proposal: Provide syntax to play music in strings, like QBasic #346

Closed ygc369 closed 7 years ago

ygc369 commented 7 years ago

QBasic has "play" command to play music which is stored in strings, why VB and C# can't? I hope that VB and C# have the same ability to play music without a music file.

HaloFour commented 7 years ago

Anyone can write a library that provides this functionality. It has no place being built into the language.

ygc369 commented 7 years ago

@HaloFour Anyone can write this? Are you sure? How to write? Could you give an example? Don't tell me to use a lot of sound files. Maybe I should not put this proposal here, I should put it in Corefx repo. But I don't think this proposal is worthless. If you only have a music book, how would you program to play it using C#?

yaakov-h commented 7 years ago

C# shouldn't play any other note. 😄

orthoxerox commented 7 years ago

@ygc369 try https://github.com/naudio/NAudio

alrz commented 7 years ago

cool.

ygc369 commented 7 years ago

@orthoxerox NAudio does not support this. see https://github.com/naudio/NAudio/issues/206