March 13, 2020
jinglebell = Ed.TuneString(“e4e4e4Re4e4e4Rz”)
while Ed.ReadMusicEnd() == Ed.MUSIC_NOT_FINISHED:
Im new to edison robot and when I typed in this code, it said syntax error, incorrect argument used in Ed.TuneString1 called.
my question is why would that happen and how to fix it.
September 2, 2019
Yes, I can help you with this. TuneString can be a little bit tricky to work with.
Here is an example working TuneString, including rests:
I can see a few issues with your TuneString function parameters:
1) You need a size parameter before your tune. This is the length of the tune string – the count of the characters in it. (eg the 9 above)
2) You need to specify a duration for your rests the same as for notes, eg ‘r4’
3) There is a small error in the documentation, rests need to be lowercase ‘r’, not uppercase ‘R’
Have another go with this information, and let me know how you go!