0% found this document useful (0 votes)
26 views

Tutorial 8: Creating Synthesizer: Apiit

The document provides instructions for creating a digital synthesizer using Flash that allows users to play piano sounds by clicking on visual representations of piano keys or pressing corresponding keyboard keys. It describes importing sound files, arranging white and black key buttons in layers to resemble a piano keyboard, and writing ActionScript code to trigger the appropriate sound file when each key is clicked or its keyboard key is pressed. The finished synthesizer allows playing piano sounds through visual keys or the computer keyboard to make music.

Uploaded by

daredevill6
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Tutorial 8: Creating Synthesizer: Apiit

The document provides instructions for creating a digital synthesizer using Flash that allows users to play piano sounds by clicking on visual representations of piano keys or pressing corresponding keyboard keys. It describes importing sound files, arranging white and black key buttons in layers to resemble a piano keyboard, and writing ActionScript code to trigger the appropriate sound file when each key is clicked or its keyboard key is pressed. The finished synthesizer allows playing piano sounds through visual keys or the computer keyboard to make music.

Uploaded by

daredevill6
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Tutorial 8: Creating Synthesizer

* To see the demo file, open T7-synthesizer.swf, you can hear the sounds of the piano by pressing the key z, x, c, v, b, n, m, q, w, e, r, t, y, u, i s, d, g, h, j, 2, 3 5, 6 and 7 or click the white key or black key. 1. 2. 3. 4. Open the file T7-synthesizer.fla. You can see there are two layers of frame named Piano and PianoDetail. Create two new layers and named them as WhiteKeys and BlackKeys. Open the library (Ctrl+L). With the WhiteKeys layer selected, drag 15 WhiteKey buttons from the library onto the Stage. Use the Align panel (Window>Align) to line up and distribute the keys. With the BlackKeys layer selected, drag 10 BlackKey buttons from the library onto the Stage. Use the Align panel ( Window>Align) to line up and distribute the keys. Place the BlackKey buttons over the WhiteKey buttons as they appear on a piano keyboard. Make the arrangement as shown in Picture 1.

5.

1 white key

st

1st black key Picture 1

APIIT

6.

Now see the library. You can see that all sound files have been imported to flash for you. In the library, right click each sound file and choose Linkage. In the Linkage Properties dialog box, click Export for ActionScript. Write the sounds name in the Identifier text box. Click OK. Point to the first white key on the left hand side, press F9 and type the following scripts:

7.

8.

Point and select the first black key, press F9 and type the following scripts:

9.

Try to figure out the scripts for the rest of the keys. Make sure the keys will produce the appropriate sound and key on the computer keyboard. To make sure the key expression correspond with the piano keys, use the arrangement shown in Picture 2.

APIIT

Picture 2 10. Play the movie. Test your keyboard either click the buttons or press the appropriate keys on your keyboard. Make some music! That's all, run your movie and check it all works. If not go back though this tutorial and check you have not missed anything,

THE END

APIIT

You might also like