: : : Hello Everybody,
: : :
: : : I'm new to programming. I have knowledge of C and C++.Now, I need to generate a 10KHz audio signal from a sound card and thereafter perform signal processing at the receiving end.
: : :
: : : I'm not able to understand how to start.Can anybody give similiar examples which could help me out?
: : :
: : : Thanking you,
: : : vasu.
: : :
: : hi vasu,
: : to do it in realtime vc++ is a good tool, else vb can also be considered.
: : srikanth.
: : Regards
: : srikanth
: Hello Srikanth!
: Thanks for replying me. Yes! many people advised me to do in VC++ as
: it is device independent.Let me tell you that I just know C and C++
: programming but I have'nt worked in this kind ever before.
: I tried to play and read some .wav files using C++ programs.But I'm
: really confused about how to start a program generating a 10KHz
: signal.Somone advised me to learn windows programming before going
: to the actual one.
: Kidly inform me the basic topics I need to learn and also help me
: finding any similiar programs available so that I could get an idea.
: Thanking You,
I suggest playing with trig functions. sin(x*10) will give you a good
sine wave with a freq of 10Hz (I think) but try combining waves, etc.
Sound is all about waveforms, and in order to generate them correctly,
(Without going to college again) is to experiment...
OUT &H61, COS(X*10)*10
will give you a wave with freq of 10Hz, and amplitude of 10.
I suggest dictionary.com before you ask me anything like
"What's amplitude?" So, just experiment, and see what works how.
PS. I am a QBASIC programmer, and I am also a little
good at C++, but QBASIC is second nature, so paraphrase
into preferable language.
PPS. If you wanted to ask, I wanted to make techno
a while back, so I started playing with my soundcard
(&H220, usually SB, but &H61, always PC SPK, only good
for simple waves and chirps (unless, sometimes laptops
will do more depending on the driver for built in SPK))
But, in your case, I would try:
OUT &H61, COS(X*10000)* [Intended Amplitude]
That should do it.