add "as" function + getControlName
This commit is contained in:
parent
f61916fffa
commit
773420fd65
2 changed files with 32 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ Copyright (C) 2023 Strudel contributors - see <https://github.com/tidalcycles/st
|
|||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { s, pan } from '../controls.mjs';
|
||||
import { s, pan, getControlName } from '../controls.mjs';
|
||||
import { mini } from '../../mini/mini.mjs';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import Fraction from '../fraction.mjs';
|
||||
|
|
@ -39,4 +39,8 @@ describe('controls', () => {
|
|||
it('combines tactus of the pattern for .mix as lcm', () => {
|
||||
expect(s(mini('bd cp mt').set.mix(pan(mini('1 2 3 4')))).tactus).toEqual(Fraction(12));
|
||||
});
|
||||
it('finds control name by alias', () => {
|
||||
expect(getControlName('lpf')).toEqual('cutoff');
|
||||
expect(getControlName('cutoff')).toEqual('cutoff');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue