Skip to content

Hackme Rockit 8 Bit synth v1.13, Ported and Cross Compiled for the ReSpeaker Core v1.0.

License

Notifications You must be signed in to change notification settings

1hedu/Respeaker-Core-Rockit

Repository files navigation

Rockit 1.13 Paraphonic Synth - ReSpeaker Core Port

Port of the Rockit 1.13 paraphonic synthesizer firmware from ATmega644P to ReSpeaker Core v1.0 (MIPS platform).

Overview

This project brings the feature-rich Rockit paraphonic synthesizer to the ReSpeaker Core v1.0, enabling it to function as a standalone hardware synthesizer with TCP MIDI input and web-based control interface.

Features

  • 3-voice paraphonic synthesis with configurable modes (mono/paraphonic)
  • 16 oscillator waveforms: Sine, Square, Saw, Triangle, 9 morphing waves, Hard Sync, Noise, Raw Square
  • 16 LFO shapes with 6 modulation destinations
  • State-variable filter with 4 modes (LP, HP, BP, Notch)
  • ADSR envelope with filter envelope modulation
  • Sub-oscillator for added low-end
  • Glide/portamento with adjustable time
  • Arpeggiator with 16 patterns, configurable speed, length, and gate (drone mode)
  • Drone/loop mode with continuous note and manual pitch control
  • Patch storage with 16 preset slots (save/recall via MIDI CC)
  • TCP MIDI server on port 50000 for remote control
  • Web UI for parameter control via browser

Hardware

  • Platform: Seeed ReSpeaker Core v1.0
  • CPU: MediaTek MT7688AN (MIPS 24KEc @ 580 MHz)
  • Audio: Onboard codec with 1/4" line output
  • OS: OpenWrt Chaos Calmer

Quick Start

Prerequisites

  • ReSpeaker Core v1.0 with network access
  • Host computer for cross-compilation (Linux recommended)

Building

See CROSS_COMPILE_GUIDE.md for detailed cross-compilation instructions.

Quick summary:

# Set up OpenWrt SDK environment
export SDK_PATH=~/OpenWrt-SDK-15.05.1-ramips-mt7688_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64
export STAGING_DIR=$SDK_PATH/staging_dir
export PATH=$STAGING_DIR/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin:$PATH

# Compile
cd ReSpeaker_Rockit_1.0
make

# Deploy
scp respeaker_rockit root@respeaker.local:/root/

Running

Quick Start (Recommended):

# On ReSpeaker device
ssh root@respeaker.local
cd /root
chmod +x start_rockit.sh
./start_rockit.sh

This launches both the synth engine and the C MIDI bridge automatically.

Manual Start:

# Start synth engine (listens on TCP port 50000)
./respeaker_rockit --tcp-midi &

# Start MIDI bridge (HTTP port 8090 -> MIDI port 50000)
./midi_bridge &

Web Interface

  1. Copy rockit_complete.html to a web server or open locally
  2. Update the IP address in the HTML to point to your ReSpeaker
  3. Open in browser to control all parameters

The web UI sends HTTP requests to port 8090, which the MIDI bridge converts to raw MIDI and forwards to the synth engine on port 50000.

Performance Notes

v1.01 Improvements:

  • C MIDI Bridge: Replaced Python HTTP server with lightweight C implementation
    • Eliminates Python interpreter overhead on embedded MIPS
    • ~10-100x faster HTTP request handling
    • Fixes slider stability issues when moving controls rapidly
    • Lower CPU usage and memory footprint

Project Structure

