Blockly play-note-for block simulation

coparu67

Senior Member
Blockly
I think the duration in "play-note-for" block is a bit strange during simulation.
For example if you simulate in picaxecloud the default "play-note-64-for-500" yo get a 0.5s sound.
If you simulate in PE6 you get a 2.5 sound.
But if you run in a PICAXE-18 you get a 5s sound.

Could you check that?
 

Technical

Technical Support
Staff member
Thanks for the report, we'll look at correcting the blockly simulation length of note.

Note also that the maximum valid value in a sound command (in BASIC) is 255, using 500 will actually get you the byte overflow amount of 244 (=244 x 10ms = 2.44 seconds).

In Blockly the unit is ms instead, so the BASIC generated from Blockly should be the ms value / 10 (which is where the current error is).
 
Last edited:
Top