Skip to content

Caching, node playback#287

Open
Alyksett wants to merge 4 commits into
j-p-higgins:mainfrom
Alyksett:caching
Open

Caching, node playback#287
Alyksett wants to merge 4 commits into
j-p-higgins:mainfrom
Alyksett:caching

Conversation

@Alyksett
Copy link
Copy Markdown

Adds:

  • Caching of node results
  • Ability to play single nodes by a conditionally rendered play button on the node once it's been cached

Caching works by hashing the node + params + input hashes. For example in the thread

[In] -> [A] -> [B] -> [Out]

Running the thread caches A, B. if [B] changes, running the thread fetches the result of A and pipes into the changed node B.

This speeds up the time taken to run threads by a potentially significant factor depending on input size and location of changes in the thread.

Since the nodes are cached, this also allows us to play individual nodes which helps in testing/understanding how sounds change through a thread instead of running an intermediary node to output. (I quickly felt this would be a nice feature when I started using SoundThread)

Cached files are saved in "user://soundthread_cache/" and are deleted on program exit or reloading a thread.

Frequency domain nodes are resynthesized on playback when played.

@Alyksett
Copy link
Copy Markdown
Author

@j-p-higgins This is the first time I've worked in godot so apologies if conventions are off.. I've only tested this on my mac and I don't see any testing/contributing guides. Let me know what/if should be changed, especially in accordance with the conventions of this codebase.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant