Revision: 06.08.2023, https://compute.toys/view/407
fn sdSphere(p: vec3f, r: f32) -> f32 {
return length(p) - r;
}Revision: 06.08.2023, https://compute.toys/view/407
fn sdSphere(p: vec3f, r: f32) -> f32 {
return length(p) - r;
}| #Star Wars theme arranged for Sonic Pi by Robin Newman December 2015 | |
| #Based on arrangement by Max Loh www.maxloh.com featured on youtube | |
| use_synth :dsaw | |
| s=0.11 #adjust tempo here | |
| sq=1*s #note timings | |
| sq7=4*sq/7.0 #for semiquaver run | |
| q=2*sq | |
| qt=2/3.0*q #for triplets |
| # ------------------------------------------- | |
| # CRASH INTO SONIC PI! | |
| # Learn to code music in less than 30 minutes | |
| # ------------------------------------------- | |
| # - download Sonic Pi from sonic-pi.net | |
| # - copy and paste these code snippets | |
| # - change and experiment with the snippets | |
| # - go! | |
| # ------------------------------------------- | |
| # These snippets were made for a workshop to |
| // Copyright © 2016 C4 | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to | |
| // deal in the Software without restriction, including without limitation the | |
| // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| // sell copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: The above copyright | |
| // notice and this permission notice shall be included in all copies or | |
| // substantial portions of the Software. |
| ############################################## | |
| ## Example 1 - play a note | |
| play 60 | |
| ############################################## | |
| ## Example 2 - play 4 random notes | |
| 4.times do | |
| play rrand_i(60, 90) | |
| sleep 0.5 |
| // | |
| // CurrencyFormatter.swift | |
| // We all pay | |
| // | |
| // Created by Mark Cornelisse on 28/10/15. | |
| // Copyright © 2015 Mark Cornelisse. All rights reserved. | |
| // | |
| import Foundation |
1 Welcome to Sonic Pi
Welcome to Sonic Pi. Hopefully you're as excited to get started making your own sounds as I am to show you. It's going to be a really fun ride where you'll learn all about music, synthesis, programming, composition, performance and more.
But wait, how rude of me! Let me introduce myself - I'm
| //SDL2 flashing random color example | |
| //Should work on iOS/Android/Mac/Windows/Linux | |
| #include <SDL.h> | |
| #include <SDL_opengl.h> | |
| #include <stdlib.h> //rand() | |
| static bool quitting = false; | |
| static float r = 0.0f; |
| /* OpenSimplex Noise in C# | |
| * Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19 | |
| * and heavily refactored to improve performance. */ | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Runtime.CompilerServices; | |
| namespace NoiseTest |
| define :sequence do |xs,tp| | |
| xs.each do |ys| | |
| in_thread do | |
| if (ys[0] == :zawa || ys[0] == :tb303 || ys[0] == :pulse || ys[0] == :s) then | |
| synth = ys[0] | |
| zs = ys[1..-1] | |
| else | |
| synth = :tri | |
| zs = ys | |
| end |