Skip to content

Instantly share code, notes, and snippets.

View Softwave's full-sized avatar

Softwave Softwave

View GitHub Profile
@munrocket
munrocket / wgsl_3d_sdf.md
Last active July 13, 2024 05:11
WGSL 3D SDF Primitives

WGSL 3D SDF Primitives

Revision: 06.08.2023, https://compute.toys/view/407

Sphere - exact

fn sdSphere(p: vec3f, r: f32) -> f32 {
  return length(p) - r;
}
@rbnpi
rbnpi / starwars.rb
Last active June 9, 2021 14:16
starwars.rb The StarWars theme arranged for Sonic Pi, based on a version by Max Loh http://www.maxloh.com/sheetmusic/ Hear it at https://soundcloud.com/rbnman/starwars
#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
@hzulla
hzulla / sonicpi-crash-course.txt
Last active May 9, 2023 09:25
Crash into Sonic Pi: Learn to code music in less than 30 minutes
# -------------------------------------------
# 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
@traviskirton
traviskirton / WorkSpace.swift
Last active September 19, 2017 15:35
Code from the Basics Tutorial
// 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.
@darinwilson
darinwilson / sonic_pi_examples.txt
Last active May 18, 2024 07:48
Sonic Pi Examples
##############################################
## 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
@jwinder
jwinder / sonic-pi-tutorial.md
Last active September 22, 2023 20:12
Sonic Pi in-app tutorials concatenated - last synced 27-08-2023 - https://sonic-pi.net/tutorial.html - https://github.com/samaaron/sonic-pi - All credit & thanks to Sam Aaron!

1 Welcome to Sonic Pi

Welcome friend :-)

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.

@ruby0x1
ruby0x1 / main.cpp
Last active January 4, 2019 21:09
SDL2 sample
//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;
@digitalshadow
digitalshadow / OpenSimplexNoise.cs
Last active June 25, 2024 07:41
OpenSimplex Noise Refactored for C#
/* 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
@dorchard
dorchard / jam-evening
Created October 15, 2014 23:07
Evening jam with Sonic Pi
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