fmfm

package module
v0.0.0-...-dc06f90 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2019 License: MIT Imports: 7 Imported by: 0

README

fmFM

Build Status Go Report Card Godoc MIT License

WORK IN PROGRESS

fmFM (Fake Mobile FM synth) is a YAMAHA MA-5 (YMU765) / YMF825 clone software FM synthesizer.

Mostly based on doomjs/opl3.

Requirements

  • Go 1.12
  • PortMIDI (for CLI)
    • macOS: brew install portmidi
    • Ubuntu: sudo apt-get install libportmidi-dev
  • PortAudio (for CLI)
    • macOS: brew install portaudio
    • Ubuntu: sudo apt-get install portaudio19-dev

CLI installation

go get -u github.com/but80/fmfm.core/cmd/fmfm-cli

CLI usage

NAME:
   fmfm-cli list - List MIDI devices

USAGE:
   fmfm-cli list
NAME:
   fmfm-cli midi - Listen MIDI events

USAGE:
   fmfm-cli midi [command options] [<Input MIDI device>]

OPTIONS:
   --mono, -m                 Force mono mode in all MIDI channels except drum PC
   --mute-nopc, -z            Mute if program change is not found
   --level value, -l value    Total level in dB (default: -12)
   --limiter value, -c value  Limiter threshold in dB (default: -3)
   --ignore value, -n value   Ignore specified MIDI channel (default: 0)
   --solo value, -s value     Accept only specified MIDI channel (default: 0)
   --dump value, -d value     Dump MIDI channel (default: 0)
   --print, -p                Print status
  • Voice libraries (*.vm5.pb) must be placed under voice/ before running. They can be generated by smaf825 (currently use v2 branch for this feature). More information (Japanese)
  • fmFM receives MIDI messages via the MIDI port specified by the 1st argument.

Build module version

go run mage.go buildmod
ls build/fmfm-module

Build WebAssembly version

go run mage.go buildwasm
ls build/fmfm-wasm

Todo

  • Analyze ATS-MA5 output
    • Waveform of DVB
    • MIDI vibrato resolution
    • Channel pan resolution
    • Channel pan and voice pan blending

License

MIT License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller は、MIDIに類似するインタフェースで Chip のレジスタをコントロールします。

func NewController

func NewController(opts *ControllerOpts) *Controller

NewController は、新しい Controller を作成します。

func (*Controller) FlushMIDIMessages

func (ctrl *Controller) FlushMIDIMessages(until int)

FlushMIDIMessages は、蓄積されたMIDIメッセージを処理します。

func (*Controller) PushMIDIMessage

func (ctrl *Controller) PushMIDIMessage(typ MIDIMessage, timestamp, midich, data1, data2 int)

PushMIDIMessage は、処理すべきMIDIメッセージを追加します。

func (*Controller) Reset

func (ctrl *Controller) Reset()

Reset は、音源の状態をリセットします。

type ControllerOpts

type ControllerOpts struct {
	Registers          ymf.Registers
	Library            *smaf.VM5VoiceLib
	MuteIfPCNotFound   bool
	ForceMono          bool
	PrintStatus        bool
	IgnoreMIDIChannels []int
	SoloMIDIChannel    int
}

ControllerOpts は、 NewController のオプションです。

type MIDIMessage

type MIDIMessage int

MIDIMessage は、MIDIメッセージの種類を表す列挙子型です。

const (
	// MIDINoteOn は、MIDIメッセージの種類 NoteOn を表す列挙子です。
	MIDINoteOn MIDIMessage = iota + 1
	// MIDINoteOff は、MIDIメッセージの種類 NoteOff を表す列挙子です。
	MIDINoteOff
	// MIDIControlChange は、MIDIメッセージの種類 ControlChange を表す列挙子です。
	MIDIControlChange
	// MIDIProgramChange は、MIDIメッセージの種類 ProgramChange を表す列挙子です。
	MIDIProgramChange
	// MIDIPitchBend は、MIDIメッセージの種類 PitchBend を表す列挙子です。
	MIDIPitchBend
)

Directories

Path Synopsis
cmd
ymf

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL