
dodi
Some nice actions have been added to the latest update :-)
But with the differences a couple of programming questions arise. First one: how to play music and dance together?
In the old program the Dance action started together with the music, in both music editor and interface. Now the action is not started together with the music, neither in the music editor nor in the interface. I only could find a solution for the interface, where the old button script started both the music and action. But where was the action started when playing in the music editor?
Second: how to stop an action in music and script editor? There exists a Run button in the script editor, that seems to do nothing? In the music editor, Play started both the music and the action, but Stop only stops the music! For stopping the action I have to close the editor, then locate the AutoPosition window with the Stop button for the action. The new version requires to add actions in the music editor, but it also only allows to Play and Stop the music, not stopping the current script?
Now I'm missing some instructions in the tutorials, how to handle above issues. And I'm missing Stop buttons in the editors, that stop both the music and the related actions.
The Panic Release button also is unavailable as long as an editor window is open, increasing the panic when something goes wrong :-( And how to restore normal operation after pressing the Panic button?
And another one: how to put or edit text in the Notepad?
To add events to the sounds
Under Cheat Sheet on the right of the script area are click and paste controlcommands for any control in your project, click on them and they are added to the script.
The scripts stop when they run out of commands to carry out. To look at it another way, say you want someone to get some water from your tap, that person has no idea how to get water from a tap, much like your robot not knowing anything at all.
So you tell them the tasks they need to carry out to achieve your request.
However, if you simply stopped giving commands after 1. above the water would continue to flow. The stop button in ARC scripts simply stops scripts issuing more commands. So if the script has opened a tap or set a H-Bridge to move a motor clockwise, simply stopping sending further commands wont stop the water flowing or motor moving, you need to issue commands to stop the water/motor.
DJ explained it a few years back using chickens as the subject matter, I will search and find that topic shortly (it's a good one, it stuck in my mind and helped me understand).
In short, to stop actions that you have started you need to send a command to stop them, the script ending will not stop them.
Edit: Here is the topic I mentioned about chickens.
DJ's amazing explanation:
To add text to the notepad, and please keep with me on this one as it's pretty complex...
:D
I expected an cursor to occur at the place where the notepad was clicked. This seems not to work, instead the arrow keys have to be used to move the cursor to the insertion point. That's not what one can expect from a Windows notepad, and caused my confusion.
Just tested: a double click will move the cursor, but at the same time it will select the word near the clicked location.
Thanks for your hints :-)
That's only half the truth, does not answer my questions :-(
First a correction: Music editor seems never to execute actions by itself; dunno why I thought it did before the update :-(
Thus it looks like actions must be added explicitly to the music, either in the music editor, or by starting both music and action at the same time, in a button click script in the interface.
It also looks like the invocation of a script stops the previously active script, as can be observed in the music editor. This feature allows to stop some lengthy action (Dance), when the music reaches the next marker (with a Stop action). But when the music is stopped manually, the next marker will not be reached, and the previous script will continue. That's not very convenient when editing a new choreography, because then the music editor must be closed and the ongoing action must be stopped in the AutoPosition window.
In the Interface window, however, it's possible to add an Stop button with some action script, that causes to stop both the music and action when clicked.
If you read through the rest of my reply and read through DJ's chicken analogy it answers the question on why pressing stop on a script does not stop an action. You must tell it to stop the action, I use the stop position in Auto Position to stop an action running, this returns the robot to it's normal, stopped position. You must also tell music to stop playing, motors to stop spinning, etc.
At the end of a set of instructions to build something or if you stopped reading the instructions part way through would that thing return to it's unbuilt state? No, it would remain part built. The same applies to the set of instructions which are within an EZ-Script.
Some commands can execute in parallel (independently), others only allow for sequential execution. Independent commands, like moving and playing music, must be stopped individually. It's unclear yet which movements can execute independently, when they affect different ports. At least positional actions (sequences of frames) can be stopped by starting another action. The HBridge (moving the Roli) seems to work independent from actions, too, so that a Stop action will keep an rolling Roli rolling.
Now the question is, how to determine what's currently possibly going on in parallel, so that a Stop script can really stop at least all movements. The same for starting movements, like when the Roli should start moving after picking up or depositing something, not while currently performing some action.
Another one: the HBridge can be steered from the controls, or from the keyboard (arrow keys). Is it possible to make the Roli move only as long as a button is pressed? How that? Does there exist something like an On Released script, in addition to the On Pressed script?