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
| //-------------------------------------------------------------------- | |
| // name: shepard-wav-func.ck | |
| // desc: Shepard–Risset illusion from a WAV sample, ascending or descending | |
| //-------------------------------------------------------------------- | |
| // Shepard-tone generator as a sporkable function | |
| fun void shepardTone(string samplePath, float direction) | |
| { | |
| // direction: positive = ascending, negative = descending | |
| .004 / 16.0 * direction => float INC; |
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
| { | |
| "definitions": { | |
| "identifier": { | |
| "description": "An identifier", | |
| "pattern": "^[a-zA-Z_0-9]+$", | |
| "type": "string" | |
| }, | |
| "identifier_list": { | |
| "items": { | |
| "$ref": "#/definitions/identifier" |
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
| public void Render(SKCanvas canvas, float angleInRadians, SKPoint center, float scale, params object[] parameters) | |
| { | |
| var Image = (SKImage) parameters[0]; | |
| var info = (SKImageInfo) parameters[2]; | |
| // get the screen density for scaling | |
| var display = DisplayInformation.GetForCurrentView(); | |
| var _scale = display.LogicalDpi / 96.0f; | |
| var scaledSize = new SKSize((float) info.Width / _scale, (float) info.Height / _scale); |