#help-with-audio

1 messages · Page 3 of 1

random bone
#

You could record silence and see what the bias seems to be in that case, and assume that is constant and subtract it. But I'm not sure about that.

drowsy parcel
#

okey nice idea thank you

#

i will try and if i can do it in circuit python i will make a guide

#

to share

random bone
#

like, record silence, and then also record a constant signal, like a 1khz tone, and see if the bias is at the same place

drowsy parcel
#

okey

#

have a good night

tall mango
#

Sorry if now is a bad time to ping you, but I just checked the voltage on both VU meters on the reel to reel, and neither of them are getting power.

#

The current would be DC, right?

glacial spruce
#

Normally the voltage to VU meters will be very low (the meters themselves are actually current driven, and have a low resistance)

tall mango
#

How low? I managed to detect about 0.04 or 0.004 volts but that might just be some static or maybe my meter touched something else.

random bone
# tall mango Sorry if now is a bad time to ping you, but I just checked the voltage on both V...

if you had an oscilloscope, you could check what even a low-level signal looks like. It would not be a constant voltage. Are the meters still not moving at all? You could see if you could carefully unsnap the cover and see whether the needles are stuck or not. Or if you tap on the cover, or reorient the tape deck, or move it side to side or rotate it a bit to see if they move at all.

tall mango
#

I tested the current too but got nothing

#

Yeah I tried to unstick the needles last night, but they didn't seem to be stuck.

#

I suspect it's a problem with the circuit that drives the meters

glacial spruce
#

Some meters will have the full scale current marked on them, it's often 1mA or even less.

tall mango
#

I don't think this one is marked

tall mango
#

So I spent hours following the instruction booklet on calibrating the VU meters, and I got the TK1 meter to work with a D cell battery and a 4.7k resistor. The TK2 meter seems to be broken? The coil might have come unspooled because there's thin wire all over the inside of the meter.

random bone
glacial spruce
#

There are two "coils" in the meter, the deflection/galvanometer coil that the current to be measured flows through, and a spiral spring that provides the restoring force. Either of these can come loose.

tall mango
#

I could look through the parts list to see if there's a part number I could look up but I might just have to leave it as is.

#

Is there anything I can replace to reduce the hiss a little more? Maybe replacing some of the tubes? I don't know much about tubes but I looked one of them up and they're pretty expensive.

glacial spruce
#

The tubes are not the most likely source, unless there are grid pentodes in the audio path. More likely suspects are noisy resistors and the tape itself. You can also roll off the high frequencies, which will reduce hiss, and there's likely not much high frequency audio to start with since it's tape.

tall mango
#

Would it be worth it to replace the resistors?

desert fog
#

Start with caps. Anything electrolytic or paper should be replaced.

tall mango
#

Ok, I lost my capacitor replacement kit so hopefully I can find some matching ones in my stash of random caps

glacial spruce
#

Note that tube circuits run at higher voltages than most solid state, so many capacitor kits won't contain capacitors of sufficient voltage.

#

However, I doubt that capacitors are contributing much to the hiss. However, old electrolytic and paper capacitors do fail, which can cause other problems.

tall mango
#

I'm not seeing many paper capacitors, which are unpolarized right? I'm mostly seeing polarized ones

desert fog
#

Paper caps are old. You'll see them in pre-'60s equipment.

tall mango
#

Also I feel like this capacitor isn't actually 5MF/5000uf

#

Do they mean microfarad?

desert fog
#

They might. Hard to say.

tall mango
#

I looked up a capacitor with the equivalent value and they're much larger than that.

desert fog
#

The old abbreviation for microfarad is mmfd (milli-milli-farad)

#

Yeah it's probably uF then.

glacial spruce
#

The old schematics I've seen use "mf" for "microfarad" (not millifarad), and mmf for "micro-microfarad" (that is, picofarads). I'd agree that electrolytic is probably 5µF

tall mango
#

So I found a few capacitors that could be replaced on the tape deck, but there were some with odd values that aren't really manufactured anymore. So I found some that were of similar values that are hopefully compatible. Would these ones be okay to use as replacements?

300uf 3v -> 300uf 50v
100uf 12v -> 100uf 16v
40uf 10v -> 47uf 10v
25uf 6v -> 27uf 16v
#

I guess it really just depends on the purpose the capacitor serves, but I tried to prioritize keeping the capacity the same while making sure the voltage rating is the same (if possible) or higher.

glacial spruce
#

