Sine Wave Sound
-
How can i generate the sine wave sound in VB? I want to generate the sine wave sound for customized duration and customized frequency Any help?
-
How can i generate the sine wave sound in VB? I want to generate the sine wave sound for customized duration and customized frequency Any help?
Hello search for fmod sound engine(fmod.dll) usage.
-
How can i generate the sine wave sound in VB? I want to generate the sine wave sound for customized duration and customized frequency Any help?
Hello, declare:
Private Declare Function MakeSound Lib "kernel32" (ByVal soundFrequency As Int32, ByVal soundDuration As Int32) As Int32
after that you can call for the MakeSound([frequency in hz],[duration in ms]) function and the computer will generate the tone trough its speakers.
-
Hello, declare:
Private Declare Function MakeSound Lib "kernel32" (ByVal soundFrequency As Int32, ByVal soundDuration As Int32) As Int32
after that you can call for the MakeSound([frequency in hz],[duration in ms]) function and the computer will generate the tone trough its speakers.
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 next i End
-
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 next i End
try this:
Option Explicit
Option Base 1Public Class NameYourClass
Private Declare Function Beep Lib "kernel32" (ByVal soundFrequency As Int32, ByVal soundDuration As Int32) As Int32
Private Sub CommandButton1_Click()
Dim Sc(3) as integer
Dim Frequency as int32 = 440
Dim Duration as int32 = 1000 ' in millisecond
Sc(1)=1
Sc(2)=1.125
Sc(3)=1.2For i = 1 to 3
Beep(Frequency, Duration)
next i
End sub
End Classnote: i just putted a class around it so you could see where to paste what.
-
try this:
Option Explicit
Option Base 1Public Class NameYourClass
Private Declare Function Beep Lib "kernel32" (ByVal soundFrequency As Int32, ByVal soundDuration As Int32) As Int32
Private Sub CommandButton1_Click()
Dim Sc(3) as integer
Dim Frequency as int32 = 440
Dim Duration as int32 = 1000 ' in millisecond
Sc(1)=1
Sc(2)=1.125
Sc(3)=1.2For i = 1 to 3
Beep(Frequency, Duration)
next i
End sub
End Classnote: i just putted a class around it so you could see where to paste what.
hi nick Actually i don't want to use the beep function but to generate the sine wave sound
-
hi nick Actually i don't want to use the beep function but to generate the sine wave sound
isnt that just a very long beep? note that the kernel32 beep isnt the .net beep (the .net beep will give you the windows error 'klunk' while the kernel32 beep will generate a tone with the given amount of hertz during the given amount of milliseconds) but now that i think about it, not sure how it works with the 'wave' part.. did i quick google for ya and found this[^] its in vb6 a bit old...and not directly what you need. but it might be able to help you (or so i think)
-
hi nick Actually i don't want to use the beep function but to generate the sine wave sound
see www.3dstate.com about using fmod functionality for 3d games.spacially horn sample.