If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!
Moderators: Pete, Mods
- Posts: 38
- Joined: Wed Sep 14, 2005 7:37 am
I've noticed that some games have a bass and melody line both being played with what seems to be the QB PLAY command. Let me put this another way. Is it possible to have a bass and melody line using only the PLAY command?
Sure, if you know your music.
Code: Select all
The command Plays note C in eights
- Posts: 826
- Joined: Sun Jul 25, 2004 4:24 am
- Location: Quebradillas, PR
Using tone toggling (playing two notes in rapid succession) is how it's usually done with PLAY.
can you give the code again? something doesn't work
- Posts: 1169
- Joined: Thu Aug 19, 2004 6:08 pm
- Location: The wetlands of central Ohio, USA
I am not sure what you mean, but just check QB's inline help, it really is pretty thourough. Also, mate, it needs to be in quotes cuz its a string.
- Posts: 80
- Joined: Sat Feb 19, 2005 8:29 am
- Location: elsewhere
but just check QB's inline help, it really is pretty thourough.
It doesn't cover this.
Plays the note C for 1/4 the length of time that PLAY "C" plays it for.
Yes but it gives only one sound and not as I understood the note and its bass?
- Posts: 128
- Joined: Sun Aug 14, 2005 8:33 pm
- Location: Forest Lake, MN
The only way to do it is through tone toggling. The PC speaker has only one channel. You must learn to program the sound card in order to play both a bass line, and a melody, plus an additional amount of channels(that I coul not tell you because chances are my PC has a different sound card than yours...).
ok does anywhere know the actual note values or will i have to figure it out?
sound 520, 50 is playing C from 2nd octave up from middle C for 50 miliseconts
now i need C# D D# and so on or will i have to figure them out myself