Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 136,412 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,453 people online right now. Registration is fast and FREE... Join Now!




signal generator

 
Reply to this topicStart new topic

signal generator, sinewave

warlock87
15 Oct, 2008 - 03:47 AM
Post #1

New D.I.C Head
*

Joined: 19 Feb, 2008
Posts: 4

CODE
Public Class Form1

    Private Sub btnCreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreate.Click
        Dim wave(0 To 255) As Byte
        Dim i As Integer
        For i = 0 To 127
            wave(i) = i
        Next i
        For i = 128 To 255
            wave(i) = 255 - i
        Next
        sfd1.ShowDialog()
        My.Computer.FileSystem.WriteAllBytes(sfd1.FileName, wave, False)
    End Sub

    Private Sub btnQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQuit.Click
        Me.Dispose()
    End Sub
End Class

i am trying to create a sine wave can anyone help me
User is offlineProfile CardPM
+Quote Post

magicmonkey
RE: Signal Generator
15 Oct, 2008 - 07:12 AM
Post #2

D.I.C Regular
***

Joined: 12 Sep, 2008
Posts: 418



Thanked: 68 times
My Contributions
Looks like you are making more of a triangle wave, you need the right formula, look at Math.Sin(a) and google sine wave to grab the correct formula.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 12:25PM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month