GLOBAL SITE AUSTRALIAN SITE

incorrect argument used in Ed.TuneString called | EdPy Programming | Forum

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Topic3
incorrect argument used in Ed.TuneString called
March 13, 2020
7:16 am
Lok
New Member
Members
Forum Posts: 2
Member Since:
March 13, 2020
sp_UserOfflineSmall Offline

jinglebell = Ed.TuneString(“e4e4e4Re4e4e4Rz”)
Ed.PlayTune(jinglebell)
while Ed.ReadMusicEnd() == Ed.MUSIC_NOT_FINISHED:
pass

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. 

Thank you

March 13, 2020
9:40 am
Adrian Herber
Admin
Forum Posts: 20
Member Since:
September 2, 2019
sp_UserOfflineSmall Offline

Hi Lok,

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:

simple = Ed.TuneString(9, “d4d4r4f4z”)

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!

March 13, 2020
5:43 pm
Lok
New Member
Members
Forum Posts: 2
Member Since:
March 13, 2020
sp_UserOfflineSmall Offline

thank you very much

  • Keep up with Edison

    Sign up for our newsletter to get all things Edison delivered straight to your inbox.

  • This field is for validation purposes and should be left unchanged.

Heads up

The Australian Federal Parliament has passed a law that extends goods and services tax (GST) to low value imports of physical goods imported by consumers from 1 July 2018.

This means that all customers purchasing Edison robots and accessories with an Australian shipping address must now pay GST. The GST will be automatically added to your purchase and show as a line item on your invoice.

We've detected that you are in Australia, so we wanted to let you know that we have changed your settings to view our Australian site, which displays GST inclusive pricing.

You can change back to the GLOBAL SITE at any time using the link in the top left of the page.

OK got it!    Take me to the GLOBAL SITE instead

Country

Pin It on Pinterest

Share This