Skip to content

Instantly share code, notes, and snippets.

@moxuse
moxuse / grid.orca
Created May 15, 2019
Grid Pttern #orcλ
View grid.orca
1C4C1C2C
A1A0A1A6
1A1A1A7A
A2A2A8A7
2A4AaAfA
A6AeApAf
6.k.3.4.
View CustomTypes.elm
type UserStatus
= Regular
| Visitor
type alias User =
{ status : UserStatus
, name : String
}
-- other declaration of User
View ErrorReporting.elm
isReasonableAge : String -> Result String Int
isReasonableAge input =
case String.toInt input of
Nothing ->
Err "That is not a number!"
Just age ->
if age < 0 then
Err "Please try again after you are born."
@moxuse
moxuse / test
Created May 14, 2019
test snipet code
View test
test snipet code
View gist:89ff0122598ac520a77e518c7ecedcdc
(
OSCdef(\orca_osc, {|msg|
var note;
msg.postln;
// note = msg[1];
// s.sendMsg("/s_new", \your_synth, s.nextNodeID, 0, 1, \note, note);
}, \p);
)
@moxuse
moxuse / Tidal.ghci
Last active May 10, 2018
Boot Tidal Code
View Tidal.ghci
:show paths
:set prompt ""
:module Sound.Tidal.Context
:load your/path/to/UnityOsc.hs -- <- maybe ~/UnityOsc
(cps, nudger, getNow) <- cpsUtils'
@moxuse
moxuse / triangle stripe
Last active Dec 13, 2017
triangle stripe
View triangle stripe
void ofApp::triangleMesh(ofMesh && mesh, float radius) {
ofPoint capturedPoint, capturedPoint2;
for (int i = 0; i < 25; i+=2) {
mesh.addIndex(i);
mesh.addIndex(i + 1);
}
for (int i = 0; i < 25; i++) {
@moxuse
moxuse / OSCController.cs
Last active Jan 8, 2017
OSCController.cs
View OSCController.cs
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityOSC;
View UnityOsc.hs
-- custom osc send to unity
module UnityOsc where
import Sound.Tidal.Stream
import Sound.Tidal.Pattern
import Sound.Tidal.Parse
import Sound.Tidal.OscStream
port = 5000
View gist:10b684943a87938c2afc
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Ayu-Texture-Test</title>
<script src="http://threejs.org/build/three.min.js"></script>
<script src="http://code.jquery.com/jquery-1.12.1.min.js"></script>
</head>
<script type="x-shader/x-vertex" id="vs">