Skip to content

Grain: recording a Grain track into a Flex buffer overloads the frame (gaps and a click in the take) #2186

Done

Description

@repeat98

@AForceTrulyEvil, a tester hit this with Grain 0.1.3 on 25 November. It's yours to look at when you have time.

What works: Grain plays cleanly. The tester played the same pattern without recording, and the Grain track sounded fine.

What's broken: recording the Grain track into a Flex recorder buffer pushes the Octatrack's processor past the frame budget. The base's frame guard then drops some of Grain's renders, which leaves short gaps. Once it also had to skip a whole audio frame, which is a loud click. Both land in the recording.

What it means musically: resampling Grain, a natural thing to do with a granular machine, gives a take with gaps and clicks.

Who acts: you, on Grain's render cost. The next Grain release already has to fit a medium pattern: a first instance of about 20 % of a frame, against the 33.3 % measured for 0.1.3. This report adds a second reason, because the recorder's work comes on top of whatever the Part already plays.

Did it run on a unit: this comes from the tester's own unit log. It has not been reproduced on a Modwerk unit yet.

Next step: could you check whether you can reproduce it with a Grain track recorded into a Flex buffer? TESTING.md's guard trace says the render needs to be up to about 30 µs shorter in the frames where stock's own work peaks. Recording probably makes those frames heavier.

Details from the unit's log
  • Base 0.8.1 (eb667962), Grain 0.1.3-experimental, 14 modules installed. USB Audio was installed but not used for this recording. Grain is on T4.
  • The five minutes before the report: CPU mean 81 %, peak 100 %, playing the whole time. Earlier in the same session, without the recording: means of 54 to 68 %.
  • Frame guard: 9 dropped renders of T4. The log keeps one such record per ten minutes, so 9 is a lower bound. 3.5 s at 90 % CPU or more. One held late frame entry, which is a skipped DSP frame.
  • Before that, picking Grain on T4 was refused with CPU FULL 8 times.
  • On the base side, not yours: a pick is judged by the longest frame of the last four seconds, so a recording started afterwards isn't counted. That is why CPU FULL let this Part through.
  • Not tested: whether a 16-bit sample, fewer voices or fewer playing tracks avoid it. Not known: MKI or MKII.

Activity

  1. added
    bug
    on Nov 25, 2026
  2. repeat98 commented on Dec 5, 2026

    @repeat98
    OwnerAuthor

    Fixed in Grain 0.2.0, live since 2 December (#2426). A Grain track now takes about half the frame it did: 16.1 % for the first one on the author's MKI, against 33.3 % on 0.1.3. That leaves room for the Flex recorder, and a Part that still doesn't fit is refused up front instead of breaking up in the take. Thanks to Grain's author for the fix. The recording itself hasn't been re-run on a unit yet, so if a take on 0.2.0 still has gaps or a click, reply here and I'll reopen it.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmodule:grain

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions