• Bugs from yesterday were solved relatively easily, so not sure code architecture is an issue (yet), was mostly caused by not fully thinking through the implementation, for example, setting the position of capsule in a sequence to the note index, despite it being incremented beyond after the active circle value is already set, and not resetting the capsule state back to the initial value when re-occupied

  • some tone.js performance hints here are super useful

    • the audio is delayed by 50ms, at 120bpm (60000/120) that’s 10th of a beat. But the base loop uses 16ths, so thats 500 / 4, 125ms, so a little under half of that. I think that will be unnoticeable.

    • this seems to have reduced the popping somewhat, but we’ll see.

  • the code to generate the audio is fairly long, however, it works incredibly well. I do want to try different scales and varying the instruments slightly, but at a base level it works incredibly well.

  • putting empty as a note - tonejs did not like this!

  • drawing the circles - new technique, draw until overlapping a point, then move towards the next point, looks much more interesting (but that could also be because I’m using different sized circles)

  • getting more and more ideas for improvements and extra features

  • To get a nice circuit for multiplayer on 1 pico, I want to try and use fewer pins. I will explore this a little bit but if not I’ll try with the most basic solution. I also need to make sure my circuit makes sense, so I’ll need a simulator or something.

    • this is the final design, basically just extends the voltage divider to react to button input

    • the downside is that this circuit is likely not able to be simulated in wokwi

  • tested circuit with a single potentiometer/button input, resulting in normal 0 value (~192) to 20500ish when button pressed, 26500 - 38500 without button. Not a bad mapping, by reducing the accuracy I think I could probably find a formula that will allow that to map nicely without jittering.