Dexed FM synthesizer similar to DX7 running on a bare metal Raspberry Pi

Overview

MiniDexed

Dexed is a FM synthesizer closely modeled on the famous DX7 by a well-known Japanese manufacturer. MiniDexed is a port to run it on a bare metal Raspberry Pi (without a Linux kernel or operating system). Currently it is not functional yet. Contributions are highly welcome.

TODO

Contributions are highly welcome.

  • Get Synth_Dexed to build with circle-stdlib
  • Upload SD card contents to GitHub Releases
  • Get it to boot on a Raspberry Pi 4
  • Get it to react to USB MIDI
  • Get it to react to MIDI via Raspberry Pi 4 GPIO
  • Get it to produce some sound on the headphone jack
  • Get it to produce some sound produced by Dexed
  • Get 8 Dexed instances to run simultaneously (like in a TX816) and mix their output together
  • Add functionality for loading .syx files (e.g., from Dexed_cart_1.0.zip)
  • Add a way to configure each Dexed instance
  • Allow for each Dexed instance to be stereo shifted
  • Add reverb effect

I am wondering whether Dexed could be ported to Circle, in order to recreate basically an open source equivalent of the TX802 (8 DX7 instances without the keyboard in one box).

Usage

  • Download from GitHub Releases
  • Unzip
  • Put the files into the root directory of a FAT32 formatted partition on microSD card
  • Boot in Raspberry Pi 4

Building locally

E.g., on Ubuntu 20.04:

git clone https://github.com/probonopd/MiniDexed
cd MiniDexed

# Recursively pull git submodules
git submodule update --init --recursive

# Install toolchain
wget -q https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
tar xf gcc-arm-*-*.tar.xz 
export PATH=$(readlink -f ./gcc-*/bin/):$PATH

# Build circle-stdlib library
cd circle-stdlib/
./configure -r 4 --prefix "aarch64-none-elf-"
make -j$(nproc)
cd ..

# Build MiniDexed
export PATH=$(readlink -f ./gcc-*/bin/):$PATH
cd src
make -j$(nproc)
ls *.img
cd ..

# Get Raspberry Pi boot files
cd ./circle-stdlib/libs/circle/boot
make
make armstub64
cd -

