Repository navigation
Grain 0.2.0-experimental: EDGE, four ways to treat the sample's edges - #2115
AForceTrulyEvil wants to merge 9 commits into
Conversation
|
Thanks for the clear write-up, and for raising the cost rule instead of working around it. Here's where 0.2.0 stands and what's next:
|
… unit (#2123) The guide opened with "Drive an Octatrack MKII", and a Grain author's agent concluded the frame-cost curve needed the owner's unit (#2115). Contributors ran the whole procedure on their own MKI twins on 24 November (#2081, #2116). Room made under the 40 KiB cap: a repeated boot sentence and the 72 s boot note. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Hi Jannik, here is the frame-cost curve for 0.2.0, read on my MKI (OS 1.40C) with package e8d7c794 on a development twin (4c7eb79b, built from this branch with the beta base's flags and --dev), RAM-booted over USB and rolled back afterwards. Scene: pattern A01 at 126 BPM, trigs on steps 1/5/9/13 of T1, T2, T3, T6 and T7. T1 and T3 Flex slots hold the same loaded 16-bit stereo sample (1.30 MB); T2 a one-shot kick; T6 and T7 have trigs and no sample; T5 and T8 are empty. T4 is a mono loop with time stretch on. Picks on an empty A02. Grain on T1 at its default knobs. Results:
So in this scene Grain fits only while T4 is silent. With T4 sounding, with time stretch, it does not fit. I have not measured other combinations (for example a second Grain track, or Grain next to FM Synth). Notes: I ran the curve on T1 only (not T1,T3,T6,T7). The declared price (35, meter 17) is unchanged; the measured first instance (24.4) is below that reserve. The evidence files are modified locally and not pushed yet; I will push them only when you say so. |
|
Thanks, that's the curve I asked for, and the unit run of the final package Please push now. In point 3 I meant that I sign after the evidence is pushed, so you don't need to wait for another go from me. With the same push:
Then I'll decide on the cost rule for 0.2.0 and write the approval for the pushed source. |
Hi Jannik, this is the Grain 0.2.0-experimental author update, on top of 0.1.3 (thanks for merging 0.1.2 and 0.1.3). It adds a knob, so I bumped the minor version. Like the earlier ones it needs your owner approval (
sdk/approvals/grain-build-approval.jsoncovers older versions), so I'm opening it as a draft.What changes for players
Package
e8d7c794…(31,524 bytes; 30,424 in 0.1.3), rebuilt on 0.1.3 withscripts/octatrack-module-packages.pyin the pinned toolchain; the previous package is removed. It loads 30,148 bytes of code and data and reserves 2,864 of BSS (33,012 bytes of static memory). The deepest Grain-only audio stack is 780 bytes by the same method as before (768 in 0.1.2).How it's stored. EDGE lives in SETUP E, the byte stock calls TSTR, whose range 0 to 3 passes the power-on check, so a project opened without the module still plays as a Flex track. In the engine it sits in each track (
gran_set_edge), not inGranParams, so the structure your new PTCH check inverify_lanes.pyreads is unchanged. No new addresses and no new stock hooks.Cost. The two loops that run for every sample,
stereo_pageandstereo_paged, compile to the same instructions as in 0.1.2. The new code runs when a grain is born or reaches an edge: a few compares, and for STOP a multiplication and a compare (a division only for a grain that does reach an edge).Tests
verify.pyruns every case in all four modes (optimized against plain paths, five pitches, mono and stereo), keeps 0.1.2's three references for WRAP and adds ones for CLMP, STOP and BNCE.range_test.c: births at both edges and a sounding grain at both edges, in every mode.verify_lanes.py: the compiled kernels, including your 0.1.3 PTCH checks, all pass.npm run check -- --base origin/main(withMODWERK_EVIDENCE_PENDING=1): prepare, licences, machines, modules, release notes, lint, typecheck, the bundle and the web tests pass, except the three items below that depend on you.sdk:checkfails in other packages' builds because my localm68k-elf-gcc13.3 lacks-fno-late-combine-instructions; the package itself was built in the pinned Docker toolchain.Tested on a unit: MKI, OS 1.40C, official base
6d23e888, card set with Grain, E-Verb, Mini Verb, syntiz, FM Synth, BBD Delay and Tape Echo, by the author (A Force Truly Evil). A sample of eight tones, one a second from C3 to E5, shows which part of the sample each grain reads. With SIZE 64, DENS 100, SCAN 0 and PTCH 0, the notes heard in CLMP, WRAP and BNCE were the ones the host renders give (POS 0 and 127 with SPRY 0 and 60, and POS 0 with DIR 127), on the first build of this release (8a4555de, STOP without the shortening). STOP was nearly silent at POS 127.8, as expected, and played as expected at POS 120. The author heard a click when a STOP grain reached an edge; the shortening is the change made for it. A later build (0e4bebd4, with the shortening) loaded and played, and the author ran the rest of the release checklist (the STOP click, EDGE across a save and a power cycle, a p-lock on EDGE, an older project) and reported nothing wrong. CPU meter (stock meter, read by eye, DENS and SPRY at maximum, PTCH +24, all four EDGE modes): 65 to 68 %, about 66 to 67 % on average in every mode.What I haven't done, and what I need from you
e8d7c794is the same engine and EDGE code on top of 0.1.3 (your PTCH, audition and chromatic changes untouched;verify_lanes.pypasses), but it hasn't been on a unit.grain-build-approval.jsoncovers 0.1.3), and on the next point.evidence/frame-cost.jsonis 0.1.3's (first 33.3, each 33.3, refused on the medium pattern). I haven't measured a curve for 0.2.0: it needs a unit on the development base. The render path is the same as 0.1.3's apart from the edge code, so I'd expect the same numbers, but I haven't measured it. I see 0.1.3's TESTING says the next Grain release is held to a first instance that fits a medium pattern, and this one is dated 24 November. Grain's first instance doesn't fit, so this is your call: waive it again, or tell me what you'd like. I didn't want to hide it.Edge cases
range_test.c, 32,768-frame samplerange_test.cwith one-frame pagesverify.pyverify_lanes.py0e4bebd4, the release checkliste8d7c794on a unitWhat the guides lacked or got wrong: nothing.
Changing a module someone else wrote: its author said yes before I started, and I link it here. (Not applicable: Grain is mine.)
I read the guide for its category in
docs/module-guides/, and TESTING.md lists what I did not test.Source and media are mine or properly licensed, with authors and full licence texts kept. Nothing comes from Elektron firmware.
Screenshots are real captures of the current module UI. Hardware results are what a named person saw on the build named beside each one; emulator results are labelled as emulator results.
Automatically merge and publish my module update after checks pass.
I verified the source, licences, UI and qualification reports, including instance isolation and Part/project/reboot persistence where applicable; no required acceptance check is failed or untested.
One more thing: I don't plan another release for a good while. I think Grain is in a good place and quite complete, and unless someone reports a bug I'll leave it as it is. The four EDGE modes are a big step in what you can do creatively with a granular machine, and I think they make Grain a very complete one. Thanks for all the help and the careful reviews!