- right-click to see additional options, such as saving in DefleMask preset format (.dmp).
- **Name**: changes the instrument name.
- **Type**: changes the instrument type (usually chip-specific).
- if changed, all applicable settings and macros will remain unchanged.
- you may have to adjust them afterwards.
## instrument types
the following instrument types are available:
- [SN76489/Sega PSG](psg.md) - for use with TI SN76489 and derivatives like Sega Master System's PSG.
- [FM (OPN)](fm-opn.md) - for use with YM2612, YM2203, YM2608, YM2610 and YM2610B.
- [Game Boy](game-boy.md) - for use with Game Boy APU.
- [C64](c64.md) - for use with Commodore 64 SID.
- [Generic Sample](sample.md) for controlling Amiga and other sample channels/chips like YM2612's Channel 6 PCM mode, NES channel 5, Sega PCM, X1-010 and PC Engine's sample playback mode.
- [PC Engine](pce.md) - for use with PC Engine's wavetable synthesizer.
- [AY-3-8910/SSG](ay8910.md) - for use with AY-3-8910 PSG sound source and SSG portion in YM2610.
- [AY8930](ay8930.md) - for use with Microchip AY8930 E-PSG sound source.
- [TIA](tia.md) - for use with Atari 2600 chip.
- [SAA1099](saa.md) - for use with Philips SAA1099 PSG sound source.
- [VIC](vic.md) - for use with VIC-20 sound chip.
- [PET](pet.md) - for use with Commodore PET.
- [VRC6](vrc6.md) - for use with VRC6's PSG sound source.
- [FM (OPLL)](fm-opll.md) - for use with YM2413.
- [FM (OPL)](fm-opll.md) - for use with YM3526 (OPL), YM3812 (OPL2) and YMF262 (OPL3).
macros are incredibly versatile tools for automating instrument parameters.
after creating an instrument, open the Instrument Editor and select the "Macros" tab. there may be multiple macro tabs to control individual FM operators and such.
![macro view](macroview.png)
the very first numeric entry sets the visible width of the bars in sequence-type macros. the scrollbar affects the view of all macros at once. there is a matching scrollbar at the bottom underneath all the macros.
each macro has the following parameters:
- macro type (explained below)
- timing options:
- **Step Length (ticks)**: determines the number of ticks between macro steps. default is 1.
- **Delay**: delays the macro until this many ticks have elapsed. default is 0.
- the button is highlighted if either of these parameters is set to non-default values.
## macro types
there are three macro types:
- ![sequence](macro-button-seq.png) **Sequence:** a sequence of numeric values.
- ![ADSR](macro-button-ADSR.png) **ADSR:** this is an attack/decay/sustain/release envelope.
- ![LFO](macro-button-LFO.png) **LFO:** Low Frequency Oscillator.
### sequence
this is the most basic macro type. when the instrument is played, every value in the macro will be output sequentially, from left to right.
- **Bottom** and **Top** determine the macro's output range (Bottom can be larger than Top to invert the envelope!). all outputs will be between these two values.
- Attack, Decay, Sustain, SusDecay, and Release accept inputs between 0 to 255. these are scaled to the distance between Bottom and Top.
- the output starts at Bottom.
- **Attack** is how much the output moves toward Top with each tick.
- **Hold** sets how many ticks to stay at Top before Decay.
- **Decay** is how much the output moves to the Sustain level.
- **Sustain** is how far from Bottom the value stays while the note is on.
- **SusTime** is how many ticks to stay at Sustain until SusDecay.
- **SusDecay** is how much the output moves toward Bottom with each tick while the note is on.
- **Release** is how much the output moves toward Bottom with each tick after the note is released.
![macro ADSR chart](macro-ADSRchart.png)
### LFO
![LFO macro editor](macro-LFO.png)
- **Bottom** and **Top** determine the macro's output range (Bottom can be larger than Top to invert the waveform!).
- **Speed** is how quickly the LFO position moves.
- **Phase** defines the starting LFO position, measured in 1/1024 increments.
- **Shape** is the waveform of the LFO. there are three waveforms:
- Triangle: Bottom > Top > Bottom.
- Saw: moves from Bottom to Top, and then jumps back to Bottom.
- Square: alternates between Bottom and Top.
## wavetable
this tab appears for PC Engine, FDS, Namco WSG, and other wavetable-based instruments.
![wavetable tab](wavetable.png)
when **Enable synthesizer** is off, the wavetable used for the instrument may be selected by creating a Waveform macro with a single value.
to use the wavetable synthesizer, refer to [the wavetable synthesizer section](wavesynth.md).
## sample
this tab appears for Generic PCM DAC, Amiga and SNES.
![sample tab](sample-map.png)
see the [Generic Sample section](sample.md) for more information.