# Make zip that contains Raspberry Pi 4 boot files
mkdir -p sdcard
cp -r ./circle-stdlib/libs/circle/boot/* sdcard
mv sdcard/config64.txt sdcard/config.txt
rm -rf sdcard/config32.txt sdcard/README sdcard/Makefile sdcard/armstub sdcard/COPYING.linux
cp ./src/*img sdcard/
zip -r MiniDexed_Raspberry_Pi_4.zip sdcard/*

Acknowledgements

Comments
  • Configurable GPIO buttons

    Configurable GPIO buttons

    Thanks @diyelectromusic and @stevelittlefish

    (This is a continuation of #271 and includes that PR, so only one of the two should be merged eventually.)

    opened by probonopd 60
  • Support for Portamento and Pitch Bender parameters

    Support for Portamento and Pitch Bender parameters

    Hi everybody, I bring you my proposal to include control over the Portamento and Pitch bender parameters. This enhancement is necessary in order to play more expressive solos. Musicians will be grateful.

    opened by arsamus 59
  • Change default pinout

    Change default pinout

    EDIT: The pinout in this post is outdated. See newer posts below for the recent one.

    Continuation from here:

    For maximum device compatibliity (including Raspberry Pi 1), we want to have a pinout that needs none of the extra pins introduced with the Raspberry Pi 2.

    Since more and more people are building their hardware now, I'd like to propose the new default pinout rather sooner than later.

    image

    Should we ever use i2c for the display (easier cabling with fewer wires, potentiometer onboard but ~3 EUR more expensive), then we could even have room for SPI:

    image

    What do you think? Feedback appreciated.

    Notes:

    • 2.2k resistor betweeen LCD pin 1 (VSS) and LCD pin 3 (V0) (10k potentiometer would be better)
    • Backlight enabled like this (note the balck and red short wires on the upper left of the green LCD board. K bridged to right side of C2, topmost right side pin of unpopulated chip footprint U3 bridged to the right side of the resistor. CAUTION: Don't blindly do this, measure with a multimeter and understand what you do first! No guarantees.)

    minidexed-2

    MiniDexed_Pinout.zip

    idea 
    opened by probonopd 51
  • Raspberry Pi 1 nonfunctional

    Raspberry Pi 1 nonfunctional

    Raspberry Pi 1 seems to be nonfunctional since at least 2022-04-05: The last message is minidexed: Serial MIDI interface enabled, thereafter it seems frozen.

    On 2022-02-28 it was definitely working: https://github.com/probonopd/MiniDexed/issues/12#issuecomment-1054505774

    Raspberry Pi Zero continues to work, also in the latest builds. What gives?

    bug 
    opened by probonopd 50
  • Switchable performance files improvements + Poly/Mono  + Fix to #298 and #83 issues

    Switchable performance files improvements + Poly/Mono + Fix to #298 and #83 issues

    Hi @probonopd , in order to complement the swichable Performance solution, I have added these additional features to improve the usability of the solution: -Custom defined new performance name: predefined Performance name can be modified. Characters are input by the rotary encoder, to move the cursor, hold down the encoder and turn right or left. Then just double click to confirm. -Delete Performance files: This allows to delete perfomance files from the list. To do that, just double click on the already loaded performance and confirm yes or no. The default performance.ini file in the root directory can't be deleted. -Change voice name: Edited voice can have a custom name (and will be saved on performance file). -Some minor improvements on related Methods.

    opened by arsamus 48
  • Support for Yamaha DX7 SysEx commands

    Support for Yamaha DX7 SysEx commands

    Use this in combination with the latest Synth_Dexed (added a method called checkSystemExclusive()) which checks parameters, checksums, ... and returns a value for further actions).

    This works for MicroDexed but I have no hardware for checking with MiniDexed.

    SysEx master volume is currently not supported.

    opened by dcoredump 46
  • Freezing a few seconds after boot

    Freezing a few seconds after boot

    I'm using an RPi 3 (FAT32) with a USB MIDI controller, but it seems to freeze after about 5-10 seconds whether the controller is plugged in or not. It sounds great right up until then, though :)

    Is there any way to do diagnostics/logging?

    As an aside, I'm really happy to see someone working on this. I've been checking around for exactly this (headless dexed on RPi) every few months and was going to put in a feature request with dopefish to see if he would consider adding it to mt32-pi when i saw there was already a ticket for it. Then, I saw your comment about this project in the ticket comments! Exciting stuff.

    opened by hizzlekizzle 34
  • Some voices are not played

    Some voices are not played

    https://yamahablackboxes.com/patches/dx7/factory/rom3a.syx

    • 17=SAX BC
    • 24=VOICES BC

    https://yamahablackboxes.com/patches/dx7/factory/rom4a.syx

    • 10=BRASS BC

    https://yamahablackboxes.com/patches/dx7/vrc/vrc106a.syx

    • 17=SYN.BRA. 4

    https://yamahablackboxes.com/patches/dx7/vrc/vrc106b.syx

    • 25=SYN.GUITAR

    https://yamahablackboxes.com/patches/dx7/vrc/vrc108a.syx

    • 15=Good-Vibes

    https://yamahablackboxes.com/patches/dx7/vrc/vrc108b.syx

    • 20=BCTrumpet

    TODO: Test with other software instruments

    bug 
    opened by probonopd 29
  • Support selecting patches using MIDI Bank Change and Program Change messages

    Support selecting patches using MIDI Bank Change and Program Change messages

    Many USB keyboards can send Bank LSB and Bank MSB Changes, and Program Changes. If we put several .syx files on the microSD card, then we might use Bank LSB and Bank MSB Changes to select those .syx files, and Program Changes to select patches.

    (Once #8 is implemented I can say which MIDI messages we need to react to.)

    enhancement 
    opened by probonopd 29
  • Multi-core support

    Multi-core support

    This PR modifies the following:

    • Update submodule circle-stdlib to v15.12
      • System options can be defined cleaner using the "-o" option
      • Include KY-040 driver from Circle (removed from MiniDexed)
    • Render sound on secondary CPU core 1
      • Enable multi-core support on Raspberry Pi 2-4
      • Does still work on the Raspberry Pi 1 with restrictions
      • Use CSoundBaseDevice::Write() instead overriding GetChunk()
      • CMiniDexed is not derived from the sound device classes any more
      • Add option SCREEN_DMA_BURST_LENGTH=1 to relieve bus congestion
    • Add volume control to MIDI CC and UI

    There is a new menu item in the UI, which controls the volume level.

    The MIDI message dump and profiling should be disabled on the Raspberry Pi 1, otherwise one hears audio drops, when the screen scrolls.

    Tested on RPi 1A+ (PWM, HDMI), 2B (PWM, I2S, HDMI) and 4B (PWM, I2S, HDMI). The UI has been tested with a RPi 1A+ only (because my hardware is connected there).

    opened by rsta2 28
  • I2C display support

    I2C display support

    Hi, just wondering, what's the current plan on this? I'm willing to further reduce the size of MiniDexed and just limited with parallel LCD options... In particular, OLED 128x32 would be the best.

    opened by Deftaudio 26
  • Sustain Pedal NoteOff Issue

    Sustain Pedal NoteOff Issue

    When you hit a note with high velocity while holding the Susatin Pedal and then pressing the same note a second time with low velocity then cuts off the first sound. That doesn't sound natural. Dexed doesn't behave like that. (And all other keyboard instruments I know)

    opened by Banana71 1
  • Automatically changing cartridge (bank) when preset <0 or >32

    Automatically changing cartridge (bank) when preset <0 or >32

    Support MIDI Bank Slect for MSB and LSB Reload Preset of new bank when bank is changed Adding much more cartridges in the getsysex.sh script --> Only tested on RPI 4b

    opened by abscisys 2
  • In MiniDexed.cpp Program/Bank Change ignore number of programs/banks allowed

    In MiniDexed.cpp Program/Bank Change ignore number of programs/banks allowed

    Should BankSelectLSB bounds-check the provided MIDI value and limit to the number of loaded banks? Similarly should ProgramChange limit to the number of voices per bank?

    Alternatively should there be an option that if a ProgramChange message comes in over MIDI the values 0..127 map onto the first four banks of 32 voices each? i.e.: 0..31 -> bank 1 voices 1-32 32..63 -> bank 2 voices 1-32 64..95 -> bank 3 voices 1-32 96..127 -> bank 4 voices 1-32

    Of course this means that a MIDI sequence: Set Bank=2; Set Program = 4 would end up selecting bank 1, program 4 (as programs 1-32 map onto bank 1)... so this probably has to be configurable...

    opened by diyelectromusic 5
  • On power up there are 16 MIDI SysEx Voice dumps sent out to

    On power up there are 16 MIDI SysEx Voice dumps sent out to "channel 0x11"

    When a ProgramChange is initiated (either over MIDI or via the UI) then the following happens:

    • MiniDexed::ProgramChange is called
    • which calls MidiDevice::SendSystemExclusiveVoice
    • which calls MiniDexed::getSysExVoiceDump and then calls send() for each attached MIDI Device with the resulting data.

    getSysExVoiceDump builds a Yamaha specific systems exclusive message that starts with the bytes: 0xF0 0x43 0x0c 0x00 0x01 0x1B where c is the MIDI channel number (in 0 to 15 format).

    This means that every time the program is changed, the current voice data for the selected TG is sent out on all MIDI devices.

    However, on power up, the initialisation in MiniDexed.cpp calls ProgramChange (0, i) and then later on calls LoadPerformanceParameters which also calls ProgramChange() again. Both of these calls happen before LoadPerformanceParameters calls SetMIDIChannel to set the MIDI channel for the TG from the performance.ini file.

    This means that there are two occasions on power up, for each tone generator, where the MIDI channel is still set to its initialised (i.e. prior to reading the performance.ini file) value of "disabled". As the Enum for MIDI channel is the following (mididevice.h): enum TChannel { Channels = 16, OmniMode = Channels, Disabled, ChannelUnknown };

    Then "Disabled" - 1 is 17 or 0x11. Which is indeed the value we see in the 16 instances of the SysEx voice dump sent out on startup.

    Not quite sure what the fix is... something in this chain should probably check for a disabled MIDI channel before dumping out voice data maybe? I'm not sure. Also I guess if the MIDI channel for a TG is set to Omni then the voice data will always show "channel 16" ("OmniMode=17" - 1).

    I get why ProgramChange always dumps the voice data too, but I can't help think that an editor, if it wants to refresh its data, ought to ask for it rather than "spamming" all MIDI channels ever time a voice is changed...?

    And what happens if a sequencer/MIDI file player/etc sends a load of PC messages on all channels at the start? The worst case might be sending PCs on all 16 channels when all 8 TGs are in Omni mode... Won't that cause 128 voice dumps to channel 16 over every MIDI OUT device!?

    Thoughts?

    opened by diyelectromusic 8
Releases(continuous)
Owner
null
Because why not? Pi Zero bare metal project that ends in an RTOS implementation

PiZeroRTOS Because why not? This repo starts out as a Pi Zero bare metal project and it could very well end up as a viable RTOS implementation with a

null 7 Feb 13, 2022
A bare metal SDK for the ESP32 & ESP32C3

MDK (Minimal Development Kit) - a baremetal ESP32/ESP32C3 SDK An bare metal, make-based SDK for the ESP32, ESP32C3 chips. It is written from scratch u

Sergey Lyubka 100 Jan 2, 2023
Microshell - a lightweight pure C implementation of shell emulator dedicated for embedded bare-metal systems.

MicroShell Lightweight pure C implementation of virtual shell, compatible with VT100 terminal. Support root tree, run-time mounting paths, global comm

Marcin Borowicz 110 Jan 5, 2023
Running Docker container on Raspberry Pi (armhf)

Running Docker container on Raspberry Pi (armhf)

null 1 Nov 8, 2022
Prueba del Raspberry PI PICO con un display Raspberry PI TFT 3.5"

Raspberry-PI-PICO-display-RPI35 Prueba del Raspberry PI PICO con un display Raspberry PI TFT 3.5" Con ayuda de la libreria https://github.com/khoih-pr

null 1 Nov 10, 2021
Wasserstein Inverted Frequency Modulation Synthesizer

Wasserstein Inverted Frequency Modulation Synthesizer 発表資料: https://speakerdeck.com/fadis/wassersteinni-fmyin-yuan 発表動画: https://youtu.be/VF9VX01QYs0

Fadis 11 Nov 24, 2022
Lo-Fi SAMD21 based mini chip tune synthesizer - Seeed Studio - Seeeduino XIAO arduino project

samd21_mini_synth Lo-Fi SAMD21 based mini chip tune synthesizer Seeed Studio - Seeeduino XIAO arduino project link to the video Description This time

Marcel 8 Dec 12, 2022
A CPU implemented in an analog modular synthesizer

A CPU implemented in an analog modular synthesizer This runs in the VCV Rack eurorack simulator. I wrote a thread explaining the CPU on twitter and a

Katherine 278 Dec 28, 2022
synthv1 - an old-school polyphonic synthesizer

synthv1 - an old-school polyphonic synthesizer

Rui Nuno Capela 32 Jan 8, 2023
A lightweight additive chiptune synthesizer (LV2 and Unity Plugin)

OvenMit Synthesizer kenakofer's first ever synthesizer! Coming initially out of BMusic's excellent tutoral series for lv2 synthesizers, the developer

Kenan Schaefkofer 8 Dec 8, 2022
Jeannie 8-voice polyphonic open source synthesizer

Jeannie 8-voice polyphonic open source synthesizer Jeannie is an 8-voice polyphonic open source synthesizer kit with digital sound synthesis and digit

Rolf Degen 38 Dec 28, 2022
Open-source Qt Quick & c++ wavetable synthesizer

?? OOSC! OOSC is a two-oscillator wavetable driving synthesizer written with Qt, QML and C++. Have some included effects like a Reverb, Flanger, EQ et

Roma 5 Sep 2, 2022
A simple wrapper for 'pacman' with a syntax similar to 'apt' to help people transitioning to Arch and Arch based distributions like Manjaro.

aptpac aptpac is a program which helps with the transition to Arch Linux and Arch based distros like Manjaro. It simplifies using pacman as it works l

Itai Nelken 18 Dec 4, 2022
Process Ghosting - a PE injection technique, similar to Process Doppelgänging, but using a delete-pending file instead of a transacted file

Process Ghosting This is my implementation of the technique presented by Gabriel Landau: https://www.elastic.co/blog/process-ghosting-a-new-executable

hasherezade 514 Jan 3, 2023
sap is a document typesetting/preparation system similar in concept to LaTeX

sap is a document typesetting/preparation system similar in concept to LaTeX

zhiayang 14 Mar 29, 2022
My_Shell is a user-defined interactive shell written in C that works similar to the original shell in linux

MY_SHELL Overview My_Shell is a user-defined interactive shell written in C that works similar to the original shell and it can execeute many of the l

Greeshma 1 Nov 22, 2021
4 channel servo controller code for Arduino Mega 2560 for AASD-15A and similar motor driver

eh-msc-4dof 4 channel servo controller code for Arduino Mega 2560 for AASD-15A and similar motor driver Arduino sketch for generating pulses needed to

null 6 Sep 9, 2022
A python library to run metal compute kernels on MacOS

metalcompute for Python A python library to run metal compute kernels on MacOS Usage Example execution from M1-based Mac running MacOS 12.0: > ./build

Andrew Baldwin 21 Nov 7, 2022
Metal lathe electronic lead screw project built on top of Russian-speaking DigitalFeed ELS system by Oleg A. and contributors from ChipMaker.ru

This software and instructions are provided as is, without warranty of any kind. This is a hobby project. Using this might damage your equipment, caus

Maxim Kachurovskiy 30 Jan 2, 2023