I figured it out!

I got it! Thanks to more help from Rowena in clearing things up.

To be able to ensure a player only gets a point if the falling sprite reaches the yellow bit at the bottom I had to separate each of the sprites into one for each x-coordinate (aka each note).

For example, all of the falling sprites for B (x = 114) were clones of the same sprite which I called “B”… I’m super creative like that!

You’ll notice that I’ve also deleted all of the “switch costume to ___” which used to look like:

I had this in the original coding because our model game on scratch included this however we only needed the same costume for that sprite every time it created a clone to fall from the top of the screen.

Side Note: I tell the program to create a “clone” of the sprite so that when it passes y-coordinate = -130 and deletes itself, the sprite still exists in order to appear for the next falling sprite for that note (rather than making an individual sprite for every falling sprite).

The original sprite is always hidden and stationary somewhere on the screen as it is told in:

Back to how I figured out the scoring…

Once I had created a falling sprites for each note, I was then able to tell it when and how to change the score:

Explaining from top to bottom:

  • When the clone is created,
  • Show clone (unlike the original which is always hidden on the screen),
  • Set to the x-coordinate stated in the other section of the falling sprite code that you can see at the top of this post,
  • Set y coordinate to 180
  • Once the clone is created change y coordinate by -2 continuously,
  • Meanwhile, if the clone touches any yellow on the screen at the same time as the “i” key is pressed on the computer keyboard (this is triggered when B on the large scale floor piano is touched –> see my earlier post “Remapping the Makey Makey” from November 17th),
  • The score is increased by 1,
  • Wait 0.5 seconds (this was added to the code because the computer was adding 60+ points for 1 correct note. It turns out that the computer was just so fast that it processed the one note being hit multiple times before it deleted itself at y=-130),
  • Also, when the falling sprite clone falls below y coordinate -130,
  • Delete clone.

The only difference in the white and black notes is the colour that it should be touching to get a point (black notes use green dots rather than yellow) and the y coordinate that it deletes itself at is y < -76 rather than y < -130.

For “Here Comes the Sun” players can get a maximum score of 48. As I mentioned in my last post, I have created different backgrounds to provide feedback in relation to the final score. Since that last post, I also added an extra background which says “Perfect!” which (as you guessed) pops up if someone gets a perfect score.

I also changed the amount of points required to get “You Rock!” as I feel 32/48 is still a pretty good score.

Published by jessicasuann

I am a student at Sydney Conservatorium of Music studying a Bachelor of Music (Education). I major in Classical Voice however throughout my studies I have practiced using a variety of pitched and non-pitched percussion, piano, guitar, and most recently; trumpet. Throughout my studies I've not only learnt how to encourage my future students to have an appreciation for music but have also extended my own appreciation and passion for music through exposure to a variety of new ways to express my musicality and experience music (predominately through technology and unique ensemble opportunities). Let's move away from "theory" vs "prac" structured lessons and adopt a more hands-on approach to music education. For a creative subject we should be teaching and learning about it in a creative way!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Teaching Music Outside the Box

Projects that can be used in the classroom to keep music alive!

Melody's Music Tech Blog

3rd year music education student (piano major) at Sydney Con | Piano teacher and accompanist in south Sydney

Technology in Music Education

A reflective blog on technology's role in 21st Century music education

LJS Music Education

Music: A Creative Process

Technology in Music Education

Tech, Music and Education combined into one.

Rachel Hennessy's Blog

notes and projects of an aspiring musician, composer and teacher

Having nothing to say and saying it: my blog.

What James Humberstone is thinking about composition, music education and music technology.

Broma Bakery

Just another WordPress.com site

Music Teaching 101

Creative Music Teaching at Sydney Conservatorium of Music

Discover

A daily selection of the best content published on WordPress, collected for you by humans who love to read.

The Atavist Magazine

Creative Music Teaching at Sydney Conservatorium of Music

Longreads

The best longform stories on the web

Create your website at WordPress.com
Get started
%d bloggers like this: