CHRISTOPHER HODDINOTT.COM
Menu

Sonic Pi - Lesson 5

8/10/2015

0 Comments

 
Lesson Objectives
  • Know that computers can multitask (do many things at once).
  • Understand that a simple program has one flow of control; in other words, it has one thread of execution. Programs can, however, have multiple such threads.
  • Be able to program multiple threads that work at the same time (concurrently).


Lesson Overview

  1. Try out the following code:
  2. in_thread do 10.times do play 60 sleep 0.25 end end play 60 sleep 0.5 play 62 sleep 0.5 play 64 sleep 0.5 play 65 sleep 0.5 play 67 sleep 0.5 play 69 sleep 0.25 play 72
  3. The code within the in_thread block gets its own control flow, and therefore runs at the same time as the play &sleep code below.



Picture
Picture
This video link is also a great tutorial on Sonic Pi

https://youtu.be/ixn6d4qSK5I?t=6m55s


Task and finish for homework.

Create a short passage with a drum loop, a bass line and a melody.

Upload to Managebac by wav or Mp3
0 Comments

    Archives

    September 2015
    August 2015
    July 2015

    Categories

    All
    Lesson 1
    Lesson 2
    Lesson 3
    Lesson 4
    Lesson 5
    Project
    Sonic Pi

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Home Page
  • About Me
  • LinkedIn
  • Extended Essay
  • Social Media
    • Pinterest
    • Twitter Feed
    • Mr Hoddinott's Awesome Music Video of the week
  • Contact
  • MLI
  • Contact
  • Home Page
  • About Me
  • LinkedIn
  • Extended Essay
  • Social Media
    • Pinterest
    • Twitter Feed
    • Mr Hoddinott's Awesome Music Video of the week
  • Contact
  • MLI
  • Contact