I'm building a guitar interface/processor with up to 4 NAM A2-full models plus effects and can't decide the form factor. Which would you actually use?
▲ 2 r/NAM_NeuralAmpModeler+1 crossposts

I'm building a guitar interface/processor with up to 4 NAM A2-full models plus effects and can't decide the form factor. Which would you actually use?

Hi everyone. Having fed up with the poor quality in current guitar interfaces and effects processors, I've decided to build my own. I recently built firmware for a $3 chip that can run a NAM A2 Full and a cab plus 6 effects. You can read more about it here on this thread.

I decided to put it in a physical form factor, and having played guitar and owned tens of pedals in the last 25 years, I'm quite undecided about what would be the best form factor. So I'd like input from people who actually play through this kind of gear.

What it does: a guitar in (stereo so you can use break out cables), stereo out, a headphone out and USB-C audio to a computer. It runs up to 20 blocks of effects, including analog guitar synth and (hopefully, I'm still working on it) guitar to MIDI, plus up to 4 A2-Full captures and up to 8 A2-Lite captures on two DSP chips. You switch presets from the unit; editing happens in an app. Latency is around 2.6-3ms with the full chain on (~1ms when used as a direct interface), and I use a high-end ADC with 119dB dynamic range—trying to get it to a world class interface.

The three shapes I'm considering:

The three different shapes I'm thinking of

  1. Desk/handheld interface, iRig HD X style. About 49 × 104 mm, battery powered, a big knob and three buttons. Lives next to your laptop or can be used on stage either hanging free from your gitar, or maybe even with a clip attached to your guitar strap.
  2. Guitar-mounted, like a Roland GK control unit. A thin box fixed to the guitar body with a short cable to the jack. Headphones and USB plug into it, so you practise or go on stage with no cables to the floor. It unclips to sit on a desk. May be battery powered.
  3. Mini floor pedal, Tonex One / Hammond 1590B size. 9 V DC in or USB power, one footswitch, a couple of knobs. Goes on a pedalboard, but also works on a desk.

I myself lean towards a guitar mount, for whatever reason I'm still in love with the old Roland GK-3.

What I'd love to know:

  • Where do you play most: couch, desk, pedalboard or rehearsal and gigs?
  • Would you mount this unit on your guitar? What would put you off (weight, finish, cables)?
  • Battery or 9 V: does battery power matter to you for something like this?
  • If it's a pedal, how many footswitches is the minimum: one for bypass, or two for presets?
  • Anything you hate about the Tonex One, Mustang Micro, iRig or similar that a new box should fix?
  • Would you prefer a small screen vs several LEDs to indicate presets?
  • What other features would you like to see?

Full disclosure: I'm the one building it. I'm not selling anything yet; I'm just trying not to build the wrong shape.

Edit: It will support Bluetooth MIDI by default. In which scenarios would you be interested in a physical MIDI input?

reddit.com
u/dashersw — 12 days ago
▲ 534 r/react+1 crossposts

I compiled CSS and TypeScript directly to native C++ for ESP32 (60 FPS, no interpreter or VM)

Introducing Gea Stack.

I built an ahead-of-time compiler that turns TSX components and a healthy subset of CSS into native firmware through generated C++. There is no JavaScript VM or CSS interpreter running on the target device.

This demo renders a spinning 3D cube at roughly 60 FPS on a Waveshare ESP32-S3 board with a 410×502 AMOLED display.

Here is a breakdown of the compiler pipeline, rendering pipeline, and the hardware bottlenecks I ran into.

1. Build-Time CSS Compilation

Instead of shipping a CSS parser, our build tool compiles CSS selectors and rules directly into statically typed, pre-allocated C++ structures.

For example, this rule:

.cube-app {
  background-image: linear-gradient(135deg, #12130f 0%, #171b14 45%, #251a15 100%);
}

Is parsed at build-time and mapped directly to fields inside a ComputedStyle struct (which occupies roughly 320 bytes of memory on RGB565 targets):

style_color_t bg_gradient_from_color;  // Packed to the native pixel (RGB565 on most targets)
style_color_t bg_gradient_mid_color;
style_color_t bg_gradient_to_color;
uint16_t bg_gradient_mid_stop;         // 450 (45% stored as permille)
uint16_t bg_gradient_to_stop;          // 1000 (100%)
int16_t  bg_gradient_angle;            // 1350 (135.0 deg stored in tenths of a degree)

(style_color_t is a compile-time alias — uint16_t/RGB565 on standard embedded targets, uint32_t/RGBA8888 on GEA_PIXEL_RGBA8888 targets.)

At runtime, changing a style property like opacity is just a single uint8_t memory write. There are zero string-based lookups or per-property heap allocations in the hot path.

2. The Core Layout and Render Pipeline

To replicate web layout ergonomics on-device, I wrote a lightweight style and layout engine in ~6,000 lines of C++:

  • Flexbox & Grid: A custom ~1,300-line engine handling standard features (grow, shrink, wrap, gap, justify-content) alongside a basic grid layout up to 8 tracks.
  • Dirty Regions: The engine tracks up to 32 coalesced dirty rectangles to avoid repainting unchanged pixels.
  • Reproject Path: For transform-only animation frames (like rotating a 3D cube), running a full layout and paint pass is too slow. If the display list commands are verified as re-projectable, the engine bypasses layout. It transforms the corner points through the updated 3D matrix and depth-sorts them in ~2.7 ms.

3. The Real Bottleneck: Memory Bandwidth

Initially, I assumed the 240 MHz CPU would struggle with the 3D matrix math and pixel alpha blending. I wrote SIMD-optimized blending loops and lookup tables, but they yielded almost zero performance gains over standard scalar loops.

The actual constraint is memory bus contention. A single 410×502 framebuffer at 16-bit color is 411 KB, which is too large to fit in internal SRAM alongside the OS and app memory. The framebuffers live in external PSRAM.

The CPU, cache, and the DMA engine (which streams pixels to the screen over an 80 MHz quad-SPI link at a hardware limit of ~40 MB/s) all compete for the same external bus. Because the hardware is heavily memory-bound, minimizing byte movement was the only way to hit acceptable frame rates.

4. Frame Budget Breakdown (~42 FPS with translucent cube faces)

Here is the exact rendering loop timing on the ESP32-S3 for a single frame of the 3D cube:

  • Replay (Rasterizing translucent cube faces): ~13 ms
  • Flush (DMA transfer over QSPI to panel): ~6 ms
  • Reproject (Transform geometry-only path): ~2.7 ms
  • Layout, dirty region tracking, overhead: ~2 ms
  • Total Frame Time: ~24 ms (~42 FPS)

Hard Limitations

This is not a full browser engine, and I had to enforce strict structural constraints to keep the footprint low:

  • No :hover states (I target touch screens where it's irrelevant).
  • The UI tree is limited to a maximum of 512 nodes.
  • Fonts are rasterized into grayscale coverage atlases at build-time (there is no runtime TTF parser).

I am working on a follow-up about how Gea handles TypeScript reactive state updates and state-store changes without a garbage collector. If you have questions about the layout compiler or the rendering pipeline, let me know in the comments.

I call this project Gea Stack, and the homepage is at https://geastack.com (admittedly heavily under construction).

Fun trivia: Gea Stack is an extension of Gea (https://geajs.com). After building a modern, no non-sense, performant UI framework, I thought it would be great if the same codebase could run on any device. After 3 months, here we are.

Finally, geatsc can compile Node.js applications to native binaries, too. I built additional libraries for targeting iOS and macOS applications in both JSX and importing and using native Apple UIKit/AppKit (and other native) classes in a TypeScript project.

Over the next couple of days I will be releasing more videos on different uses and examples of Gea, and in July I will be fully open sourcing the compiler and the targets/operating systems around it under our GitHub organization at https://github.com/geastack.

Looking forward to your comments!

u/arbayi — 4 months ago