Reference.RobotPlayMelody History

Hide minor edits - Show changes to markup

May 15, 2013, at 09:32 AM by Scott Fitzgerald -
Changed lines 7-8 from:

Plays a melody according to a string of music notes. The input string also contains information about note duration, as well as silences. Must be preceded by Robot.beginSpeaker() in setup().

to:

Plays a melody according to a string of music notes. The input string also contains information about note duration, as well as silences. Must be preceded by Robot.beginSpeaker() in setup().

May 03, 2013, at 11:20 AM by Xun Yang -
Changed lines 1-2 from:
to:
April 14, 2013, at 12:15 PM by Scott Fitzgerald -
Changed lines 1-2 from:

playMelody(melody)

to:

Robot?

playMelody()

Changed lines 7-8 from:

Play melody according to a string of music notes.

to:

Plays a melody according to a string of music notes. The input string also contains information about note duration, as well as silences. Must be preceded by Robot.beginSpeaker() in setup().

NB : when a melody is playing, all other processes stop

Syntax

Robot.playMelody(melody)

Changed lines 17-18 from:

melody: A string composed of notes to be played.

to:

melody: A string of notes to be played and their duration.

Changed lines 20-42 from:

c play "C"
C play "#C"
d play "D"
D play "#D"
e play "E"
f play "F"
F play "#F"
g play "G"
G play "#G"
a play "A"
A play "#A"
b play "B"
- quite note

1 Set as full note
2 Set as half note
4 Set as quarter note
8 Set as eigth note

. Make the previous note 3/4 its length

to:

Notes

  • c : play "C"
  • C : play "#C"
  • d : play "D"
  • D : play "#D"
  • e : play "E"
  • f : play "F"
  • F : play "#F"
  • g : play "G"
  • G : play "#G"
  • a : play "A"
  • A : play "#A"
  • b : play "B"
  • - : silence

Duration

  • 1 : Set the following as full notes
  • 2 : Set the following as half notes
  • 4 : Set the following as quarter notes
  • 8 : Set the following as eigth notes
  • . : Make the previous note 3/4 its length
Added line 50:
Added line 55:
Changed lines 63-67 from:

Note

Robot.beginSpeaker() is needed for Robot.playMelody.

The programme is paused when the melody is being played.

to:
Changed line 68 from:
to:
April 11, 2013, at 08:15 PM by Xun Yang -
Changed lines 55-56 from:

Robot.readySpeaker() is needed for Robot.playMelody.

to:

Robot.beginSpeaker() is needed for Robot.playMelody.

Added line 63:
April 11, 2013, at 08:13 PM by Xun Yang -
Changed line 61 from:
to:
April 11, 2013, at 08:03 PM by Xun Yang -
Changed line 45 from:
  Robot.readySpeaker();//Initialize the sound module
to:
  Robot.beginSpeaker();//Initialize the sound module
March 29, 2013, at 05:04 PM by Xun Yang -
Changed line 45 from:
  Robot.readySpeaker();
to:
  Robot.readySpeaker();//Initialize the sound module
Added lines 55-56:

Robot.readySpeaker() is needed for Robot.playMelody.

March 29, 2013, at 05:01 PM by Xun Yang -
Added line 26:
Added line 32:
Changed line 60 from:
to:
March 29, 2013, at 05:00 PM by Xun Yang -
Added lines 1-58:

Share