QB64 Phoenix Edition
Silent Pause in PLAY being skipped - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10)
+---- Thread: Silent Pause in PLAY being skipped (/showthread.php?tid=1757)

Pages: 1 2


Silent Pause in PLAY being skipped - PhilOfPerth - 06-17-2023

I'm experimenting with the PLAY function, and am (once again) confused with one section, the P (for silent pause).
With the string below, I expected to play four notes of staccato duration, four of normal, and four of legato. 
It would then pause for 32 quarter-notes and then repeat. But the P32 seems to be ignored. 
Pauses of up to 64 quarter-notes are permitted, so why does this happen?  Huh

Code: (Select All)
Play "MS CCCC P8 MN CCCC P8 ML CCCC P32 MS CCCC P8 MN CCCC P8 ML CCCC"



RE: Silent Pause in PLAY being skipped - a740g - 06-17-2023

From  PLAY - QB64 Phoenix Edition Wiki
1 is a whole note and 4 is a quarter of a note etc.

Hence, P64 is actually 1/64 of a note. So, if you put something like a P1 in there, then you will get a good pause.


RE: Silent Pause in PLAY being skipped - mnrvovrfc - 06-17-2023

(06-17-2023, 12:59 AM)PhilOfPerth Wrote: It would then pause for 32 quarter-notes and then repeat. But the P32 seems to be ignored. 
Pauses of up to 64 quarter-notes are permitted, so why does this happen?  Huh

Unless you like your computer music at really v e r y s l o w tempos, you shouldn't get too heavy with "P32" and "P64".

Try the same thing but with "T32" as the first thing in the string. Cannot go any slower than that.

The numbers to use with "P" are confusing but they're going along with sheet music. "P4" is one beat and "P1" is one bar (four beats). The first one is the solid dot with an empty mast on it, and the second one is an open dot alone. Then to break down the "P4" one starts adding flags to the mast such as one flag for "P8". Need two "P8" to fill in a "P4". Again, this is what the Renaissance Italians primarily decided with sheet music.


RE: Silent Pause in PLAY being skipped - PhilOfPerth - 06-17-2023

Oh yes, of course!
I was reading it "backward", thinking it meant the number of seconds! Blush

A further, but related query:  I can't get the new "Q" argument to have any effect. Is there a demo of this somewhere?


RE: Silent Pause in PLAY being skipped - mnrvovrfc - 06-17-2023

"Q" is only to help reduce clicks between the notes sounding. You shouldn't worry about it too much.

If you want to change the volume of notes you must use "V" instead.


RE: Silent Pause in PLAY being skipped - PhilOfPerth - 06-17-2023

(06-17-2023, 02:12 AM)mnrvovrfc Wrote:
(06-17-2023, 12:59 AM)PhilOfPerth Wrote: It would then pause for 32 quarter-notes and then repeat. But the P32 seems to be ignored. 
Pauses of up to 64 quarter-notes are permitted, so why does this happen?  Huh

Unless you like your computer music at really v  e  r  y    s  l  o  w  tempos, you shouldn't get too heavy with "P32" and "P64".

Try the same thing but with "T32" as the first thing in the string. Cannot go any slower than that.

The numbers to use with "P" are confusing but they're going along with sheet music. "P4" is one beat and "P1" is one bar (four beats). The first one is the solid dot with an empty mast on it, and the second one is an open dot alone. Then to break down the "P4" one starts adding flags to the mast such as one flag for "P8". Need two "P8" to fill in a "P4". Again, this is what the Renaissance Italians primarily decided with sheet music.

Yes, thanks Minerva. I was aware of most of that from a previous music background; the bit I was missing was, as a740g explained, the P relates to the fraction of a quarter-notes, not
the number of quarter-notes. A silly error really!


RE: Silent Pause in PLAY being skipped - TerryRitchie - 06-17-2023

A little tune made with PLAY:

