This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int geohandle = 0; | |
| float strength = ch("strength"); | |
| float width_divisor = 32.0; | |
| // radius is derived from the width of the square | |
| // valid radius values were very low so | |
| // manipulating a scale value is more readable | |
| f@radius = ((detail(0, "width")) / width_divisor) * ch("radius_scale"); | |
| // get all the neighbors within the radius around this point |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| [RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))] | |
| public class CreateCube : MonoBehaviour | |
| { | |
| public int xSize, ySize, zSize; | |
| private Mesh mesh; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example 4-7: Filling variables with random values | |
| float r; | |
| float g; | |
| float b; | |
| float a; | |
| float diam; | |
| float x; | |
| float y; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example 5-6: Bouncing Ball | |
| int x = 0; | |
| int speedx = 2; | |
| int y = 120; | |
| int speedy = 2; | |
| void setup() { | |
| size(480, 270); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FX | |
| X = F/(10)~TF[+FHJ]X:0.5 | |
| X = F!/(10)~TF[+FX]X:0.3 | |
| X = H!/(30)~TF[+FK]X:0.1 | |
| X = H!/(30)~TF[+FJ]:0.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ ! -d ./png ]; then mkdir ./png; fi; | |
| # creates the screen image | |
| for f in *.exr; | |
| do | |
| echo "Processing $f" | |
| convert -alpha off -background black $f ./png/$f.png | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- patterning | |
| -- norns study 2 | |
| engine.name = "PolyPerc" | |
| function init() | |
| engine.release(3) | |
| notes = {} | |
| selected = {} | |
| -- build a scale, clear selected notes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- harmonics | |
| engine.name = "Sines" | |
| function init() | |
| root_note = 30 | |
| base_freq = midi_to_hz(root_note) | |
| freqs = {} | |
| amps = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- dX is the number of the sound channel used (up to 6) | |
| -- sound sets a sound playing, you can include multiple sounds | |
| -- and they all play within the time of one cycle | |
| -- a sine LFO is slowly changing the cutoff over 7 cycles | |
| -- from 200hz to 400hz | |
| -- playing every 1/4 note in this case | |
| d1 $ sound "bd*4" # cutoff (range 200 400 $ slow 7 $ sine) | |
| -- claps on the off beats | |
| d2 $ sound "~ cp ~ cp" # cutoff (range 400 1000 $ slow (range 1 3 $ rand) $ sine) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 102bpm | |
| setcps (102/60/4) | |
| let the_scale = "hexMajor6" | |
| d1 $ cat [ n (scale the_scale "0 4 8 13?"), n (scale the_scale "<[0,4,7,11]>") ] # s "supersquare" # attack "1.2" # sustain "4" # release "3" # cutoff (range 300 500 $ slow 11 $ sine) # pitch1 (slow 9 $ range 0.95 1.05 $ sine) # gain 0.6 | |
| d1 silence | |
| d2 $ euclid 5 16 $ every 3 (rev) $ every 7 (euclid 5 22 ) $ n (scale the_scale "<[-3 2]*2>") # s "supercomparator" # cutoff (range 320 1100 $ rand) # attack "0.24" # sustain "2" # release "0.7" # voice (slow 17 $ range 0.4 0.9 $ sine) # gain 0.9 |