Aaqib’s Status Report (11/7)

Completed prototype implementation of piezo circuit on two channels and firmware w/o guitar string tapping.
Tapping works as intended and preliminary measurements show good results (i.e. slow, medium and fast taps correspond to variable values at least to an approximation).

Next Steps:
– Connect to guitar bridge to see string vibrations. If guitar vibrations captured accurately, then move to rest of the strings (this is simply a copy paste of original schema).

Tim’s Status Report (10/31)

The fret-overlay flex PCB and its stencil are on order from JLCPCB (order W2026102801223865), and the parts are on order from LCSC (WM2610280045). Both vendors’ engineering and shipping questions have been answered.

The two orders ship separately. Next, we prepare hand assembly and write the Teensy 4.x firmware that scans all 126 fret pads over SPI and combines them with pluck events from the GK-3.

Firmware plan

The Teensy 4.x reads all 8 MCP23S17 expanders over one SPI bus at least 1,000 times a second. It turns the pressed pads into a fret per string, and sends a USB-MIDI note when the GK-3 detects a pluck. The whole path has to stay under 10 ms.

Wiring. J1 connects to the Teensy as follows. All 8 chips share one chip select and are told apart by their hard-wired addresses: U1 = 000 through U8 = 111.

  • J1 pin 1, MISO: Teensy pin 12
  • J1 pin 2, MOSI: pin 11
  • J1 pin 3, SCK: pin 13
  • J1 pin 4, CS: pin 10
  • J1 pin 5, GND: GND
  • J1 pin 6, 3V3: 3.3 V

A separate wire from the guitar’s ground (bridge or jack sleeve) to Teensy GND is required, because the grounded strings are what pull a pressed pad low.

Start-up

  1. Write IOCON (register 0x0A) with HAEN = 1. Until HAEN is set, every chip answers address 000, so one write reaches all 8.
  2. On each chip, enable the pull-ups on both ports: GPPU A/B (0x0C/0x0D) = 0xFF. The pins are already inputs by default.

Scan loop

  1. For each chip, read GPIOA and GPIOB (0x12/0x13) in one 4-byte SPI transfer. All 8 chips take about 0.1 ms at the chip’s 10 MHz SPI limit.
  2. A pressed pad reads 0. A lookup table generated from pad_map.csv converts (chip, pin) into (string, fret). U8 GPA0/GPA1 are unused.
  3. For each string, take the highest pressed fret; no fret pressed means the open string. Accept a change only after 2-3 identical scans, which is the debounce.

Turning frets into notes. The GK-3 gives a pluck onset and velocity for each string. On a pluck, the note is the open-string note (E2 40, A2 45, D3 50, G3 55, B3 59, E4 64) plus the current fret. The Teensy sends it as a USB-MIDI Note On with that velocity. The note ends when the string is muted or the fret changes.

Team Status Update 10/31

Model:
Waiting for hardware to be done to test actual performance. Currently at a reasonable point when testing manually

Risks are that the delay for the input from guitar is higher than expected limiting the amount of time the model gets for generation. The mitigation here would be to predict farther in the future and use a smaller faster model and sacrifice output note quality for more realtime output

Jai Status Report 10/31

Tested generation manually in order to tune the models and see current performance.

Currently waiting on the hardware to test the whole pipeline to determine what needs to be fixed. The manual test is good but not really indicative of how an actual performance would sound like given the latency and jitter matters

On track, hopefully with be able to test using some hardware by next week

Tim’s Status Report (10/24)

We are ordering the fret-overlay flex PCB as bare boards and soldering the parts ourselves, instead of paying JLCPCB to assemble it. The assembled quote came to $390.36 for 5 boards, with 2 of them assembled.
Two decisions got us here:

  • Rails. JLCPCB’s flex-assembly panel rule forced a much larger panel than the board itself. We found a layout that passes the rule, but the extra area and the assembly fees made the order expensive.
  • Self-assembly. We will order bare boards plus a cheap stencil, buy the chips and parts from LCSC, and reflow them ourselves. A bare board doesn’t need rails, so it is ordered at its own size.

    The assembled order cost $390.36. Most of that is board area and assembly fees, not parts: the chips and other parts were only about $25 of it.

