Mockbird
Interface Libarary and Synthesizer Setup Tool for Mockingbird-OTTO
Loading...
Searching...
No Matches
Soundscape::Card Class Reference

Interface to a Soundscape sound card running the Mockingbird-OTTO firmware. More...

#include <sndscape.h>

Public Member Functions

 Card ()
 Interfaces to the card configured by the SNDSCAPE environment variable.
 
 Card (std::uint16_t port)
 Interfaces to the card at a specific port.
 
Version get_fw_version ()
 Get the firmware version.
 
FWInfo get_fw_info ()
 Get Synthesizer info.
 
void reset_synth (std::uint8_t program_cnt, std::uint16_t patch_cnt, std::uint16_t wave_cnt)
 Clear software-loaded waves and synthesizer configuration.
 
MelodicInstrument get_melodic (std::uint8_t program_nr)
 Gets the definition of one melodic instrument.
 
void set_melodic (std::uint8_t program_nr, const MelodicInstrument &inst)
 Sets the definition of one melodic instrument.
 
void send_midi_byte (std::uint8_t byte)
 Sends a byte to the MIDI synthesizer.
 

Detailed Description

Interface to a Soundscape sound card running the Mockingbird-OTTO firmware.

This class uses the typical DOS configuration of running the first port in MPU401 compatible mode that also works with most General MIDI games. It will configure the firmware into that mode during construction.

This class does not implement any kind of interface to the AD1848 codec present on most SoundScape cards.

Note that this is the "old" firmware distributed as SNDSCAPE.COD, not the "new" firmware distributed as SNDSCAPE.COx. The new firmware does not support synthesizer reprogramming. On the other hand, only the new firmware supports the effects processor on the Soundscape Elite.

The old firmware can be found at

The Spea/V7 MediaFX is a rebranded Reveal SC-600 if it has a TDA-8421 chip, or a rebranded Ensoniq S-2000 if it does not. The X-Techsnd 001 is an S-1000 clone, the SJ-MS01 is another S-1000 clone.

Constructor & Destructor Documentation

◆ Card() [1/2]

Soundscape::Card::Card ( )

Interfaces to the card configured by the SNDSCAPE environment variable.

This method parses SNDSCAPE%\SNDSCAPE.INI to determine the base port address. It throws an exception if the file does not exists or the card does not respond.

Exceptions
AutoConfigErrorFailed to determine the base port address from the SoundScape configuration file
HardwareNotPresentThe hardware is not responding at the port indicated by the configuration file
TimeoutWhile the hardware seems to be present, the firmware does not respond as expected.
UnexpectedEventThe firmware sent an unexpected event byte during initialization.
FWErrorThe firmware reported an error during initialization

◆ Card() [2/2]

Soundscape::Card::Card ( std::uint16_t port)

Interfaces to the card at a specific port.

Parameters
portThe ODIE base I/O port.
Exceptions
HardwareNotPresentThe hardware is not responding at the port indicated by port.
TimeoutWhile the hardware seems to be present, the firmware does not respond as expected.
UnexpectedEventThe firmware sent an unexpected event byte during initialization.
FWErrorThe firmware reported an error during initialization

Member Function Documentation

◆ get_fw_info()

FWInfo Soundscape::Card::get_fw_info ( )

Get Synthesizer info.

This includes the firmware version as well as the table sizes for melodic programs, patches, waveforms and drum instruments. Some of these parameters can be changed using reset_synth.

Returns
Synthesizer info.

◆ get_fw_version()

Version Soundscape::Card::get_fw_version ( )

Get the firmware version.

Returns
Firmware version, currently only version 1.21 is known to exist

◆ get_melodic()

MelodicInstrument Soundscape::Card::get_melodic ( std::uint8_t program_nr)

Gets the definition of one melodic instrument.

Parameters
program_nrNumber of the program (0..127)
Returns
Instrument definition
Exceptions
std::out_of_rangeprogram_nr exceeds 127
TimeoutThe firmware did not respond in time.
UnexpectedEventThe firmware sent an unexpected event byte.
FWErrorThe firmware reported an error.

◆ reset_synth()

void Soundscape::Card::reset_synth ( std::uint8_t program_cnt,
std::uint16_t patch_cnt,
std::uint16_t wave_cnt )

Clear software-loaded waves and synthesizer configuration.

Resets the synthesizer. It automatically loads ROM samples if a sample ROM is installed (which is the case on all known SoundScape cards). It does not range check program, patch or wave numbers in the ROM, so you must not specify values below the ones required by the ROM, while means that program_cnt needs to be 128 unless your card is modded. Values below 128 cause a firmware buffer overflow while it loads the ROM samples, and values above 128 make no sense, because there are only 128 MIDI programs. The Mockingbird-OTTO firmware does not implement alternate banks to allow for more programs.

While the firmware info includes the number of drum instruments, that number is fixed and cannot be changed from 88 to anything else.

The minimum number of patches or waveforms required for the default general MIDI ROMs is not yet known.

Parameters
program_cntSize of the table for melodic programs (use 128).
patch_cntSize of the table for patches (firmware default is 256).
wave_cntSize of the table for waveforms (firmware default is 512).
Exceptions
TimeoutThe firmware did not respond in time.
UnexpectedEventThe firmware sent an unexpected event byte.
FWErrorThe firmware reported an error.

◆ send_midi_byte()

void Soundscape::Card::send_midi_byte ( std::uint8_t byte)

Sends a byte to the MIDI synthesizer.

Parameters
byteMIDI byte to send.
Exceptions
TimeoutThe transmit buffer was stalled for more than half a second.

◆ set_melodic()

void Soundscape::Card::set_melodic ( std::uint8_t program_nr,
const MelodicInstrument & inst )

Sets the definition of one melodic instrument.

Parameters
program_nrNumber of the program (0..127)
instInstrument definition
Exceptions
std::out_of_rangeprogram_nr exceeds 127
TimeoutThe firmware did not respond in time.
UnexpectedEventThe firmware sent an unexpected event byte.
FWErrorThe firmware reported an error.

The documentation for this class was generated from the following file: