Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Audio 10/10] Loose ends #2337

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

[Audio 10/10] Loose ends #2337

wants to merge 19 commits into from

Conversation

Thar0
Copy link
Contributor

@Thar0 Thar0 commented Dec 10, 2024

The final PR in the series of initial audio work. With this PR everything I had worked on in my branch is merged, but new improvements may still happen in the future.

  • Adds afile_sizes to generate sizes headers for Soundfonts and Sequences for audio/session_config.c
  • Adds an overview README for tools/audio
  • Tools cleanup and further documentation
  • Renames some internal .note sections from .name and .fonts to .note.name and .note.fonts
  • Samplebank and Soundfont xml documentation

I originally planned to also include a doc about how VADPCM works but writing it was taking too long so I didn't include it here.

Copy link
Collaborator

@fig02 fig02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly just read docs and didnt look at code changes too deeply

Copy link
Contributor

@cadmic cadmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only skimmed the docs, and did not try to use them to create my own samplebank or soundfont

```
Begins a new samplebank.

**Properties**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically in XML parlance these are called "attributes", and what's called "Sub-Attributes" below are "tags" (maybe "child tags" or "children"?). I think using the word "properties" is probably fine, but using the word "attribute" for tags could be confusing

(ditto with other XML docs)

**Properties**

- **Name**: Name of this blob. Must be a valid C language identifier.
- **Path**: Path to binary file, relative to the project root (typically in `assets/samples/`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be $(BUILD_DIR)/assets/audio/samples/?

Comment on lines 22 to 23
- **Medium**: The storage medium, from the SampleMedium enum.
- **CachePolicy**: The cache policy, from the AudioCacheLoadType enum.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit: in the soundfont XML you put SampleMedium and AudioCacheLoadType in monospace font

**Properties**

- **Name**: Unique name for this envelope. Must be a valid C identifier.
- **Release**: Release rate index for this envelope
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this index into exactly? I tried searching for "release rate" but didn't find much

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It indexes gAudioCtx.adsrDecayTable, I mentioned this but didn't add much explanation for it, I think the code surrounding this probably needs some docs before reviewing again how it's presented here

Name="<C Identifier>"
Sample="<Sample Name>"
SampleRate="[Sample Rate]"
BaseNote="[Note Number]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define "Note Number"? If I didn't know better I'd attempt to put "C4" or something here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C4 would actually be correct, I've changed it to say Note Name and added a brief explanation of the field at the top of the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants