Bring on Da Noise - Playing .wav Files in CircuitPython

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 4

  • @ace.johnny
    @ace.johnny 3 месяца назад

    The try/except imports might be less bewildering to beginners if you briefly explained the hardware differences between AudioOut and PWMAudioOut, and why PWM is required for boards without built-in DACs and speakers.

    • @profgallaugher
      @profgallaugher  3 месяца назад

      Thanks. My philosophy is to hold new topic introduction until it absolutely needs to be introduced. A course that assumes no prior programming & engineering is a pretty big lift, even for my bright students, so if we don't need to discuss DAC concepts (and why some boards have them & some don't), I've chosen to leave that out. You'll see this approach throughout the course. We don't do a "blink" because it's actually more complex than lighting up an entire set of on-board neopixels, plus it's not really something someone uses in a real project. And we put off discussions of resistors (which is often a first-step in many electronics courses) because we deliberately choose Qwiic/STEMMA-QT that hides lots of complexity & lets students build stuff quickly without having to worry about deeper details. We're covering things like scheduling & IoT in the "Prescription Box" when we finally need a single LED and students have been pretty ramped up with concepts so as not to be intimidated. What I'd actually like to see is a unified sound library from Adafruit that will hide this setup from the user. Audio is likely the least "cross platform" thing we do in CircuitPython, but it's definitely possible to produce libraries that make the right configuration decisions for simple audio output. The CircuitPython team is fantastic & they have a lot on their plate. Unsure if this is something they've got scheduled, but your idea prompts me to reach out & post a suggestion on a git page. Cheers.

    • @ace.johnny
      @ace.johnny 3 месяца назад

      I understand your approach, and I'm a big fan of your concise style, but in this video you spent a lot of time describing what you were doing, but not as much as usual on why. Just an extra sentence or two of hardware detail would have, in my opinion, justified the multi-library necessity.
      Something like, "The CircuitPlayground Express has a built-in audio circuit and can use the AudioOut library directly, whereas the CPBluefruit and Pico require a different technique called PWM which we'll dive into later."
      As a professor of complicated subjects myself (live audio engineering and design), I thought I'd share some constructive feedback.

    • @profgallaugher
      @profgallaugher  3 месяца назад

      I might be able to add this when introducing these concepts in the Raspberry Pi Pico portion of the course. Thanks & best wishes.