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

Request for assistance with ZPWM, Mixer, Synthesizer on Kittenbot Meowbit #141

Open
rwillenbacher opened this issue Jul 11, 2021 · 0 comments

Comments

@rwillenbacher
Copy link

Dear All,

I require assistance. I have made a Kittenbot Meowbit Codal target ( still missing some capability ) and started to make some sample programs. Now I am at a point where I know no further and I have tried for 3 days.

The Codal target is here:
https://github.com/rwillenbacher/codal-kittenbot-meowbit

I tried writing a sample program that outputs, on A or B button press, one of two configurable ( with the directional buttons ) Synthesizer frequencies. So it is:
ZPWM ← Mixer ← {Synthesizer0, Synthesizer1 }.

The sample program in question is in samples/main.cpp with its associated codal.json.

The Synths are brought up in background generation mode and their frequency is updated in the main program loop. The playback is done by changing the Volume of the mixer channels the Synthesizers are attached to. So now it shows the weird behavior of playing back the frequency of the Synthesizer which frequency was changed by the user last regardless of which Frequency it should play back on A or B button press. The program sometimes also causes the device to lock up but its hard to reproduce. Now regarding the locking up I suspect some fiber stuff going on between the Synths generating buffers in the background and the ZPWM pulling them in from a different fiber.

What I cannot understand is why the frequency played on the speaker is always of the Synth which frequency got updated last. As I cannot debug the device I looked and changed some things in the Synth and Mixer source files at no success. As the Pxt-Arcade codebase does not use the same sound model it is of little help.

Please Advise.

Thanks.

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

1 participant