Skip to content

Instantly share code, notes, and snippets.

View cristianvogel's full-sized avatar
🕳️
Music is my mothership

NeverEngineLabs cristianvogel

🕳️
Music is my mothership
View GitHub Profile
@cristianvogel
cristianvogel / createEnum.js
Last active June 26, 2022 10:46
my enum implementation
/**
* my enum implementation
* @param values Object of key/value or Array of just keys
* @param locked boolean, resulting Object will not be modifiable
* @returns {Readonly<{}>} use like a regular enum look up
*/
function createEnum(values = {} | [], locked = false) {
const dictionary = {};
let entry, i = 0
for ( entry in values ) {
@cristianvogel
cristianvogel / FastIdentityDictionary.st
Last active April 26, 2022 15:13
Kyma scripting: Key Value style Capytalk syntax
"Convenient for Class building. Can set default values using
ifAbsent:
"
| x |
x := #( #A !Attack #D !Decay #S !Sustain #R !Release ).
x expandToFastIdentityDictionary at: #A ifAbsent: [0.01]
@cristianvogel
cristianvogel / MidiChannelSelector.js
Created January 17, 2022 09:17
drawDigitInjectedIntoCustomSvg
/**
* Contextual pop up menu in a 4x4 grid for selecting midi channel
* by CAV
**/
import * as React from 'react';
import Menu from '@material-ui/core/Menu';
import Grid from '@material-ui/core/Grid';
import Button from '@material-ui/core/Button';
import InputLabel from '@material-ui/core/InputLabel';
@cristianvogel
cristianvogel / buildFromScript.st
Created January 3, 2022 16:55
Kyma build from Script starter
(inputs at: 1) start: 0 s
"Parameters that follow will be passed as ?GreenVariables"
voiceNumber: ?VoiceNumber