.
├── ReSpeaker_Rockit_1.0/        # Current firmware (WORKING)
│   ├── main.c                    # Entry point, ALSA setup, MIDI server
│   ├── rockit_engine.c           # Synth engine (oscillators, envelope, filter)
│   ├── rockit_engine.h
│   ├── params.c                  # Parameter management
│   ├── params.h
│   ├── paraphonic.h              # Voice allocation
│   ├── wavetables.c              # Waveform lookup tables
│   ├── wavetables.h
│   ├── filter_svf.c              # State-variable filter
│   ├── filter_svf.h
│   ├── socket_midi_raw.c         # TCP MIDI server
│   ├── socket_midi_raw.h
│   ├── patch_storage.c           # Persistent patch save/load
│   ├── patch_storage.h
│   ├── midi_bridge.c             # Fast C HTTP->MIDI bridge (port 8090)
│   ├── start_rockit.sh           # Startup script for synth + bridge
│   ├── avr_compat.h              # AVR compatibility shims
│   └── Makefile
│
├── rockit_1.13_paraphonic.tar.gz # Original ATmega644P firmware
├── rockit_complete.html          # Web-based control interface
├── CROSS_COMPILE_GUIDE.md        # Detailed build instructions
└── README.md                     # This file

MIDI Implementation

Control Changes (CC)

CC # Parameter Range Description
1 LFO Depth 0-127 Modulation wheel
7 Master Volume 0-127 Overall output level
70 Release 0-127 Envelope release time
71 Resonance 0-127 Filter resonance/Q
72 OSC Mix 0-127 OSC1 ← → OSC2 balance
73 Attack 0-127 Envelope attack time
74 Cutoff 0-127 Filter cutoff frequency
75 Decay 0-127 Envelope decay time
76 Sub Osc 0-127 Sub-oscillator on/off (64+ = on)
80 OSC1 Wave 0-127 Waveform (value >> 3 = 0-15)
81 OSC2 Wave 0-127 Waveform (value >> 3 = 0-15)
82 Tune 0-127 Coarse tuning (semitones)
83 Fine 0-127 Fine tuning (cents)
84 Filter Mode 0-127 LP/HP/BP/Notch (value >> 5)
85 Filter Env 0-127 Envelope → Filter amount
86 Sustain 0-127 Envelope sustain level
87 LFO1 Rate 0-127 LFO1 frequency
88 LFO1 Shape 0-127 LFO1 waveform (value >> 3)
89 LFO1 Dest 0-127 LFO1 destination (value >> 4)
90 Glide 0-127 Portamento time
91 Drone Mode 0-127 Toggle: 0-63=off, 64-127=on
92 Save Patch 0-127 Save to patch slot (value >> 3 = 0-15)
93 Recall Patch 0-127 Load from patch slot (value >> 3 = 0-15)
95 LFO2 Rate 0-127 LFO2 frequency
96 LFO2 Depth 0-127 LFO2 modulation amount
97 LFO2 Shape 0-127 LFO2 waveform (value >> 3)
98 LFO2 Dest 0-127 LFO2 destination (value >> 4)
102 Mode 0-127 Mono/Para toggle
103 Voices 0-127 2/3-voice toggle

Note Messages

  • Note On: MIDI note number 0-127, velocity 0-127
  • Note Off: MIDI note number 0-127

Special Modes

Drone Mode (CC 91): When drone mode is enabled, the synthesizer enters a continuous note mode with special control mappings:

  • CC 73 (Attack): Sets the base MIDI note for arpeggiator (value >> 1 = 0-63)
  • CC 75 (Decay): Selects arpeggiator pattern (value * 15 / 127 = 0-15)
  • CC 70 (Release): Controls arpeggiator speed (255 - value = faster at higher values)

The arpeggiator provides 16 patterns including chromatic runs, scales, and octave jumps. Gate time and pattern length are controlled via the arpeggiator parameters (P_ARP_GATE, P_ARP_LENGTH).

CLI Commands

When running interactively, type commands at the prompt:

NOTE <0-127>      - Trigger note (stays on)
OFF <0-127>       - Release note
ALLOFF            - All notes off (panic)
CUTOFF <0-127>    - Set filter cutoff
RESO <0-127>      - Set resonance
VOL <0-127>       - Set master volume
MIX <0-127>       - Set oscillator mix
ATTACK <0-127>    - Set attack time
DECAY <0-127>     - Set decay time
RELEASE <0-127>   - Set release time
HELP              - Show commands

