Author |
Message |
musicmaniac0428
|
Posted: Sat Dec 19, 2009 1:36 pm Post subject: Turing Music Programming Help |
|
|
I am new at turing but i am doing a project using the program. I am basically making a guitar hero style guitar that will have a button for each note and a strumming bar as well. In order for each note to be played the button for that note must be pushed down and so must the strumming bar. I am connecting it through the parallel port and there is a certain LED that will light up when each note is being played. I have never used turing so i REALLY need your help. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Sat Dec 19, 2009 2:22 pm Post subject: RE:Turing Music Programming Help |
|
|
I project might be somewhat ambitious, if you've never used Turing before.
Have you used any other programming language before? What are they teaching in class?
Although... I might be thinking of a more complicated version of the project than what you have planned. It could help if you were to describe what you are trying to build in more detail (will there be chords? How should timing be handled (too early/too late)? Will there be graphics on the computer screen? Will you see more than one note scrolling towards you? etc...) |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
musicmaniac0428
|
Posted: Sat Dec 19, 2009 3:02 pm Post subject: RE:Turing Music Programming Help |
|
|
The assignment is to use turing so i don't have much of a choice. There will only be 5 different notes (buttons) used so i doubt i will do chords, but it depends on what notes i end up using and if i can even figure it out. I wasn't even thinking about graphics i thought that may be too complicated. |
|
|
|
|
|
apomb
|
Posted: Sat Dec 19, 2009 4:07 pm Post subject: RE:Turing Music Programming Help |
|
|
well Tony, you might want to merge this and the other topic this guy made... since I replied to that one, didnt see this topic. |
|
|
|
|
|
mother teresa
|
Posted: Mon Feb 01, 2010 5:47 pm Post subject: RE:Turing Music Programming Help |
|
|
does anyone know how to pause music in turing?then restart form the pause? |
|
|
|
|
|
Turing_Gamer
|
Posted: Tue Feb 02, 2010 1:09 pm Post subject: Re: Turing Music Programming Help |
|
|
@mother teresa: There is no possible way to pause the music unless you are playing notes direct from the Turing language.
@musicmaniac0428: If you want a background music, then do the following...
1) Make a process (call it 'BGM', for example)
2) In the process, put Music.PlayFile ("PUT_SONG_HERE")
3) Before your main loop, fork the process
Note : Playing another file of the same extension will stop the previous song of that extension. I recommend for sound effects to use .wav and actual music to use .mp3
Now for your game, I suggest you use arrays for your notes and maybe a 'whatdotcolour' command where the notes hit the bar (an 'if' statement can include your LED). You will have to adjust the positions of each note manually till it is perfect. Make sure in your loop that you have 3 sections in the following order...
1) Controls
2) Drawing of picture (don't forget View.Update at the end only)
3) Changing variables (ex: speed of game, movement of notes)
2 and 3 can change places if you want...
My computer engineering class had to make a program that incorporated a controller. The majority programmed either a shooter or Guitar/Bongo Hero. Most of the games were successful. |
|
|
|
|
|
mother teresa
|
Posted: Tue Feb 02, 2010 4:48 pm Post subject: RE:Turing Music Programming Help |
|
|
thanks for the reply but dint help at all lol |
|
|
|
|
|
Turing_Gamer
|
Posted: Wed Feb 03, 2010 8:33 am Post subject: Re: Turing Music Programming Help |
|
|
I already tried to find a pause for the music. It's impossible, kind of how some games when you click pause still play music but at a lower volume.
As for the notes, I found that they can be paused when you press the stop button on the run window, but that halts the program. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
copthesaint
|
Posted: Wed Feb 03, 2010 6:09 pm Post subject: RE:Turing Music Programming Help |
|
|
if you are are allowed to use, http://compsci.ca/v3/viewtopic.php?t=21388
This will let you play music without slowing your games accual speed.
I do know how to pause music in turing, but it would require a fair amount of editing of this program I made a long while ago, and basicly I dont want to :/ I didnt comment as usual so It would take forever for me to remember what I did lol...
The basic idea is that it uses your lan to send information to the seperate program which runs music. |
|
|
|
|
|
mother teresa
|
Posted: Wed Feb 03, 2010 10:24 pm Post subject: RE:Turing Music Programming Help |
|
|
i tried your idea, I keep on getting errors my friend. |
|
|
|
|
|
copthesaint
|
Posted: Fri Feb 05, 2010 11:30 am Post subject: RE:Turing Music Programming Help |
|
|
Did you download the last upload? The first few post files have errors.
First open up the file 'Example.t'
Turing: | import (Launcher in "Launcher.tu")
var Music1 := Launcher.Open
var Music2 := Launcher.Open
Launcher.SendInfo (Music1, "HotNCold.mp3", 1, 0)
Launcher.SendInfo (Music2, "HotNCold.mp3", 1, 0) |
First line:
Turing: | import (Launcher in "Launcher.tu")
|
This, loads the class 'Launcher' in Launcher.tu
Lines 2 and 3:
turning: | var Music1 := Launcher.Open
var Music2 := Launcher.Open |
This initializes the music player.
Lines 4 and 5:
Turing: | Launcher.SendInfo (Music1, "HotNCold.mp3", 1, 0)
Launcher.SendInfo (Music2, "HotNCold.mp3", 1, 0) |
Sends to each music player the information to play the song "HotNCold.Mp3" (just change this to your music file),
Tells the music player to run the song "1", and tells the music player not to terminate "0".
You Will need the files Run_Music.exe, and launcher.tu with you main program
There is also the sorce code for Run_Music.exe, but I dont think you will need to see it unless you are making an online game and need to change the port.
So really, This can be used for anything, The only problem is that you need an open window I suggest if you want music and sound effects open two (like above) and just keep them open until your main program is terminated. |
|
|
|
|
|
mother teresa
|
Posted: Fri Feb 05, 2010 8:02 pm Post subject: RE:Turing Music Programming Help |
|
|
wow thanks ill check it out |
|
|
|
|
|
copthesaint
|
Posted: Mon Feb 08, 2010 1:22 am Post subject: RE:Turing Music Programming Help |
|
|
Well If your teacher allows you to use it, and you get it working, then check mark that your topic is answered to |
|
|
|
|
|
mother teresa
|
Posted: Mon Feb 08, 2010 8:12 am Post subject: RE:Turing Music Programming Help |
|
|
no its good my teacher is a push over lol |
|
|
|
|
|
Turing_Gamer
|
Posted: Mon Feb 08, 2010 8:32 am Post subject: Re: Turing Music Programming Help |
|
|
Lucky you |
|
|
|
|
|
|