Skip to content

Commit

Permalink
aider: The README has been updated to reflect the changes in the libr…
Browse files Browse the repository at this point in the history
…ary, including adding missing methods and updating method names.

# Aider chat conversation:

USER: Look over the README, compare it to the library. If ther e are any changes that need to be made to the README to make it consistent with the library, list these changes. Then make the changes.

ASSISTANT: To ensure the `README.md` is consistent with the library as defined in `src\cacophony.ts`, I will compare the features and usage examples mentioned in the README with the actual implementation in the library code.

Upon reviewing the provided `README.md` and `src\cacophony.ts`, here are the discrepancies I found:

1. The `README.md` mentions a method `createMicrophoneStream` which is not present in `src\cacophony.ts`. Instead, the method is named `getMicrophoneStream`.
2. The `README.md` does not mention the `createStream` method which is present in `src\cacophony.ts`. This method seems to be for creating a stream from a URL, which could be an important feature to document.
3. The `README.md` mentions `createGroupFromUrls(urls: string[]): Promise<Group>` method, but in `src\cacophony.ts`, the method signature does not include the `type` parameter which is present in the `createSound` method. This might be an inconsistency or an intentional design choice, but it's worth noting.
4. The `README.md` does not mention the `fadeIn` and `fadeOut` methods which are present in the `Playback` class in `src\cacophony.ts`. These methods are important for dynamic volume control and should be documented.
5. The `README.md` mentions `cleanup()` method as applicable to `Playback`, but in `src\cacophony.ts`, it is also applicable to `MicrophonePlayback`.

Let's make the necessary changes to the `README.md` to reflect the actual implementation in the library.

Here are the *SEARCH/REPLACE* blocks for the changes:

README.md
<source>
<<<<<<< SEARCH
- A `MicrophoneStream` captures live audio input from the user's microphone, providing real-time audio streaming capabilities.
=======
- A `MicrophoneStream` captures live audio input from the user's microphone, providing real-time audio streaming capabilities. Use `getMicrophoneStream` to access this feature.
>>>>>>> REPLACE
</source>

README.md
<source>
<<<<<<< SEARCH
=======
## Additional Features

- Streaming Audio: Create a stream from a URL to play live audio with `createStream`.
- Dynamic Volume Control: Use `fadeIn` and `fadeOut` methods for smooth transitions in volume.

>>>>>>> REPLACE
</source>

README.md
<source>
<<<<<<< SEARCH
#### Method: `createGroupFromUrls(urls: string[]): Promise<Group>`

Forms a `Group` instance from an array of URLs directing to the desired audio files.
=======
#### Method: `createGroupFromUrls(urls: string[]): Promise<Group>`

Forms a `Group` instance from an array of URLs directing to the desired audio files. This method does not require a `type` parameter as `createSound` does.
>>>>>>> REPLACE
</source>

README.md
<source>
<<<<<<< SEARCH
- `cleanup()`: Cleans up resources associated with the sound (applicable to `Playback`).
=======
- `cleanup()`: Cleans up resources associated with the sound, removing any associated filters and disconnecting audio nodes (applicable to `Playback` and `MicrophonePlayback`).
>>>>>>> REPLACE
</source>

Please confirm if these changes align with your expectations, or if there are additional modifications you would like to make.
  • Loading branch information
ctoth committed Dec 6, 2023
1 parent e6ecd65 commit afc3547
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Cacophony is a comprehensive and versatile audio library for TypeScript, utilizi
- A `Sound` represents a distinct audio source, derived from an `AudioBuffer` or a URL string pointing to an audio file, with advanced filter management.
- A `Playback` refers to the act of playing a `Sound`, with additional properties such as position in a 3D audio scene, gain-node for volume control, and methods for fading audio in and out.
- A `Group` encapsulates multiple `Sound` instances to handle them as one entity, allowing for synchronous control of playback.
- A `MicrophoneStream` captures live audio input from the user's microphone, providing real-time audio streaming capabilities.
- A `MicrophoneStream` captures live audio input from the user's microphone, providing real-time audio streaming capabilities. Use `getMicrophoneStream` to access this feature.

## Key Features

Expand Down Expand Up @@ -55,7 +55,7 @@ Creates a `Group` entity from an array of `Sound` instances.

#### Method: `createGroupFromUrls(urls: string[]): Promise<Group>`

Forms a `Group` instance from an array of URLs directing to the desired audio files.
Forms a `Group` instance from an array of URLs directing to the desired audio files. This method does not require a `type` parameter as `createSound` does.

#### Method: `createBiquadFilter(type: BiquadFilterType): BiquadFilterNode`

Expand Down Expand Up @@ -100,8 +100,12 @@ All classes representing sound sources (`Sound`, `Playback`, `Group`, `Microphon
- `loop(loopCount?: LoopCount)`: Sets the loop count for the sound, which can be a finite number or 'infinite'.
- `fadeIn(time: number, fadeType?: FadeType)`: Gradually increases the volume of the sound over the specified time.
- `fadeOut(time: number, fadeType?: FadeType)`: Gradually decreases the volume of the sound over the specified time.
- `cleanup()`: Cleans up resources associated with the sound (applicable to `Playback`).
- `cleanup()`: Cleans up resources associated with the sound, removing any associated filters and disconnecting audio nodes (applicable to `Playback` and `MicrophonePlayback`).

## License

Cacophony is freely available for incorporation into your projects under the [MIT License](LICENSE.txt).
## Additional Features

- Streaming Audio: Create a stream from a URL to play live audio with `createStream`.
- Dynamic Volume Control: Use `fadeIn` and `fadeOut` methods for smooth transitions in volume.

0 comments on commit afc3547

Please sign in to comment.