Code: (Select All)
CLS
LOCATE 12, 28
PRINT "The William Tell Overture."
LOCATE 13, 25
PRINT "(takes a few seconds to compile)"
M$ = M$ + "mfl16t155o2mnb4p8msbbmnb4p8msbbb8g#8e8g#8b8g#8b8o3e8o2b8g#8e8g#8b8g#8b8o3e8o2mnb4p8msbbmnb4"
M$ = M$ + "p8msbbmnb4p8msbbmnb4p8msbbb8bbb8b8b8bbb8b8b8bbb8b8b8bbb8b8mlb2b2b8p8p4p4p8mso1bbb8bbb8bbo2e8f#8g#8o1bb"
M$ = M$ + "b8bbo2e8g#g#f#8d#8o1b8bbb8bbb8bbo2e8f#8g#8eg#mlb4bmsag#f#e8g#8e8o3b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o4a"
M$ = M$ + "o3bo4ao3bp16mlg#o4g#o3mng#p16mld#o4d#o3mnd#p16mleo4eo3mnep16mlao4ao3mnap16"
M$ = M$ + "mlg#o4g#o3mng#p16mld#o4d#o3mnd#p16mleo4eo3mnep16mlao4ao3mnao4go3go4go3go4g"
M$ = M$ + "o3go4go3go4g8e8c8e8g#o3g#o4g#o3g#o4g#o3g#o4g#o3g#o4g#8e8o3b8o4e8g#o3g#o4g#o3g#o4g#o3g#o4g#o3g#o4msg#8mnf8c#8"
M$ = M$ + "f8a#o3a#o4a#o3a#o4a#o3a#o4a#o3a#o4a#8g8e8g8b8p16a#p16ap16g#p16f#p16ep16d#p16c#p16o3bp16a#p16"
M$ = M$ + "ap16g#p16f#p16ep16d#p16fmled#ed#mne8bbb8bbb8bbo4e8f#8g#8o3bbb8bbb8bbo4g#8a8b8p8e8f#8g#8p8o3g#8"
M$ = M$ + "a8b8p8p2o2bco3c#dd#eff#gg#aa#bco4c#d#ed#f#d#ed#f#d#ed#f#d#ed#f#d#ed#f#d#ed#f#d#ed#f#d#e"
M$ = M$ + "d#f#d#e8eo3eo4eo3eo4eo3eo4e8o3bo2bo3bo2bo3bo2bo3b8g#o2g#o3g#o2g#o3g#o2g#o3g8eo2eo3eo2eo3eo2eo3e8eee8"
M$ = M$ + "e8e8o2bbb8b8b8g#g#g#8g#8g#8eee8e8e8o1b8o2e8o1b8o2g#8e8b8g#8o3e8o2b8o3e8o2b8o3g#8e8b8g#8o4e4"
M$ = M$ + "p8eee8e8e8e8e4p8p16ee4p8p16o2ee2"
PLAY M$



RE: Silent Pause in PLAY being skipped - a740g - 06-17-2023

(06-17-2023, 03:19 AM)TerryRitchie Wrote: A little tune made with PLAY:
This is awesome. I made tiny changes to show the time left and give the user a chance to exit early.

Code: (Select All)
Locate 12, 28
Print "The William Tell Overture."
M$ = M$ + "mbl16t155o2mnb4p8msbbmnb4p8msbbb8g#8e8g#8b8g#8b8o3e8o2b8g#8e8g#8b8g#8b8o3e8o2m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#p16f#p16ep16d#p16f#mlef#g#mnamlg#abmno4c#o3mlbo4c#d#mnemld#ef#mng#ao3bo4ao3bo4a"
M$ = M$ + "o3bo4ao3bo4ao3bo4ao3bo4ao3bo4ao3bmlef#g#mnamlg#abmno4c#o3mlb"
M$ = M$ + "o4c#d#mnemld#ef#mng#ao3bo4ao3bo4ao3bo4ao3bo4ao3bo4ao3bo4a"
M$ = M$ + "o3bo4ao3bp16mlg#o4g#o3mng#p16mld#o4d#o3mnd#p16mleo4eo3mnep16mlao4ao3mnap16"
M$ = M$ + "mlg#o4g#o3mng#p16mld#o4d#o3mnd#p16mleo4eo3mnep16mlao4ao3mnao4go3go4go3go4g"
M$ = M$ + "o3go4go3go4g8e8c8e8g#o3g#o4g#o3g#o4g#o3g#o4g#o3g#o4g#8e8o3b8o4e8g#o3g#o4g#o3g#o4g#o3g#o4g#o3g#o4msg#8mnf8c#8"
M$ = M$ + "f8a#o3a#o4a#o3a#o4a#o3a#o4a#o3a#o4a#8g8e8g8b8p16a#p16ap16g#p16f#p16ep16d#p16c#p16o3bp16a#p16"
M$ = M$ + "ap16g#p16f#p16ep16d#p16fmled#ed#mne8bbb8bbb8bbo4e8f#8g#8o3bbb8bbb8bbo4g#8a8b8p8e8f#8g#8p8o3g#8"
M$ = M$ + "a8b8p8p2o2bco3c#dd#eff#gg#aa#bco4c#d#ed#f#d#ed#f#d#ed#f#d#ed#f#d#ed#f#d#ed#f#d#ed#f#d#e"
M$ = M$ + "d#f#d#e8eo3eo4eo3eo4eo3eo4e8o3bo2bo3bo2bo3bo2bo3b8g#o2g#o3g#o2g#o3g#o2g#o3g8eo2eo3eo2eo3eo2eo3e8eee8"
M$ = M$ + "e8e8o2bbb8b8b8g#g#g#8g#8g#8eee8e8e8o1b8o2e8o1b8o2g#8e8b8g#8o3e8o2b8o3e8o2b8o3g#8e8b8g#8o4e4"
M$ = M$ + "p8eee8e8e8e8e4p8p16ee4p8p16o2ee2"
Play M$

While Play(0) > 0 And _KeyHit <> 27
    Locate 13, 32
    Print Using "(### seconds left)"; Play(1); ' for QB64-PE v3.8
    'Print Using "(### seconds left)"; Play(0) / _SndRate; ' for QB64-PE v3.1 - v3.7
    _Limit 30
Wend

End



RE: Silent Pause in PLAY being skipped - GareBear - 06-17-2023

Take a look at line 1 and print how to exit. Some people need literal instructions. I used your code to figure it out. The ' _KeyHit <> 27' told me that you used the 'Esc' key. I have not seen this code before. I figured '_KeyHit' means something like a key pressed. '<>' other than 27. 27 is ascii for 'Esc'. I hope I did not over do the explaining on my part. I like what you did.


RE: Silent Pause in PLAY being skipped - bplus - 06-17-2023

(06-17-2023, 02:25 PM)GareBear Wrote: Take a look at line 1 and print how to exit. Some people need literal instructions. I used your code to figure it out. The ' _KeyHit <> 27' told me that you used the 'Esc' key. I have not seen this code before. I figured '_KeyHit' means something like a key pressed. '<>' other than 27. 27 is ascii for 'Esc'. I hope I did not over do the explaining on my part. I like what you did.

_Keyhit is alternate to INKEY$ returning a number as opposed to letter(s).

The QB64 IDE has handy Tool on main menu, 2nd down from Tool: "Insert Quick Keycode" which will insert keycode into your code with very next keypress combo you make. Further these numbers are positive of negative depending if you just pressed a key and are still holding down (better than Inkey$) or released (like Inkey$).

There is also a _KeyDown(Keynumber) option that works great for keypress combinations.
Shift = _Keydown(shiftKeyNumber) ' shift is true or false
Great for picking up Alt, Ctrl, Shift combos with regualar letter keys probably explained better in Wiki.