Hello Friends,
I need your help to create simple sinwave sound generator in which i can customize frequency and duration.
can anybody help me to write its code?
Printable View
Hello Friends,
I need your help to create simple sinwave sound generator in which i can customize frequency and duration.
can anybody help me to write its code?
You perhaps should elaborate a bit for those of us who think a wav is a rough sea.
I may be off track, on your needs, but is this the area you are interested in -
http://www.planet-source-code.com/vb...65169&lngWId=1
or this -
http://www.planet-source-code.com/vb...64845&lngWId=1
I have seen this earlier but there are too many functions and i cannot understand the other functions
I only need that there is a text box for frequency and duration and play button to play that sine wave.
I need only simple code.
I have no idea if this will help you at all but it's all I have to offer and if it isn't just remember that little from some is better than a lot from others:)
i want to do something like this
Option Explicit
Option Base 1
Private Sub CommandButton1_Click()
Dim Sc(3) as integer
Dim Frequency=440
Dim Duration = 1000 ' in millisecond
Sc(1)=1
Sc(2)=1.125
Sc(3)=1.2
For i = 1 to 3
' some code is required to play the sine wave sound for above frequency and duration in which Frequency=440*Sc(i)
next i
End
That program I posted has everything you need. It has a Frequency generator, a duration generator, a sine wave and piano keys to give you your sound. I know nothing about sound but I looked at the code and it is very simple to understand even for me. You, who knows more about sound than I do should be able to figure out what you need and modify the code to suite your needs.