-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix some eslint config + fix some newly uncovered warnings * Fix underdraw in MIDI editor note lines when zoomed in
- Loading branch information
Showing
23 changed files
with
171 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Map as ImmMap } from 'immutable'; | ||
import { globalTempoCSN } from 'src/globalMenu'; | ||
import BpmNodeSmallView from 'src/graphEditor/nodes/CustomAudio/BPM/BPMNodeSmallView.svelte'; | ||
|
||
import type { ForeignNode } from 'src/graphEditor/nodes/CustomAudio/CustomAudio'; | ||
import type { OverridableAudioParam } from 'src/graphEditor/nodes/util'; | ||
import type { ConnectableInput, ConnectableOutput } from 'src/patchNetwork'; | ||
import { mkSvelteContainerCleanupHelper, mkSvelteContainerRenderHelper } from 'src/svelteUtils'; | ||
|
||
export class BPMNode implements ForeignNode { | ||
private vcId: string | undefined; | ||
|
||
static typeName = 'BPM'; | ||
public nodeType = 'customAudio/bpm'; | ||
|
||
public paramOverrides: { | ||
[name: string]: { param: OverridableAudioParam; override: ConstantSourceNode }; | ||
} = {}; | ||
|
||
constructor(_ctx: AudioContext, vcId?: string, _params?: { [key: string]: any } | null) { | ||
this.vcId = vcId; | ||
|
||
this.renderSmallView = mkSvelteContainerRenderHelper({ | ||
Comp: BpmNodeSmallView, | ||
getProps: () => ({}), | ||
}); | ||
|
||
this.cleanupSmallView = mkSvelteContainerCleanupHelper({ preserveRoot: true }); | ||
} | ||
|
||
public serialize(): { [key: string]: any } { | ||
return {}; | ||
} | ||
|
||
public buildConnectables() { | ||
return { | ||
inputs: ImmMap<string, ConnectableInput>(), | ||
outputs: ImmMap<string, ConnectableOutput>().set('bpm', { | ||
type: 'number', | ||
node: globalTempoCSN, | ||
}), | ||
vcId: this.vcId!, | ||
node: this, | ||
}; | ||
} | ||
|
||
// These are set dynamically at initialization time in the constructor | ||
public renderSmallView: ForeignNode['renderSmallView']; | ||
public cleanupSmallView: ForeignNode['cleanupSmallView']; | ||
} |
11 changes: 11 additions & 0 deletions
11
src/graphEditor/nodes/CustomAudio/BPM/BPMNodeSmallView.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="root"> | ||
This node outputs the current global tempo for the composition in BPM. | ||
<br /><br /> | ||
In the future, this will allow the global tempo to be controlled dynamically during playback as well. | ||
</div> | ||
|
||
<style> | ||
.root { | ||
padding: 8px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 23 additions & 13 deletions
36
src/graphEditor/nodes/CustomAudio/CustomGainNodeSmallView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.