QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: Richard on March 11, 2021, 09:12:27 pm
-
I just tried using PLAY for the very first time and to me the code does not play as i expected.
Play "ABCDEFG>ABCDEFG>ABCDEFG>ABCDEFG>ABCDEFG>ABCDEFG>ABCDEFG"
Any comments?
Using QB64 v1.5 Windows 10 x64
-
How do you expect it to play?
-
'maybe <6 octaves
Play "o1CDEFGab>CDEFGab>CDEFGab>CDEFGab>CDEFGab"
doh ray me... usually starts on C a scale without sharps or flats.
-
@bplus
Thanks - you have summarized PLAY in one line of code for me.
Now got the result expected - a monotonic increase in frequency.
Any way to adjust volume individually for each key?
-
http://www.qb64.org/wiki/PLAY (http://www.qb64.org/wiki/PLAY)
-
SpriggySpriggs is right!
see important notes on PLAY
MB will allow music to play while program code progresses. MF will wait for code to continue playing notes.
Command string values are not case sensitive and spacing is ignored. Use upper or lower case as desired.
NOTE: In QB64, PLAY may NOT delay program progress! Use _DELAY and END to allow music completion.
-
While playing around with PLAY the following does not play for me
According to both the IDE help wiki and @SMcNeill downloaded Wiki (NOV 2020) - the note length can be any value between 1 and 64.
Also, for me, the IDE help wiki appears to have some "garbage" e.g. in the Tn -Tempo section of PLAY.
-
Not a fault with QB64 (really a "timing" aspect to be aware of)...
Consider the code below
Different duration (for me) with/without the _DELAY 1 line
I may have "lost" the play sound in PLAY "L8N65" in my QB64 programs because of timing concerns (not having _DELAY 1).
So, yes, PLAY works with "L64" as well.