• Log in or sign up for an account here: https://www.sythe.org/login

Guitar hero project?

Status
Not open for further replies.

kharg0

Active Member
Joined
Feb 25, 2007
Sythe Gold
0
Messages
131
Guitar hero project?
I'm in the midsts of creating a guitar hero with visual basic i have button pressing down but i need more (i also have the part that makes the pictures move across the page)

what i need is... i need some one who can help me make this by, using a location to see if you missed the note...

i have..
Code:
if picturebox1.location.x = 10 or 15 or 20 or 25 or 30 or 35 or 40 or 45 or 50 then picturebox1.location.x = 0


eDIT!
Already a new update now i am able to press a key and send the notes down a line


Edit...
Code:
Public Class Form1
    Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
    Public Const VK_F9 = &H78

    Private Sub PictureBox9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox9.Click
        Me.Close()
    End Sub

    Private Sub Keyboardtimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Keyboardtimer.Tick
        If GetAsyncKeyState(Keys.F1) And PictureBox10.Location.Y = 550 Or 545 Or 540 Or 535 Or 530 Or 525 Or 520 Or 515 Or 510 Or 505 Or 500 Then
            keytime.Enabled = False
            PictureBox10.Location = New Point(PictureBox10.Location.X, PictureBox10.Location.Y = 0)
            keytime.Enabled = True
        Else : My.Computer.Audio.Play("C:\WINDOWS\Media\chord.wav", AudioPlayMode.Background)
        End If
        If GetAsyncKeyState(Keys.F2) And PictureBox12.Location.Y = 550 Or 545 Or 540 Or 535 Or 530 Or 525 Or 520 Or 515 Or 510 Or 505 Or 500 Then
            t2.Enabled = False
            PictureBox12.Location = New Point(PictureBox12.Location.X, PictureBox12.Location.Y = 0)
            t2.Enabled = True
        Else : My.Computer.Audio.Play("C:\WINDOWS\Media\chord.wav", AudioPlayMode.Background)
        End If
        If GetAsyncKeyState(Keys.F3) And PictureBox13.Location.Y = 550 Or 545 Or 540 Or 535 Or 530 Or 525 Or 520 Or 515 Or 510 Or 505 Or 500 Then
            t3.Enabled = False
            PictureBox13.Location = New Point(PictureBox13.Location.X, PictureBox13.Location.Y = 0)
            t3.Enabled = True
        Else : My.Computer.Audio.Play("C:\WINDOWS\Media\chord.wav", AudioPlayMode.Background)
        End If
        If GetAsyncKeyState(Keys.F4) And PictureBox14.Location.Y = 550 Or 545 Or 540 Or 535 Or 530 Or 525 Or 520 Or 515 Or 510 Or 505 Or 500 Then
            t4.Enabled = False
            PictureBox14.Location = New Point(PictureBox14.Location.X, PictureBox14.Location.Y = 0)
            t4.Enabled = True
        Else : My.Computer.Audio.Play("C:\WINDOWS\Media\chord.wav", AudioPlayMode.Background)
        End If
        If PictureBox10.Location.Y = 555 Then
            My.Computer.Audio.Play("C:\WINDOWS\Media\chord.wav", AudioPlayMode.Background)
        End If
        If PictureBox12.Location.Y = 555 Then
            My.Computer.Audio.Play("C:\WINDOWS\Media\chord.wav", AudioPlayMode.Background)
        End If
        If PictureBox13.Location.Y = 555 Then
            My.Computer.Audio.Play("C:\WINDOWS\Media\chord.wav", AudioPlayMode.Background)
        End If
        If PictureBox14.Location.Y = 555 Then
            My.Computer.Audio.Play("C:\WINDOWS\Media\chord.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Keyboardtimer.Enabled = True
    End Sub

    Private Sub keytime_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles keytime.Tick
        PictureBox10.Location = New Point(PictureBox10.Location.X, PictureBox10.Location.Y + 5)
    End Sub

    Private Sub t2_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t2.Tick
        PictureBox12.Location = New Point(PictureBox12.Location.X, PictureBox12.Location.Y + 5)
    End Sub

    Private Sub t3_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t3.Tick
        PictureBox13.Location = New Point(PictureBox13.Location.X, PictureBox13.Location.Y + 5)
    End Sub

    Private Sub t4_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t4.Tick
        PictureBox14.Location = New Point(PictureBox14.Location.X, PictureBox14.Location.Y + 5)
    End Sub

    Private Sub PictureBox5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox5.Click
        keywait.Enabled = True
        w2.Enabled = True
        w3.Enabled = True
        w4.Enabled = True
    End Sub

    Private Sub keywait_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles keywait.Tick
        keytime.Enabled = True
    End Sub

    Private Sub w2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles w2.Tick
        t2.Enabled = True
    End Sub

    Private Sub w3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles w3.Tick
        t3.Enabled = True
    End Sub

    Private Sub w4_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles w4.Tick
        t4.Enabled = True
    End Sub
End Class

thats my code overall but im still getting problems
1.when i start up my program the pictures just shake? (look at keyboardtimer because it starts on form load)
 
Guitar hero project?
I don't think it would work because you need to specify each time what needs to be that number in an if statement you can't just go and 35 or 40 or 45.

You should try shortening your if statements like so.

Code:
if picturebox1.location.x >= 10 and picturebox1.location.x <= 50 then picturebox1.location.x = 0
 
Guitar hero project?
omg thanks i needed that so bad
i was wondering how to put a range instead of random numbers
thanks man

1>!!!!!!!!!!!!!!! ok i need to know why it's ignoring my requests

i tell it
Code:
If GetAsyncKeyState(Keys.F1) And PictureBox10.Location.Y >= 400 And PictureBox10.Location.Y <= 550 Then

and it doesnt work? is there something wrong with my code ??

please help with this soon
peace out b town..
 
Guitar hero project?
Ok here is a working example that I tried myself. It is shorter and cleaner.

Code:
    Dim minallow As Integer = 450
    Dim maxallow As Integer = 500

    Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        If e.KeyCode = Keys.F9 Then
            If PictureBox1.Location.Y >= minallow And PictureBox1.Location.Y <= maxallow Then
                PictureBox1.Location = New Point(PictureBox1.Location.X, 0)
            End If
        End If
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If PictureBox1.Location.Y <= maxallow Then
            PictureBox1.Location = New Point(PictureBox1.Location.X, PictureBox1.Location.Y + 5)
        Else
            ' Missed note
            PictureBox1.Location = New Point(PictureBox1.Location.X, 0)
        End If
    End Sub
 
Guitar hero project?
Aight thx stuart real big help really

my stupid program it wont work rite ill try a diff prog

?!?! somethings wrong with my code somewhere it works wen i start over on a new application but not wih the one im using
 
Guitar hero project?
nicely done stuart your in my credits as a partner

and i fixed the problem

do know of a way we cloukld nake ikt random beats not just all in a pattern

Perfect idea hard code.. we could use import music and if vb can do this scan the music for loud parts and spft partsand send the correct key down when it hard or soft!

if anyone who owns vb hard knows how to do this please post

please reply any post would be nice,
 
Guitar hero project?
just if you wanted to know this already exists i dont know if its on visual basic but this is its name Frets on Fire you can get ideas from it and make them better
 
Guitar hero project?
Yeah, Frets on Fire is another guitar hero clone, and it's very good. You can make your own songs, or import them from Guitar Hero.

Instead of just re-inventing the wheel, you should try and help improve Frets on Fire. It's open source so you can easily edit and change it.

Also, Frets on Fire is written in Python so it'd be pretty easy for you to pick it up and be able to follow the code quite easily.
 
Guitar hero project?
yea my prob with frets on fire is that my cp is crap and wont load it so im making my own and theres also flash hero for computer its online how do u edit frets on fire?

and i coukld use an ax media player to play the song then use a sound recorder to record and listen?
 
Guitar hero project?
hi... i'm making a guitar hero project with visual basic... i can understand your code except one part: "timer1.tick"

what is that?
 
Status
Not open for further replies.
Runescape Gamblingrunescape gambling
Back
Top