We dropped JLCPCB assembly. We will order the board bare at its own size and reflow the parts ourselves.

  • Board. A single bare board, 471.15 x 160.05 mm, with no rails or frame. The 240 mm rule only applies to assembly, and the board fits JLCPCB’s 234 x 490 mm single-piece flex limit. Price: $154.80
  • Stencil. Ordered separately as a stencil-only item, using a 111 x 53 mm crop of the chip area. That cost $17.16, versus $31.58 for the 520 x 420 mm stencil the PCB-linked order required. All 248 openings were checked against the copper pads.
  • Parts. Bought from LCSC, JLCPCB’s sister store, with shipping combined into the JLCPCB box. Price: $25.62

Total comes to $197.58 + shipping which is significantly lower than price for two assembled boards.

Team Status Update 10/24

Model:

The loop works in simulation, and the compute meets the latency target. Using the live style input, next note accuracy is ~ .74

Risks: Jitter needs 80ms sort window. Options are relax latency requirement, correct output before the window closes, or train for unsorted input.

Design change was to ingest chords in a single pass.

Piezo Circuit:
Not much to update, still waiting on parts to arrive.

PCB Overlay for Fret Matrix:
JLCPCB charge is too high when assembly with other serial data transfer parts is involved.

Decision: Order only PCB without rails from JLCPCB, and order the serial data transfer parts separately.

Jai Status Report 10/24

Did end to end latency tests on personal laptop

sizefirst accompaniment note, p50 / p95 (ms)with 80 ms sort window, p50 / p95
XS 10M2.3 / 3.532 / 71
S 26M5.1 / 7.136 / 74
M 53M9.7 / 16.241 / 82
L 114M18.5 / 26.350 / 92

Ingesting the chord in one pass instead of token by token is 5x faster with identical outputs. The model is within the 30 ms target without the sort window. The 80 ms sort window is now the latency: only 30 to 46% of chords finish under 30 ms.

Accuracy

sizecleanraw live input40 ms sort80 ms sort
S0.7590.4690.6630.737
M0.7740.4790.6770.748
L0.7770.4880.6870.756

Tested music theory stuff for chord prediction, as that might help improve accuracy. It really only helped when theres short context. Longer context actually teaches the music theory

I added key, diatonic, harmonic-rhythm, loop and stock-progression features. Next-bar chord top-1: with 4 chords of history 0.453 to 0.508 (+5.5); with 8, +1.7; with 32, +0.5 (within noise).

On schedule.

Nextweek figure out the sort window vs latency conflict. Use theory features more to test. Start the pretraining on M

Aaqib’s Status Report (10/17)

Finalizing piezo + circuit implementation.

Concerns with piezo element:
– Original plan was to use piezo film from TE Connectivity. This film is thin enough for us to place under the bridge saddle. However, our donor guitar’s bridge width may not be compatible. The reason is the bridge’s width is <50mm while each piezo film is around 12.5mm is width. This implies that there can be an overlap of film which would result in cross talk between strings. As a result, we are first going to attempt using only 2 films to experiment and see how bad the cross talk. Since there is insulation, I think we should be on the good (also given that the signal from this film is extremely low anyway given that the material constant is pretty low (33 pC per newton) while the disk has almost x10 more capacitance per newton. Which is why we order the piezo 10mm disks as well (but this will also induce cross talk at a higher level).
See circuit implementation below (credit to CircuitLM (gave json) and claude (for diagram):

Status Report Global Concerns (i.e. part A):
Most of the people in the world are not as technologically capable. It is my understanding they prefer technology to serve them without understanding fundamentally what is happening under the hood. This is also why abstractions exist even within the engineering world. Not every problem and implementation is required to be known, sometimes only knowing the input and output (and assumptions) is needed for serving an audience. This is pretty much what our product is. The users don’t need to understand the depth of technology to play some music and get bandmates. It is for that population, who don’t want to dive into the nature of NN models and circuitry, that we are designing the solution for.