Synthesix Lite FM

By Grauw

Ascended (8382)

Grauw's picture

12-08-2018, 00:18

Presenting a MSX MIDI synthesizer for the MSX-MUSIC and PSG…

A few years back I worked on a project called Synthesix, which turned your MSX into a modular MIDI synthesizer. However development on that project halted because the scope was too big, and the reception was mediocre due to its complex user interface.

However I still very much do like the concept of using modern tools like PC DAWs such as Logic Pro or Renoise, and MIDI controllers like the BeatStep Pro to make music for the MSX. So as a little side project for my game I set out to make a much simpler version of Synthesix, which I dubbed Synthesix Lite FM.

It has minimal UI, a fixed (non-modular) set-up similar to most normal synthesizers, targets FM and PSG only, and any configuration is done by control messages through MIDI. It’ll run in the background on a real MSX or in an emulator, and the DAW or MIDI controllers talk to it like they would to any other hardware synthesizer.

Project page: https://bitbucket.org/grauw/synthesix-lite-fm

Login or register to post comments

By Grauw

Ascended (8382)

Grauw's picture

12-08-2018, 01:23

Some more information:

It uses MIDI channels 1-9 for FM voices, channels 7-11 for FM drums if enabled, channels 12-14 for the PSG tones, channel 15 for PSG noise and channel 16 for the PSG envelope. All channels are monophonic.

It’s currently already basically functional, but still needs love in a number of places, e.g. the FM drums aren’t implemented yet, pitch bend support is missing, and I want ADSRs and LFOs for amplitude and pitch (I have PSG ADSRs working locally but it’s not complete yet).

For generating replayable files for the MSX, I was thinking to make a PC script which takes a MIDI file as input and replicates the workings of Synthesix Lite FM so that the timing is precisely synced to the MSX interrupt and not limited by MIDI bandwidth. This would then output a VGM-like command stream optimised with a recurring pattern dictionary, so that it requires very little CPU time to play back while still keeping file sizes moderate.

Oh, and currently it is turbo R only.

By syn

Paragon (1920)

syn's picture

12-08-2018, 00:36

Very interesting. Would you mind adding a compiled executable? I'm not really a developer so I failed at running the makefile Wink Will try it tomorrow or something

By Grauw

Ascended (8382)

Grauw's picture

12-08-2018, 01:06

I just did.

Also added documentation to the README for the MIDI channels and controls it responds to.

On my BeatStep Pro I mapped CC 16-31 to the knobs and CC 80-95 to the toggle buttons.

By Grauw

Ascended (8382)

Grauw's picture

13-08-2018, 12:02

Use a tempo of 150 bpm to have 1 MIDI tick per 60 Hz interrupt, or a tempo of 125 bpm for 50 Hz.

MIDI has 24 ticks per quarter note. Since Synthesix Lite is aimed at making game music, it updates once per interrupt. Any other tempo of course also works, but these tempos give you a precise match to the MSX interrupts.

By Grauw

Ascended (8382)

Grauw's picture

06-10-2018, 22:52

I made a Youtube playlist for Synthesix Lite FM videos, on which I posted:

Showing the synth in action with some different hardware and software used to control it.

Recent update is that I implemented the pitch bend support.

By Grauw

Ascended (8382)

Grauw's picture

06-10-2018, 23:51

Grauw wrote:

Recent update is that I implemented the pitch bend support.

For the coders among us, I had to do a bunch of math for that but I think it turned out pretty nice Big smile.

; b = note number
; c = fraction
; hl <- period
PSGTone_GetPeriod:
    ld hl,0AAABH  ; de = hl * (1 / 1.5)
    muluw hl,bc
    ld hl,13803  ; (69 / 12 - log2(440) - log2(16) + log2(3579545) - 8) * 2048
    and a
    sbc hl,de
    call Math_Pow2
    ld l,h
    ld h,e
    ld a,h
    and ~0FH
    ret z
    ld hl,0FFFH  ; clamp
    ret

; hl = exponent (signed fixed point 1.4.11) (least significant bit ignored)
; dehl <- product (fixed point 16.16)
; Modifies: af, b, de, hl
Math_Pow2:
    [more]