Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

C# I just want to know how I could write a code in c# that plays a sound in a certain frequency.

Guitar

New Coder
So I’m a guitarist. im also bored with life. So instead of playing guitar like a normal person, I’d rather have a program running that makes the guitar say pogchamp in a frequency depending on the note being played. Yes. I’m that stupid. Any way, is there a way that I can make the frequency adjust depending on the incoming note? so it just checks the frequency, and then that frequency is what pogchamp is set to, goes into the amp, and then that’s what you hear.

if you have any advice to give me, thank you in advance
 
Saw a post on Ultimate Guitar about Zoom MS50 linking here, so followed out of interest.
In answer to your question... generally speaking, the pitch of an audio tone can be determined by doing an FFT and finding the fundamental frequency. An FFT will decompose a complex audio waveform to a series of sine-waves. Usually, the one with the greatest amplitude is the fundamental, and the bucket it falls into will determine the frequency, or note being played. This is not a perfect way of doing this but it will give you a start.
When you say "say pogchamp", do you mean play an audio sample with the word "pogchamp" being spoken? If so, the correct way to do this is to use a Vocoder. This is a bit of signal processing that sort of modulates a sample to apply an audio tone to it... like a primitive Autotune type thing.

Stackoverflow is full of C# examples for this stuff. Never used C# much beyond a bit of REST stuff, so can't help with the actual coding, but the DSP stuff is pretty standard regardless of language.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom