6.0.0-rc4Source

Nt FM C++ Classes

Real-time FM synthesis of game sound effects from patches of a few hundred bytes.

Using the Module

target_link_libraries(app PRIVATE Nt::FM)

Nt FM synthesises lasers, coins, jumps, explosions, alarms and engine loops with four-operator FM, from JSON patches instead of sample files. QtFM::Engine plays QtFM::Patch values in real time or renders them offline; QtFM::AudioOutput connects it to a sound device. Qt has no such module.

See Using Nt FM for a walk through and the patch format, and examples/fm/fmplay.cpp for a complete program.

Classes

QtFMThe QtFM namespace holds Nt FM: an FM synthesiser for game sound effects.
QtFM::AudioOutputThe AudioOutput class is the interface of a sound output that an Engine renders into.
QtFM::ChipThe Chip class gives register-level access to a chip core that an Engine runs.
QtFM::ChipCoreThe ChipCore class is the interface of a chip emulation core.
QtFM::EngineThe Engine class plays patches in real time, or renders them offline.
QtFM::EngineConfigThe EngineConfig struct holds the settings of an Engine, fixed when it is constructed.
QtFM::MidiFileThe MidiFile class reads the notes of a Standard MIDI File.
QtFM::MidiFile::ControlThe Control struct is a change of a channel's level, pan or pitch bend.
QtFM::MidiFile::NoteThe Note struct is one note of a MidiFile.
QtFM::MidiPlayerThe MidiPlayer class plays a MidiFile on an Engine with FM instruments.
QtFM::MusicPlayerThe MusicPlayer class plays chip music from register logs.
QtFM::PatchThe Patch class holds one complete, self-describing sound.
QtFM::PatchBankThe PatchBank class holds a named set of patches, such as all the sounds of a game.
QtFM::PlayOptionsThe PlayOptions struct holds how Engine::play() plays a patch.
QtFM::SequenceThe Sequence class holds timed notes on a tempo grid, for jingles and short cues.
QtFM::Sequence::NoteThe Note struct is one note of a Sequence.
QtFM::VoiceHandleThe VoiceHandle class controls a voice that Engine::play() started.