All Projects → github → sonic-pi-challenge

github / sonic-pi-challenge

Licence: CC0-1.0 license
Sonic Pi Challenge at GitHub Universe 2020

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to sonic-pi-challenge

osmid
osmid is a tool to bridge MIDI and OSC. It is currently in use in Sonic Pi
Stars: ✭ 63 (-3.08%)
Mutual labels:  sonic-pi
negasonic
This ain't Sonic Pi, but it works on the browser: www.negasonic.org
Stars: ✭ 73 (+12.31%)
Mutual labels:  sonic-pi
sonic-track
Uses a raspberry pi camera or web cam and python opencv to track motion in camera view. Sends motion contour data to sonic-pi via osc interface to produce and control notes/sample. Includes ability to use onscreen menu areas to change synthesizer, octaves Etc.
Stars: ✭ 24 (-63.08%)
Mutual labels:  sonic-pi
sonic-pi-vscode-editor
Use Sonic Pi from VS Code
Stars: ✭ 51 (-21.54%)
Mutual labels:  sonic-pi
sonic-pi.el
Emacs running SonicPi
Stars: ✭ 79 (+21.54%)
Mutual labels:  sonic-pi
ziffers
Numbered musical notation for composing algorithmic and generative melodies
Stars: ✭ 53 (-18.46%)
Mutual labels:  sonic-pi

The Sonic Pi Challenge is over.

Thank you to everyone who took part.

You can view Sam's final live-coded DJ set here incorporating some of your snippets 🤘

GitHub Universe2020 Sonic Pi Challenge

OK, this is going to be fun. It calls for some awesome ascii-art!

# ██    ██ ███    ██ ██ ██    ██ ███████ ██████  ███████ ███████ ██████   ██████  ██████   ██████ 
# ██    ██ ████   ██ ██ ██    ██ ██      ██   ██ ██      ██           ██ ██  ████      ██ ██  ████ 
# ██    ██ ██ ██  ██ ██ ██    ██ █████   ██████  ███████ █████    █████  ██ ██ ██  █████  ██ ██ ██ 
# ██    ██ ██  ██ ██ ██  ██  ██  ██      ██   ██      ██ ██      ██      ████  ██ ██      ████  ██ 
#  ██████  ██   ████ ██   ████   ███████ ██   ██ ███████ ███████ ███████  ██████  ███████  ██████  
#                                                                                                  
#                                                       ╘
#                                                ─       ╛▒╛
#                                                 ▐╫       ▄█├
#                                          ─╟╛      █▄      ╪▓▀
#                                ╓┤┤┤┤┤┤┤┤┤  ╩▌      ██      ▀▓▌
#                                 ▐▒   ╬▒     ╟▓╘    ─▓█      ▓▓├
#                                 ▒╫   ▒╪      ▓█     ▓▓─     ▓▓▄
#                                ╒▒─  │▒       ▓█     ▓▓     ─▓▓─
#                                ╬▒   ▄▒ ╒    ╪▓═    ╬▓╬     ▌▓▄
#                                ╥╒   ╦╥     ╕█╒    ╙▓▐     ▄▓╫
#                                           ▐╩     ▒▒      ▀▀
#                                                ╒╪      ▐▄
#                        
#                             _____             __        ____  __
#                            / ___/____  ____  /_/____   / __ \/_/
#                            \__ \/ __ \/ __ \/ / ___/  / /_/ / /
#                           ___/ / /_/ / / / / / /__   / ____/ /
#                          /____/\____/_/ /_/_/\___/  /_/   /_/
#                        
#                         ___             _ _         
#                        / __\ |__   __ _| | | ___ _ __   __ _  ___ 
#                       / /  | '_ \ / _` | | |/ _ \ '_ \ / _` |/ _ \
#                      / /___| | | | (_| | | |  __/ | | | (_| |  __/
#                      \____/|_| |_|\__,_|_|_|\___|_| |_|\__, |\___|
#                                                        |___/      

Background

Let's get started. Hello! I'm Sam Aaron.

I created a thing called Sonic Pi which lets you turn code into music.

As part of GitHub Universe 2020 I delivered an introductory workshop on how to start live coding synths and beats with Sonic Pi.

(You may have already watched it, in which case, hello again!).

In that workshop I issued a challenge to get you to write a bit of code which I could use in my live performance. Once I have all the submissions I'll choose a nice selection of them to incorporate into my performance.

All entries will feature in a public repo so everyone will be able to jam with, mash it up and perhaps even perform your live coding debut with it at an upcoming conference.

What you will need

  • An open mind
  • Some headphones
  • A computer with Sonic Pi installed
  • Willingness to share with others.

Challenge Brief

Write a short riff/melody using (scale :E, :minor_pentatonic).

That's really all there is to it. It can be in any style, using any synth, sample or FX that Sonic Pi offers. Ideally your riff is fairly short (otherwise if I use it I might have to trim it). This means that your code doesn't have to be very long just 3-4 lines is perfectly acceptable.

All submissions will be considered for the performance - especially very simple coded riffs.

Note that using your own samples isn't available as an option in this challenge as I won't have access to your personal sample files.

Once you've coded up your riff(s), all you need to do is to submit a pull request to this repository. Add your file(s) to the snippets directory named with the pattern USERNAME_ID.rb e.g. leereilly_01.rb and leereilly_02.rb.

Please note: All submissions are under the CC0-1.0 license. This should be your own work or work that you have the right to contribute.

Tips

  1. All submissions will be considered.
  2. Simple code is just as likely to be picked as complex code.
  3. Ideally the sound should play for no more than 10 seconds (any submission I use might be trimmed).
  4. Submissions can only be text files with the code.
  5. Only code covered in The Sonic Pi Tutorial will be considered.
  6. Have fun! Share your coded riff with your friends and see what they think!

Getting started

OK, so you want to get started?

Next you might want to check out The Sonic Pi Tutorial.

I would suggest whizzing through Section 2 on Synths and the start of Section 5 on Programming Structures especially the section on iteration and loops.

Essentially you'll just need to understand play and sleep and which notes to use.

The :e :minor_pentatonic scale includes the following notes: [28, 31, 33, 35, 38, 40, 43, 45, 47, 50, 52, 55, 57, 59, 62, 64, 67, 69, 71, 74, 76]

So whenever you call play be sure to use one of these notes. For example:

# A Valid Entry
play 28
sleep 0.5
play 33
sleep 0.5
play 59
sleep 0.125
play 45

Of course, you might want to embellish your riff by using use_synth to change the synthesiser, use the release: opt to change the length of each note, use randomisation to choose one of a set of notes: [45, 52, 64, 71].choose, bring in samples, use FX blocks and anything else you find fun. If it's included in the Sonic Pi tutorial then it's fine to use it in your submission.

So experiment and play!

Examples

The following are a few example submissions you can either use as starting points for your own or inspiration to sow creative seeds into your mind.

# Random Riff

use_random_seed 409832 

8.times do
  play (scale :e3, :minor_pentatonic).choose, release: rand
  sleep 0.125
end

# Simple Ditty
use_synth :dsaw 
play 28, release: 2
sleep 0.5
play 33, release: 0.5
sleep 0.5
play 59, release: 0.1
sleep 0.125
play 45, release: 1
# Random Rhythm Riff w/ FX
with_fx :reverb, room: 1 do
 use_random_seed 23001055 
  use_synth :square

  8.times do
    play (scale :e1, :minor_pentatonic).choose, release: rand
    sleep [0.125, 0.25].choose
  end
end

Submit and Share!

Once you have your submission please submit a pull request adding your riff/melody to the snippets directory named username_01, where username is your GitHub username and 01 is just a unique identifier in case you have multiple submissions.

Please note: All submissions are under the CC0-1.0 license. This should be your own work or work that you have the right to contribute.

Thanks so much for taking part, live coding your own riff and sharing it with us. Please do tune into the performance to see if your submission will feature!

Enjoy!

Take care and please do consider joining our friendly community: http://in-thread.sonic-pi.net

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].