Kautenja / PotatoChips

Eurorack modules based on programmable sound chip emulation.
Other
44 stars 4 forks source link

Some oscillators generate impulse on startup #64

Closed Kautenja closed 3 years ago

Kautenja commented 4 years ago

Describe the bug

When loading a patch with certain modules, an impulse is emitted on patch load

To Reproduce

Steps to reproduce the behavior:

  1. create a patch with
    • 2A03 with Pulse 1 output connected to plots, audio interface, etc.
    • a MIDI-CV gate connected to the volume input for Pulse 1
  2. save the patch then reload the patch
  3. observe an impulse generated by the oscillator voice

this occurs for most oscillators in a similar configuration as 2A03

Expected behavior

The oscillator is quiet on initialization if an empty cable is connected to the volume / amplifier level input.

Kautenja commented 3 years ago

Resolved in 1.8.0 by initializing the BLIP buffer in the Blargg based emulators to 0. The memory was initially being allocated, but not cleared. Also move from dynamic allocation in the constructor to a hard-coded array structure of static length.