Turing Piano Program
Author |
Message |
ashkie
|
Posted: Wed Jun 08, 2011 8:15 pm Post subject: Turing Piano Program |
|
|
What is it you are trying to achieve?
What I am trying to do is make a one octave piano from a lower c to an upper c.
What is the problem you are having?
Once you get to the notes where you need to increase an octave (2a>, etc.) and you try pressing a lower octave key again, the lower octave key is in a higher octave than it previously was. I want this to stop, as I want the program to simulate a real piano.
Please specify what version of Turing you are using
4.1.1 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: Wed Jun 08, 2011 8:26 pm Post subject: RE:Turing Piano Program |
|
|
You'll probably need a variable to keep track of which octave you're at. If you want a low-C, and you're currently at a high octave, reduce the octave, then play the note. If you're at a low octave and want a high-C, increase the octave and play the note.
The important bit is storing which octave you're at. |
|
|
|
|
![](images/spacer.gif) |
klutzedufus
|
Posted: Sat Jul 02, 2011 5:13 pm Post subject: Re: Turing Piano Program |
|
|
if chars (';') then
Music.Play ( ">2c" )
end if
The problem with this is that it's raising the octave, and not lowering it again after. I had a similar problem when I was trying to make a song playing program. It should look like:
if chars (';') then
Music.Play ( ">2c<" )
end if |
|
|
|
|
![](images/spacer.gif) |
Raknarg
![](http://compsci.ca/v3/uploads/user_avatars/3745510004d8be6689b92f.jpg)
|
Posted: Mon Jul 04, 2011 10:36 am Post subject: RE:Turing Piano Program |
|
|
if you want to simplify it, you could have it play an mp3 for the notes instead. |
|
|
|
|
![](images/spacer.gif) |
|
|