Fixes Applied (v1.0)

This version includes critical fixes from the original port attempt:

  1. PROGMEM Syntax Error - Removed incompatible AVR-specific keywords from wavetables
  2. MIDI CC Mapping - Updated CC handler to match web UI (CC 70-94 range)
  3. 16 Waveform Support - Added all waveforms from original Rockit 1.13
  4. params_init() Bug - Added missing initialization call (was causing zero volume)

Fixes Applied (v1.01)

Stability and performance improvements:

  1. C MIDI Bridge - Replaced Python HTTP server with lightweight C implementation

    • Eliminates Python interpreter bottleneck on embedded MIPS
    • ~10-100x faster HTTP request handling
    • Fixes slider stability during rapid parameter changes
  2. Startup Noise Fix - Resolved digital blaring noise on synth startup

    • Removed killall python from startup script (was killing Mopidy)
    • Added proper ALSA state management (drop/prepare/drain)
    • Zero-initialized audio buffers with calloc()
  3. Code Quality - Eliminated all compilation warnings

    • Fixed string comparison bugs
    • Proper type-safe hardsync wavetable access
    • Removed unused variables

Performance

  • CPU Usage: ~25% at 48kHz sample rate
  • Latency: <10ms note-to-audio
  • Polyphony: 3 voices (paraphonic mode)
  • Memory: ~8MB RSS

Known Issues

  • LFO routing partially implemented (destinations work but some modulations are placeholders)
  • Sub-oscillator uses simple -1 octave sine wave (original had more complex implementation)
  • Some morph waveforms reuse base waveforms (requires additional wavetables for full morphing)

Implemented Features

  • Arpeggiator - 16 patterns with configurable speed, length, and gate (available in drone mode)
  • Preset System - Patch storage with save/load functionality (filesystem-based)
  • Drone/Loop Mode - Continuous note mode with manual pitch/amplitude control

Future Enhancements

  • Complete LFO modulation routing (full matrix implementation)
  • Optimize wavetable access for better performance
  • Add MIDI learn for CC mapping
  • Expand morph waveforms with full wavetable interpolation
  • Web-based patch management interface

Credits

  • Original Rockit Firmware: Matt Heins / HackMe Electronics (2011-2015)
  • ReSpeaker Port: Based on Rockit 1.13 paraphonic edition
  • Platform: Seeed Studio ReSpeaker Core v1.0

License

This project inherits the GPL v3 license from the original Rockit firmware.

Rockit is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

See LICENSE file for details.

Support

For issues specific to this ReSpeaker port, please open an issue on GitHub.

For questions about the original Rockit firmware, see waybackmachine http://hackmeopen.com/

HUGE Shoutout to the Rockit Synth creator, Matt Heins. I was a Kickstarter backer of the Rockit project, and he was kind enough to use me a test guineapig for I belive fw vw1.11. He even sent me a new 644p with it preloaded, since it was unlikely especially back then that I would have an AVR programmer of any sort. And i returned this courtesy by losing interest for like 5 years before I desoldered the old chip and replaced it with the one he'd sent so long ago(2011). This was 2017, and almost 10 years beyond that, here I am, [probably not] keeping this baby alive (by porting it to another dead platform (:, albeit with the same enhancements, see https://github.com/1hedu/Hackme-Rockit-1.13-paraphonic). Anyway Matt, thank you for delivering me such a great product. It continues to keep me occupied.


Status: ✅ Working (v1.01 - 2025-11-15) Tested On: ReSpeaker Core v1.0 (MT7688) with OpenWrt Chaos Calmer Recent Fixes: C MIDI bridge for slider stability, startup noise resolved

About

Hackme Rockit 8 Bit synth v1.13, Ported and Cross Compiled for the ReSpeaker Core v1.0.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages