11/13/2023 0 Comments Greenfoot piano array![]() ![]() let’s call that field isDown and the declaration is below: We will use a boolean field that we add to the class to remember if the class is actually down at the moment. Therefore, lets make the code better so that the image is set only when it actually changes. A more important reason is that when we add sound it will make a big difference if the sound of the key is heard once or over and over again. One is that it is bad programming practice to waste your computers CPU resources doing unnecessary work. There are a few reasons why we have to fix this though. Why is this a big problem? Setting the image to itself is definitely unnecessary, but doesn’t seem incorrect. Looking at the code, you can see that even if the “g” key is not being pressed, the image will be reset to white-key.png although it is already showing that image. Every time that the act method executes, the image is set again to one of the two images even though it might be on the correct image anyhow. ![]() The image is not set only once as it is changed but all the time. While this code does work, there is a problem. ![]() When the key is not pressed, the musical keyboard key goes to the up position.ĥ.3 Do This: Put this version of the code in to your own act method. When g is pressed the musical keyboard key switches to the picture of it down. Later on we will choose keys on the computer keyboard with thought and purpose, right now we just want to get the code right. Take a look at this code:įor this example we choose a letter more or less at random, (the “g” key) to get the key object to react to. You just need code that will switch the image to the white-key-down.png when the right key on the computer keyboard is pressed. Since we already sort of know how to do this when we animated our crabs walking, we should be able to do this pretty easily. The white-key.png is the image that is set to default for class Key. Those are the two states that we want to show. The scenario already has two images files, one is called white-key.png and the other is called white-key-down.png. The first task is to animate the piano key, when a key is pressed on the keyboard, we want the key object in the world to change so it looks like it’s pressed down. You can start experimenting by placing down an object of class Key in the world and then running the scenario. If you looked at the code, you know that there is not much there, the Piano class only has the size and resolution of the world, and the key class only has method stubs ( an empty method) for the act and the constructor method. Make a few of them and place them all next to each other. Explain the code that is already there and what it does.ĥ.2 Do This: Create an object of class Key and put it in the world. Start by opening the scenario called piano-1 from the Handout folder.ĥ.1 Do This: Open the scenario piano-1 and look at the code that is already there for the two classes that already exist, Piano and Key. In this chapter, we will present a review of the preliminary data collected to date.Now we are going to start a new project, a piano that you can play with the computers keyboard. The game has been tested by a group of approximately 30 teenagers over a period of about 6 months, over which data was collected. This educational game aims to assess the possible impacts that its use has on learning and skill development related to auditory memory, qualitative discrimination of musical sound height (pitch-in the range of an octave with a central point in 440 Hz), visual identifi cation of musical notation symbols and its relative organization according to the grammar rules of traditional music spelling. In this chapter we'll talk yet, albeit briefl y, about the game engine used in the development of this educational application. After that, we will make the summary presentation of the music educational game FLAPPY CRAB, a clone of the GEARS Studios Flappy Bird, developed for mobile devices and other platforms with the UNITY 3D© game engine. The chapter begins with a brief introduction to the concepts listed above, trying to consider them in the school context. It also analyzes the concepts of gamifi cation, mashup/ remix and presents its possible usage in education-music teaching-through the development of the project/educational game FLAPPY CRAB. This chapter discusses some possibilities of gamifi cation and remixing processes for music education. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |