Merge branch 'color-in-hap-value' into inline-punchcard
This commit is contained in:
commit
f83a156317
7 changed files with 1892 additions and 1900 deletions
|
|
@ -2476,17 +2476,6 @@ export const hsl = register('hsl', (h, s, l, pat) => {
|
|||
return pat.color(`hsl(${h}turn,${s * 100}%,${l * 100}%)`);
|
||||
});
|
||||
|
||||
/**
|
||||
* Sets the color of the hap in visualizations like pianoroll or highlighting.
|
||||
* @name color
|
||||
* @synonyms colour
|
||||
* @param {string} color Hexadecimal or CSS color name
|
||||
*/
|
||||
// TODO: move this to controls https://github.com/tidalcycles/strudel/issues/288
|
||||
export const { color, colour } = register(['color', 'colour'], function (color, pat) {
|
||||
return pat.withContext((context) => ({ ...context, color }));
|
||||
});
|
||||
|
||||
/**
|
||||
* Sets the id of the hap in, for filtering in the future.
|
||||
* @name id
|
||||
|
|
@ -2496,6 +2485,7 @@ export const { color, colour } = register(['color', 'colour'], function (color,
|
|||
Pattern.prototype.id = function (id) {
|
||||
return this.withContext((ctx) => ({ ...ctx, id }));
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Control-related functions, i.e. ones that manipulate patterns of
|
||||
// objects
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue