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

Add examples #3

Closed
Psykopear opened this issue Mar 12, 2021 · 2 comments
Closed

Add examples #3

Psykopear opened this issue Mar 12, 2021 · 2 comments

Comments

@Psykopear
Copy link
Contributor

Hi again.

I'm building some small projects while I learn how to use this crate.
Would you be interested in adding those as examples in this repository?

I already moved the example in the README inside an examples folder, so I can run it with:

cargo run --release --examples sinewave

The only thing changed is that I used .expect rather than propagating the error with anyhow just to avoid adding the dependency in the repository.

I already have another example to play a .wav file from the file system.

If you are ok with it I can open a PR for each example while I write them.

@ooesili
Copy link
Owner

ooesili commented Mar 12, 2021

Hi!

I'm the process of adding a patterns API and a scheduler to this crate, and its going to make the example in the README very different than it is now. The crate is pretty low-level right now as I'm sure you've noticed, and I don't want the user experience or the examples to be that low level. For example, I don't imagine that most people will use the server module very often, if at all.

TL;DR this crate is going through a bunch of changes right now so those examples will go out of date really quickly, so I'm going say no to adding an examples folder at this time. If you'd like to contribute examples, I'd been trying to port the sclang examples from the SuperCollider docs to Rust. For example, you can see how I've ported the example on the DiskOut UGen:

Some Background

I'm shooting for pushing up v0.2.0 within a week and that will include the pattern and scheduler modules which should provide more of a stable foundation to build examples, but even then I still have a bunch more foundational work in progress. For some background, this project started in a different repository (https://gitlab.com/ooesili/studio/). The studio repository is my playground where I've been figuring stuff out. I've been pulling out features from that repository, polishing and documenting them, and adding them to this crate when I feel happy about their designs. Some of the notable things that I already have proof-of-concept implementations of are:

  • looping with live code reloading
  • a "tracker" module that can record and playback audio
  • declarative buffer and synthdef management. Instead of using the server commands to allocate buffers and load synthdefs, a user would just say "I want these buffers, and these synthdefs" and they will automatically be allocated

I think these features are going to have a pretty large impact on the kind of examples that would be helpful for someone getting started with this crate, and they should be landing soon because they are already partially implemented in that other repo.

@Psykopear
Copy link
Contributor Author

This is great to hear, especially the declarative buffer and synthdef management.

I understand that starting to accept contributions this early in the project can be counterproductive, so I'll just let you work on it and do my experiments following the main branch for now.

Feel free to close the issue, and open a new one when you will feel ready to start accepting PRs then.

@ooesili ooesili closed this as completed Mar 22, 2021
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

No branches or pull requests

2 participants