{"id":15048177,"url":"https://github.com/github/sonic-pi-challenge","last_synced_at":"2025-10-04T08:32:05.416Z","repository":{"id":55125215,"uuid":"319406946","full_name":"github/sonic-pi-challenge","owner":"github","description":"Sonic Pi Challenge at GitHub Universe 2020","archived":true,"fork":false,"pushed_at":"2021-01-08T05:48:16.000Z","size":3696,"stargazers_count":70,"open_issues_count":0,"forks_count":24,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-09-30T00:23:54.712Z","etag":null,"topics":["sonic-pi"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-07T18:20:46.000Z","updated_at":"2024-08-12T05:12:10.000Z","dependencies_parsed_at":"2022-08-14T12:40:56.823Z","dependency_job_id":null,"html_url":"https://github.com/github/sonic-pi-challenge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fsonic-pi-challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fsonic-pi-challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fsonic-pi-challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fsonic-pi-challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/sonic-pi-challenge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235232861,"owners_count":18957059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sonic-pi"],"created_at":"2024-09-24T21:08:57.482Z","updated_at":"2025-10-04T08:32:03.844Z","avatar_url":"https://github.com/github.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"sonic-pi-challenge.gif\"\u003e\n  \u003cp\u003eThe Sonic Pi Challenge is over.\u003c/p\u003e\n  \u003cp\u003eThank you to everyone who took part.\u003c/p\u003e\n  \u003cp\u003eYou can view Sam's final live-coded DJ set \u003ca href=\"https://www.youtube.com/watch?v=oa2dHlQ-kfs\"\u003ehere\u003c/a\u003e incorporating some of your \u003ca href=\"snippets\"\u003esnippets :metal:\u003c/p\u003e\n\u003c/div\u003e\n\n#\n\n# GitHub Universe2020 Sonic Pi Challenge\n\n__OK, this is going to be fun. It calls for some awesome ascii-art!__\n\n\n```\n# ██    ██ ███    ██ ██ ██    ██ ███████ ██████  ███████ ███████ ██████   ██████  ██████   ██████ \n# ██    ██ ████   ██ ██ ██    ██ ██      ██   ██ ██      ██           ██ ██  ████      ██ ██  ████ \n# ██    ██ ██ ██  ██ ██ ██    ██ █████   ██████  ███████ █████    █████  ██ ██ ██  █████  ██ ██ ██ \n# ██    ██ ██  ██ ██ ██  ██  ██  ██      ██   ██      ██ ██      ██      ████  ██ ██      ████  ██ \n#  ██████  ██   ████ ██   ████   ███████ ██   ██ ███████ ███████ ███████  ██████  ███████  ██████  \n#                                                                                                  \n#                                                       ╘\n#                                                ─       ╛▒╛\n#                                                 ▐╫       ▄█├\n#                                          ─╟╛      █▄      ╪▓▀\n#                                ╓┤┤┤┤┤┤┤┤┤  ╩▌      ██      ▀▓▌\n#                                 ▐▒   ╬▒     ╟▓╘    ─▓█      ▓▓├\n#                                 ▒╫   ▒╪      ▓█     ▓▓─     ▓▓▄\n#                                ╒▒─  │▒       ▓█     ▓▓     ─▓▓─\n#                                ╬▒   ▄▒ ╒    ╪▓═    ╬▓╬     ▌▓▄\n#                                ╥╒   ╦╥     ╕█╒    ╙▓▐     ▄▓╫\n#                                           ▐╩     ▒▒      ▀▀\n#                                                ╒╪      ▐▄\n#                        \n#                             _____             __        ____  __\n#                            / ___/____  ____  /_/____   / __ \\/_/\n#                            \\__ \\/ __ \\/ __ \\/ / ___/  / /_/ / /\n#                           ___/ / /_/ / / / / / /__   / ____/ /\n#                          /____/\\____/_/ /_/_/\\___/  /_/   /_/\n#                        \n#                         ___             _ _         \n#                        / __\\ |__   __ _| | | ___ _ __   __ _  ___ \n#                       / /  | '_ \\ / _` | | |/ _ \\ '_ \\ / _` |/ _ \\\n#                      / /___| | | | (_| | | |  __/ | | | (_| |  __/\n#                      \\____/|_| |_|\\__,_|_|_|\\___|_| |_|\\__, |\\___|\n#                                                        |___/      \n```\n\n## Background\n\n\u003cimg align=\"right\" src=\"https://githubuniverse.com/assets/img/speakers/Sam_Aaron_Headshot.jpg\" width=\"260\"\u003e\n\nLet's get started. Hello! I'm \u003ca href=\"http://sam.aaron.name/\"\u003eSam Aaron\u003c/a\u003e.\n\nI created a thing called [Sonic Pi](https://sonic-pi.net/) \nwhich lets you turn code into music. \n\nAs part of GitHub Universe 2020 I delivered an [introductory workshop on\nhow to start live coding synths and beats with Sonic Pi](https://githubuniverse.com/Express-yourself-with-code-Learn%20to%20live%20code%20beats%20and%20riffs%20with%20Sonic%20Pi/). \n\n(You may have already watched it, in which case, hello again!).\n\nIn that workshop I issued a challenge to get you to write a bit of code\nwhich I could use in my [live performance](https://githubuniverse.com/Closing-performance-live-coded-DJ-set-with-Sam-Aaron-on-Sonic-PI/). Once I have all the\nsubmissions I'll choose a nice selection of them to incorporate into my\nperformance.\n\nAll entries will feature in a public repo so everyone will be able to\njam with, mash it up and perhaps even perform your live coding debut\nwith it at an upcoming conference.\n\n\n## What you will need\n\n* An open mind\n* Some headphones\n* A computer with Sonic Pi installed\n* Willingness to share with others.\n\n\n## Challenge Brief\n\nWrite a short riff/melody using `(scale :E, :minor_pentatonic)`.\n\nThat's really all there is to it. It can be in any style, using any\nsynth, sample or FX that Sonic Pi offers. Ideally your riff is fairly\nshort (otherwise if I use it I might have to trim it). This means that\nyour code doesn't have to be very long just 3-4 lines is perfectly\nacceptable.\n\nAll submissions will be considered for the performance - especially very\nsimple coded riffs.\n\n__Note that using your own samples isn't available as an option in this\nchallenge as I won't have access to your personal sample files.__\n\nOnce 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`.\n\n**Please note:** All submissions are under the [CC0-1.0 license](LICENSE.md). This should be your own work or work that you have the right to contribute.\n\n## Tips\n\n1. All submissions will be considered.\n2. Simple code is just as likely to be picked as complex code.\n3. Ideally the sound should play for no more than 10 seconds (any submission I use might be trimmed).\n4. Submissions can only be text files with the code.\n5. Only code covered in [The Sonic Pi Tutorial](https://sonic-pi.net/tutorial) will be considered.\n6. Have fun! Share your coded riff with your friends and see what they think!\n\n## Getting started\n\nOK, so you want to get started? \n\nNext you might want to check out [The Sonic Pi Tutorial](https://sonic-pi.net/tutorial). \n\nI would suggest whizzing through [Section 2 on Synths](https://sonic-pi.net/tutorial#section-2) \nand the start of [Section 5 on Programming Structures](https://sonic-pi.net/tutorial#section-5)\nespecially the [section on iteration and loops](https://sonic-pi.net/tutorial#section-5-2).\n\nEssentially you'll just need to understand `play` and `sleep` and which\nnotes to use. \n\nThe `:e` `:minor_pentatonic` scale includes the following\nnotes:\n`[28, 31, 33, 35, 38, 40, 43, 45, 47, 50, 52, 55, 57, 59, 62, 64, 67, 69, 71, 74, 76]`\n\nSo whenever you call `play` be sure to use one of these notes. For example:\n\n```\n# A Valid Entry\nplay 28\nsleep 0.5\nplay 33\nsleep 0.5\nplay 59\nsleep 0.125\nplay 45\n```\n\nOf course, you might want to embellish your riff by using `use_synth` to\nchange the synthesiser, use the `release:` opt to change the length of\neach note, use randomisation to choose one of a set of notes: `[45, 52, 64, 71].choose`, \n[bring in samples](https://sonic-pi.net/tutorial#section-3),\n[use FX blocks](https://sonic-pi.net/tutorial#section-6) and anything\nelse you find fun. If it's included in the Sonic Pi tutorial then it's\nfine to use it in your submission.\n\nSo experiment and play!\n\n## Examples\n\nThe following are a few example submissions you can either use as\nstarting points for your own or inspiration to sow creative seeds into\nyour mind.\n\n```\n# Random Riff\n\nuse_random_seed 409832 \n\n8.times do\n  play (scale :e3, :minor_pentatonic).choose, release: rand\n  sleep 0.125\nend\n\n```\n\n```\n# Simple Ditty\nuse_synth :dsaw \nplay 28, release: 2\nsleep 0.5\nplay 33, release: 0.5\nsleep 0.5\nplay 59, release: 0.1\nsleep 0.125\nplay 45, release: 1\n```\n\n```\n# Random Rhythm Riff w/ FX\nwith_fx :reverb, room: 1 do\n use_random_seed 23001055 \n  use_synth :square\n\n  8.times do\n    play (scale :e1, :minor_pentatonic).choose, release: rand\n    sleep [0.125, 0.25].choose\n  end\nend\n```\n\n## Submit and Share!\n\nOnce 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.\n\n**Please note:** All submissions are under the [CC0-1.0 license](LICENSE.md). This should be your own work or work that you have the right to contribute.\n\nThanks 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!\n\n## Enjoy!\n\nTake care and please do consider joining our friendly community:\nhttp://in-thread.sonic-pi.net\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fsonic-pi-challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fsonic-pi-challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fsonic-pi-challenge/lists"}