This repository was archived by the owner on Jan 16, 2023. It is now read-only.
Open
Conversation
neSpecc
suggested changes
Nov 21, 2019
src/modules/AudioContextManager.ts
Outdated
| * Get current time of audio context | ||
| * @return {Number} | ||
| */ | ||
| public getCurrentTime(): number { |
Member
There was a problem hiding this comment.
можно сделать геттер currentTime
src/modules/Noise.ts
Outdated
| /** | ||
| * Class represents noise node | ||
| */ | ||
| export default class Noise { |
Member
There was a problem hiding this comment.
Suggested change
| export default class Noise { | |
| export default abstract class Noise { |
src/modules/Noise.ts
Outdated
| * @param destination {AudioDestinationNode} - audio context destination | ||
| */ | ||
| public connect(destination: AudioDestinationNode): void { | ||
| if (this.isConfigured) { |
src/modules/Noise.ts
Outdated
| /** | ||
| * Configure noise node | ||
| */ | ||
| private configure(): void { |
src/modules/Noise.ts
Outdated
| this.buffer = audioContextManager.getAudioContext().createBuffer(1, 4096, audioContextManager.getAudioContext().sampleRate); | ||
| this.buffersChannelData = this.buffer.getChannelData(0); | ||
|
|
||
| for (let i = 0; i < 4096; i++) { |
Member
There was a problem hiding this comment.
нужен коммент, или вынести в отдельный метод
…team/codex.music into noise-node � Conflicts: � dist/index.js
…to noise-node � Conflicts: � dist/index.js
neSpecc
suggested changes
Nov 26, 2019
src/modules/noises/Noise.ts
Outdated
| /** | ||
| * Noise node status | ||
| */ | ||
| private isConfigured: boolean = false; |
src/modules/noises/Noise.ts
Outdated
| this.bufferSourceNode.loop = true; | ||
|
|
||
| /** | ||
| * Add bandpass filter |
src/modules/noises/Noise.ts
Outdated
| if (frequency) { | ||
| this.setNoiseFrequency(frequency); | ||
| } else { | ||
| this.setNoiseFrequency(1000); |
Member
There was a problem hiding this comment.
просто внеси 1000 как дефолтное значение параметра
neSpecc
reviewed
Nov 26, 2019
src/modules/noises/Noise.ts
Outdated
| constructor(frequency?: number) { | ||
| this.configure(); | ||
| if (frequency) { | ||
| this.currentFrequency = frequency; |
src/modules/noises/Noise.ts
Outdated
| private currentFrequency: number = 1000; | ||
|
|
||
| /** | ||
| * Destination for noise node |
| /** | ||
| * Current frequency of noise node in hertz | ||
| */ | ||
| private currentFrequency: number = 1000; |
Member
There was a problem hiding this comment.
это свойство сейчас нигде не используется
| /** | ||
| * Configure noise node | ||
| */ | ||
| private configure(): void { |
Member
There was a problem hiding this comment.
может этот код лучше в конструктор перенести? тк тут определяются основные свойства, а приватный метод где-то внизу. Пусть лучше будет в конструкторе наверху
src/modules/noises/Noise.ts
Outdated
| if (newDestination) { | ||
| this.destination = newDestination; | ||
| } | ||
| if (this.destination) { |
Member
There was a problem hiding this comment.
я не вижу в коде, где назначается this.destination
neSpecc
reviewed
Nov 26, 2019
| /** | ||
| * Add bandpass filter for filtering required noise frequency | ||
| */ | ||
| this.bandpass = new BandPassFilter(); |
Member
There was a problem hiding this comment.
это можно сразу при объявлении свойства назначить
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #26