the big rename: @strudel.cycles/* -> @strudel/*

This commit is contained in:
Felix Roos
2024-01-18 09:54:37 +01:00
parent b10612da5c
commit 96bafa7f0b
90 changed files with 369 additions and 396 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import useEvent from '@src/useEvent.mjs';
import useFrame from '@src/useFrame.mjs';
import { getAudioContext } from '@strudel.cycles/webaudio';
import { midi2note } from '@strudel.cycles/core';
import { getAudioContext } from '@strudel/webaudio';
import { midi2note } from '@strudel/core';
import { useState, useRef, useEffect } from 'react';
import Claviature from '@components/Claviature';
+1 -1
View File
@@ -1,4 +1,4 @@
import { colorMap } from '@strudel.cycles/core/color.mjs';
import { colorMap } from '@strudel/core/color.mjs';
import React from 'react';
const Colors = () => {
+3 -3
View File
@@ -1,8 +1,8 @@
import { useState, useRef, useCallback, useMemo, useEffect } from 'react';
import { Icon } from './Icon';
import { silence, getPunchcardPainter, noteToMidi } from '@strudel.cycles/core';
import { transpiler } from '@strudel.cycles/transpiler';
import { getAudioContext, webaudioOutput } from '@strudel.cycles/webaudio';
import { silence, getPunchcardPainter, noteToMidi } from '@strudel/core';
import { transpiler } from '@strudel/transpiler';
import { getAudioContext, webaudioOutput } from '@strudel/webaudio';
import { StrudelMirror } from '@strudel/codemirror';
// import { prebake } from '@strudel/repl';
import { prebake } from '../repl/prebake.mjs';
@@ -4,7 +4,7 @@ layout: ../../../layouts/MainLayout.astro
---
import { MiniRepl } from '@src/docs/MiniRepl';
import { midi2note } from '@strudel.cycles/core/';
import { midi2note } from '@strudel/core/';
import Box from '@components/Box.astro';
import QA from '@components/QA';
+2 -2
View File
@@ -1,6 +1,6 @@
import { createCanvas } from 'canvas';
import { pianoroll } from '@strudel.cycles/core';
import { evaluate } from '@strudel.cycles/transpiler';
import { pianoroll } from '@strudel/core';
import { evaluate } from '@strudel/transpiler';
import '../../../../test/runtime.mjs';
import * as tunes from '../../repl/tunes.mjs';
@@ -4,8 +4,6 @@ layout: ../../layouts/MainLayout.astro
---
import { MiniRepl } from '../../docs/MiniRepl';
import { JsDoc } from '../../docs/JsDoc';
import { samples } from '@strudel.cycles/webaudio';
see https://strudel.cc/?zMEo5kowGrFc
-2
View File
@@ -4,8 +4,6 @@ layout: ../../layouts/MainLayout.astro
---
import { MiniRepl } from '../../docs/MiniRepl';
import { JsDoc } from '../../docs/JsDoc';
import { samples } from '@strudel.cycles/webaudio';
Note:
+2 -2
View File
@@ -1,6 +1,6 @@
import { createCanvas } from 'canvas';
import { pianoroll } from '@strudel.cycles/core';
import { evaluate } from '@strudel.cycles/transpiler';
import { pianoroll } from '@strudel/core';
import { evaluate } from '@strudel/transpiler';
import '../../../../test/runtime.mjs';
import { getMyPatterns } from '../../my_patterns';
+13 -12
View File
@@ -16,16 +16,16 @@ The purpose of the multiple packages is to
## Overview
[See the latest published packages on npm](https://www.npmjs.com/search?q=%40strudel.cycles).
[See the latest published packages on npm](https://www.npmjs.com/search?q=%40strudel).
Here is an overview of all the packages:
### Essential Packages
These package are the most essential. You might want to use all of those if you're using strudel in your project:
- [core](https://github.com/tidalcycles/strudel/tree/main/packages/core#strudelcyclescore): tidal pattern engine with core primitives
- [mini](https://github.com/tidalcycles/strudel/tree/main/packages/mini#strudelcyclesmini): mini notation parser + core bindings
- [transpiler](https://github.com/tidalcycles/strudel/tree/main/packages/transpiler#strudelcyclestranspiler): user code transpiler. syntax sugar + highlighting
- [core](https://github.com/tidalcycles/strudel/tree/main/packages/core#strudelcore): tidal pattern engine with core primitives
- [mini](https://github.com/tidalcycles/strudel/tree/main/packages/mini#strudelmini): mini notation parser + core bindings
- [transpiler](https://github.com/tidalcycles/strudel/tree/main/packages/transpiler#strudeltranspiler): user code transpiler. syntax sugar + highlighting
### Language Extensions
@@ -38,23 +38,24 @@ These packages extend the pattern language by specific functions
These packages provide bindings for different ways to output strudel patterns:
- [webaudio](https://github.com/tidalcycles/strudel/tree/main/packages/webaudio#strudelcycleswebaudio): the default webaudio output
- [osc](https://github.com/tidalcycles/strudel/tree/main/packages/osc#strudelcyclesosc): bindings to communicate via OSC
- [midi](https://github.com/tidalcycles/strudel/tree/main/packages/midi#strudelcyclesmidi): webmidi bindings
- [csound](https://github.com/tidalcycles/strudel/tree/main/packages/csound#strudelcyclescsound): csound bindings
- [soundfonts](https://github.com/tidalcycles/strudel/tree/main/packages/serial#strudelcyclessoundfonts): Soundfont support
- [serial](https://github.com/tidalcycles/strudel/tree/main/packages/serial#strudelcyclesserial): webserial bindings
- [webaudio](https://github.com/tidalcycles/strudel/tree/main/packages/webaudio#strudelwebaudio): the default webaudio output
- [osc](https://github.com/tidalcycles/strudel/tree/main/packages/osc#strudelosc): bindings to communicate via OSC
- [midi](https://github.com/tidalcycles/strudel/tree/main/packages/midi#strudelmidi): webmidi bindings
- [csound](https://github.com/tidalcycles/strudel/tree/main/packages/csound#strudelcsound): csound bindings
- [soundfonts](https://github.com/tidalcycles/strudel/tree/main/packages/serial#strudelsoundfonts): Soundfont support
- [serial](https://github.com/tidalcycles/strudel/tree/main/packages/serial#strudelserial): webserial bindings
### Others
- [embed](https://github.com/tidalcycles/strudel/tree/main/packages/embed#strudelcyclesembed): embeddable REPL web component
- [react](https://github.com/tidalcycles/strudel/tree/main/packages/react#strudelcyclesreact): react hooks and components for strudel
- [embed](https://github.com/tidalcycles/strudel/tree/main/packages/embed#strudelembed): embeddable REPL web component
### No Longer Maintained
- [react](https://github.com/tidalcycles/strudel/tree/main/packages/react#strudelreact): react hooks and components for strudel
- [eval](https://www.npmjs.com/package/@strudel.cycles/eval): old code transpiler
- [tone](https://www.npmjs.com/package/@strudel.cycles/tone): bindings for Tone.js instruments and effects
- [webdirt](https://www.npmjs.com/package/@strudel.cycles/webdirt): webdirt bindings, replaced by webaudio package
- any `@strudel.cycles/*` packages have been renamed to `@strudel/*` since version 0.10.0.
## Tools
+1 -1
View File
@@ -4,7 +4,7 @@ layout: ../../layouts/MainLayout.astro
---
import { MiniRepl } from '@src/docs/MiniRepl';
import { midi2note } from '@strudel.cycles/core/';
import { midi2note } from '@strudel/core';
import Box from '@components/Box.astro';
import QA from '@components/QA';
+3 -3
View File
@@ -4,10 +4,10 @@ Copyright (C) 2022 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 { code2hash, getDrawContext, logger, silence } from '@strudel.cycles/core';
import { code2hash, getDrawContext, logger, silence } from '@strudel/core';
import cx from '@src/cx.mjs';
import { transpiler } from '@strudel.cycles/transpiler';
import { getAudioContext, initAudioOnFirstClick, webaudioOutput } from '@strudel.cycles/webaudio';
import { transpiler } from '@strudel/transpiler';
import { getAudioContext, initAudioOnFirstClick, webaudioOutput } from '@strudel/webaudio';
import { defaultAudioDeviceName } from '../settings.mjs';
import { getAudioDevices, setAudioDevice } from './util.mjs';
import { StrudelMirror, defaultSettings } from '@strudel/codemirror';
+1 -1
View File
@@ -5,7 +5,7 @@ import {
onTriggerSample,
getAudioContext,
loadBuffer,
} from '@strudel.cycles/webaudio';
} from '@strudel/webaudio';
let TAURI;
if (typeof window !== 'undefined') {
+2 -2
View File
@@ -1,6 +1,6 @@
import { registerSound, onTriggerSample } from '@strudel.cycles/webaudio';
import { registerSound, onTriggerSample } from '@strudel/webaudio';
import { isAudioFile } from './files.mjs';
import { logger } from '@strudel.cycles/core';
import { logger } from '@strudel/core';
//utilites for writing and reading to the indexdb
+1 -1
View File
@@ -1,5 +1,5 @@
import XMarkIcon from '@heroicons/react/20/solid/XMarkIcon';
import { logger } from '@strudel.cycles/core';
import { logger } from '@strudel/core';
import useEvent from '@src/useEvent.mjs';
import cx from '@src/cx.mjs';
import { nanoid } from 'nanoid';
+1 -1
View File
@@ -1,6 +1,6 @@
import useEvent from '@src/useEvent.mjs';
import { useStore } from '@nanostores/react';
import { getAudioContext, soundMap, connectToDestination } from '@strudel.cycles/webaudio';
import { getAudioContext, soundMap, connectToDestination } from '@strudel/webaudio';
import React, { useMemo, useRef } from 'react';
import { settingsMap, useSettings } from '../../settings.mjs';
import { ButtonGroup } from './Forms.jsx';
+1 -1
View File
@@ -1,4 +1,4 @@
import { Pattern, noteToMidi, valueToMidi } from '@strudel.cycles/core';
import { Pattern, noteToMidi, valueToMidi } from '@strudel/core';
const maxPan = noteToMidi('C8');
const panwidth = (pan, width) => pan * width + (1 - width) / 2;
+5 -5
View File
@@ -1,5 +1,5 @@
import { Pattern, noteToMidi, valueToMidi } from '@strudel.cycles/core';
import { registerSynthSounds, registerZZFXSounds, samples } from '@strudel.cycles/webaudio';
import { Pattern, noteToMidi, valueToMidi } from '@strudel/core';
import { registerSynthSounds, registerZZFXSounds, samples } from '@strudel/webaudio';
import { registerSamplesFromDB } from './idbutils.mjs';
import './piano.mjs';
import './files.mjs';
@@ -15,10 +15,10 @@ export async function prebake() {
registerZZFXSounds(),
registerSamplesFromDB(),
//registerSoundfonts(),
// need dynamic import here, because importing @strudel.cycles/soundfonts fails on server:
// => getting "window is not defined", as soon as "@strudel.cycles/soundfonts" is imported statically
// need dynamic import here, because importing @strudel/soundfonts fails on server:
// => getting "window is not defined", as soon as "@strudel/soundfonts" is imported statically
// seems to be a problem with soundfont2
import('@strudel.cycles/soundfonts').then(({ registerSoundfonts }) => registerSoundfonts()),
import('@strudel/soundfonts').then(({ registerSoundfonts }) => registerSoundfonts()),
samples(`${baseNoTrailing}/piano.json`, `${baseNoTrailing}/piano/`, { prebake: true }),
// https://github.com/sgossner/VCSL/
// https://api.github.com/repositories/126427031/contents/
+11 -11
View File
@@ -1,6 +1,6 @@
import { controls, evalScope, hash2code, logger } from '@strudel.cycles/core';
import { controls, evalScope, hash2code, logger } from '@strudel/core';
import { settingPatterns, defaultAudioDeviceName } from '../settings.mjs';
import { getAudioContext, initializeAudioOutput, setDefaultAudioContext } from '@strudel.cycles/webaudio';
import { getAudioContext, initializeAudioOutput, setDefaultAudioContext } from '@strudel/webaudio';
import { isTauri } from '../tauri.mjs';
import './Repl.css';
@@ -79,16 +79,16 @@ export function getRandomTune() {
export function loadModules() {
let modules = [
import('@strudel.cycles/core'),
import('@strudel.cycles/tonal'),
import('@strudel.cycles/mini'),
import('@strudel.cycles/xen'),
import('@strudel.cycles/webaudio'),
import('@strudel/core'),
import('@strudel/tonal'),
import('@strudel/mini'),
import('@strudel/xen'),
import('@strudel/webaudio'),
import('@strudel/codemirror'),
import('@strudel/hydra'),
import('@strudel.cycles/serial'),
import('@strudel.cycles/soundfonts'),
import('@strudel.cycles/csound'),
import('@strudel/serial'),
import('@strudel/soundfonts'),
import('@strudel/csound'),
];
if (isTauri()) {
modules = modules.concat([
@@ -97,7 +97,7 @@ export function loadModules() {
import('@strudel/desktopbridge/oscbridge.mjs'),
]);
} else {
modules = modules.concat([import('@strudel.cycles/midi'), import('@strudel.cycles/osc')]);
modules = modules.concat([import('@strudel/midi'), import('@strudel/osc')]);
}
return evalScope(
+2 -2
View File
@@ -1,9 +1,9 @@
import { atom } from 'nanostores';
import { persistentMap, persistentAtom } from '@nanostores/persistent';
import { useStore } from '@nanostores/react';
import { register } from '@strudel.cycles/core';
import { register } from '@strudel/core';
import * as tunes from './repl/tunes.mjs';
import { logger } from '@strudel.cycles/core';
import { logger } from '@strudel/core';
export let $publicPatterns = atom([]);
export let $featuredPatterns = atom([]);