Skip to content

Commit

Permalink
working on getting actions to run
Browse files Browse the repository at this point in the history
  • Loading branch information
tambien committed Apr 25, 2024
1 parent 08df7ad commit 5d910ca
Show file tree
Hide file tree
Showing 17 changed files with 118 additions and 88 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run tests

on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- dev
push:
branches:
- dev
jobs:
all-tests:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: 18.12.0
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
2 changes: 1 addition & 1 deletion Tone/component/channel/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class Channel extends ToneAudioNode<ChannelOptions> {
}

/**
* Solo/unsolo the channel. Soloing is only relative to other [[Channels]] and [[Solo]] instances
* Solo/unsolo the channel. Soloing is only relative to other [[Channel]]s and [[Solo]] instances
*/
get solo(): boolean {
return this._solo.solo;
Expand Down
2 changes: 1 addition & 1 deletion Tone/core/context/Context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ export class Context extends BaseContext {

/**
* Starts the audio context from a suspended state. This is required
* to initially start the AudioContext. See [[Tone.start]]
* to initially start the AudioContext. See [[start]]
*/
resume(): Promise<void> {
if (isAudioContext(this._context)) {
Expand Down
2 changes: 1 addition & 1 deletion Tone/core/context/ToneAudioNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ export function disconnect(
* const player1 = new Tone.Player("https://tonejs.github.io/audio/drum-samples/conga-rhythm.mp3");
* const filter = new Tone.Filter("G5").toDestination();
* // connect nodes to a common destination
* fanIn(player, player1, filter);
* Tone.fanIn(player, player1, filter);
*/
export function fanIn(...nodes: OutputNode[]): void {
const dstNode = nodes.pop();
Expand Down
2 changes: 1 addition & 1 deletion Tone/core/context/ToneWithContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export abstract class ToneWithContext<Options extends ToneWithContextOptions> ex

/**
* Convert the incoming time to seconds.
* This is calculated against the current [[Tone.Transport]] bpm
* This is calculated against the current [[Transport]] bpm
* @example
* const gain = new Tone.Gain();
* setInterval(() => console.log(gain.toSeconds("4n")), 100);
Expand Down
2 changes: 1 addition & 1 deletion Tone/instrument/DuoSynth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface DuoSynthOptions extends MonophonicOptions {
}

/**
* DuoSynth is a monophonic synth composed of two [[MonoSynths]] run in parallel with control over the
* DuoSynth is a monophonic synth composed of two [[MonoSynth]]s run in parallel with control over the
* frequency ratio between the two voices and vibrato effect.
* @example
* const duoSynth = new Tone.DuoSynth().toDestination();
Expand Down
1 change: 0 additions & 1 deletion Tone/instrument/PolySynth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ export class PolySynth<Voice extends Monophonic<any> = Synth> extends Instrument
* @param notes The notes to play. Accepts a single Frequency or an array of frequencies.
* @param time When the release will be triggered.
* @example
* @example
* const poly = new Tone.PolySynth(Tone.AMSynth).toDestination();
* poly.triggerAttack(["Ab3", "C4", "F5"]);
* // trigger the release of the given notes.
Expand Down
3 changes: 3 additions & 0 deletions Tone/source/buffer/Player.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,11 +709,14 @@ describe("Player", () => {
setTimeout(() => {
player.restart(undefined, undefined, 1);
const checkStopTimes = new Set();
// @ts-ignore
player._activeSources.forEach(source => {
// @ts-ignore
checkStopTimes.add(source._stopTime);
});
getContext().lookAhead = originalLookAhead;
// ensure each source has a different stopTime
// @ts-ignore
expect(checkStopTimes.size).to.equal(player._activeSources.size);
done();
}, 250);
Expand Down
2 changes: 1 addition & 1 deletion Tone/source/buffer/Players.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class Players extends ToneAudioNode<PlayersOptions> {
* const players = new Tone.Players();
* players.add("gong", "https://tonejs.github.io/audio/berklee/gong_1.mp3", () => {
* console.log("gong loaded");
* players.get("gong").start();
* players.player("gong").start();
* });
*/
add(name: string, url: string | ToneAudioBuffer | AudioBuffer, callback?: () => void): this {
Expand Down
2 changes: 1 addition & 1 deletion Tone/source/oscillator/OmniOscillator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export class OmniOscillator<OscType extends AnyOscillator>

/**
* The width of the oscillator when sourceType === "pulse".
* See [[PWMOscillator.width]]
* See [[PWMOscillator]]
*/
get width(): IsPulseOscillator<OscType, Signal<"audioRange">> {
if (this._getOscType(this._oscillator, "pulse")) {
Expand Down
2 changes: 1 addition & 1 deletion examples/meter.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}).toDestination();

const toneMeter = new Tone.Meter({
channels: 2,
channelCount: 2,
});
player.connect(toneMeter);

Expand Down
2 changes: 1 addition & 1 deletion examples/mixer.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
}

// create a meter on the destination node
const toneMeter = new Tone.Meter({ channels: 2 });
const toneMeter = new Tone.Meter({ channelCount: 2 });
Tone.Destination.chain(toneMeter);
meter({
tone: toneMeter,
Expand Down
2 changes: 1 addition & 1 deletion examples/pingPongDelay.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
// play a snare sound through it
const player = new Tone.Player("https://tonejs.github.io/audio/drum-samples/CR78/snare.mp3").connect(feedbackDelay);

const toneMeter = new Tone.Meter({ channels: 2 });
const toneMeter = new Tone.Meter({ channelCount: 2 });
feedbackDelay.connect(toneMeter);

meter({
Expand Down
92 changes: 46 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tone",
"version": "14.8.0",
"version": "14.9.0",
"description": "A Web Audio framework for making interactive music in the browser.",
"browser": "build/Tone.js",
"main": "build/esm/index.js",
Expand Down Expand Up @@ -103,7 +103,7 @@
"yargs": "^17.3.0"
},
"dependencies": {
"standardized-audio-context": "^25.3.37",
"standardized-audio-context": "^25.3.70",
"tslib": "^2.3.1"
},
"prettier": {
Expand Down
6 changes: 3 additions & 3 deletions scripts/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name" : "Tone.js",
"mode": "file",
"entryPoints": ["../Tone"],
"out":"../docs",
"defaultCategory" : "Global",
"categorizeByGroup" : true,
"categoryOrder" : ["Core", "Source", "Instrument", "Effect", "Component", "Signal"],
"exclude" : ["./Tone/**/*.test.ts", "./test/**/*.ts"],
"excludeProtected" : true,
"excludePrivate" : true,
"listInvalidSymbolLinks" : true,
"excludeNotExported" : false
"hideGenerator": true,
}
Loading

0 comments on commit 5d910ca

Please sign in to comment.