Code the Tetris Theme Tune

Similar documents
sonic pi / Jungle Doctor Who

In this project you will learn how to code a live music performance, that you can add to and edit without having to stop the music!

Sonic Pi for music teachers

Music Department Music Literacy Workbook Name

S2 Homework Workbook Understanding Music. Listening & Literacy. Name: Class: Replacement Copy Cost: 50p. S2 Homework Workbook pg.

YEAR 3 AUTUMN 1. Working with standard notation. Introduction Explain how the notation system works:

Past papers. for graded examinations in music theory Grade 2

Sonic Pi. What is it? Table of Contents

Revision of Important Things About Scale Writing

Introduction to Rhythm Sticks Unit Plan

Theory of Music Grade 2

Theory of Music Grade 2

NOTES and BEATS For Beginners

Musical Literacy - Contents!

Specialist Music Program Semester One : Years Prep-3

Let's Learn About Notes

The KING S Medium Term Plan - MUSIC. Y7 Module 2. Notation and Keyboard. Module. Building on prior learning

Keyboard Foundation Level 1

Written Piano Music and Rhythm

COLLEGE OF PIPING AND DRUMMING SNARE DRUMMING LEVEL ONE / PRELIMINARY. Syllabus and Resources. The Royal New Zealand Pipe Bands Association

COLLEGE OF PIPING AND DRUMMING BASS AND TENOR DRUMMING LEVEL ONE / PRELIMINARY. Syllabus and Resources. The Royal New Zealand Pipe Bands Association

Music General Certificate of Secondary Education June Listening to and Appraising Music. (JUN ) WMP/Jun12/42701

S1 Homework Workbook Understanding Music. Listening & Literacy. Replacement Copy Cost: 50p. S1 Homework Workbook pg. 1

Past papers. for graded examinations in music theory Grade 6

Modcan Touch Sequencer Manual

Homework Booklet. Name: Date:

Music Theory For Pianists. David Hicken

PIANO. Free Choice Piece DISCOVER MORE. Graded Music Exam: General Information 1

MAKING (COMPOSING) Throughout this term, you have been developing music writing/creating skills, using rhythm. You are to create an 8-bar melody.

SE22 Piano School Grade 1 theory guide

Music Strands of Progression Strand A: Elements of Music. Year One Year Two Year Three Elements of Music

Singing the Faith consolidated corrections music

Three Birds vocal score in braille music with annotations

DCB mk 3. professional bi-directional MIDI to DCB converter. Operating manual

Rhythm Music Theory. Work book 1

Music theory PART ONE

Georg Mertens - Cello Method: Contents of Volume 1

Sibelius In The Classroom: Projects Session 1

Past papers. for graded examinations in music theory Grade 1

Credo Theory of Music training programme GRADE 4 By S. J. Cloete

The computer speakers can be loud. So, you may want to adjust the volume. For example, on the Mac keyboard you can use the F11 and F12 keys.

Richmond. Music PRIMARY. TEACHER S BOOK Term 1

Theory of Music Grade 1

TIATracker v1.0. Manual. Andre Kylearan Wichmann, 2016

Getting Graphical PART II. Chapter 5. Chapter 6. Chapter 7. Chapter 8. Chapter 9. Beginning Graphics Page Flipping and Pixel Plotting...


THE CHORAL SINGERS TOOLKIT

Eighth note triplets (Quaver triplets)

2. ARTICULATION The pupil must be able to able to articulate evenly and clearly at a variety of slow to medium tempos and demonstrate a good posture

African Music Research

Sibelius Advanced Session 2

New Zealand Music Examinations Board

PITCH & THE RECORDER. Year 7 Music. Pitch & The Recorder CLANCY CATHOLIC COLLEGE CREATIVE AND PERFORMING ARTS FACULTY

1 National Unit credit at SCQF level 4: (6 SCQF credit points at SCQF level 4*)

2) Is it a Sharp or a Flat key? a. Flat key Go one Flat Further (use Blanket Explodes) b. Sharp key Go Down a Semitone (use Father Christmas)

REPORT ON THE NOVEMBER 2009 EXAMINATIONS

Past papers. for graded exams in music theory Grade 7

G-Stomper Timing & Measure V Timing & Measure... 2

Piano Syllabus. London College of Music Examinations

metal Fatigue Performance notes

Theory of Music Grade 1

Year 11 Composition 12 Bar Blues Workbook

Georg Mertens - Cello Method: Contents of Volume 1

technology T05.2 teach with space MEET THE SENSE HAT Displaying text and images on the Sense HAT LED matrix

Sudoku Music: Systems and Readymades

Foundation of Music Edcuation - Gold Level

Course Report Level National 5

A Symphony of Fractions

Theory of Music Grade 1

Sample assessment task. Task details. Content description. Year level 9

Music Theory. Level 1 Level 1. Printable Music Theory Books. A Fun Way to Learn Music Theory. Student s Name: Class:

Can you paint picture of how you feel? Christmas Play songs-can we learn to sing from memory? Can we sing with pitch? Foundatio n Stage KS1.

XYNTHESIZR User Guide 1.5

READING AND WRITING MUSIC: TEACHER S GUIDE

Pipe Band Drumming SCQF Level 3 (PDQB Level 1 Snare)

Creating a Lead Sheet Using Logic Pro X and Sibelius

Music Curriculum Map Year 5

Theory of Music Grade 4

SignalTap: An In-System Logic Analyzer

Sibelius: Tips for Working Effectively


ORB COMPOSER Documentation 1.0.0

Music overview. Autumn Spring Summer Explore and experiment with sounds. sound patterns Sing a few familiar songs. to songs and other music, rhymes

LEGO MINDSTORMS PROGRAMMING CAMP. Robotics Programming 101 Camp Curriculum

Year 7 revision booklet 2017

Past papers. for graded examinations in music theory Grade 4

Hip Hop Robot. Semester Project. Cheng Zu. Distributed Computing Group Computer Engineering and Networks Laboratory ETH Zürich

MUSIC CONTEMPORARY. Western Australian Certificate of Education Examination, Question/Answer Booklet. Stage 3

Reason Overview3. Reason Overview

Level 1 Music, Demonstrate aural and theoretical skills through transcription pm Wednesday 26 November 2014 Credits: Four

MUSIC THEORY. The notes are represented by graphical symbols, also called notes or note signs.

Let s Get Loud. The Big Idea. Supplies. Key Prep: What s the Math? Grades K-2

Get Set! Piano Tutor Book 1 Quiz 1

CSC475 Music Information Retrieval

Listening and Responding

Theory of Music Grade 4

Music Department Curriculum and Assessment Outline

Background/Purpose. Goals and Features

The. finale. Projects. The New Approach to Learning. finale. Tom Carruth

About Importance of Truth

Transcription:

Code the Tetris Theme Tune Introduction In this project you will learn how to program musical notes in Sonic Pi so that you can turn sheet music into code. You ll create your own mix of the Tetris theme tune. Tetris is a popular computer game created in 1984 by Russian coder Alexey Pajitnov. Many versions of Tetris use the music Korobeiniki, a Russian folk dance. If you re using a Raspberry Pi computer then you can hear the music by playing the Tetromino game. You can find it by choosing Games from the menu and then Python Games. Don t play for too long! You ve got coding to do. The shapes of the Tetris pieces are called tetrominoes - the 2D shapes that can be made with 4 squares. 1

Step 1: Code the Beginning Now let s code the first part of the tune in Sonic Pi. Activity Checklist First let s choose a speed and a synth for the music. The normal speed is 60 beats per minute (bpm) but that s not fast enough for this piece. Choose an empty Buffer in Sonic Pi and add this code: Here s the first bar of Korobeiniki: It shows the name of the note below in red and the length of the note above in green. Musical notes have letter names from A-G. To get more notes you repeat the letters to get more octaves (ranges of higher or lower notes.) Each octave starts from C. In Sonic Pi the default is octave 4, b3 means b from the octave below. Sonic Pi allows you to use letter names instead of numbers. This is useful when you are working with musical notation. Code the first 3 notes of Korobeiniki in Sonic Pi: 2

That works but it takes quite a lot of typing. There s a shorter way to program longer tunes: play_pattern. play_pattern allows you to program multiple notes in one line. Replace your code to use play_pattern to play the first bar: You might have noticed that the notes aren t actually all the same length. That s okay, if you change play_pattern to play_pattern_timed then you can say how long each note lasts. The numbers in green show many beats each note lasts. 3

(If you read music, this piece is in 4/4 time and a crotchet lasts one beat, a quaver lasts half a beat and a minim lasts two beats.) play_pattern_timed takes a list of notes and then a list of times. Change your play_pattern code to look like this: If you don t give enough times then Sonic Pi will repeat them. This bar repeats the timing 1, 0.5, 0.5 (crotchet, quaver, quaver) so you can change your code to: Add the next bar of music, the timing is the same for this bar. Is the tune starting to sound familiar? 4

Challenge: Finish the tune Here s the music for the next two bars. Can you use play_pattern_timed to program it? Save your project Step 2: Faster! Russian folk songs often get faster and faster. The Tetris theme tune does this too as you get to higher levels in the game. Let s make your tune go faster and faster. Activity Checklist Your code should now look like this: Let s put the music into a loop first so that it plays multiple times: 5

We can use the variable current_bpm to find out what the bpm is currently set to. Add a line to increase the bpm every time you repeat the loop: Try increasing the number of repeats to go faster and faster! Save your project Challenge: Mix the tune Try changing the way the tune sounds by using a different synth. You can see a list of the synths available to you by typing use_synth [space] and choosing from the list that appears. 6

Challenge: More of the tune Can you program the next part of the tune: Sonic Pi uses :r in lower case for a rest (a pause) and you can use it just like a note. Challenge: More music Can you use what you ve learned to program more music? You can search for sheet music online. Some music gives the letter names for notes which makes it easier. 7

Save your project 8