Mobsya / blockly

The web-based visual programming editor.
https://developers.google.com/blockly/
Apache License 2.0
1 stars 9 forks source link

Cannot play music in Blockly #11

Open motib opened 7 years ago

motib commented 7 years ago

Blockly supports "play ..." but there is no way to specify that the execution pause until the sound is finished. In Scratch, there is an additional block "play ... until done" and something similar should be here.

Another issues: there should be a "rest" note like in VPL.

stephanemagnenat commented 7 years ago

The current design of blockly for Thymio is to be a dumb layer on top of aesl. In particular, it does not do any "purely-event based" to "sequential" code conversion. Therefore, to properly handle sound, one needs to use a global variable and the event "on sound finished playing".

motib commented 7 years ago

We have to look at the intended users. In our case it is not people going "down" from aesl to blockly, but kids who know scratch going "up" to scratch or blockly for robotics activities. Playing a tune is lots of fun and should be easy to do. Furthermore, from a pedagogical point of view, playing a tune would be taught much, much earlier (perhaps even to an earlier age group) than global variables.

So I would like to request that this mod have a relatively high priority. In fact, this is more important that the earlier issues on the environment.

stephanemagnenat commented 7 years ago

I agree, but to do it properly, we need support for translating durative code into purely event-based one, as I did for an example in botspeak. Doing so with Blockly requires a redesign of its interface with Aseba, and so this is not trivial. But I fully agree from the point of view of the user.