For the first one (I'm guessing it's an electrolytic, you may not want to use a 50V one in a 3V application, as the difference in voltage is enough to possibly cause a change in characteristics. I'd probably replace that one with a 330µF 6.3V unit.

desert fog
#

First, check the tolerances. Those old caps are probably ±20% at best. Second, try to figure out whether they are in the signal path. If they're just bulk decoupling caps the exact ratings probably don't matter that much.

glacial spruce
#

Note that modern capacitors can be considerably smaller than vintage ones. The little green one on the right replaced a much larger original.

desert fog
#

At the same time, you have to be somewhat careful. The maximum voltages on modern caps are not something you can fudge. Transients can absolutely cause them to explode.

glacial spruce
#

Especially with tantalums.

dusty rivet
#

And I only applied ~5V to the rail 😬

desert fog
#

Yeah, and overshoot on the power rails wasn't nearly as big of a concern in old equipment.

glacial spruce
#

A tube circuit designed for 180V would generally work okay on 225V.

tall mango
tepid grove
#

How can I identify the wattage of a speaker. It measures just shy of 8ohms, and is run inside a toy from 2x AA

unborn drum
sterile hearth
#

Hi everyone.
I've recently acquired a Electret Microphone Amplifier - MAX9814 with Auto Gain Control (https://www.adafruit.com/product/1713) and I want to use it so as to measure sound levels of frequencies as high as 20kHz (which should be supported by the mic specs). I thought that I could accomplish that by adapting Adafruit's guide on this topics (https://learn.adafruit.com/adafruit-microphone-amplifier-breakout/measuring-sound-levels). The guide is setup so as to measure sound levels of frequencies as low as 20 Hz (via a sample window of 50 milliseconds), but it is unclear to me how I could change it so as to measure at the range I'm interested in. I wonder if anyone would have tips on how I could do it? Thanks!

glacial spruce
severe bison
#

Looking to transmit I2S data to a 1/4 inch mono jack that will go to an amplifier. This breakout https://www.adafruit.com/product/3006 and the MAX98357A onboard is perfect capabilities-wise except for the fact that it's supposed to power speakers directly.

#

What kind of options would everyone suggest given my constraints? Or is there a way to set this particular chip up to run to an amplifier (e.g. a guitar amplifier or PA) properly?

glacial spruce
#

There is a part for that, but the AdaFruit offering for it is for a Pi, so you might have to figure out the wiring to hook it to something else https://www.adafruit.com/product/4037

severe bison
#

Yeah, I've seen the obsolete version. What I'm looking to do is make my own board eventually and the UDA1334 chip itself appears to also be obsolete. It would be nice if there was a breakout a la Adafruit's offering, but it's not a strict requirement.

glacial spruce
young pawn
young pawn
# severe bison What kind of options would everyone suggest given my constraints? Or is there a ...

there are different I2S DACs on like aliexpress and such that have different kinds of output including line out.
Maybe "pirate audio" or "hifiberry" could also offer some options that you could use. They're made for raspberry pi but I think it's just I2S after all. 🤔
But please double-check which "flavour" of I2S that chip needs, and whether your microcontroller can actually support that exact flavour.

#

If you're worried about loudness. That MAX9814, powered by 5V, with a 6cm diameter 4 Ohm speaker at default 9dB gain is too loud for me! And I could even increase the gain. But of course, that's not a guitar amp or PA

severe bison
#

I'm not worried about loudness per se. Mostly trying to make sure whatever I use won't end up damaging other equipment.

severe bison
#

So I guess that chip in one format or another is a good one to check out!

#

I hope that is not rude to post non-Adafruit boards here.

weary gyro
severe bison
#

Wow, the Demo Base looks pretty cool too. Ordered up a few of the I2S DAC modules you suggested, looking forward to doing some experimentation!

young pawn
#
    inline int16_t Amplify(int16_t s) {
      int32_t v = (s * gainF2P6)>>6;
      if (v < -32767) return -32767;
      else if (v > 32767) return 32767;
      else return (int16_t)(v&0xffff);
    }

gainF2P6 is uint8_t and 2.6 bits fixed point.
https://github.com/earlephilhower/ESP8266Audio/blob/0abcf71012f6128d52a6bcd155ed1404d6cc6dcd/src/AudioOutput.h#L67
Only talking about the last return. Just posting the entire thing for context.
what's the point of the bitmasking (v&0xffff)here? Is that actually required or just good style?

#

I just tested it and casting from int32_t or uint32_t to int16_t or uint16_t always produces the same result, no matter with or without the bitmask

earnest dune
#
# s8, peak near 0, equal weight into -128 and +128 ranges
# u8. peak near 127, equal weight on both sides
#

ffmpeg -i input.mp3 -ar 16000 -ac 1 -f u16le -acodec pcm_u16le output.raw

#

some notes, from what i was doing audio on my pi

#

if you tell ffmpeg to produce signed 8bit audio, and you interpret it as signed in your code, then its centered on 0, and goes positive/negative

#

but if you tell it to produce unsigned audio, and treat it as unsigned, its centered on 127 (half of int8_max), and goes up/down from there

young pawn
#

I'm working with some audio library that uses int16_t and clips it to go from -32767 to 32767

earnest dune
#

thats just signed 16bit ints

young pawn
earnest dune
#

ah, so they added their own limits

young pawn
#

to make it perfectly symmetrical I think

earnest dune
#

in my case, i converted a youtube video into a raw audio, and then usd .incbin to embed it into my compiled binary

#

and then i just told c it was an uint16_t[]

young pawn
#

but in the end I want to play wav or hopefully mp3 from SD

earnest dune
#

e.g. with "xxd -i file_example_WAV_1MG.raw file_example_WAV_1MG.c"
this ugly mess, is what .incbin solves

#

i find it silly that you have to convert binary to hex, then have the compiler turn hex back into binary

#
[nix-shell:~/apps/rpi/lk-overlay]$ cat dev/audio/wear.S 
.section .rodata
.global wear
wear:
.incbin "dev/audio/wear.bin"
.global wear_end
wear_end:
#

and this just embeds a binary directly into .rodata without any conversions

#

gcc also recently gained an extension, to do that without assembly

#

but i forget the name of the flag

#

https://github.com/librerpi/lk-overlay/blob/master/platform/bcm28xx/arm/payload.S

.section .rodata
bcm2835_payload_start:
  .incbin "../../../build-rpi1-test/lk.bin"
bcm2835_payload_end:
...

.data
DATA(arm_payload_array)
arm_payload_array:
  # bcm2835 pi0/pi1
  .int bcm2835_payload_start
  .int bcm2835_payload_end - bcm2835_payload_start
  # bcm2836 pi2
  .int bcm2836_payload_start
  .int bcm2836_payload_end - bcm2836_payload_start
  # bcm2837 pi2 rev1.2 and pi3 in 64bit mode
  .int bcm2837_payload_start
  .int bcm2837_payload_end - bcm2837_payload_start
END_DATA(arm_payload_array)```
#

@young pawn with this, i can embed 3 binaries, and create some intermediate start/end symbols
then i can generate an array of start/length ints

#

and then on the C side, i just claim its an array defined externally

#

and boom, all of the pointers and lengths are pre-filled

young pawn
#

neat, I didn't know other ways than xxd 😄

earnest dune
#

there is also the objcopy route

young pawn
#

but kinda of course there are dozens of ways to do anything 😆

earnest dune
#

$(OBJCOPY) -I binary -O elf32-vc4 -B vc4 $< $@

#
extern uint8_t _binary_arm_chainloader_build_arm_chainloader_bin_start;
extern uint8_t _binary_arm_chainloader_build_arm_chainloader_bin_end;
#

but that creates an ugly pair of symbols, based on the filename and path

#

while .incbin lets you hide all of that ugly with non-global symbols in the .S file

round tinsel
#

I just wanted to thank @weary gyro for his amazing tips page on synthio. I’ve got a drum sequencer on a Pygamer partly working.

round tinsel
tepid grove
weary gyro
round tinsel
#

Yup. I borrowed those. 😉

#

I’ve started building a grid to set each step. More to come in the next couple of days

stable iris
young pawn
#

Is this normal?
I have a .mp3 with 32bps. When I listen to it, it sounds great.
But when I convert it to 32bps wav there is cracking. I think it's only in loud parts. I've encountered this with 4 songs/files now
Converted to 16bps wav, it's fine again.
I use audacity to convert it. (just load the file, and export it again. No editing or anything else). And I'm listening with VLC and bluetooth headphones that only support 16bps and screen speakers that support 24&16bps. What's going on?

#

The main issue is:
I would like to have the same song (with zero cracking) as wav with 32, 24, 16bps and ideally each at different sample rates as well

random bone
young pawn
#

in audacity the mp3 plays fine

random bone
#

I don't think bps is meaningful for an MP3. Did you encode the MP3 yourself? What were the encoder settings?

young pawn
#

bits per second is the important thing for the wav files because I want to test some audio code I wrote 😄

random bone
#

does the converted wav file look like it's clipping?

#

in the waveform display?

young pawn
#

good point. looks pretty clippy to me. (That's the mp3)

random bone
#

ugh 🙂

#

i don't know why the Audacity playback doesn't sound worse, but I assume it's due to the conversions going on to play vs write a .wav

young pawn
#

yeah, I guess there's something weird going on with that. Thank you 😄

round tinsel
#

q: How can I play notes in the background with synthio? I want the UI to still function while notes are playing. Do I need to use await or just loops instead of sleeps?

echo hedge
#

no need for asyncio. sleeps could cause problems

earnest dune
#

another side-project ive been doing on the rpi, is audio via the PWM hw

#

in its current configuration, its doing 1 PWM pulse per sample, so my PWM rate is ~44khz, and the top waveform is after the hw lowpass filter

#

it looks rather ugly, and i'm wondering is doing 2 or 3 pulses per sample might smooth it out?

#

@echo hedge what do you think?

echo hedge
#

I think we run the PWM outside of audio frequency range and then just change the duty cycle at the sample rate

#

(look at circuitpython's audiopwmio)

earnest dune
#

the tricky bit here, is that the rpi PWM has a fifo

#

you feed it a list of duty cycles, and it will emit one pulse per entry

#

so you dont have to update the duty-cycle at 44khz, you just dma a stream of duty-cycles to it

#

but now, the pwm rate, must be a integer multiple of the sample rate

#

i'll try double, and see what that does

small chasm
#

what kind of hardware filter are you using?

earnest dune
#

and this is the same filter from the pi4b

round tinsel
#

I built it for the PyGamer but it should work on any board that supports synthio.

#

Currently it has three voices for drums.

#

Next I want to add an editor to add more voices.

surreal narwhal
#

Hello!
I'm not sure where to begin with describing what's going on but when I play an mp3 (audiomixer and i2s), it begins with a sharp pop or scratch sound and then I get follow up ones at random intervals after that. The mp3 in question comes from this guide (https://learn.adafruit.com/led-rocket-lamp#about-the-enceladus-hiss-mp3-file-3136744) but I am seeing the same behavior from other mp3s (such as the ones from John Park's walkmp3rson guide). Interestingly, this does not occur if I play a wav file, even converting the above mp3 to a wav. If it helps, I'm using a RP2040 Propmaker Feather with the 8 Ohm 1 Watt Mini Oval Speaker!

Adafruit Learning System

Night Light with White Noise

weary gyro
# surreal narwhal Hello! I'm not sure where to begin with describing what's going on but when I p...

MP3 decoding is very CPU intensive, I'm kind of surprised it works at all. Any other things happening in CircuitPyton (your editor accessing the CIRCUITPY drive, your code reading I2C devices, etc) can cause audio dropouts.
However, you can sometimes get these dropouts to go away by increasing the buffer_size in the audiomixer.Mixer(). It defaults to 1024 but I have good luck with 4096. E.g. if your code looks like this:

mixer = audiomixer.Mixer(voice_count=1, sample_rate=22050, channel_count=1, bits_per_sample=16, samples_signed=True)

change it to look like:

mixer = audiomixer.Mixer(voice_count=1, sample_rate=22050, channel_count=1, bits_per_sample=16, samples_signed=True, buffer_size=4096)
surreal narwhal
round tinsel
#

Question about synthio examples. I tried TodBots code to create a saw wave and it works fine, but the sine wave does not. I’m not sure if the calculations are wrong or if it’s just a whole lot quieter

weary gyro
round tinsel
weary gyro
earnest dune
# earnest dune

@weary gyro do you have any ideas about this question from a few days ago?

weary gyro
# earnest dune <@352910176736772096> do you have any ideas about this question from a few days ...

I don't think I have much to add. I don't do much at that low-level any more. It's not clear to me what your expected output should be. If the bottom trace is expected output and top trace is PWM-filtered output, then looks like your RC filter is too big and you need to lower its time constant (reduce its R or C). As for general approach of using PWM-pulsewidth-per-sample, that is the technique I am most familiar with from most PWM DAC techniques. Many libraries just take the sample and scale it to use directly as PWM duty-cycle. You said you're doing this on the Raspberry Pi, there are many working examples of using two PWM pins to give you stereo out for use by ALSA or whatever by adding a device-tree overlay. I think it's even built into raspi-config now? I have vague recollections of seeing it there

earnest dune
#

raspi-config doesnt really apply here
because ive replaced the official firmware

#

i cant change the RC filter, because i want it to work with normal boards

#

so i need to adjust my PWM freq, to match the existing RC filter?

#

this is what the official firmware does:

Stage 1 is source samplerate conversion (8kHz-48kHz -> 48828Hz) - this fractional conversion is required as the PWM source clock is not a power-of-two product of audio sample frequencies.
Stage 2 - Oversampling by factor x8 to 390625Hz using a length=512 FIR filter with a nice, sharp cut-off.
Stage 3 - A final x2 oversampling stage with a length=4 FIR filter, which is folded into the noise shaping for various beneficial reasons.
Stage 4 - 2nd-order quantisation noise shaping from 16-bit PCM at 781250Hz to 7-bit PWM samples.

#

so, i think its using a 781khz pwm rate, with 7bit samples

#

and then using dithering to simulate 16bit samples

weary gyro
#

Ah, bare metal on RasPi. Sounds like you're beyond my abilities then

earnest dune
#

even more baremetal then normal baremetal

#

i havent turned the arm cpu on

earnest dune
#

and see when the RC-filtered looks good, and the audible noise goes away

#
> (781250 * Math.pow(2,7)) / 1000 / 1000
100
#

oh, and that sample rate, suddenly makes a lot more sense

#

its just a 100mhz ref-clk

#

each sample, is then 2^7 clock cycles long

#

and the duty cycle, is then just a 7bit number

round tinsel
#

Is it possible to create delays and reverb with synthio?

severe bison
#

Cheap stereo line out I2S DAC for Circui...

pale relic
#

Would I be able to use a Stereo 3.7W Class D Audio Amplifier with speakers and a knob with the Grand Central M4 with 5v power?

glacial spruce
#

I think that would work fine. Are you thinking of using the onboard DACs to generate signals? You may need a little interface circuitry, but nothing complicated.

pale relic
#

Maybe? @glacial spruce I'm new to all this and I was using the tutorial for the grand Central as a sound board and wanted a better way to make it portable without having to work about the jumper wires disconnecting.
Any guidance would be appreciated.
I saw someone In the forums recommend a mono amplifier and use two mono speakers.

#

I probably have to use the mono speaker instead of 3w 4ohm one?

glacial spruce
#

Basically, whether you want to do mono or stereo is up to you: the SAMD51 (and therefore the Grand Central) has two DACs, so you can have individual signals if you want. You can use a stereo amp (with either a mono or stereo input) and two speakers.

#

I'm not sure what you mean by "mono speaker", pretty much all speakers are mono, you just use two of 'em for stereo.

pale relic
#

would adding a 10K Log Potentiometer mess up the signals?

glacial spruce
#

No, that's how a traditional volume control works

pale relic
#

Awesome. Thank you!

placid turtle
#

Hey guys! I have a soundboard (https://www.adafruit.com/product/2210) and a speaker (https://www.adafruit.com/product/1314) and I don't know how to tell if the sound I'm getting is as loud as it can go or if there is a way for me to make it louder

placid turtle
pallid latch
#

Okay, so the speakers can handle a little more power than that sound board is set to put out.

#

And it's got 2 channels, so you could use 2 speakers for more power.

#

Okay, so I think my earlier suggestion was to just use it in GPIO trigger mode.

#

Yeah, so there's the Vol + and Vol - pins. That would be what you'd use to control the volume if you are in GPIO trigger mode, which is the easier of the potential modes to get going.,

#

Yeah, so the way I was thinking you'd want it to work is to set it up such that you run a GPIO pin on the ItsyBitsy M4 to one of the trigger pins on the sound board.

#

But then you'd also want to hook up the Vol+ and Vol - pins to buttons so you can turn up the volume.

#

Ugh, I hate saying use the serial port to control it because that's more coding and stuff.

placid turtle
pallid latch
#

The second, according to the tutorial page. Not the end of the world to leave it powered up

#

Probably easiest way forward, because cosplay project, is to get the volume pins working and do it via the GPIO trigger mode and if you have time you can go back and switch it over to the serial mode if you still have time.

tepid grove
#

Is it possible to stream audio (WAV) over good WiFi to an esp32s2 +audio bff. Like shoutcast/icecast back in the day (aware still exists).

young pawn
#

I've seen an example for that in the Arduino-Audio-Tools library

#

(but tbh I'm not sure if it works with ESP32s2 specifically. I have no idea what the differences are between all the ESP32)

tepid grove
young pawn
#

IIRC from just reading random stuff in that audio library, there are some ESP32 (or some specific boards) that don't have I2S (or have it not accessible or have it not yet software supported or something like that).

#

I know, sorry, I'm really vague here. :/

tepid grove
#

That makes sense. I believe the S's do have i2s, but can't remember the original esp32. Maybe the c3 is missing it, and probably the esp8266 too. Not sure on the H series but probably got it as more powerful than C series.
There was something in the back of my mind about one of the S series regarding DMA access and I2S lacking software support in certain languages / toolchains but hardware existed.

trim crypt
tepid grove
tardy frost
# young pawn I know, sorry, I'm really vague here. :/

And @tepid grove All ESP32's have I2S. You can use the I/O mux to map the I2S pins to any available I/O pins, so it doesn't matter if a board specifically expresses them. The original ESP32 and the S3 have two I2S controllers; the S2, C3, C6 and H2 all have one.

#

(I have notes where I keep track of all this 😉 )

cursive rune
#

The I2S breakout 3006 appears to have an RC filter on each leg - are these values enough to knock the 300KHz edges off for line-out to an audio interface, or do I need to put something else inline?

cursive rune
#

also, any advice for volume control with this chip from a Pico running synthio?

young pawn
tepid grove
tardy frost
tardy frost
weary gyro
# cursive rune also, any advice for volume control with this chip from a Pico running synthio?

Generally on I2S amps, you set the hardware gain to a fixed level and then adjust your content's volume. For synthio, if you run the synth through AudioMixer then you can adjust its volume level with the mixer.. e.g. something like this:

audio = audiobusio.I2SOut(...)
mixer = audiomixer.AudioMixer(voice_count=5, channel_count=1, sample_rate=22050)
audio.play(mixer)
synth = synthio.Synthesizer(sample_rate=22050)
mixer.voice[0].play(synth)
mixer.voice[0].level = 0.25

For a more complete example, you can check out one of these: https://github.com/todbot/circuitpython-synthio-tricks/tree/main/examples

glacial spruce
#

That is indeed generally true, as it's the easiest and requires the fewest parts. However, it's not the highest fidelity approach, which is generally to keep high signal levels until the final attenuator/amplifier. In most cases, you don't need to go to all that trouble (and again, most people don't). But if you're aiming for maximum fidelity (and if you're already doing all the other complicated and expensive things required to achieve that), it may be worth considering fancy things like motorized potentiometers at the final stage to adjust volume.

cursive rune
#

I'm less concerned about maximum fidelity as this is a novelty at this point, but I'd like to be able to control volume dynamically. It sounds like AudioMixer can do it, although it's probably overkill.

#

More detail: I'm making a synth accordion. I'm looking for something I can use to emulate the function of the bellows. My first thought was to point each of the synth Notes at an amplitude variable and update this amplitude each time I read the "bellows" input.

weary gyro
#

The other benefit that AudioMixer gives you is the ability to specify a buffer_size, which can help with glitches if you have other I/O devices (particularly I2C devices)

cursive rune
weary gyro
# cursive rune Is it possible to map multiple notes' amplitude to a single variable that can be...

yes but it can get a little complicated. for global volume your best bet is probably to use the audiomixer. if you did want per-note volumes but also global volume sometimes, one approach would be to iterate on them:

notes = []  # list of Notes that are playing (you save them as you 'press' them)
def set_notes_volume(volume):
  for note in notes:
    note.amplitude = volume
set_notes_volume(0.45)  
set_notes_volume(0.90)  # and so on
round tinsel
# weary gyro Nope

I've been thinking about this the past few days. It seems like delays and reverb could be created with a ring buffer that mixes the latest sample with and old one from the buffer, then writes the new value back to the buffer. But then I realized that the cost here is memory, not computation. A couple of seconds of echo would be a lot of memory at 44khz

round tinsel
#

I’m especially happy with the blade runner instrument. Thanks to @weary gyro for his tutorial on modifying a filter in real time.

round tinsel
#

I mixed 20% noise with the saw waveform to create noisy saw. However I had to do it sample by sample. LERPing the entire arrays printed a data type error.

round tinsel
#
noisewave = np.array([random.randint(-32767, 32767) for i in range(SAMPLE_SIZE)], dtype=np.int16)
plain_saw = np.linspace(-SAMPLE_VOLUME, SAMPLE_VOLUME, num=SAMPLE_SIZE, dtype=np.int16)
noisy_saw = lerp(noisewave,plain_saw,0.9)
#

the code executes, but when I try to use the weavform it says: ValueError: waveform must be array of type 'h'

weary gyro
#

oh, are you getting the error when attempting to assign to note.waveform?

#

You need to either re-cast that array as np.int16 or (what I do), do the full-array-size replace, e.g.

noisewave = np.array([random.randint(-32767, 32767) for i in range(SAMPLE_SIZE)], dtype=np.int16)
plain_saw = np.linspace(-SAMPLE_VOLUME, SAMPLE_VOLUME, num=SAMPLE_SIZE, dtype=np.int16)
noisy_saw = lerp(noisewave,plain_saw,0.9)

wave_empty = np.zeros(SAMPLE_SIZE, dtype=np.int16)  # empty buffer we'll copy into
note = synthio.Note( frequency=220, waveform=wave_empty)
note.waveform[:] = noisy_saw
round tinsel
#

ah, okay. that's an interesting trick.

#

it works now with this code: ```noisewave = np.array([random.randint(-32767, 32767) for i in range(SAMPLE_SIZE)], dtype=np.int16)
plain_saw = np.linspace(-SAMPLE_VOLUME, SAMPLE_VOLUME, num=SAMPLE_SIZE, dtype=np.int16)
noisy_saw = np.zeros(SAMPLE_SIZE, dtype=np.int16)
noisy_saw[:] = lerp(noisewave,plain_saw,1.0)

weary gyro
#

excellent. if your goal is to keep around "noisy_saw" and not just immediately assign it to note.waveform then you could cast the output of lerp() to an int16 array like:

noisy_saw = np.array( lerp(noisewave,plain_saw,0.9), dtype=np.int16 )
regal tree
#

I'm wondering if there are ways to test sound for more than pitch and volume and ways to reproduce sound involving more than just playing back a waveform or a midi type of synth the end point of being able to use a txt to speech through some controllable electronics to make it sound like a saxophone talking or a violin "talking" rather than sound like a person with a pitch shifted human voice I have a cheap Midi Keyboard and the sound it produces basically the same sound reguardless of what instrument is chosen I can kinda play a couple of different instruments and have in interest in making some midi controller/synth combo - digital instruments like some ive seen on you tube and a few other sites If there is a number of paid to access midi voice files but finding free or low cost voices that work with different types of hardware / midi software on windoze are there low cost hobiest midi instrument voice making software for use in win or on a Pi

random bone
green island
#

Question: https://www.adafruit.com/product/3885

Does that have a DC filter capacitor? Do I need one if the audio is coming from a QT Py RP2040, via the synth module, using PWM?

Also, does that have any kind of filtering at all, or do I need to add a low pass filter between the microcontroller and the speaker, to remove PWM switching noise? (Yeah, I know that technically the voice coils can filter the PWM noise, but I'm not sure if that applies to this particular speaker or whether it still might be a good idea.)

weary gyro
# green island Question: https://www.adafruit.com/product/3885 Does that have a DC filter capa...

From the schematic in the Learn Guide for it https://learn.adafruit.com/adafruit-stemma-speaker/downloads, it looks like it does have a pair of 1uF DC blocking cap but no PWM RC filter. The PWM rate of CircuitPython's PWM is high enough and the response of that speaker is low enough, that I think I think it will work.
But be aware, even with the best filtering to that little amp it's going to sound relatively cruddy. That little speaker is just too small to make very impressive sound. It's great for simple beeps and bloops

glacial spruce
#

Filtering after the amp (with the speaker) means the amp can create "intermodulation distortion" from the two signals

green island
#

I should have realized there would be some kind of DC filtering between the microcontroller and the speaker. The amp chip would almost certainly be high impedance on the input, which would block DC even without a filter cap.

Good point on intermodulation. So the takeaway is, I don't need DC filtering, but I should probably filter the PWM if I want a small quality improvement. I actually have the speaker, and I've tested it out a bit. The sound quality isn't awesome, but I didn't expect it to be with both a low end speaker and a low end amp. I was just kind of fishing to see if I could clean it up a little bit, and it sounds like filtering the PWM will work.

Thanks both of you. I really appreciate it!

glacial spruce
#

High impedance won't "block" DC, it just won't draw any appreciable current.

green island
#

Right, but in terms of audio, that's all that is important. Normally, you don't even worry about DC except between the power amp and the speaker, because the speaker is the only thing that could sink enough DC power to be a problem. (Technically speaking, a DC filter capacitor is the same. It doesn't actually block DC, because there's no such thing as a capacitor that doesn't leak.)

earnest dune
green island
#

In this case the source is digital (but PWM, so sort of analog but constrained to the chip supply voltage) and the receiving amp is analog, so that won't matter here, but yeah, even an analog source to an analog sink could end up clipping sooner in one direction with a DC bias (but the effect with an ADC would be more pronounced...). Hmm, that does mean that if I set the gain of the amp too high, I could still end up clipping in one direction sooner than the other...

This is definitely something worth keeping in mind. I probably would want a DC filter cap if there was any chance of saturating the amp, if there wasn't already one.

late arrow
#

@weary gyro Sorry to bother you - Where did you have your PCBs made for the QT PY Synth? I'm very tempted to send an order in.

weary gyro
#

From JLC PCB. I just put an order in for a bunch to put in my Tindie.

#

I'll send you one

late arrow
#

I can wait till they're on Tindie, you've been more than generous. 🙂

weary gyro
#

🙂

late arrow
#

I assume you soldered in the TRRS jacks and rotary encoders?

weary gyro
#

Yes. The jacks are SMD and will come pre-soldered, along with the entire audio out circuitry and TRS MIDI input circuitry

late arrow
#

Perfect, I think I actually may have all the parts already!

weary gyro
#

nice. Also, that "wavetable_midisynth" one I just made a video about on youtube has a "code_i2s.py" version that works on a Pico & PCM5102 that you have. And if you set its auto_play=True it will play a little song without needing MIDI

late arrow
#

cool! thanks for the heads up

young palm
#

I've got a db Technologies FM10 powered speaker that recently made a small pop when turned on and now has no audio, though the power light works. I've opened it up and discovered that the NXP TDA8950TH amplifier IC has left a skid mark on the board and also cracked open a ceramic capacitor next to it.

The amplifier IC isn't made anymore, though there are some available from AliExpress. What are the chances of the Ali part being genuine, or if it isn't is it likely to work anyway? Parts that are pin compatible don't seem to be any more available, as far as I've found so far.

glacial spruce
#

It's one of those "it may be worth a try" situations. It could be there are other circuit faults that killed off the first IC, and will just kill off the replacement. Or a chip (and capacitor) swap may bring it back to life. If not, you can always just stuff a different amplifier board in it.

earnest dune
#

for context, ive been working on the open rpi firmware, and one of the goals is getting analog audio working

#

this would be the spectrum plot for a test file that i was playing, just the original input file

#

this would be the result of playing that file on an rpi, with the stock firmware
running the analog audio into an old JVC sound bar
then recording it on my cellphone

to my untrained ear, it sounds fine, but you can see some distortion in the graph

#

and this would be my entirely custom audio driver, on the exact same hardware
it has distortion that i can easily hear

#

any tips on what i could try to improve it further?
ive been pointed to delta-sigma in other channels, but cant make sense of the pdf i was sent

young pawn
earnest dune
#

lets see, first you avg together 2 samples
oh, that reminds me

#

due to the rather low pwm rate, there is a very strong 48khz tone in the output

#

and to avoid that, i was just playing every sample twice, as-is

#

but i now realize, thats a rather dumb form of over-sampling, and just averaging may help

#

writes more code

#

i also just realized, i'm not dealing with LR interleaving right, when i do that

#

helps to get a good night sleep and then take another look at the code

#

so first, as i loop thru the audio samples, i put them into next_right and next_left

once ive gotten a pair, i average with last_left and last_right, and write those to the output buffer

then i write next_left and next_right, and update last, that should be right, and slightly better...

#

but its generating too many samples, something wrong with the logic i didnt mention....

#

and ive somehow horribly broken it

#

i think the problem, was how i was doing bounds checking and wrapping in the write buffer

#

i was using == to wrap, and only checking once per loop

#

but the code to deal with interleaving, and over-sampling, wrote 4 in a loop, then nothing for a few passes

#

so it stepped over the trigger, and didnt wrap right

#

the sample rate is correct now, but just a dumb avg of last&next sample seems to have made it sound worse

#

heh, surprisingly, you can still make out the vocals at 2bits/sample!

#

instruments are just destroyed though

#

i seem to remember hearing something about bit depth being related to the noise floor

#

hmmm, and what effect might the MASH filter and fractional division have....

#

ref: 432000000, target: 24576000, divisor(f): 17.578125, divisor(fixed): 0x11940

#
> 432000000/17/1000/1000
25.41176470588235
> 432000000/18/1000/1000
24
#

so, if it lacked mash, it would just be randomly alternating between 24mhz and 25.4mhz

#

and each pwm period is 128 clocks long
assuming worst case, the pwm period would vary from 187 to 198khz

earnest dune
#

it seems to sound best with no over-sampling, if i stick to the dumb repeat a sample N times method

#

and the avg between 2 samples method can only 2x, and makes it sound worse as well

#

i'll need to study things more

round tinsel
#

Could someone explain to be what the RING parameters of synthio do?

weary gyro
tepid grove
#

Okay audio heads, does this idea make any sense at all... It's basically a virtual theramin. Using a grid time-of-flight sensor (VL53L5CX), and imagining a vertical "aerial", and using the proximity to center in the horizontal plane as pitch like normal, and the Z or vertical plane as volume. I initally invisaged the right hand side for pitch and volume and the left for switching sound style / activating different voices/samples instead of normal "note" / waveform. Now I may stick to simple pitch and volume, maybe having a web control for other features (imagine your phone as knobs n buttons over wifi)

#

Going for the worlds smallest circuitpython theramin, but the speaker is so far the largest problem 🙂

young pawn
#

Just curious because I have the same sensor but not used it yet: have you tried the multiple-object recognition? Maybe you could even play multiple notes at the same time. (Hehe, feature-creeping other people's projects)
You only have 8 pixels I think so with side-to-side pitch you would only get 8 notes. But idk if that matters for a theremin

tepid grove
#

I think the original library I forked doesnt have multi object

#

not too keen to do that before friday 😉

#

mp-extras/vl53 whatever

glacial spruce
#

I have seen some designs that use simple photocells as sensors, as the shadow of your hand provides enough light difference to control something like pitch or volume.

#

My version, however, does not run CircuitPython, and is no contender for world's smallest.

tepid grove
#

oooh lovely tho

#

I did see a laser harp / time of flight instrument, looked pretty cool visually

tepid grove
young pawn
#

ah, thank you 😄

cursive rune
#

@tepid grove just a note (no pun intended): it's spelled "Theremin" with no "a"

tepid grove
#

thank you, thats instantly helped my searching a fair bit

glacial spruce
#

After Leon Theremin, the instrument's inventor. Bob Moog was once asked to repair Clara Rockmore's original Theremin, and traced out the schematic while he was at it.

tepid grove
#

omg, thanks, love a good story/history, now my mind wants to make mine closer to the source 🙂

glacial spruce
#

I know the feeling, hence my vacuum tube one.

#

When Paia came out with their "Theramax" version, they had a contest, where they had some Clara Rockmore T shirts printed up as prizes. Many people asked if they could buy the shirts, but they didn't want to use Clara's image without her permission. So they wrote her and asked. She explained that the date in the image was wrong, and gave the correct one, and gave her permission for the shirts to be made and sold if they'd give her a dozen of them to give out to her friends. They naturally were happy to do so. https://paia.com/proddetail.php?prod=CRT

PAiA - DIY Music & Sound Electronics Kits - Synthesizer, Theremin, Studio
tepid grove
#

I have so much to learn, my musical knowledge is weak, the video I watched was always on about knobs to adjust timbre (had to look it up), and the open source designs are fascinating too. I think an air version is limited in control unless you memorise a lot, but still possible, probably easier to have limited features, or additional external controls

glacial spruce
#

I have an old vacuum tube electronic organ I'm restoring, and information on its circuitry is hard to come by. I finally found an industry newsletter published by a company that made neon lamps, that showed an actual schematic of how the organ oscillators worked, along with a description of how the neon lamps are used as frequency dividers to generate the lower octaves. I've had to learn a bunch of arcane information about music, electronics, and unusual components in the process.

tepid grove
#

Wow, the slightest snippet of info, I do love a treasure hunt, but those kind of projects are long term-ers, like shelve and wait for passive absorption of solutions

glacial spruce
#

And a glamour shot of the inside of the organ, showing the neon lamp dividers in operation

glacial spruce
#

That I understand. Some think it's a curse, but I regard it as a blessing.

tepid grove
#

Definitely both, a mixed blessing if you will 🙂 It drives us, while others around us are driven mad...

tepid grove
#

Okay Theremin/Audio fans, I see that I can change the sample rate in audioio / wav / mixer /whatever, and that will naturally shift the pitch, but what if I wanted to slow down a played WAV sample, and also modify the pitch upwards?

glacial spruce
#

That would require more involved processing

tepid grove
#

Yeah, way beyond my level and probably cpy right now

#

How crazy am I to think i might be able to eat WAVs into ulab.numpy frame by frame...

#

not this week, but generally

weary gyro
random bone
young pawn
#

Afaik you don't actually have to get a "3W" speaker if you're using one of these MAX I2S direct-to-speaker amps.
If your speaker is less than 3W then it might theoretically break if you blast music too loud.
If your speaker is more than 3W then it should be no problem. The 3W amp will just drive it at max 3W.
Maybe knowing that might "unlock" you more options? 😄

#

(at least that's how a friend who does a bit of audio geeking as a hobby explained it to me. For example right now I'm successfully using a 15W speaker with that MAX I2S amp. Please correct if I'm wrong.
Imho it seems like a very big "simplification" to always just say "3W speaker required" for these kinda microcontroller projects. But literally everyone adafruit, pimoroni, etc does that)

glacial spruce
#

Agreed. In general, any speaker with the right impedance will work. If the speaker gets hot or distorted, you probably want one with higher power handling capability, but for most signals, even a small speaker with a 3W amp will work fine.

earnest dune
#

the only extra detail i can think of, that isnt above
a 3000 watt speaker is going to have more mass to it
and may produce less volume per watt
so driving it with a 3W amp, may produce less volume

glacial spruce
#

One advantage to larger speakers is they tend to be more efficient, so you get more sound from the same power.

young pawn
glacial spruce
#

Of course, if you go to enormous speakers and lossy crossovers, you can lose volume

earnest dune
#

yeah, a larger cone will produce more sound, but i'm fuzzy on the losses from the added mass

glacial spruce
#

For bass, enclosed, baffled, or horn loaded speakers will do a lot better than a bare speaker in free air

young pawn
#

oh, I have some questions about speaker enclosure design coming up hopefully this or next week! 😄

glacial spruce
#

An easy demo to do is take an ordinary cheap 2" speaker and run it in free air, then take a square of something with a 2" hole in it and listen to the speaker held against that hole. The volume and bass improvement is impressive.

young pawn
#

even just the cardboard from a package? digikeybox

glacial spruce
#

If you're going to design speaker enclosures, that simple demo is totally worth doing

#

Cardboard works, but can flex some, the effect is somewhat stronger with stiffer material (MDF, flakeboard, plastic, plywood (which is what I used)

young pawn
#

Thank you! 😄 I think I will try cardboard later just because that's pretty much the only thing I have right now and can just cut a hole in 😭

tepid grove
# random bone maybe an RP2040 Prop-Maker + the sensor + https://www.adafruit.com/product/3968,...

I was thinking (got my first Adafruit cardboard box last week rather than just packets) that I'd do a larger one with prop maker and speaker in the box, and sensor protruding upwards through lid. Few pierced speaker holes, these speakers are very shoddy though, I really wanted that out of stock one - been checking for about 6weeks...
But the mini qtpy version is so lovely n small, already lost it once 😂

#

It's like a 1inch cube (plus speaker).
Got some speakers on order from pimoroni so fingers crossed they're a better fit / more svelt, while also being better quality than this donor Poundland speaker.

tepid grove
young pawn
#

good idea! Though I would only need this for testing. I hope I can make the finished thing out of wood then 😄

weary gyro
green island
# glacial spruce Cardboard works, but can flex some, the effect is somewhat stronger with stiffer...

Supposedly you can improve subwoofer sound quality even in a box that's too small, by filling it with quilt stuffing. Normally if the box is too small, the small air volume will restrict woofer motion, reducing volume (but making the bass "tighter" sounding aka more accurate), but the stuffing impedes the pressure wave going through the box, sort of simulating a box with more air space. This would probably also help with a box made of more flexible material, because impeding the pressure waves will cause them to have less energy once they reach the walls.

tardy frost
tepid grove
tepid grove
# young pawn Just curious because I have the same sensor but not used it yet: have you tried ...

Also found out the Motion detection is limited to minimum 40cm and max 150cm, but that 400mm is too much for a desktop sensor. Would work well for the floor / standing version though (cardboard box will be desk and/or floor model. You calibrate the poisition/noise of you standing, with arms down, then raise one to top of comfortable zone, then bottom, then right, etc).
Ideally I'd update the firmware, but there's been changes to return silicon temperature which means the mp-extras/vl53l5cx library is no longer compatible with latest firmwares / ULD.

glacial spruce
#

For that kind of range, you might want ultrasonic or some other technology (microwave, depth camera, triangulation, etc.)

tepid grove
#

Thinking the camera eventually, but keen to play with mWave sensors too. Ultrasonics are cool but bulky. Having seen the Useful Sensors person detector (<1mb webcam with onboard ML for a few faces in memory and basic person grid refs.) I wonder how long before we can do that via GPL for under $5. (It's $10 and using NDA stuff internally I believe right now)

young pawn
#

dark magic confirmed 🤯 just laying this cardboard on top already makes it sound way better

young pawn
#

The sad thing is, this might already sound better than my PC screen speakers

young pawn
tepid grove
# young pawn The sad thing is, this might already sound better than my PC screen speakers

lol, don't, the cheap speakers I sacrificed are no match for the 3W 4ohm ones from pimoroni (similar/same as adafruit), but still bigger than device. All sound better than my TV. Larger rectable speaker is gonna work well for the boxed version. To be fair I should stop using a speaker and move to line out + midi options, but battery powered theremin box will be cool, and the qtpy version is just amusing...

young pawn
#

could you mount the QTPy and I2S dac (or what are you using?) like this to make the box exactly as large as the speaker? 🤔 😆

#

All sound better than my TV
seriously, it really surprises me how easy it apparently is to get "better than mainstream consumer devices" audio 😆

tepid grove
young pawn
#

that also sounds like a nice idea!

tepid grove
#

The sizes are amusing, but I didn't think about the orientation of cables and lost a little, plus the SD card is huge so a stubby would help, and my capacitive touch "button" (the resistor on corner) could be squeezed in too.

#

Oh and its the Audio BFF in answer to the i2c dac question. Wanted to see if could use samples on one side and theremin the other, but long term aims, for now its going to play an optional drum loop / music to play along to.

glacial spruce
tepid grove
glacial spruce
#

Yes, they do tend to be odd shapes.

tepid grove
#

Classically forgot to factor a few things in before CPY day, including not appreciating the theremin needs horizontal resolution not vertical (where this sensor "shines"). Now added the larger Sparkfun version on top of the Pimoroni one, but at a good angle, and going to try using both to give that better horizontal (or 2 references basically and some maths). Also just made possibly the worlds smallest / cutest StemmaQT/Qwiic/JST-SH cables, one about 8mm, one 25mm.

#

not sure we're still under an inch anymore

spice island
#

Inspired by last week's synthio session on Friday (thanks!) I've got a few project ideas using RP2040s and building button based interfaces. However I wondered if I could use the pimoroni Keybow 2040 I've got as a basis for a tidy synth? It has got 4x4 keymatrix with RGB leds, but it only has a limited number of pins broken out as solder pads.
UART-TX (GPIO0), UART-RX (GPIO1)
INT (GPIO3) , SDA (GPIO4), SCL (GPIO5)
However, gleaned from a pimoroni support forum looking at SPI display support, the latter three pins INT, SDA and SCL all have hardware 10k resistor pullups. (schematic is here https://cdn.shopify.com/s/files/1/0174/1800/files/keybow_2040_schematic.pdf?v=1629994431) Would that make it impossible to connect a MAX98357 i2s amplifier and drive it from circuitpython? (moved from help-with-circuitpython)

odd oasis
desert fog
#

I don't think I2S should generally have pullups though.

odd oasis
#

Ideally, no they should not.

#

You may have to reduce the clock rate/sampling rate to get it to work really well.

spice island
#

@odd oasis they're intended to be on the SCL/SCA I2C set up, but the board exposes very few pins, so I wanted to see if I can get the amplifier to connect over those pins. - thanks!

desert fog
#

Depends on the chip(s)

young pawn
#

Just tested it with that Adafruit MAX98357, Pi Pico, 10kOhm Pullups on Data and Bitclock, and 3kOhm Pullup (because I only have 2 10kOhm resistors 😆) on LRCLK on my crappy breadboard. It should be 16 bit 48000Hz

desert fog
#

... which means that you'll need a clock frequency of at least 2*16*48k = 1.536MHz (two channels, 16 bit audio, 48kHz).

#

That's really pushing it for a 10k pullup.

#

And that's assuming zero overhead and no gap between samples.

young pawn
#

Afaik I2S has no gaps between samples

earnest dune
#

yeah

young pawn
#

just left,right,left,right and so on

earnest dune
#

and i think I2S also uses the data clock, as a reference for the DAC playback rate

desert fog
#

Ah

odd oasis
#

Technically the rp2040 is driving that output, so I’m thinking it should be a push pull driver?

earnest dune
#

so if your i2s clock is jittery, your audio will play back at a jittery sample rate

desert fog
#

Yeah pretty much

#

Which is yet another reason you don't want pullups.

weary gyro
young pawn
#

kinda disappointing that this board doesn't break out more GPIO. It looks pretty big = enough space to me

spice island
#

yes the pullups are integrated into the board, which has the microcontroller on it, I think Pimoroni changed tack after this and take a different approach now.

weary gyro
spice island
#

thanks all, my first question on here and lots of help

odd oasis
#

It’s a keybow, and I think they directly tied each switch to their own gpio.

spice island
#

I'll get the soldering iron out and see what happens when I wire it up

young pawn
earnest dune
young pawn
#

but thb I know nothing about PCB design 😆

spice island
#

only some of the GPIO have solder pads, the two UART ones and the three for I2C

weary gyro
earnest dune
#

is there a 3rd gpio available somewhere?
maybe L/R clock could go on an i2c pin, its slower, so the pulls wont matter as much

young pawn
#

2 consecutive + one that can be any pin. (at least with Arduino. I suspect Circuitpython is similar)

desert fog
#

PIO can use any contiguous sequence of pins.

odd oasis
#

Oh so they are. For some reason I thought they had a display and a voltage monitor, but I’m probably thinking of a different board…

weary gyro
earnest dune
#

sideset can use a second of up to 4 pins

desert fog
#

Yeah that too.

spice island
desert fog
#

You could just side set everything with PIO.

young pawn
spice island
#

runnning the pin enumeration code from adafruit and then trying
audio = audiobusio.I2SOut(bit_clock=board.INT, word_select=board.SDA, data=board.SCL)
seems to work

board.GP0 board.TX (GPIO0)
board.GP1 board.RX (GPIO1)
board.INT (GPIO3)
board.SCL (GPIO5)
board.SDA (GPIO4)
is the beginning of what the Keybow 2040 reports

young pawn
#

Because Arduino-Pico has a newer I2S implementation that allows with or without MCLK (limitations apply), input or output, and 8, 16, 24, 32 bit per sample. While the raspberry Pi companies I2S can only do 16 bps

weary gyro
spice island
#

I'll solder it up and see if it works

young pawn
#

Iirc at some point the I2S in the Earlephilhower-core was basically completely rewritten. Not sure if it's still based on the pico-examples.

#

And MCLK support is very new like last month or so and completely optional

#

but tbh 32bit audio is probably kinda overkill... Right now I can't even play a 16bit 44000Hz wav from SD card with features like fading, volume control, etc 😆

spice island
spice island
#

It works! I disconnected the board last night and when I powered it up this evening, it worked first time. So that's pleasing, thanks for your help everyone especially penpingu for going to the effort of mocking it up as a real circuit.

cursive rune
#

I'm using the Adafruit MAX98357A breakout board and it seems like it can get overloaded or overdriven somehow

#

as the sound gets louder, there's a point where it just cuts out and needs a power cycle to come back

#

I'm definitely using it within spec on the output side; how can I avoid this on the input side?

#

I'm using circuitpython

glacial spruce
#

Could be a power supply problem

cursive rune
#

Everything else seems happy enough, but I guess it's possible

young pawn
#

In some random YouTube video I don't remember anymore they guy had to add a capacitor because the power supplies voltage dropped too much. (Yeah, I know not the most reliable source lol)

#

That's why I bought a capacitor kit "just in case" but I didn't have to use it yet. At least on my PCs USB ports "way louder than comfortable" is no problem

#

Btw how are you powering the amp? You can power it with 5V even when your microcontroller has 3.3V logic level.

cursive rune
#

running directly from the USB 5v line

dense mountain
#

MIDI question: Can a Macropad RP2040's STEMMA QT port be used to output serial MIDI? How about Input too?
Probably needs to be some kind of a hack not using the pins for that port configured for I2C protocol, as I don't think I2C can do MIDI IO (but maybe?)

glacial spruce
#

That is, in fact, what the todbot board does. Since the pins used for STEMMA I2C are also usable as serial pins, it does so.

dense mountain
glacial spruce
#

That's not a technically compliant implementation, but it may work.

dense mountain
#

Ok maybe I just buy an Adafruit MIDI featherwing and wire that up to a STEMMA-QT wire/plug?

glacial spruce
#

That would likely work, and has the advantage of already having the DIN connectors mounted

desert fog
#

Sorry for the shameless self-plug, but the opportunity was too good to pass up.

weary gyro
cursive rune
#

is there a "safe" way to filter the PWM carrier coming from the MAX98357A breakout so it can drive a line out?

glacial spruce
#

While you could do so, using an I2S amplifier as an I2S DAC seems like an odd approach.

cursive rune
#

I'd like to be able to have it default to speaker output, but able to plug in for recording

glacial spruce
#

I think it's fairly high frequency PWM, so you should be able to make an LC or even RC filter. You might need a transformer to isolate the differential drive to a single ended one like a line out, as well.

earnest dune
#

i can think of 2 options

1: get a pair of i2s dac's, one for driving a speaker, one for driving line-out, assuming they are compatible
2: just convert the "analog" side as needed

cursive rune
#

I have some switching audio jacks that I was planning on using

glacial spruce
#

Yes, you could use an ordinary I2S DAC to get the analog signal, then follow it with an ordinary analog amplifier for speaker level

#

Doing it with switching jacks seems like it would be pretty complicated.

cursive rune
#

thinking that if I need a transformer anyways, I can just have the speaker hooked up to the output terminals of the jack (so they're disconnected when a plug is inserted) and record through a passive DI

glacial spruce
#

You want to take a digital signal, convert it to PWM, convert that to analog, then route it to a DI to turn it back to digital? Color me bewildered.

cursive rune
#

DI is analog, just an audio transformer

#

aka "direct box"

#

I don't have a way to directly send the digital audio stream to my recording equipment

earnest dune
#

ive seen somebody bit-bang SPDIF optical, on the pico status led before

#

i'm sure you could also find i2s->optical converter chips

cursive rune
#

I would have used the UDA1334A breakout but it's been discontinued

weary gyro
#

@cursive rune if you’re looking for I2S modules with line out, I’m a fan of the cheapie PCM5102 ones you can get off Amazon or Aliexpress

humble flame
#

Lots of uda1334a modules on eBay and AliExpress

fickle leaf
# cursive rune is there a "safe" way to filter the PWM carrier coming from the MAX98357A breako...

I’ve been experimenting with an analog circuit for this — works with or without a connected speaker. Here’s the backpack version for that amp. I’m also building and testing a more flexible version to act like a traditional self-powered DI. https://github.com/CedarGroveStudios/PCB_Reintegrator

GitHub

Contribute to CedarGroveStudios/PCB_Reintegrator development by creating an account on GitHub.

humble flame
#

Can you link the adafruit amplifier module please

fickle leaf
fair forge
#

Good afternoon! I'm doing an audio project and want to use the qt py (I have 3) and I have a few of the qt py audio bffs.

I want to get the LiPo bff as well but want to make sure of a couple things: 1. Any issues with connecting both the audio and the LiPo bffs together?

  1. Like the audiofx board, I want to wire in a button to play sounds. Sounds pretty basic, but just want to ensure all these things are doable. Thanks so much!!
odd oasis
#

With the i2s using a1-a3 and micro SD using a0 and the spi pins, you have the uart and I2C pins left for wiring any buttons or other devices. Of course, you don’t need to use an I2C or uart device, as these pins can be repurposed as GPIO.

fair forge
#

Thanks Hem!

Back to the drawing board.

#

Wait... Is the battery monitor required for LiPo charging or is it just data on the charge state for display? Thanks!

tough canyon
#

Hello, do you guys reckon this type of relay would work to send audio data over? i want to kinda use those relays in reverse, at the output i want to send on one part audio data from an esp32 and the other output i want to send data from my computer, and at the base i want to have the final jack that goes to the speakers. Basically, I want to switch between two audio lines with a microcontroller

#

I am worried with this approach that 1. the relays are unidirectional, 2. the relays will not keep the audio data intact

#

If it helps, I am using this DAC's L, R channels for the ESP32 part. it's using an I2S interface:

#

That is if a relay is a good solution

#

BTW please ping me, I am in God knows how many servers lol

glacial spruce
tough canyon
glacial spruce
#

There are signal relays designed for such use. However, it's often easier to use "analog switch" ICs to switch the signals electronically

tough canyon
#

solid state relays?

#

they should remove some noise because they are not mechanical

glacial spruce
#

Solid state relays are quieter, but they're designed for switching power and can introduce crossover distortion when switching low-level signals

tough canyon
#

hmm

glacial spruce
#

Something like a CD4053 chip can do the job

tough canyon
#

let me look it up

glacial spruce
#

Or a CD4052 if you want to do stereo

tough canyon
#

yeah I wanna do stereo

#

Seems to be what I need

#

thanks

tidal swift
#

Hey all, 👋 , looking for some pertinent and timely guidance on a project that I'm a bit in over my head on and have a looming deadline for (week from today). The end goal is the ability to record people speaking for arbitrary lengths of time to file. To this end I put together a hardware setup with an RP2040, the Adafruit PDM mic breakout board ( https://www.adafruit.com/product/3492 ), and SD card hooked up via SPI.

I am struggling with the audio acquisition. Attempting to record at 16-bit, mono, 16kHz. It is my understanding/assumption that the PDMIn class from CircuitPython does the filtering/decimation needed to produce audio samples. The documentation says the samples coming out are 16-bit, unsigned. I am taking the buffer of samples, offsetting them by half the max of an unsigned short to scale to the signed range, and then writing to an opened adafruit_wave.Wave_write . e.g.:

            data = struct.pack(f'<{struct_size}h', *signed_samples)

            self._wav.writeframes(data)

I don't seem to be getting anything resembling usable audio when I play back the WAV.

There are no examples I can find that demonstrate how to record audio to file with this PDM mic breakout board and CircuitPython. The only example of usage I can find is this: https://learn.adafruit.com/adafruit-pdm-microphone-breakout/circuitpython

More worryingly, this message #help-with-audio message seems to imply that it is not even possible to record uninterrupted audio beyond what can fit in RAM.

Any guidance would be appreciated, or suggestions for a different hardware setup that I could quickly pivot to via paying too much for shipping. This is all battery powered and being crammed into a small shell:

glacial spruce
#

Record to a file on what? Local or remote? Compact Flash? HDD? Something else?

tidal swift
#

SD card via SPI bus

glacial spruce
#

The message you linked provides the important bit of information: this is not something CircuitPython is particularly good at. Personally, I'd use Arduino for a project like this. Failing that, you'd need to write some code to double buffer your audio, reading into one buffer while writing the other buffer to storage.

#

I don't know of any example code, unfortunately.

#

Another approach is to punt the RP2040 and use something like a Pi zero

tidal swift
#

If I have to, I can pry the Pi Zero out of my 3D printer, there's just not much time left. As it currently stands, I made a custom carrier board for the RP2040 stamp, and the board hosts the microSD card slot and connector for the Frone numpad.

tidal swift
glacial spruce
#

Alas, I've never used that particular board

tidal swift
#

Well, regardless, thank you for your insight. Maybe someone else will be able to chime in.

tidal swift
#

So where I'm at now is that if I take the samples straight out of the buffer given to PDMIn, offset them to be signed, and then write them raw to a file... I can import the raw samples in Audacity, applying its Normalize effect (which also removes DC offset) and I get what appears to be an extremely noisy and sped up version of what I recorded. If I halve the sample rate in Audacity it's still very sped up but becomes somewhat intelligible as the thing I recorded.

#

(barring the extreme amount of noise)

#

It seems to be off by a factor of 8? If I scale the speed in Audacity by 0.125 the audio is awful, but it's the right speed pretty sure.

#

The PDM input is configured for a 16kHz sample rate.

glacial spruce
#

It seems like there's a mismatch somewhere. Perhaps the samples are more bits that your encoding is accounting for, which would cause both a speedup and distortion.

tidal swift
#

Python hasn't been crying about a mismatch during the packing into a byte array, though.

glacial spruce
#

Most of the packing functions take your word for the data format, as Python doesn't really know what the format of the byte array is, other than it's a byte array.

tidal swift
#

Where the packing is done via struct.pack(f'<{len(signed_samples)}h', *signed_samples)

glacial spruce
#

That looks right side up and frontwards to me

tidal swift
#

Unfortunate.

#

Thought: Could this somehow be a case of time between buffers being significant?

#

As in, the time is inadvertently compressed because regular intervals of audio are just missing.

#

@random bone Feel free to ignore (and sorry for) the ping, but saw that you had cropped up in previous related discussions. If you find time or the desire, would appreciate whatever insight might be given.

random bone
# tidal swift Thought: Could this somehow be a case of time between buffers being significant?

Audio input does not have a lot of viable use cases because of the limited amount of RAM available, and is mostly for sound and pitch detection and the like. So I'm not surprised it is not working well.

Make sure you have the sample size correct (8 vs 16 bits). and you are importing the raw file correctly (mono, correct sampling rate, etc.). Anything wrong there could cause accidental factors of two.

If you have some non-RP2040 board that supports PDMIn, you could try the same PDMIn program and see whether you have the same speed problems.

tidal swift
#

Using adafruit_wave.Wave_write to create a WAV file and write to it. e.g.

self._wav = adafruit_wave.open(self._filename, 'w')
self._wav.setframerate(16000)
self._wav.setnchannels(1)
self._wav.setsampwidth(2)

. . .

self._wav.writeframes(data)
#

and the mic configuration:

self._mic = audiobusio.PDMIn(
    self._clock_pin,
    self._data_pin,
    sample_rate=16000,
    bit_depth=16,
    mono=True,
    oversample=64,
    startup_delay=0.11,
)
random bone
#

PDMIn uses a quite low-quality digital filter in order to keep up with the input (same filter used on SAMD21)

tidal swift
#

Would it be possible to just get the data from the microphone and post-process later with a better filter?

#

I don't need any real-time processed audio.

random bone
#

what are you doing with the audio signal?

#

are you trying to actually record sounds?

#

do you have any non-RP2040 boards that run CircuitPython?

tidal swift
#

I'm trying to record The Human Voice™

#

The only other microcontroller board I have is the Pi Zero W currently installed in my 3D printer to add wireless management to it.

random bone
#

what length of samples, in seconds?

tidal swift
#

I could pull that.

#

More context: The intent is to have this serve as an "audio guestbook" at a wedding where people can leave messages to posterity for the happy couple.

random bone
#

there is not enough RAM available to record more than a few seconds of audio. A Linux computer like an RPi would be much easier to deal with in this case

tidal swift
#

Fitting the hardware inside of this frog.

random bone
#

that is a constraint 😆

#

You could code it up on a Pi 4 and meanwhile order a Zero W

tidal swift
#

I'll just go pull it out of the printer

#

You think it would work well in this capacity, though?

random bone
#

for sure, it has plenty of power and RAM; consider comparing it with an old PC from 20-30 years ago which could also do this work

tidal swift
#

What about power draw?

#

The battery I have is..

#

one sec

#

I think it's your 2000mAh one.

#

I don't know what I'm expecting for runtime, but probably several hours?

random bone
#

so there's no way you could just plug it in somewhere?

tidal swift
#

No, another fun constraint is the need for it to be wireless.

random bone
#

well, you could use a phone, and the frog could sit on a "rock" with a phone inside

#

do you want to play back what they said?

#

or anything could be in the "rock"

#

pi something, big battery, etc.

tidal swift
#

Well, it's funny you say this.

#

I also had some neopixel eyes for the frog, and had retrofitted the numpad with a connector to use the keys for guests to punch in a number related with them to better correlate recordings to a person in case they don't say who they are/don't speak clearly.

median hemlock
#

@tidal swift There is code for that very thing using a Teensy and it’s audio board. It’s not easy or flawless …or the thread wouldn’t be 445 messages long. https://forum.pjrc.com/threads/70553-Teensy-4-0-based-Audio-Guestbook

tidal swift
#

But would be happy to drop the numpad and eyeballs.

#

I shipped my Teensy 4.0 to a friend to try out M8 Headless, unfortunately.

#

But could order one with fast shipping.

random bone
#

is this like this coming weekend?

tidal swift
#

😎 Yes.

#

I've had some unfortunate work deadlines these last few months

#

Didn't have time to pick the project back up until now.

#

Started late May.

random bone
#

having been at a wedding recently, the interaction we had with the "group selfie" picture taker was a lot more fun than, say a 35mm camera on a tripod with a remote shutter release

#

it as a tablet thingie

#

how about an old cassette recorder gussied up? old school, fun to play with, can play back, not centered around technolgoy

#

or just that voice recorder you showed above, or is that not your project?

tidal swift
#

Frog is a particular request from the couple.

#

That's my recorder, and the inside of my frog.

#

And is the backup option here, yeah.

#

I'm a professional software dev with no hardware experience, and said yes to my brother's request to hack this thing together, figuring it'd be relatively turnkey. I underestimated, like always, and time has really flown by.

random bone
#

I think Plan B is the right approach, not sure what else I can say. It's Monday

random bone
#

no one at the wedding cares that you coded it yourself 🙂

#

sorry to turn this into an xy problem discussion

tidal swift
#

Always should.

tidal swift
random bone
#

my view about software is that being constructively lazy is often the right approach. I'm sorry we can't do what you want in CPy, but there are a lot of hw constraints.

#

USB sound dongle also probably available at Best Buy, etc.

tidal swift
random bone
#

the recorder you have is a plan, and so is a USB dongle + mic + some python script that reads buttons from the Zero W pins and records audio with, like arecord or something

#

or maybe sox

tidal swift
#

I also have a lavalier mic laying around somewhere

random bone
#

or find a usb microphone, there are small ones, or it's a cute-looking accessory

#

depends on whether you want playback or not

#

if not vetco, microcenter if you have one

#

obviously no time to order from us

#

i have to sleep, good luck, sorry for the stumbling blocks

tidal swift
#

Thank you for your time and wisdom. Haven’t found the mic, but have scrounged everything else I think.

random bone
#

🛠️

tidal swift
#

🤷‍♀️

tidal swift
#

Ended up finding this project: https://github.com/sandeepmistry/pico-microphone built and flashed to my board, and the audio sounds great. Just need to figure out Arduino now and how to incorporate the microphone library here with it I guess.

median hemlock
#

@tidal swift any idea of the maximum length recording?

tidal swift
#

euphemism any idea of the maximum

harsh gust
harsh gust
#

why is it hummint like this?

#

and when I grab the amp circuit of the input source,

#

it decreases a lot of humming noise all of a sudden

#

why?

wraith shuttle
harsh gust
#

Also this happens 💀💀

harsh gust
#

this is def coming from input amp circuit

#

cuz when I take the input from the amp circuit off, there is no noise from speakers circuits

glacial spruce
#

Yup, noise coupling from the AC mains

harsh gust
#

this is the power source I have

glacial spruce
#

Shielding. You'll need to incase all the small signal handling wires in shielding connected to a low impedance point, while also avoiding ground loops.

#

It could also be power conducted from that power supply, but that's easy to test: if it goes away when using a battery for power, the power supply is the issue. If it doesn't, then you have hum pickup from ambient to contend with.

harsh gust
#

I get no humming when I connect 9v battery

harsh gust
young pawn
glacial spruce
harsh gust
harsh gust
harsh gust
glacial spruce
#

The easiest ones are R/C or L/C filters, after that, you get to assorted more powerful techniques. One of my favourites is to add a linear post regulator to actively smooth out the power. However, you need some voltage headroom to make this practical.

tidal swift
#

@random bone @glacial spruce Ended up pivoting to PlatformIO + Arduino via this core ( https://arduino-pico.readthedocs.io/en/latest/ ) and was able to utilize that library I found. Countless hours of me flailing about/sleeping very little, and got it working for the wedding on Sunday.

#

Was too late for the Pi Zero W in my printer, though. Had already pulled it out and mangled the 26mm pins during desoldering.

fervent cloud
#

I'm running into an issue on my pico w using circuitpython and audiopwmio to get a chime to ring on a button press. It's all functional, I get audio out, but at the start of playback of any sample there is some clipping and destortion. It only occurs at the start of playback, my audio source is clean, and if I loop the sample in the playback there's no distortion when the start rolls around again. Anyone got any pointers or tips?

odd oasis
# fervent cloud I'm running into an issue on my pico w using circuitpython and audiopwmio to get...

What kind of distortion are you experiencing? Is it something similar to https://github.com/adafruit/circuitpython/issues/5136 perhaps?

GitHub

Currently for some ports and some audio play mechanisms, there can be clicks at the beginning and/or the end of a sample due to sudden level shifts. We have support for quiescent values but these a...

weary gyro
fervent cloud
fervent cloud
harsh gust
#

Hi I used this one to supply 12V DC power and my microcontroller that can take upto 12V got hotter and fried up.

#

And I checked with the output with multimeter and it says 24V

#

Why was this putting out 24V instead of 12V?

solemn flint
harsh gust
#

I will try another one and if it's really the problem of then mis labeling,

#

Is it possible for me to ask them for replacement and also pay for my fried microcontroller?

solemn flint
harsh gust
#

wait but am I doing it right

#

I get the same result with the other one too

#

ohhhh wait

solemn flint
#

No, your multimeter is set to AC volts. You want to use the settings to the left.

harsh gust
#

my bad

#

The microcontroller that I was using could take upto 17V.

#

Why did it fry even when the input voltage was only 12V?

solemn flint
harsh gust
tall mango
#

Sorry if this is a dumb question, but does anyone know the voltage range of a magnetic tape play head? I'm trying to determine what kind of amplifier I would need for one.

glacial spruce
#

I would guess millivolt range, but possibly 100µV or so? I haven't tried scoping one.

#

That's the playback voltage, the recording end of things is somewhat more complex, due to bias, equalization, etc.

tall mango
#

Oh, thanks! I'm just trying to see if the tape head on its own would be usable with a standard phono turntable preamp.

#

Seems like it might be compatible, just a little quiet?

#

I'd have to check my tape deck's manual when I get home.

glacial spruce
#

Some phono pickups (moving coil I think) are very low output

dawn phoenix
#

hi! im trying to use the music maker featherwing with a esp32-s3 reverse tft feather (https://www.adafruit.com/product/5691) and trying to run the example code from the vs1053 library. nothing shows up in the serial monitor except for "Adafruit VS1053 Feather Test", so im guessing its getting stuck at musicPlayer.begin()? im not sure how to get it working

harsh gust
#

Ahhh I really want to get rid of this hummingggg

#

It is definitely coming from input amp component

glacial spruce
#

That would make sense: the lowest level circuitry will be most susceptible to hum.

harsh gust
glacial spruce
#

Basically adding a small amount of hum to a small signal will make a big difference, but adding the same amount of hum to a stronger signal won't.

harsh gust
glacial spruce
#

I doubt you can do anything about that, so the remaining approach is to reduce hum pickup by your input circuitry.

harsh gust
desert fog
#

Basically, the noise is getting amplified along with the signal, so you have to figure out a way to reject that hum at the input stage.

#

It would help to know what you are amplifying, and what is causing that noise.

unborn drum
harsh gust
#

It is 99% the input section bc when I unplug the LM386, it's quiet so it's not the speaker amp

harsh gust
glacial spruce
#

You may need to shield the entire piezo pickup, as it may be acting as an antenna that picks up ambient hum

desert fog
#

Piezos are noisy

unborn drum
# harsh gust yes those black cables are shielded. And those are speaker amp so it's not causi...

It’s hard to tell what you have connected to what, but I think I see a lot of unshielded wiring.

Two things you may want to investigate: humbucker guitar pickups, and piezo pickups.

Guitars also need to amplify a tiny signal in electrically noisy environments, so they have to solve the same problem you are having.

Humbuckers are basically two guitar pickups wired together such that they cancel out the hum.

Here’s a thread specifically about piezo pickups and solving ground hum:
https://www.acousticguitarforum.com/forums/showthread.php?t=426173

harsh gust
harsh gust
#

@unborn drum Hi, I just checked out that forum, and I found it's quite similar to my situation — especially this line "Most of it goes away when I touch the endpin and even more when I touch the endpin and a metal object"

#

Since I am not familiar with guitar jargons and how pickups work, I actually did a little research and learned a little tonight.

#

This guy was so good explaining the principle of humbucking pickups.

#

Even though it's the method used for electromagnetic pickups, not piezo pickups, it was interesting to learn how it works.

#

While reading off of Wikipedia page about Pickups, I found this term "mains hum"

#

Mains hum, electric hum, cycle hum, or power line hum is a sound associated with alternating current which is twice the frequency of the mains electricity. The fundamental frequency of this sound is usually double that of fundamental 50/60 Hz, i.e. 100/120 Hz, depending on the local power-line frequency. The sound often has heavy harmonic conten...

#

The hum from my setup exactly sounds like 60Hz Hum in the example! (You can hear different hums in that page.)

#

I think my main problem is trying using the shielded wire and get a solid ground connection like the guy in the forum says.

#

But what does it mean getting a good ground? Shouldn't it be done when I connect the (-) to the (-) rail on the board?

#

And while I was learning about guitar pickups, I watched this video

#

In this episode of Tech Bench, our tech Paul walks us through what pickups are and how they really work. We'll cover the different types of magnets and the materials that are used in pickups, the bobbins, the pickup wire, how they're wound and the difference between phase and series. That's not all! We'll talk about potting, polarity, the differ...

▶ Play video
#

When they make guitar pickups, they dip the pickup in wax, this procedure is called "Potting"

#

which helps all the components tight and secure, also protects from microphonic feedback noise

#

Do you think dipping the piezo in resin can also help?

#

So to summarise my questions:

  1. Using shielded audio cable (typical thick, black one) would work fine when it comes to shielding, yes?
  2. What does it mean by getting a good ground? How do I achieve that?
  3. Does dipping the piezo in resin can also help preventing unwanted hum or noise?
#

Oh, btw anyone other than @unborn drum can hop in and leave me comments.

#

I am so dumb I need your advice

#

Thank you so much for reading the long texts.

unborn drum
#

You aren’t dumb, you’re learning! As are we all.

Regarding cables, the most important part is to have the signal wire encased in the grounding.

unborn drum
#

This is starquad cable, you can see the braided shield completely encloses the signal wires.

You want this shield to be connected to ground, so that any interference it picks up has somewhere to go.

Another term you’ll want to research is “balanced audio,” where the signal is sent over three conductors (positive, negative and ground) instead of two. One of the two audio signals is phase-reversed before being sent down the wire, then it gets un-reversed and summed with the original audio. The result is cancellation of any noise that the wire picks up.

Starquad cable allows for balanced audio, and in addition, it uses two pairs of twisted wire (four conductors) to carry the two internal signals, which further reduces noise.

Here’s a link about using two piezo elements to create a balanced signal:

https://www.instructables.com/Balanced-piezo-contact-microphones/?amp_page=true

#

Dipping the element won’t help in your case, because the piezo doesn’t have a big coil of wire that can vibrate.

unborn drum
#

I have a few more thoughts:

  1. If you are sending audio signals through the breadboard, you can’t really shield them. Ditto for the signals that pass through that 386 board. You might want to consider enclosing all that inside a metal enclosure. And grounding that enclosure.

  2. Are you powering any part of this from the wall besides the amp? If so, you might have a “ground loop” issue. (This can sound pretty similar to mains hum)

#

And actually now that I think about it… why are you using both a 386 and a guitar amp? I would think the guitar amp has plenty of gain on its own, and shouldn’t require a preamp. Am I missing something?

harsh gust
harsh gust
#

interesting I might try today or tomorrow

harsh gust
harsh gust
#

and I use another power converter board that does 12V to 5V conversion

#

That was powering the breadboard.

#

I didn't have any of this humming issue when I was testing out at home, even though I was using the power straight from the wall.

#

But as soon as I bring all the set up to school lab and try similar stuff, all kind of problems showed up.

#

And the reason I am using that cheap LM386, is that — I tried using other circuits, other methods, spent almost more than a year to build a better circuits out there, but it all failed. And no matter what people say, that cheap LM386 worked the best for my purpose so far.

#

It provided me enough gain with clear audio signal ( when I was testing at home haha)

#

I am an artist, not an electric engineer. Ofc I love learning new stuff and trying new things, but considering that I have limited amount of time to finish my project, and my main focus is not on building amplifier circuit, I don't have too much time to spend on choosing the "right" amplifier. I chose what works best for me currently, which is that LM386 board that I bought from Amazon.
https://www.amazon.com/HiLetgo-LM386-Audio-Amplifier-Module/dp/B00LNACGTY/ref=pd_ci_mcx_mh_mcx_views_0?pd_rd_w=eAb5h&content-id=amzn1.sym.225b4624-972d-4629-9040-f1bf9923dd95%3Aamzn1.symc.40e6a10e-cbc4-4fa5-81e3-4435ff64d03b&pf_rd_p=225b4624-972d-4629-9040-f1bf9923dd95&pf_rd_r=6Y26MZ8QWP15PA2W32QN&pd_rd_wg=wyWgI&pd_rd_r=9d7847f5-2060-475d-a95d-572209612e8c&pd_rd_i=B00LNACGTY

#

I do this kind of sound installation featuring ant colony. Basically I place piezo elements inside of their nest, and amplify their movement and social behavior, do real-time sound synthesis with those input signals.

#

I was connecting each piezo straight to my laptop before, but now I am trying to be independent from using laptop by using microcontrollers.

#

Since I have to amplify the sound of tiny ants, I have more gain amplification than normal uses.

#

This is how I am trying lay things out for now

#

I was thinking of making a decent PCB, but I might try using multiple perfboards, connecting then together.

#

Daisy Seed is a microcontroller component that can do audio synthesis stuff

cursive rune
#

@harsh gust you may find that simply twisting together the pair of wires for each piezo element helps a bit to reduce the hum

harsh gust
cursive rune
#

I'm not sure what you mean by that, but you can just twist the pair of wires coming from the piezo element and see if it helps

earnest dune
#

i had an idea recently, about why my audio might be sounding like crap, maybe i'm clipping in the analog domain?

what is the typical voltage range, for analog line-level audio?

harsh gust
#

ok so that's how I am testing it rn.

#

There were two problems.

  1. Power distributer that doesn't work properly with any components, under whatever setup.

  2. using weird cable for audio components.

earnest dune
#

though, wikipedia says pro and consumer have different line levels, fun!

unborn drum
harsh gust
unborn drum
harsh gust
azure panther
#

Hopefully this is an acceptable place to post this, but my 2014 volt has a pretty nice speaker system except that it's starting to fuzz out. I have limited experiences with car audio shops, but none of those experiences have even remotely approached a positive experience. How difficult is it really to replace your own car speaker system? I am more than comfortable with electricity and electronics, I'm just wondering about things I'm not familiar with such as working on a car extensively

glacial spruce
#

It's not too tough: the connections are just push-on spade lugs in most cases, so you remove the existing speaker, unplug the wires, connect them to the replacement speaker, and place it back where the original was.

#

The Crutchfield website has lots of information and diagrams on doing this.

thick urchin
#

Ahoy out there, anyone good with USB audio ?

#

I have an interesting use case , that I need a little direction with

#

Here's the situation - I'm a bit old school so I like old school Motorola microphones , the big ugly white ones you used to see in cop cars. Anywho, I'm playing some simulator games in which there are 'radios' that ar used to talk to other players. Normally this is done with a USB headset, but for some fun and authenticity I looked into using the old hand held microphone CB-style.

#

Now there are people who sell 'button boxes ' that have an interface pre made for standard 4 pin microphones, but they are $300+

#

I've seen some home made ad-hoc systems that use a single board system ( arduino, etc ) to act as a USB keyboard to send a keypress to activate the PTT feature, and use a standard 1/8" plug connected to the MIC in on the sound card.

#

I have also seen some sweet high end systems that use only a USB connector , but those again $300 + for some off reason

#

as I see it, it should be able to be done with two single board microcopntrollers - one for the keypress, one for taking analog audio from the mic to digital and presenting itself as a USB audio device, and those two connected to a USB hub so that it only takes up one port

#

so am I crazy for thinking that I can take audio from a mic, , use an analog -> digital on board chip ( arduino, pi, etc ) and using USB OTG have it identify itself to the PC runnign windows as an audio device ?

young pawn
#

(probably advanced stuff. Idk if that's easily possible with arduino. Can't a single device have multiple endpoints? I think Arduino HID can have multiple endpoints to present itself as both a keyboard and a mouse. So maybe it's also possible to have it present itself as both a USB microphone and a keyboard)

thick urchin
#

Taht was a question I ahd as well - if a single device can have multiple endpoints

#

IVe been googling / youtubing all night on this

young pawn
#

I think this means that my Xbox one controller (connected over USB) presents itself as a HID input, a pair of headphones and a microphone

#

But I'm very sorry, I can't help you if doing that with an arduino or similar is super easy or super hard. I'm curious about that as well

thick urchin
#

Huzzah! Yeah I an do the keyboard part, but I'm unsure of the audio

young pawn
#

The only USB audio library for Arduino that I know of is on the Teensy. Theoretically USB audio should be possible on RP2040. Waveshare has a uf2 that turns the RP2040 into a USB sound card (but output over I2S only), and there is absolutely no source code for it.

thick urchin
#

I"ll use wahtever hardware, I was just guessing

#

but I am really curious if you cna use a single USB as multip devices, I read somewhere that shaid no, to use a hub

young pawn
thick urchin
#

it isnt clear on how, I'm more of a pi person than arduino .. I like micropython

#

it seems the majority of the solutions use 2 lines, one for audio ( 1/8" ) and a USB

young pawn
#

If you can just plug the microphone into your PC's microphone jack and use a separate MCU that only does HID for the button, that's the easiest way I bet

thick urchin
#

I jsut saw that unit with the single USB and I want to nkow how they did it 🙂

#

it just looks to me like it's a single board doing keyboard press emulation and USB audio in one unit

young pawn
#

I would assume similar as my xbox controller

#

Or does it actually send the PTT button to the PC? Or does it just mute/unmute the microphone based on that button? (and sends silence to the PC when it's muted)

thick urchin
#

all the ones Ive seen send a predetermined keypress

young pawn
#

ah, there is a "usbHID.zip" - sounds like USB HID 😆

thick urchin
#

but again that one is 2 cords, USB and 1/8"

modest island
#

Question/problem:

I have a project where I am building a small circular device which has a speaker in it. Naturally I am going for a circular speaker.
The problem I have is that the top surface of the product "might" get wet by water/rain sometimes. So Ideally I have to make it water/splashproof.

#

How would I handle this with the speaker? I can't just leave holes at the top

#

Maybe I can have it facing to the floor with some rubber feet at the bottom? But that might not be great for the audio either?

weary gyro
modest island
#

Ah interesting - thanks! Will have a look at those

glacial spruce
#

Speakers firing down work just fine, I have a few

tranquil isle
#

Hoi, does adafruit have a amp module for 3 wire speakers? As i have a iphone 13 pro speaker module here, but it needs 3 wires/3 prong, and my phone could output some, but not nearly enough power, so need a tiny amp to plug the speakers to. Any suggestions?

sacred pollen
#

What sort of db range should I expect to get from a PAM8302 amplifier and an 8ohm 1watt speaker? I'm working on the finishing touches for my kid's halloween costume and it seems to peak around 70db. Wondering if I shouldn't expect much higher than that, and/or if a different speaker would be louder.

random bone
random bone
sacred pollen
random bone
sacred pollen
#

not expecting miracles from it, just wondering if a different speaker would change anything or if I'm limited by the amplifier

#

I also have the speaker in a housing to focus the audio, but that only helps a tiny bit

#

(also confirmed the trim pot on the amp is all the way up)

young pawn
#

2.5W at 4Ω, 10% THD, 1.5W at 8Ω, 10% THD,
That amp has more power with a 4 Ohm speaker than with an 8 Ohm one

sacred pollen
#

hrm, ok

#

time to see if I can cannibalize one of my kid's "way too loud" toys for a bigger speaker 😄

glacial spruce
#

That speaker will also be louder if you put it in a baffle or enclosure

sacred pollen
sacred pollen
#

you know, if you ever thought to yourself "hm, I bet my old gen1 Echo Dot would have a speaker I can repurpose"

#

let me be the one to say that no, it doesn't

#

the "speaker" is basically a pair of tiny things that cannot easily be accessed/repurposed

#

not entirely a wasted effort though! I can desolder the rotary encoder it uses and add that to my collection

tranquil isle
random bone
#

is this an amp, or just a speaker?

tranquil isle
#

As if there's "3 speakers", left, right and center

#

Unless third is ground

random bone
#

I would assume that the speaker setup is special, and the frequency reponse might not be flat at all. I thought maybe you were talking about a more conventional speaker like https://www.adafruit.com/product/1313

#

don't have to buy from us, these kind of things are common

tranquil isle
# random bone https://www.adafruit.com/product/3923

Aye. Reason i want iphone speaker is because it packs one helluva punch at proper volume and amps for it's small size. So i wanted to make a phone case with just that. But neeeed an amp to properly power it. Unless a regular small compute board can provide the volts/amps needed to properly power/wire it

tranquil isle
random bone
#

no, you need an amp, but I'm saying the size constraints may make it not flat at all. The amplifier in the phone (or the software) may do a lot of tailoring to match the speakers

tranquil isle
#

Just first need to find out if it simply works with left, right, ground, or some other purpose for the third to function

random bone
#

yeah, I have no idea of the connections on it. ... going afk

tranquil isle
tranquil isle
#

If not, i shall dig more on the web thinky

random bone
#

sorry, the stereo amps here are bridge-tied, so you can't tie one side of the outputs together

glacial spruce
#

Many amplifiers produce more power by driving one output up while driving the other output down, so the difference between them is greater. Because of this, you can't just tie outputs from different amplifiers together because they'll fight.

desert fog
#

You can sometimes connect current feedback amplifier outputs in parallel.

random bone
# tranquil isle what does that mean?

It means you can't drive two speakers with just three wires, where one is common to both speakers. For bridge-tied stereo amplifiers, you need four wires.

#

If you are not totally committed to using those speakers, I'd suggest you get some more conventional, larger speakers.

tranquil isle
#

Unless you know of alternative tiny 2 wire only speakers that is as small, or close enough to be as strongly packed on bass/middle tone/highs as iphone pro speakers thinky I was originally going for ipad pro speakers as they pack an even tighter bass, but figured they would end up too big lol

frozen arch
#

Hi! I've been making slow progress on a music box for my daughter, loosely based on this idea: https://www.instructables.com/Juuke-a-RFID-Music-Player-for-Elderly-and-Kids/

After success with the original, I'm trying to make a v2 that's battery powered. I'm currently trying to do that with an Adafruit Feather RP2040, an Adafruit MusicMaker FeatherWing, and an MFRC522 RFID reader. I've been having trouble getting music playback and RFID reading to work at the same time, and although I'm comfortable with programming and debugging, I'm lacking experience in electronics and their communication protocols. The errors I get seem nondeterministic, and I can't tell if it's a hardware problem, a compatibility problem, a software problem, or a me problem.

I've gotten good help from Discords and forums in the past, but given my limited time for working on this proejct, it's hard to build momentum, and I find myself having to re-solve the same problems each time before making progress. Would anyone be interested in helping out 1-on-1 on a video call? I'd be willing to pay for your time.

Please @-mention or dm me if interested so I see the notification

surreal bloom
#

how would one play an audio sample with an arduino, that is able to sustain as long as an input is high?

#

Should the sample be split into three bits, and just loop to test to see if the input is still high and repeat the middle bit over and over?

cursive rune
tranquil isle
weary gyro
cursive rune
tranquil isle
# cursive rune Phone speaker drivers do the simulation to make fake bass. There's no magic in A...

But still. Whenever i play a song through the 2 connectors, i can hear the song, but no vocalist. As i said, as if there's "middle speaker missing", That's the part i wanted to find out, if there was a amp that could supply for a "3 wire speaker" :P If i can figure out that part, i can work out the rest myself. I'm experimenting after all. just need to find a amp/chip that can supply audio to said "configuration"

young pawn
#

Have you connected your current amp to the other two "maybe middle speaker" connectors as well? Just as a test if there actually is that middle speaker. Maybe then you hear only the vocals.

glacial spruce
tranquil isle
#

Got a name/model for it? As i have no idea what to get.

modest island
#

Hm got a problem with audio conversion again

#

I am trying to batch convert mp3 to wav. I used "Kabuu Audio Converter" for that now. But my rp2040 does not seem to be able to play them

#

When I import to audacity it looks ok?

unborn drum
# tranquil isle Got a name/model for it? As i have no idea what to get.

This is a stab in the dark, but I think you may be experiencing Phase Issues. Sorry this is a little long:

I’ve read through the other replies to your question, and forgive me if I missed it, but nobody seems to have picked up on the part about just the vocals being missing.

As far as I know, you are dealing with a stereo speaker. There is no mysterious third channel, and the music you are playing almost certainly has no separate vocal track.

So how can the vocals disappear from the music?

Phase.

In most music, the vocal track is recorded in mono and mixed to the center, meaning it goes to the right and left channel (mostly) evenly. The instruments are often spread differently in the right and left channels.

If the left and right channel are out of phase (meaning the voltage on one channel goes up when the other channel goes down) and get combined (in software, or in the amp, or in the wiring the speaker), the result will be the cancellation of any signal that’s the same in both the left and right channel.

Result: you’ll hear music but no vocals.

Im not familiar with the hardware you’re using so I can’t help with what to buy, but maybe my observation can shed some light on the nature of the problem.

unborn drum
tranquil isle
# unborn drum This is a stab in the dark, but I think you may be experiencing Phase Issues. So...

Hmm, so in this case it's just 2 wires needed, but as the singular iphone speaker is too demanding and needing an amp, the phase are out of whack and an amp could solve this issue? :) so with the adafruit 2.5w or was it 3 watt should suffice, right? And how will it be powered? Gonna find a few videos how to set it all up to test with. And a smol compute unit to BT receive it all and powered by a small rechargeable battery

glacial spruce
earnest dune
#

ive been bored, and rigged up gnuradio to render a waterfall of all audio i'm playing
and ive noticed a weird notch at around 6.6khz on some music, anybody happen to have a guess as to what could cause that?

earnest dune
#

but on closer inspection, i notice gnuradio was capturing at 44.1khz
but the rest of the pulseaudio stuff was in 48khz
so i assume PA was having to do rate conversion, which adds more artifacts....

#

but the 6.6khz notch is still present

glacial spruce
#

My first thought was "Copyguard", but happily that never went anywhere.

modest island
#

new problem/question.
I am using this board for my project - works fine so far with my code.
https://www.adafruit.com/product/5768

I would like for the user to upload/remote trigger some audio files. I assume bluetooth would be the best option? Is that possible somehow? Is there a board that has bluetooth already integrated? Or would I have to use a separate breakout board for that?

late arrow
modest island
#

For those I would then need an extra audio amplifier, right?

earnest dune
#

just made an interesting discovery with my headset mic

#

it has a lot of white noise, from 0 to 7khz

#

high noise floor?

#

but also, it seems to be running on a 14khz sample rate internally

#

it can register a 7khz tone, but an 8khz tone is just missing

#

but the usb interface lies, and claims it can do 48khz sample rate

#

so it must be up-sampling, to suit what the PC asked for?

earnest dune
#

interesting, while watching game of thrones, i noticed 2 notches

#

but they sometimes move

#

maybe its a defect in each mic they are using?

#

and when they switch mics in editing, it changes the pattern

#

and yeah, its entirely gone in the next scene, set in a different location

desert fog
#

HDCP? It's in-band. But if it was active I would expect the entire stream to look like noise.

earnest dune
#

HDCP acts on the raw uncompressed data stream

desert fog
#

Could be some sort of in-band metadata or control channel as well.

glacial spruce
#

More likely, it's a defect in the compression or signal chain

earnest dune
#

and each clip of the original audio was captured on diff hw

#

and then in editing, combined into one final cut

glacial spruce
#

Even more so if they're doing matrixing

earnest dune
#

matrixing?

glacial spruce
#

Mixing down multichannel audio into 2-channel

earnest dune
#

ah, but this is a 6 channel file

#

however, i'm playing it back at 2 channels

glacial spruce
#

There are several ways to mix down to 2 channels, with varying side effects

earnest dune
#

pulseaudio claims mpv is passing it:
Format: pcm, format.sample_format = "\"float32le\"" format.rate = "48000" format.channels = "6" format.channel_map = "\"front-left,front-right,front-center,lfe,side-left,side-right\""

#

so its pulseaudio that is responsible for the downmixing

glacial spruce
#

I doubt it's trying to do center channel synthesis, Dolby encoding, etc. at least

earnest dune
#

but gnuradio is capturing at Sample Specification: s32le 1ch 48000Hz

#

so PA has to down-mix it all the way to single-channel

earnest dune
glacial spruce
#

Hah, the old "vocal zapper" effect

#

That can also happen in some forms of stereo encoding, where the "left" channel is really L+R and the "right" channel is L-R (FM stereo works like this)

earnest dune
#

and i think that FM does this, so its backwards compatible with mono FM?

desert fog
#

Yeah

earnest dune
#

ive not noticed those 2 notches show up again so far

glacial spruce
#

I keep thinking of Copyguard and being glad the legislators had a clue and didn't go ahead with it.

earnest dune
#

how did it work?

#

ive also noticed, audio compression seems to dynamically change the max freq

#

there seems to be a sharp edge to the noise floor

#

interesting, it just cut to the next scene, a very sharp 16khz tone is now present

glacial spruce
#

Basically, the proposal was to have a notch removed from copyrighted music, and they'd require recorders to refuse to record such material. The originators insisted the notch was narrow enough to be inaudible. The audiophiles insisted it would be audible. So the legislators had them do an A/B test. It was audible, and the proposal didn't continue.

earnest dune
#

and you can see how the noise floor stops at 18khz, but it sometimes goes beyond

earnest dune
glacial spruce
#

Heh, that looks like old MP3 encoding sometimes did. It seemed like it figured that most high frequency material was barely audible, so it treated it as "there" or "not there", and on playback, it would insert high frequency beeping (which I privately dubbed "deedling") when it was "there". I have enough high frequency hearing that I could easily tell when it was doing it.

glacial spruce
#

Yeah, they'd chosen the notch to not be on the standard musical scale, but it happened to be a harmonic of B-flat, so was audible in orchestral music in some keys.

earnest dune
desert fog
#

Also if you ask me copy protection should have precisely zero legal standing beyond basic copyright law.

glacial spruce
#

In the final test, they had tried to "improve" it by only notching when it was above -20dB, which made it even more audible as you could hear it coming and going with the sound level.

earnest dune
#

that reminds me, if twitch has a high offset (due to lag), it will adjust the playback speed to try and catch up

#

that really messes with music, i can hear it going off-key

#

there was a few drum beats, and it went past the normal max freq

desert fog
earnest dune
#

at least with things like HDCP, its not harming the quality of the audio, but it can intefere with your ability to playback

earnest dune
desert fog
#

HDCP is stupid, but less objectionable than some of the other "solutions" to the "problem".

glacial spruce
#

My old plasma monitor didn't support the more recent versions of HDCP, so certain devices stopped working after a firmware upgrade. I ended up buying an HDCP stripper from a part of the world that is uninterested in US company profits so I could still watch my legally obtained content in a legitimate fashion.

#

I also have a DVD player that lets me skip ads, FBI warnings, etc.

desert fog
#

When it is more difficult to obtain the thing illegally than it is to pirate it, piracy is not the problem.

glacial spruce
#

I'm guessing you meant "legally"...

earnest dune
desert fog
#

yeah

#

(responding to bodger)

earnest dune
earnest dune
glacial spruce
#

I would say so.

earnest dune
#

now, lets say that the 2nd person is half way across the continent

#

how do we watch the show together?

#

but now, how do i get that digital copy?

#

or, are we just not allowed to watch the same show?

desert fog
#

Well, if these companies get their way, it's super convenient:

  1. Both of you pay separate subscriptions for your own accounts.
  2. Also pay for the Ultra Premium Deluxe Plus upgrade that supports RealLive room sharing.
  3. Add your friend as a friend on your account, and wait for them to accept the request.
  4. Create a virtual "room" and invite your friend into it.
  5. Your friend joins the room.
  6. Find out that you can't actually watch the thing regardless, because your friend is in a different region, and the thing is unavailable in that region.
glacial spruce
#

Normally, copyrighted material is for "private exhibition". Generally, people you know, you can't charge admission, and it can't be re-recorded. As for the particular use case, that could be problematic, beyond your somewhat peculiar definition of "watching together"

desert fog
#

... except for that time Disney literally tried to track your eyes in your living room to make sure too many people weren't watching the thing.

glacial spruce
#

One time, I wanted to show Apollo 13 in the big conference room at work, complete with a serious sound system. Initially, the legal department said I wasn't allowed to do so. I went over the terms of "private exhibition" with them, and they conceded that my idea didn't violate that, so we hauled in the sound system, fired up the projector, and a few of us watched it on the big screen, until the scene where the Saturn V launches. We literally shook the building, and people came running to see what was going on, and stuck around to watch the rest of the film. Good times.

earnest dune
glacial spruce
#

Track my eyes in my living room? With WHAT? There's nothing in my living room capable of that.

earnest dune
#

problem solved 😛

glacial spruce
#

Relatedly, I wonder how that free TV company is doing

earnest dune
#

it also opens 3 popup windows, for the show, twitch stream, and twitch chat

#

and tries to move them to line up nicely

#

linux window decorations arent accounted for

#

and it moves all the windows, on every tick, roaming all over the screen 😛

desert fog
earnest dune
desert fog
#

There seriously needs to be a penalty for that type of thing.

glacial spruce
#

I don't see how such a penalty would benefit rich old white guys

desert fog
#

Yeah I heard about that.

earnest dune
#

its using endpoints on a publicly accessible service

#

mazda claims the android app was decompiled to find them

desert fog
#

Even then, decompilation and reverse engineering are not illegal.

glacial spruce
#

That's good, as service documentation for this old oscilloscope is hard to come by

desert fog
#

The EULA may have rules against it, but what if I never actually agreed to those terms?

earnest dune
#

what if i have never owned a certain model of pi, and am decompiling firmware for that model

glacial spruce
#

Although it doesn't take much in the way of reverse engineering to realize that 6AN8 tube needs replacing

earnest dune
glacial spruce
#

That bluish glow inside it indicates that the tube has gone gassy

earnest dune
#

ah

#

was hard to tell if it was from inside or a reflection from outside

desert fog
glacial spruce
#

Fair point. It's clearer from this angle, but I can see how it might look like it's reflected from something nearby

desert fog
#

That reminds me I need to fix my tube tester.

earnest dune
#

that wasnt even decompiling, lol

desert fog
#

Oh, the engineers are probably happy to see you doing it. It's just the legal team that would complain.

earnest dune
#

firmware wise, the pi5 is a bit of a mixed bag

#

the firmware is doing far less

#

but they have also added new blobs for other tasks

#

i think overall, the blobs are just managing clocks, reset and power logic

glacial spruce
#

I was working on reverse engineering Pioneer's LaserBarcode system but I was having issues figuring out the checksum field, so I wrote them and asked. They wrote back saying it was too hard and to give up. I explained what I'd figured out so far, and they said they'd give me a free copy of their $100 software if I promised not to publish my findings!

earnest dune
#

lol

glacial spruce
#

It turned out their software was written in ... HyperCard!

earnest dune
#

havent heard of that one

glacial spruce
#

It's fairly primitive, basically "cards" (like web pages) with information on them, with links (like web pages) to other cards to do various things.

earnest dune
#

sounds like this? lol

glacial spruce
#

Kinda the opposite

earnest dune
red sedge
#

I'm using an arduino to spit out a sinewave

#

by default, that means my voltage is 0-5v centered at 2.5v

#

i want it to be, a proper audio signal, so i need to "shift" it down by 2.5v

#

I'm testing in ltspice and it seems that i can literally just slap a 0.1uf cap on the output pin and get a nice +-2.5v signal centered on 0v

#

am I missing something? this seems too easy.

earnest dune
red sedge
#

yeah I've been trying to figure out how exactly that works

#

I'm trying to pass frequencies as low as like 5hz

#

im fine to lose up to like 15-20hz