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

Update WavPlayer to work with Daisy Patch with new libraries #266

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

OZHALL
Copy link

@OZHALL OZHALL commented Feb 28, 2022

This has been tested on a Patch with a clone of the Main branch as of 2/28/2022.
I have also set up "#define"s so that it can be compiled for the Patch.init(). I've tested that as well. Note that there is no encoder on the Patch.init() so I'm just commenting out that code.
Stephen, I'll be happy to continue fleshing out this example for the Patch.init() with knob and pushbutton support to replace the encoder. Let me know if you'd like me to do that.

@stephenhensley
Copy link
Collaborator

Hey @OZHALL thanks for the contribution!

Overall it looks good, but I think with all of the ifdefs and the need to recompile for different platforms, this would probably benefit most from being split into discrete examples. Up to you if you want to make all of the versions, or just focus on one, but it'll simplify reading the example(s) for other users to use as a starting point.

  • seed/patch_sm/patch.init -- can just be audio playback of the first file it finds
  • pod and/or patch -- can use encoder to select files

Depending on which platform(s) you go for, it'll be best to move/add the project to the corresponding folder that matches the platform.


Also, if you want to you can convert this to a standard AudioCallback instead of an InterleavingAudioCallback if that helps clean up the self-proclaimed, "counter-intuitive" loop you're doing. The normal audio-callback is non-interleaved, and it's Buffer types are organized as arrays per-channel, which seems like it would fit better for what you're going for without requiring defines.


Let me know if you have any questions.

@OZHALL
Copy link
Author

OZHALL commented Feb 28, 2022 via email

@OZHALL
Copy link
Author

OZHALL commented Mar 4, 2022

Stephen,
Here's the pull request for the new .../patch_sm/WavPlayer/WavPlayer.cpp
We don't really want to commit the changes to .../seed/WavPlayer
I tried to remove the .../seed changes. Still learning the fine details of git.
I'm going to set this project aside after the patch_sm commit. Might get back to it later. I'd really like to figure out what's going on with the Patch version, but alas ... bigger fish to fry.

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.

2 participants