To write a melody for a piano that is 12 pitches long and has at least 4 different pitches, you can follow these steps:
1. Start by selecting a key for your melody. This will determine the pitches you can use. Let's say we choose the key of C major.
2. In C major, the 12 pitches available are: C, D, E, F, G, A, B, and their corresponding sharps or flats.
3. To ensure that you have at least 4 different pitches, you can choose any combination of 4 unique pitches from the available 12. For example, you could choose C, D, F, and A.
4. Now, you can create a melody using these 4 pitches. You can arrange them in any order and rhythm you like. Here's an example:
C - D - F - A - C - D - F - A - C - D - F - A
This melody uses the pitches C, D, F, and A, and it repeats the sequence three times.
5. Experiment with different rhythms, note durations, and patterns to make your melody more interesting. You can also explore different octaves to add variation.
Remember, this is just one example of a melody using 4 different pitches out of the available 12. You can come up with many creative variations using different combinations and patterns. Let your imagination guide you and have fun exploring the possibilities of your piano melody!