merge changes
This commit is contained in:
parent
e72c9cbebf
commit
7225b0b18d
2 changed files with 6 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import { useEvent } from '@strudel.cycles/react';
|
import { useEvent } from '@strudel.cycles/react';
|
||||||
// import { cx } from '@strudel.cycles/react';
|
// import { cx } from '@strudel.cycles/react';
|
||||||
import { useStore } from '@nanostores/react';
|
import { useStore } from '@nanostores/react';
|
||||||
import { getAudioContext, soundMap } from '@strudel.cycles/webaudio';
|
import { getAudioContext, soundMap, connectToDestination } from '@strudel.cycles/webaudio';
|
||||||
import React, { useMemo, useRef } from 'react';
|
import React, { useMemo, useRef } from 'react';
|
||||||
import { settingsMap, useSettings } from '../../settings.mjs';
|
import { settingsMap, useSettings } from '../../settings.mjs';
|
||||||
import { ButtonGroup } from './Forms.jsx';
|
import { ButtonGroup } from './Forms.jsx';
|
||||||
|
|
@ -72,7 +72,7 @@ export function SoundsTab() {
|
||||||
const onended = () => trigRef.current?.node?.disconnect();
|
const onended = () => trigRef.current?.node?.disconnect();
|
||||||
trigRef.current = Promise.resolve(onTrigger(time, params, onended));
|
trigRef.current = Promise.resolve(onTrigger(time, params, onended));
|
||||||
trigRef.current.then((ref) => {
|
trigRef.current.then((ref) => {
|
||||||
ref?.node.connect(ctx.destination);
|
connectToDestination(ref?.node);
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@ import { cx } from '@strudel.cycles/react';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import * as tunes from '../tunes.mjs';
|
import * as tunes from '../tunes.mjs';
|
||||||
|
|
||||||
|
const { BASE_URL } = import.meta.env;
|
||||||
|
const baseNoTrailing = BASE_URL.endsWith('/') ? BASE_URL.slice(0, -1) : BASE_URL;
|
||||||
|
|
||||||
export function WelcomeTab({ context }) {
|
export function WelcomeTab({ context }) {
|
||||||
return (
|
return (
|
||||||
<div className="prose dark:prose-invert max-w-[600px] pt-2 font-sans pb-8 px-4">
|
<div className="prose dark:prose-invert max-w-[600px] pt-2 font-sans pb-8 px-4">
|
||||||
|
|
@ -20,7 +23,7 @@ export function WelcomeTab({ context }) {
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
To learn more about what this all means, check out the{' '}
|
To learn more about what this all means, check out the{' '}
|
||||||
<a href="./workshop/getting-started" target="_blank">
|
<a href={`${baseNoTrailing}/workshop/getting-started/`} target="_blank">
|
||||||
interactive tutorial
|
interactive tutorial
|
||||||
</a>
|
</a>
|
||||||
. Also feel free to join the{' '}
|
. Also feel free to join the{' '}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue