spessasynth_core 4.3.5 → 4.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +622 -425
- package/dist/index.js +833 -370
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -1416,10 +1416,6 @@ interface InsertionProcessorSnapshot {
|
|
|
1416
1416
|
* 20 parameters for the effect, 255 means "no change" + 3 effect sends (index 20, 21, 22)
|
|
1417
1417
|
*/
|
|
1418
1418
|
params: Uint8Array;
|
|
1419
|
-
/**
|
|
1420
|
-
* A boolean list for channels that have the insertion effect enabled.
|
|
1421
|
-
*/
|
|
1422
|
-
channels: boolean[];
|
|
1423
1419
|
}
|
|
1424
1420
|
type InsertionProcessorConstructor = new (sampleRate: number, maxBufferSize: number) => InsertionProcessor;
|
|
1425
1421
|
//#endregion
|
|
@@ -1628,545 +1624,627 @@ declare const NonRegisteredLSB: {
|
|
|
1628
1624
|
readonly envelopeReleaseTime: 102;
|
|
1629
1625
|
};
|
|
1630
1626
|
//#endregion
|
|
1631
|
-
//#region src/synthesizer/audio_engine/channel/
|
|
1632
|
-
interface
|
|
1633
|
-
/**
|
|
1634
|
-
* The current pressure (aftertouch) of this channel.
|
|
1635
|
-
*/
|
|
1636
|
-
pressure: number;
|
|
1627
|
+
//#region src/synthesizer/audio_engine/channel/awe32_nrpn.d.ts
|
|
1628
|
+
interface ChannelGenerators {
|
|
1637
1629
|
/**
|
|
1638
|
-
*
|
|
1630
|
+
* An array of offsets generators for SF2 NRPN support.
|
|
1631
|
+
* A value of 0 means no change; -10 means 10 lower, etc.
|
|
1639
1632
|
*/
|
|
1640
|
-
|
|
1633
|
+
offsets: Int16Array;
|
|
1641
1634
|
/**
|
|
1642
|
-
*
|
|
1635
|
+
* A small optimization that disables applying offsets until at least one is set.
|
|
1643
1636
|
*/
|
|
1644
|
-
|
|
1637
|
+
offsetsEnabled: boolean;
|
|
1645
1638
|
/**
|
|
1646
|
-
*
|
|
1647
|
-
*
|
|
1648
|
-
*
|
|
1649
|
-
* but it may vary for different sound banks.
|
|
1650
|
-
* For example, if a MIDI requests a modulation depth of 100 cents,
|
|
1651
|
-
* the multiplier will be 2,
|
|
1652
|
-
* which, for a preset with a depth of 50,
|
|
1653
|
-
* will create a total modulation depth of 100 cents.
|
|
1639
|
+
* An array of overrides generators for AWE32 NRPN support.
|
|
1640
|
+
* A value of GENERATOR_OVERRIDE_NO_CHANGE_VALUE (-32,767) means no change;
|
|
1641
|
+
* other values replace current generators.
|
|
1654
1642
|
*/
|
|
1655
|
-
|
|
1643
|
+
overrides: Int16Array;
|
|
1656
1644
|
/**
|
|
1657
|
-
*
|
|
1658
|
-
* This allows triggering multiple parts (channels) with a single note message.
|
|
1659
|
-
* @remarks
|
|
1660
|
-
* Only used when customChannelNumbers is enabled.
|
|
1645
|
+
* A small optimization that disables applying overrides until at least one is set.
|
|
1661
1646
|
*/
|
|
1662
|
-
|
|
1647
|
+
overridesEnabled: boolean;
|
|
1648
|
+
}
|
|
1649
|
+
//#endregion
|
|
1650
|
+
//#region src/synthesizer/enums.d.ts
|
|
1651
|
+
/**
|
|
1652
|
+
* The available interpolation types of the synthesizer.
|
|
1653
|
+
*/
|
|
1654
|
+
declare const InterpolationTypes: {
|
|
1655
|
+
readonly linear: 0;
|
|
1656
|
+
readonly nearestNeighbor: 1;
|
|
1657
|
+
readonly hermite: 2;
|
|
1658
|
+
};
|
|
1659
|
+
type InterpolationType = (typeof InterpolationTypes)[keyof typeof InterpolationTypes];
|
|
1660
|
+
//#endregion
|
|
1661
|
+
//#region src/synthesizer/audio_engine/channel/parameters/system.d.ts
|
|
1662
|
+
/**
|
|
1663
|
+
* The system parameters of the channel.
|
|
1664
|
+
* These can only be changed via the API.
|
|
1665
|
+
*/
|
|
1666
|
+
interface ChannelSystemParameter {
|
|
1663
1667
|
/**
|
|
1664
|
-
* If the
|
|
1665
|
-
* - `true` - POLY ON - regular playback.
|
|
1666
|
-
* - `false` - MONO ON - one note per channel, others are killed on Note On.
|
|
1668
|
+
* If the preset is locked, preventing any program changes from being sent.
|
|
1667
1669
|
*/
|
|
1668
|
-
|
|
1670
|
+
presetLock: boolean;
|
|
1669
1671
|
/**
|
|
1670
|
-
*
|
|
1671
|
-
*
|
|
1672
|
+
* If the channel should not produce any sound
|
|
1673
|
+
* and ignore incoming Note On messages.
|
|
1672
1674
|
*/
|
|
1673
|
-
|
|
1675
|
+
isMuted: boolean;
|
|
1674
1676
|
/**
|
|
1675
|
-
*
|
|
1676
|
-
*
|
|
1677
|
+
* The gain for the channel.
|
|
1678
|
+
* From 0 to any number. 1 is 100% volume.
|
|
1677
1679
|
*/
|
|
1678
|
-
|
|
1680
|
+
gain: number;
|
|
1679
1681
|
/**
|
|
1680
|
-
*
|
|
1682
|
+
* The panning of the channel.
|
|
1683
|
+
* -1 (left) to 1 (right). 0 is center.
|
|
1681
1684
|
*/
|
|
1682
|
-
|
|
1685
|
+
pan: number;
|
|
1683
1686
|
/**
|
|
1684
|
-
*
|
|
1685
|
-
*
|
|
1686
|
-
* This is initialized to a mode suitable for each Part, so for general purposes there is no need to change this.
|
|
1687
|
-
*
|
|
1688
|
-
* - 0 - Single: If the same note is played multiple times in succession, the previously-sounding note will be completely silenced, and then the new note will be sounded.
|
|
1689
|
-
* - 1 - LimitedMulti: If the same note is played multiple times in succession, the previously-sounding note will be continued to a certain extent even after the new note is sounded. (Default setting)
|
|
1690
|
-
* - 2 - FullMulti: If the same note is played multiple times in succession, the previously-sounding note(s) will continue sounding for their natural length even after the new note is sounded.
|
|
1691
|
-
*
|
|
1692
|
-
* SpessaSynth treats LimitedMulti like FullMulti.
|
|
1693
|
-
* Essentially Limited and Full are normal
|
|
1694
|
-
* and Single is like `monophonicRetrigger` system parameter.
|
|
1687
|
+
* The channel key shift in semitones.
|
|
1688
|
+
* Drum channels DO NOT ignore this value.
|
|
1695
1689
|
*/
|
|
1696
|
-
|
|
1690
|
+
keyShift: number;
|
|
1697
1691
|
/**
|
|
1698
|
-
*
|
|
1692
|
+
* The channel tuning in cents.
|
|
1693
|
+
* Drum channels DO NOT ignore this value.
|
|
1699
1694
|
*/
|
|
1700
|
-
|
|
1695
|
+
fineTune: number;
|
|
1701
1696
|
/**
|
|
1702
|
-
*
|
|
1703
|
-
*
|
|
1704
|
-
*
|
|
1697
|
+
* The interpolation type used for sample playback.
|
|
1698
|
+
*
|
|
1699
|
+
* Overrides the global parameter if set.
|
|
1705
1700
|
*/
|
|
1706
|
-
|
|
1701
|
+
interpolationType: InterpolationType | null;
|
|
1707
1702
|
/**
|
|
1708
|
-
*
|
|
1709
|
-
*
|
|
1710
|
-
*
|
|
1703
|
+
* If the channel should prevent changing any parameters via NRPN.
|
|
1704
|
+
*
|
|
1705
|
+
* Overrides the global parameter if set.
|
|
1711
1706
|
*/
|
|
1712
|
-
|
|
1707
|
+
nrpnParamLock: boolean | null;
|
|
1713
1708
|
/**
|
|
1714
|
-
*
|
|
1715
|
-
*
|
|
1716
|
-
*
|
|
1709
|
+
* Indicates whether the channel is in monophonic retrigger mode.
|
|
1710
|
+
* This emulates the behavior of Microsoft GS Wavetable Synth,
|
|
1711
|
+
* Where a new note will kill the previous one if it is still playing.
|
|
1717
1712
|
*
|
|
1718
|
-
*
|
|
1713
|
+
* Overrides the global parameter if set.
|
|
1719
1714
|
*/
|
|
1720
|
-
|
|
1715
|
+
monophonicRetrigger: boolean | null;
|
|
1721
1716
|
}
|
|
1722
|
-
declare const
|
|
1717
|
+
declare const DEFAULT_CHANNEL_SYSTEM_PARAMETERS: ChannelSystemParameter;
|
|
1718
|
+
/**
|
|
1719
|
+
* Sets a system parameter of the channel
|
|
1720
|
+
* @param parameter The type of the system parameter to set.
|
|
1721
|
+
* @param value The value to set for the system parameter.
|
|
1722
|
+
*/
|
|
1723
|
+
declare function setSystemParameterInternal<P extends keyof ChannelSystemParameter>(this: MIDIChannel, parameter: P, value: ChannelSystemParameter[P]): void;
|
|
1723
1724
|
//#endregion
|
|
1724
|
-
//#region src/synthesizer/audio_engine/channel/
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
channel: number;
|
|
1730
|
-
/** The velocity of the note. */
|
|
1731
|
-
velocity: number;
|
|
1732
|
-
}
|
|
1733
|
-
interface NoteOffCallback {
|
|
1734
|
-
/** The MIDI note number. */
|
|
1735
|
-
midiNote: number;
|
|
1736
|
-
/** The MIDI channel number. */
|
|
1737
|
-
channel: number;
|
|
1738
|
-
}
|
|
1739
|
-
interface ProgramChangeCallback extends MIDIPatchFull {
|
|
1740
|
-
/** The MIDI channel number. */
|
|
1741
|
-
channel: number;
|
|
1742
|
-
}
|
|
1743
|
-
interface ControllerChangeCallback {
|
|
1744
|
-
/** The MIDI channel number. */
|
|
1745
|
-
channel: number;
|
|
1746
|
-
/** The controller number. */
|
|
1747
|
-
controller: MIDIController;
|
|
1748
|
-
/** The value of the controller. */
|
|
1749
|
-
value: number;
|
|
1750
|
-
}
|
|
1751
|
-
interface PolyPressureCallback {
|
|
1752
|
-
/** The MIDI channel number. */
|
|
1753
|
-
channel: number;
|
|
1754
|
-
/** The MIDI note number. */
|
|
1755
|
-
midiNote: number;
|
|
1756
|
-
/** The pressure value. */
|
|
1757
|
-
pressure: number;
|
|
1758
|
-
}
|
|
1759
|
-
interface StopAllCallback {
|
|
1725
|
+
//#region src/synthesizer/audio_engine/channel/midi_channel.d.ts
|
|
1726
|
+
/**
|
|
1727
|
+
* This class represents a single MIDI Channel within the synthesizer.
|
|
1728
|
+
*/
|
|
1729
|
+
declare class MIDIChannel {
|
|
1760
1730
|
/**
|
|
1761
|
-
* The MIDI channel
|
|
1731
|
+
* The currently selected MIDI patch of the channel.
|
|
1732
|
+
* Note that the exact matching preset may not be available, but this represents exactly what MIDI asks for.
|
|
1762
1733
|
*/
|
|
1763
|
-
|
|
1734
|
+
readonly patch: MIDIPatch;
|
|
1764
1735
|
/**
|
|
1765
|
-
*
|
|
1736
|
+
* The preset currently assigned to the channel.
|
|
1737
|
+
* Note that this may be undefined in some cases.
|
|
1766
1738
|
*/
|
|
1767
|
-
|
|
1768
|
-
}
|
|
1769
|
-
type ChannelMIDIParameterChange = { [P in keyof ChannelMIDIParameter]: {
|
|
1739
|
+
preset?: BasicPreset;
|
|
1770
1740
|
/**
|
|
1771
|
-
* The channel
|
|
1741
|
+
* The channel's number (0-based index)
|
|
1772
1742
|
*/
|
|
1773
|
-
channel: number;
|
|
1743
|
+
readonly channel: number;
|
|
1774
1744
|
/**
|
|
1775
|
-
*
|
|
1745
|
+
* Sets a system parameter of the channel.
|
|
1746
|
+
* @param parameter The type of the system parameter to set.
|
|
1747
|
+
* @param value The value to set for the system parameter.
|
|
1776
1748
|
*/
|
|
1777
|
-
|
|
1749
|
+
readonly setSystemParameter: typeof setSystemParameterInternal;
|
|
1778
1750
|
/**
|
|
1779
|
-
*
|
|
1751
|
+
* Locks or unlocks a given Channel MIDI Parameter.
|
|
1752
|
+
* This prevents any changes to it until it's unlocked.
|
|
1753
|
+
* @param parameter The Channel MIDI Parameter to lock.
|
|
1754
|
+
* @param isLocked If the parameter should be locked.
|
|
1780
1755
|
*/
|
|
1781
|
-
|
|
1782
|
-
} }[keyof ChannelMIDIParameter];
|
|
1783
|
-
//#endregion
|
|
1784
|
-
//#region src/synthesizer/enums.d.ts
|
|
1785
|
-
/**
|
|
1786
|
-
* The available interpolation types of the synthesizer.
|
|
1787
|
-
*/
|
|
1788
|
-
declare const InterpolationTypes: {
|
|
1789
|
-
readonly linear: 0;
|
|
1790
|
-
readonly nearestNeighbor: 1;
|
|
1791
|
-
readonly hermite: 2;
|
|
1792
|
-
};
|
|
1793
|
-
type InterpolationType = (typeof InterpolationTypes)[keyof typeof InterpolationTypes];
|
|
1794
|
-
//#endregion
|
|
1795
|
-
//#region src/synthesizer/audio_engine/parameters/system.d.ts
|
|
1796
|
-
/**
|
|
1797
|
-
* The global parameters of the synthesizer.
|
|
1798
|
-
* These can only be changed via the API.
|
|
1799
|
-
*/
|
|
1800
|
-
interface GlobalSystemParameter {
|
|
1756
|
+
readonly lockMIDIParameter: typeof lockMIDIParameterInternal;
|
|
1801
1757
|
/**
|
|
1802
|
-
*
|
|
1758
|
+
* An array of MIDI controllers for the channel.
|
|
1759
|
+
* This array is used to store the state of various MIDI controllers
|
|
1760
|
+
* such as volume, pan, modulation, etc.
|
|
1761
|
+
* @remarks
|
|
1762
|
+
* A bit of an explanation:
|
|
1763
|
+
* The controller table is stored as an int16 array, it stores 14-bit values, allowing for full 14-bit LSB resolution.
|
|
1764
|
+
* The only exception from this are the Registered and Non-Registered Parameter Numbers.
|
|
1765
|
+
* Data entries do store it!
|
|
1803
1766
|
*/
|
|
1804
|
-
|
|
1767
|
+
protected readonly _midiControllers: Int16Array;
|
|
1805
1768
|
/**
|
|
1806
|
-
*
|
|
1769
|
+
* An array of octave tuning values for each note on the channel.
|
|
1770
|
+
* Each index corresponds to a note (0 = C, 1 = C#, ..., 11 = B).
|
|
1771
|
+
* Note: Repeated every 12 notes.
|
|
1807
1772
|
*/
|
|
1808
|
-
|
|
1773
|
+
protected readonly octaveTuning: Int8Array;
|
|
1774
|
+
protected readonly _midiParameters: Readonly<ChannelMIDIParameter>;
|
|
1809
1775
|
/**
|
|
1810
|
-
*
|
|
1811
|
-
*
|
|
1812
|
-
*
|
|
1813
|
-
*
|
|
1814
|
-
* Decreasing it does not cause memory usage change, so it's fine to use.
|
|
1776
|
+
* Note On message tracking, for grouping voices for specific Note On messages.
|
|
1777
|
+
* Used for overlapping Note Ons.
|
|
1778
|
+
* MIDI note: current note on ID
|
|
1779
|
+
* @protected
|
|
1815
1780
|
*/
|
|
1816
|
-
|
|
1781
|
+
protected readonly noteOnID: number[];
|
|
1817
1782
|
/**
|
|
1818
|
-
*
|
|
1819
|
-
*
|
|
1820
|
-
*
|
|
1783
|
+
* Note Off message tracking, for grouping voices for specific Note On messages.
|
|
1784
|
+
* Used for overlapping Note Ons.
|
|
1785
|
+
* MIDI note: current note on ID
|
|
1786
|
+
* @protected
|
|
1821
1787
|
*/
|
|
1822
|
-
|
|
1788
|
+
protected readonly noteOffID: number[];
|
|
1823
1789
|
/**
|
|
1824
|
-
*
|
|
1825
|
-
*
|
|
1790
|
+
* If the last Parameter was RPN.
|
|
1791
|
+
* If false then the last parameter was NRPN.
|
|
1792
|
+
* @protected
|
|
1826
1793
|
*/
|
|
1827
|
-
|
|
1794
|
+
protected lastParameterIsRegistered: boolean;
|
|
1828
1795
|
/**
|
|
1829
|
-
*
|
|
1830
|
-
*
|
|
1831
|
-
* the recommended use case would be setting
|
|
1832
|
-
* the reverb parameters then locking it to prevent changes by MIDI files.
|
|
1796
|
+
* Per-note pitch wheel mode uses the pitchWheels table as source
|
|
1797
|
+
* instead of the regular entry in the midiControllers table.
|
|
1833
1798
|
*/
|
|
1834
|
-
|
|
1799
|
+
protected perNotePitch: boolean;
|
|
1835
1800
|
/**
|
|
1836
|
-
*
|
|
1837
|
-
*
|
|
1801
|
+
* Current pan in range [-500;500]
|
|
1802
|
+
* Updated in `updateInternalParams`.
|
|
1803
|
+
* This is used to avoid a big addition for every voice rendering call.
|
|
1838
1804
|
*/
|
|
1839
|
-
|
|
1805
|
+
protected currentPan: number;
|
|
1840
1806
|
/**
|
|
1841
|
-
*
|
|
1842
|
-
*
|
|
1843
|
-
*
|
|
1844
|
-
* the chorus parameters then locking it to prevent changes by MIDI files.
|
|
1807
|
+
* Current tuning in cents.
|
|
1808
|
+
* Updated in `updateInternalParams`.
|
|
1809
|
+
* This is used to avoid a big addition for every voice rendering call.
|
|
1845
1810
|
*/
|
|
1846
|
-
|
|
1811
|
+
protected currentTuning: number;
|
|
1847
1812
|
/**
|
|
1848
|
-
*
|
|
1849
|
-
*
|
|
1813
|
+
* Current key-shift.
|
|
1814
|
+
* Updated in `updateInternalParams`.
|
|
1850
1815
|
*/
|
|
1851
|
-
|
|
1816
|
+
protected currentKeyShift: number;
|
|
1852
1817
|
/**
|
|
1853
|
-
*
|
|
1854
|
-
*
|
|
1855
|
-
*
|
|
1856
|
-
* the delay parameters then locking it to prevent changes by MIDI files.
|
|
1818
|
+
* Current gain.
|
|
1819
|
+
* Updated in `updateInternalParams`.
|
|
1820
|
+
* This is used to avoid a big multiplication for every voice rendering call.
|
|
1857
1821
|
*/
|
|
1858
|
-
|
|
1822
|
+
protected currentGain: number;
|
|
1859
1823
|
/**
|
|
1860
|
-
*
|
|
1861
|
-
*
|
|
1862
|
-
*
|
|
1863
|
-
*
|
|
1824
|
+
* The last pressed note on this channel for portamento tracking.
|
|
1825
|
+
* -1 means none.
|
|
1826
|
+
* This is not a `ChannelMIDIParameter` and is strictly internal,
|
|
1827
|
+
* mostly because we don't want to send events for every note on message.
|
|
1828
|
+
* It can be set with Portamento Control CC anyway.
|
|
1829
|
+
* @protected
|
|
1864
1830
|
*/
|
|
1865
|
-
|
|
1831
|
+
protected lastPortamentoNote: number;
|
|
1866
1832
|
/**
|
|
1867
|
-
* If the
|
|
1868
|
-
*
|
|
1869
|
-
*
|
|
1870
|
-
*
|
|
1833
|
+
* If the portamento should be executed once regardless of Portamento on/off.
|
|
1834
|
+
* Adhering to the MIDI spec, CC#84 ignores on/off.
|
|
1835
|
+
* This is also not a `ChannelMIDIParameter` for the same reason as `lastPortamentoNote`
|
|
1836
|
+
* @protected
|
|
1871
1837
|
*/
|
|
1872
|
-
|
|
1838
|
+
protected portamentoForce: boolean;
|
|
1873
1839
|
/**
|
|
1874
|
-
*
|
|
1840
|
+
* The last pressed note on this channel in mono mode.
|
|
1841
|
+
* Used for tracking and releasing this note on a new Note On event.
|
|
1842
|
+
* -1 means none.
|
|
1843
|
+
* @protected
|
|
1875
1844
|
*/
|
|
1876
|
-
|
|
1845
|
+
protected lastMonoNote: number;
|
|
1877
1846
|
/**
|
|
1878
|
-
*
|
|
1847
|
+
* The last pressed note's velocity on this channel in mono mode.
|
|
1848
|
+
* @protected
|
|
1879
1849
|
*/
|
|
1880
|
-
|
|
1850
|
+
protected lastMonoVelocity: number;
|
|
1881
1851
|
/**
|
|
1882
|
-
*
|
|
1883
|
-
*
|
|
1852
|
+
* For Mono Mode restoring notes.
|
|
1853
|
+
* playingNotes[midiNote]
|
|
1854
|
+
* @protected
|
|
1884
1855
|
*/
|
|
1885
|
-
|
|
1856
|
+
protected readonly playingNotes: boolean[];
|
|
1857
|
+
protected readonly generators: ChannelGenerators;
|
|
1858
|
+
protected readonly computeModulator: (voice: Voice, pitchWheel: number, modulatorIndex: number) => number;
|
|
1859
|
+
protected readonly computeModulators: (voice: Voice, sourceUsesCC?: 0 | 1 | -1 | undefined, sourceIndex?: number | undefined) => void;
|
|
1886
1860
|
/**
|
|
1887
|
-
*
|
|
1888
|
-
* From -1 (left) to 1 (right). 0 is center.
|
|
1861
|
+
* Current amount of voices that are playing on this channel.
|
|
1889
1862
|
*/
|
|
1890
|
-
|
|
1863
|
+
protected _voiceCount: number;
|
|
1891
1864
|
/**
|
|
1892
|
-
*
|
|
1893
|
-
* Drum channels ignore this value.
|
|
1865
|
+
* Current amount of voices that are playing on this channel.
|
|
1894
1866
|
*/
|
|
1895
|
-
|
|
1867
|
+
get voiceCount(): number;
|
|
1896
1868
|
/**
|
|
1897
|
-
*
|
|
1898
|
-
* Drum channels ignore this value.
|
|
1869
|
+
* Indicates whether this channel is a drum channel.
|
|
1899
1870
|
*/
|
|
1900
|
-
|
|
1871
|
+
protected _drumChannel: boolean;
|
|
1901
1872
|
/**
|
|
1902
|
-
*
|
|
1873
|
+
* Indicates whether this channel is a drum channel.
|
|
1903
1874
|
*/
|
|
1904
|
-
|
|
1875
|
+
get drumChannel(): boolean;
|
|
1905
1876
|
/**
|
|
1906
|
-
*
|
|
1877
|
+
* An array of MIDI controllers for the channel.
|
|
1878
|
+
* This array is used to store the state of various MIDI controllers
|
|
1879
|
+
* such as volume, pan, modulation, etc.
|
|
1880
|
+
* @remarks
|
|
1881
|
+
* A bit of an explanation:
|
|
1882
|
+
* The controller table is stored as an int16 array, it stores 14-bit values, allowing for full 14-bit LSB resolution.
|
|
1883
|
+
* The only exception from this are the Registered and Non-Registered Parameter Numbers.
|
|
1884
|
+
* Data entries do store it!
|
|
1907
1885
|
*/
|
|
1908
|
-
|
|
1886
|
+
get midiControllers(): Readonly<Int16Array>;
|
|
1909
1887
|
/**
|
|
1910
|
-
*
|
|
1911
|
-
*
|
|
1912
|
-
* Where a new note will kill the previous one if it is still playing.
|
|
1888
|
+
* The channel system parameters of this channel.
|
|
1889
|
+
* These are only editable via the API.
|
|
1913
1890
|
*/
|
|
1914
|
-
|
|
1915
|
-
}
|
|
1916
|
-
declare const DEFAULT_GLOBAL_SYSTEM_PARAMETERS: GlobalSystemParameter;
|
|
1917
|
-
//#endregion
|
|
1918
|
-
//#region src/synthesizer/audio_engine/channel/awe32_nrpn.d.ts
|
|
1919
|
-
interface ChannelGenerators {
|
|
1891
|
+
get systemParameters(): Readonly<ChannelSystemParameter>;
|
|
1920
1892
|
/**
|
|
1921
|
-
*
|
|
1922
|
-
*
|
|
1893
|
+
* The channel MIDI parameters of this channel.
|
|
1894
|
+
* These are only editable via MIDI messages.
|
|
1923
1895
|
*/
|
|
1924
|
-
|
|
1896
|
+
get midiParameters(): Readonly<ChannelMIDIParameter>;
|
|
1897
|
+
protected get channelSystem(): MIDISystem;
|
|
1925
1898
|
/**
|
|
1926
|
-
*
|
|
1899
|
+
* Locks or unlocks a given controller.
|
|
1900
|
+
* This prevents any changes to it until it's unlocked.
|
|
1901
|
+
* @param controller The MIDI controller number (0-127).
|
|
1902
|
+
* @param isLocked If the controller should be locked.
|
|
1927
1903
|
*/
|
|
1928
|
-
|
|
1904
|
+
lockController(this: MIDIChannel, controller: MIDIController, isLocked: boolean): void;
|
|
1929
1905
|
/**
|
|
1930
|
-
*
|
|
1931
|
-
*
|
|
1932
|
-
*
|
|
1906
|
+
* Changes the preset to, or from drums.
|
|
1907
|
+
* Note that this executes a program change.
|
|
1908
|
+
* @param isDrum If the channel should be a drum preset or not.
|
|
1933
1909
|
*/
|
|
1934
|
-
|
|
1910
|
+
setDrums(isDrum: boolean): void;
|
|
1935
1911
|
/**
|
|
1936
|
-
*
|
|
1912
|
+
* Stops all notes on the channel.
|
|
1913
|
+
* @param force If true, stops all notes immediately, otherwise applies release time.
|
|
1937
1914
|
*/
|
|
1938
|
-
|
|
1915
|
+
stopAllNotes(force?: boolean): void;
|
|
1916
|
+
protected resetGeneratorOverrides(): void;
|
|
1917
|
+
protected setGeneratorOverride(gen: GeneratorType, value: number, realtime?: boolean): void;
|
|
1918
|
+
protected resetGeneratorOffsets(): void;
|
|
1919
|
+
protected setGeneratorOffset(gen: GeneratorType, value: number): void;
|
|
1920
|
+
protected resetDrumParams(): void;
|
|
1921
|
+
protected computeModulatorsAll(sourceUsesCC: -1 | 0 | 1, sourceIndex: number): void;
|
|
1922
|
+
protected setBankMSB(bankMSB: number): void;
|
|
1923
|
+
protected setBankLSB(bankLSB: number): void;
|
|
1924
|
+
/**
|
|
1925
|
+
* Sets drums on channel.
|
|
1926
|
+
*/
|
|
1927
|
+
protected setDrumFlag(isDrum: boolean): void;
|
|
1939
1928
|
}
|
|
1940
1929
|
//#endregion
|
|
1941
|
-
//#region src/synthesizer/audio_engine/channel/parameters/
|
|
1942
|
-
|
|
1943
|
-
* The system parameters of the channel.
|
|
1944
|
-
* These can only be changed via the API.
|
|
1945
|
-
*/
|
|
1946
|
-
interface ChannelSystemParameter {
|
|
1930
|
+
//#region src/synthesizer/audio_engine/channel/parameters/midi.d.ts
|
|
1931
|
+
interface ChannelMIDIParameter {
|
|
1947
1932
|
/**
|
|
1948
|
-
*
|
|
1933
|
+
* The current pressure (aftertouch) of this channel.
|
|
1949
1934
|
*/
|
|
1950
|
-
|
|
1935
|
+
pressure: number;
|
|
1951
1936
|
/**
|
|
1952
|
-
*
|
|
1953
|
-
* and ignore incoming Note On messages.
|
|
1937
|
+
* The current pitch wheel value (0-16,383) of this channel.
|
|
1954
1938
|
*/
|
|
1955
|
-
|
|
1939
|
+
pitchWheel: number;
|
|
1956
1940
|
/**
|
|
1957
|
-
* The
|
|
1958
|
-
* From 0 to any number. 1 is 100% volume.
|
|
1941
|
+
* The current pitch wheel range, in semitones.
|
|
1959
1942
|
*/
|
|
1960
|
-
|
|
1943
|
+
pitchWheelRange: number;
|
|
1961
1944
|
/**
|
|
1962
|
-
* The
|
|
1963
|
-
*
|
|
1945
|
+
* The modulation depth in cents.
|
|
1946
|
+
* This is internally converted to a multiplier by dividing by 50.
|
|
1947
|
+
*
|
|
1948
|
+
* The MIDI specification assumes the default modulation depth is 50 cents,
|
|
1949
|
+
* but it may vary for different sound banks.
|
|
1950
|
+
* For example, if a MIDI requests a modulation depth of 100 cents,
|
|
1951
|
+
* the multiplier will be 2,
|
|
1952
|
+
* which, for a preset with a depth of 50,
|
|
1953
|
+
* will create a total modulation depth of 100 cents.
|
|
1964
1954
|
*/
|
|
1965
|
-
|
|
1955
|
+
modulationDepth: number;
|
|
1966
1956
|
/**
|
|
1967
|
-
* The channel
|
|
1968
|
-
*
|
|
1957
|
+
* The channel's receiving number (0-based index).
|
|
1958
|
+
* This allows triggering multiple parts (channels) with a single note message.
|
|
1959
|
+
* @remarks
|
|
1960
|
+
* Only used when customChannelNumbers is enabled.
|
|
1961
|
+
*/
|
|
1962
|
+
rxChannel: number;
|
|
1963
|
+
/**
|
|
1964
|
+
* If the channel is in the poly mode.
|
|
1965
|
+
* - `true` - POLY ON - regular playback.
|
|
1966
|
+
* - `false` - MONO ON - one note per channel,
|
|
1967
|
+
* highest still pressed note is restored after releasing the currently playing one.
|
|
1968
|
+
*/
|
|
1969
|
+
polyMode: boolean;
|
|
1970
|
+
/**
|
|
1971
|
+
* The key shift of the channel (in semitones).
|
|
1972
|
+
* Drum channels ignore this value.
|
|
1969
1973
|
*/
|
|
1970
1974
|
keyShift: number;
|
|
1971
1975
|
/**
|
|
1972
|
-
*
|
|
1973
|
-
* Drum channels
|
|
1976
|
+
* Cents, RPN/SysEx for fine-tuning.
|
|
1977
|
+
* Drum channels ignore this value.
|
|
1974
1978
|
*/
|
|
1975
1979
|
fineTune: number;
|
|
1976
1980
|
/**
|
|
1977
|
-
*
|
|
1981
|
+
* Enables random panning for every note played on this channel.
|
|
1982
|
+
*/
|
|
1983
|
+
randomPan: boolean;
|
|
1984
|
+
/**
|
|
1985
|
+
* Assign mode for the channel.
|
|
1986
|
+
* `ASSIGN MODE` is the parameter that determines how voice assignment will be handled when sounds overlap on identical note numbers in the same channel (i.e., repeatedly struck notes).
|
|
1987
|
+
* This is initialized to a mode suitable for each Part, so for general purposes there is no need to change this.
|
|
1978
1988
|
*
|
|
1979
|
-
*
|
|
1989
|
+
* - 0 - Single: If the same note is played multiple times in succession, the previously-sounding note will be completely silenced, and then the new note will be sounded.
|
|
1990
|
+
* - 1 - LimitedMulti: If the same note is played multiple times in succession, the previously-sounding note will be continued to a certain extent even after the new note is sounded. (Default setting)
|
|
1991
|
+
* - 2 - FullMulti: If the same note is played multiple times in succession, the previously-sounding note(s) will continue sounding for their natural length even after the new note is sounded.
|
|
1992
|
+
*
|
|
1993
|
+
* SpessaSynth treats LimitedMulti like FullMulti.
|
|
1994
|
+
* Essentially Limited and Full are normal
|
|
1995
|
+
* and Single is like `monophonicRetrigger` system parameter.
|
|
1980
1996
|
*/
|
|
1981
|
-
|
|
1997
|
+
assignMode: number;
|
|
1982
1998
|
/**
|
|
1983
|
-
*
|
|
1999
|
+
* Indicates whether this channel uses the insertion EFX processor.
|
|
2000
|
+
*/
|
|
2001
|
+
efxAssign: boolean;
|
|
2002
|
+
/**
|
|
2003
|
+
* CC1 for GS controller matrix.
|
|
2004
|
+
* An arbitrary MIDI controller, which can be bound to any synthesis parameter.
|
|
2005
|
+
* Default is 16.
|
|
2006
|
+
*/
|
|
2007
|
+
cc1: MIDIController;
|
|
2008
|
+
/**
|
|
2009
|
+
* CC2 for GS controller matrix.
|
|
2010
|
+
* An arbitrary MIDI controller, which can be bound to any synthesis parameter.
|
|
2011
|
+
* Default is 17.
|
|
2012
|
+
*/
|
|
2013
|
+
cc2: MIDIController;
|
|
2014
|
+
/**
|
|
2015
|
+
* Drum map for GS system exclusive tracking.
|
|
2016
|
+
* Only used for selecting the correct channel when setting drum parameters through sysEx,
|
|
2017
|
+
* as those don't specify the channel, but the drum number.
|
|
1984
2018
|
*
|
|
1985
|
-
*
|
|
2019
|
+
* The only values that are allowed are 0 (melodic) 1 or 2.
|
|
1986
2020
|
*/
|
|
1987
|
-
|
|
2021
|
+
drumMap: number;
|
|
1988
2022
|
/**
|
|
1989
|
-
*
|
|
1990
|
-
* This emulates the behavior of Microsoft GS Wavetable Synth,
|
|
1991
|
-
* Where a new note will kill the previous one if it is still playing.
|
|
2023
|
+
* The relation between the input and the actual velocity.
|
|
1992
2024
|
*
|
|
1993
|
-
*
|
|
2025
|
+
* If Velo Depth is increased, small differences in your playing dynamics will make a large difference in the loudness of the sound.
|
|
2026
|
+
* If Velo Depth is decreased, even large differences in your playing dynamics will make only a small difference in the loudness of the sound.
|
|
2027
|
+
*
|
|
2028
|
+
* Examples (with offset being set to normal):
|
|
2029
|
+
*
|
|
2030
|
+
* - 64 is normal.
|
|
2031
|
+
* - 32 is half velocity at max volume.
|
|
2032
|
+
* - 127 is max velocity at half volume.
|
|
2033
|
+
*
|
|
2034
|
+
* Refer to [SC-8850 Owner's Manual](https://cdn.roland.com/assets/media/pdf/SC-8850_OM.pdf), page 56.
|
|
1994
2035
|
*/
|
|
1995
|
-
|
|
2036
|
+
velocitySenseDepth: number;
|
|
2037
|
+
/**
|
|
2038
|
+
* The offset to add to the input velocity.
|
|
2039
|
+
*
|
|
2040
|
+
* If Velo Offset is set higher than 64, even softly played notes (i.e., notes with a low velocity)
|
|
2041
|
+
* will be sounded loudly. If Velo Offset is set lower than 64,
|
|
2042
|
+
* even strongly played notes (i.e., notes with a high velocity) will be sounded softly.
|
|
2043
|
+
*
|
|
2044
|
+
* Examples (with depth set to normal):
|
|
2045
|
+
*
|
|
2046
|
+
* - 64 is normal.
|
|
2047
|
+
* - 32 is silent until half velocity, max velocity is half volume.
|
|
2048
|
+
* - 96 starts at half volume and reaches max volume at half velocity.
|
|
2049
|
+
* - 127 always forces velocity to max.
|
|
2050
|
+
*
|
|
2051
|
+
* Refer to [SC-8850 Owner's Manual](https://cdn.roland.com/assets/media/pdf/SC-8850_OM.pdf), page 56.
|
|
2052
|
+
*/
|
|
2053
|
+
velocitySenseOffset: number;
|
|
1996
2054
|
}
|
|
1997
|
-
declare const
|
|
2055
|
+
declare const DEFAULT_CHANNEL_MIDI_PARAMETERS: ChannelMIDIParameter;
|
|
1998
2056
|
/**
|
|
1999
|
-
*
|
|
2000
|
-
*
|
|
2001
|
-
* @param
|
|
2057
|
+
* Locks or unlocks a given Channel MIDI Parameter.
|
|
2058
|
+
* This prevents any changes to it until it's unlocked.
|
|
2059
|
+
* @param parameter The Channel MIDI Parameter to lock.
|
|
2060
|
+
* @param isLocked If the parameter should be locked.
|
|
2002
2061
|
*/
|
|
2003
|
-
declare function
|
|
2062
|
+
declare function lockMIDIParameterInternal<P extends keyof ChannelMIDIParameter>(this: MIDIChannel, parameter: P, isLocked: boolean): void;
|
|
2004
2063
|
//#endregion
|
|
2005
|
-
//#region src/synthesizer/audio_engine/channel/
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2064
|
+
//#region src/synthesizer/audio_engine/channel/types.d.ts
|
|
2065
|
+
interface NoteOnCallback {
|
|
2066
|
+
/** The MIDI note number. */
|
|
2067
|
+
midiNote: number;
|
|
2068
|
+
/** The MIDI channel number. */
|
|
2069
|
+
channel: number;
|
|
2070
|
+
/** The velocity of the note. */
|
|
2071
|
+
velocity: number;
|
|
2072
|
+
}
|
|
2073
|
+
interface NoteOffCallback {
|
|
2074
|
+
/** The MIDI note number. */
|
|
2075
|
+
midiNote: number;
|
|
2076
|
+
/** The MIDI channel number. */
|
|
2077
|
+
channel: number;
|
|
2078
|
+
}
|
|
2079
|
+
interface ProgramChangeCallback extends MIDIPatchFull {
|
|
2080
|
+
/** The MIDI channel number. */
|
|
2081
|
+
channel: number;
|
|
2082
|
+
}
|
|
2083
|
+
interface ControllerChangeCallback {
|
|
2084
|
+
/** The MIDI channel number. */
|
|
2085
|
+
channel: number;
|
|
2086
|
+
/** The controller number. */
|
|
2087
|
+
controller: MIDIController;
|
|
2088
|
+
/** The value of the controller. */
|
|
2089
|
+
value: number;
|
|
2090
|
+
}
|
|
2091
|
+
interface PolyPressureCallback {
|
|
2092
|
+
/** The MIDI channel number. */
|
|
2093
|
+
channel: number;
|
|
2094
|
+
/** The MIDI note number. */
|
|
2095
|
+
midiNote: number;
|
|
2096
|
+
/** The pressure value. */
|
|
2097
|
+
pressure: number;
|
|
2098
|
+
}
|
|
2099
|
+
interface StopAllCallback {
|
|
2010
2100
|
/**
|
|
2011
|
-
* The
|
|
2012
|
-
* Note that the exact matching preset may not be available, but this represents exactly what MIDI asks for.
|
|
2101
|
+
* The MIDI channel number.
|
|
2013
2102
|
*/
|
|
2014
|
-
|
|
2103
|
+
channel: number;
|
|
2015
2104
|
/**
|
|
2016
|
-
*
|
|
2017
|
-
* Note that this may be undefined in some cases.
|
|
2105
|
+
* If the channel was force stopped. (no release time)
|
|
2018
2106
|
*/
|
|
2019
|
-
|
|
2107
|
+
force: boolean;
|
|
2108
|
+
}
|
|
2109
|
+
type ChannelMIDIParameterChange = { [P in keyof ChannelMIDIParameter]: {
|
|
2020
2110
|
/**
|
|
2021
|
-
* The channel
|
|
2111
|
+
* The channel that was affected.
|
|
2022
2112
|
*/
|
|
2023
|
-
|
|
2113
|
+
channel: number;
|
|
2024
2114
|
/**
|
|
2025
|
-
*
|
|
2026
|
-
* @param parameter The type of the system parameter to set.
|
|
2027
|
-
* @param value The value to set for the system parameter.
|
|
2115
|
+
* The parameter that was changed.
|
|
2028
2116
|
*/
|
|
2029
|
-
|
|
2117
|
+
parameter: P;
|
|
2030
2118
|
/**
|
|
2031
|
-
*
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2119
|
+
* The new value of this parameter.
|
|
2120
|
+
*/
|
|
2121
|
+
value: ChannelMIDIParameter[P];
|
|
2122
|
+
} }[keyof ChannelMIDIParameter];
|
|
2123
|
+
//#endregion
|
|
2124
|
+
//#region src/synthesizer/audio_engine/parameters/system.d.ts
|
|
2125
|
+
/**
|
|
2126
|
+
* The global parameters of the synthesizer.
|
|
2127
|
+
* These can only be changed via the API.
|
|
2128
|
+
*/
|
|
2129
|
+
interface GlobalSystemParameter {
|
|
2130
|
+
/**
|
|
2131
|
+
* If the synthesizer processes the audio effects.
|
|
2039
2132
|
*/
|
|
2040
|
-
|
|
2133
|
+
effectsEnabled: boolean;
|
|
2041
2134
|
/**
|
|
2042
|
-
*
|
|
2043
|
-
* Each index corresponds to a note (0 = C, 1 = C#, ..., 11 = B).
|
|
2044
|
-
* Note: Repeated every 12 notes.
|
|
2135
|
+
* If the event system is enabled.
|
|
2045
2136
|
*/
|
|
2046
|
-
|
|
2047
|
-
protected readonly _midiParameters: Readonly<ChannelMIDIParameter>;
|
|
2137
|
+
eventsEnabled: boolean;
|
|
2048
2138
|
/**
|
|
2049
|
-
*
|
|
2050
|
-
*
|
|
2051
|
-
*
|
|
2139
|
+
* The maximum number of voices that can be played at once.
|
|
2140
|
+
*
|
|
2141
|
+
* Increasing this value causes memory allocation for more voices.
|
|
2142
|
+
* It is recommended to set it at the beginning, before rendering audio to avoid GC.
|
|
2143
|
+
* Decreasing it does not cause memory usage change, so it's fine to use.
|
|
2052
2144
|
*/
|
|
2053
|
-
|
|
2145
|
+
voiceCap: number;
|
|
2054
2146
|
/**
|
|
2055
|
-
*
|
|
2056
|
-
*
|
|
2147
|
+
* Enabling this parameter will cause a new voice allocation when the voice cap is hit, rather than stealing existing voices.
|
|
2148
|
+
*
|
|
2149
|
+
* This is not recommended in real-time environments.
|
|
2057
2150
|
*/
|
|
2058
|
-
|
|
2151
|
+
autoAllocateVoices: boolean;
|
|
2059
2152
|
/**
|
|
2060
|
-
*
|
|
2061
|
-
*
|
|
2062
|
-
* This is used to avoid a big addition for every voice rendering call.
|
|
2153
|
+
* The reverb effect gain.
|
|
2154
|
+
* From 0 to any number. 1 is 100% reverb.
|
|
2063
2155
|
*/
|
|
2064
|
-
|
|
2156
|
+
reverbGain: number;
|
|
2065
2157
|
/**
|
|
2066
|
-
*
|
|
2067
|
-
*
|
|
2068
|
-
*
|
|
2158
|
+
* If the synthesizer should prevent editing of the reverb parameters.
|
|
2159
|
+
* This effect is modified using MIDI system exclusive messages, so
|
|
2160
|
+
* the recommended use case would be setting
|
|
2161
|
+
* the reverb parameters then locking it to prevent changes by MIDI files.
|
|
2069
2162
|
*/
|
|
2070
|
-
|
|
2163
|
+
reverbLock: boolean;
|
|
2071
2164
|
/**
|
|
2072
|
-
*
|
|
2073
|
-
*
|
|
2165
|
+
* The chorus effect gain.
|
|
2166
|
+
* From 0 to any number. 1 is 100% chorus.
|
|
2074
2167
|
*/
|
|
2075
|
-
|
|
2168
|
+
chorusGain: number;
|
|
2076
2169
|
/**
|
|
2077
|
-
*
|
|
2078
|
-
*
|
|
2079
|
-
*
|
|
2170
|
+
* If the synthesizer should prevent editing of the chorus parameters.
|
|
2171
|
+
* This effect is modified using MIDI system exclusive messages, so
|
|
2172
|
+
* the recommended use case would be setting
|
|
2173
|
+
* the chorus parameters then locking it to prevent changes by MIDI files.
|
|
2080
2174
|
*/
|
|
2081
|
-
|
|
2175
|
+
chorusLock: boolean;
|
|
2082
2176
|
/**
|
|
2083
|
-
* The
|
|
2084
|
-
*
|
|
2085
|
-
* This is not a `ChannelMIDIParameter` and is strictly internal,
|
|
2086
|
-
* mostly because we don't want to send events for every note on message.
|
|
2087
|
-
* It can be set with Portamento Control CC anyway.
|
|
2088
|
-
* @protected
|
|
2177
|
+
* The delay effect gain.
|
|
2178
|
+
* From 0 to any number. 1 is 100% delay.
|
|
2089
2179
|
*/
|
|
2090
|
-
|
|
2180
|
+
delayGain: number;
|
|
2091
2181
|
/**
|
|
2092
|
-
* If the
|
|
2093
|
-
*
|
|
2094
|
-
*
|
|
2095
|
-
*
|
|
2182
|
+
* If the synthesizer should prevent editing of the delay parameters.
|
|
2183
|
+
* This effect is modified using MIDI system exclusive messages, so
|
|
2184
|
+
* the recommended use case would be setting
|
|
2185
|
+
* the delay parameters then locking it to prevent changes by MIDI files.
|
|
2096
2186
|
*/
|
|
2097
|
-
|
|
2098
|
-
protected readonly generators: ChannelGenerators;
|
|
2099
|
-
protected readonly computeModulator: (voice: Voice, pitchWheel: number, modulatorIndex: number) => number;
|
|
2100
|
-
protected readonly computeModulators: (voice: Voice, sourceUsesCC?: 0 | 1 | -1 | undefined, sourceIndex?: number | undefined) => void;
|
|
2187
|
+
delayLock: boolean;
|
|
2101
2188
|
/**
|
|
2102
|
-
*
|
|
2189
|
+
* If the synthesizer should prevent changing the insertion effect type and parameters.
|
|
2190
|
+
* This effect is modified using MIDI system exclusive messages, so
|
|
2191
|
+
* the recommended use case would be setting
|
|
2192
|
+
* the insertion effect type and parameters then locking it to prevent changes by MIDI files.
|
|
2193
|
+
*
|
|
2194
|
+
* To lock the channel insertion assign, lock the `efxAssign` parameter instead.
|
|
2103
2195
|
*/
|
|
2104
|
-
|
|
2196
|
+
insertionEffectLock: boolean;
|
|
2105
2197
|
/**
|
|
2106
|
-
*
|
|
2198
|
+
* If the synthesizer should prevent editing of the drum parameters.
|
|
2199
|
+
* These params are modified using MIDI system exclusive messages or NRPN, so
|
|
2200
|
+
* the recommended use case would be setting
|
|
2201
|
+
* the drum parameters then locking it to prevent changes by MIDI files.
|
|
2107
2202
|
*/
|
|
2108
|
-
|
|
2203
|
+
drumLock: boolean;
|
|
2109
2204
|
/**
|
|
2110
|
-
*
|
|
2205
|
+
* Forces note killing instead of releasing. Improves performance in black MIDIs.
|
|
2111
2206
|
*/
|
|
2112
|
-
|
|
2207
|
+
blackMIDIMode: boolean;
|
|
2113
2208
|
/**
|
|
2114
|
-
*
|
|
2209
|
+
* Synthesizer's device ID for system exclusive messages. Set to -1 to accept all.
|
|
2115
2210
|
*/
|
|
2116
|
-
|
|
2211
|
+
deviceID: number;
|
|
2117
2212
|
/**
|
|
2118
|
-
*
|
|
2119
|
-
*
|
|
2120
|
-
* such as volume, pan, modulation, etc.
|
|
2121
|
-
* @remarks
|
|
2122
|
-
* A bit of an explanation:
|
|
2123
|
-
* The controller table is stored as an int16 array, it stores 14-bit values, allowing for full 14-bit LSB resolution.
|
|
2124
|
-
* The only exception from this are the Registered and Non-Registered Parameter Numbers.
|
|
2125
|
-
* Data entries do store it!
|
|
2213
|
+
* The master gain.
|
|
2214
|
+
* From 0 to any number. 1 is 100% volume.
|
|
2126
2215
|
*/
|
|
2127
|
-
|
|
2216
|
+
gain: number;
|
|
2128
2217
|
/**
|
|
2129
|
-
* The
|
|
2130
|
-
*
|
|
2218
|
+
* The master pan.
|
|
2219
|
+
* From -1 (left) to 1 (right). 0 is center.
|
|
2131
2220
|
*/
|
|
2132
|
-
|
|
2221
|
+
pan: number;
|
|
2133
2222
|
/**
|
|
2134
|
-
* The
|
|
2135
|
-
*
|
|
2223
|
+
* The global key shift in semitones.
|
|
2224
|
+
* Drum channels ignore this value.
|
|
2136
2225
|
*/
|
|
2137
|
-
|
|
2138
|
-
protected get channelSystem(): MIDISystem;
|
|
2226
|
+
keyShift: number;
|
|
2139
2227
|
/**
|
|
2140
|
-
*
|
|
2141
|
-
*
|
|
2142
|
-
* @param controller The MIDI controller number (0-127).
|
|
2143
|
-
* @param isLocked If the controller should be locked.
|
|
2228
|
+
* The global tuning in cents.
|
|
2229
|
+
* Drum channels ignore this value.
|
|
2144
2230
|
*/
|
|
2145
|
-
|
|
2231
|
+
fineTune: number;
|
|
2146
2232
|
/**
|
|
2147
|
-
*
|
|
2148
|
-
* Note that this executes a program change.
|
|
2149
|
-
* @param isDrum If the channel should be a drum preset or not.
|
|
2233
|
+
* The interpolation type used for sample playback.
|
|
2150
2234
|
*/
|
|
2151
|
-
|
|
2235
|
+
interpolationType: InterpolationType;
|
|
2152
2236
|
/**
|
|
2153
|
-
*
|
|
2154
|
-
* @param force If true, stops all notes immediately, otherwise applies release time.
|
|
2237
|
+
* If the synthesizer should prevent changing any parameters via NRPN.
|
|
2155
2238
|
*/
|
|
2156
|
-
|
|
2157
|
-
protected resetGeneratorOverrides(): void;
|
|
2158
|
-
protected setGeneratorOverride(gen: GeneratorType, value: number, realtime?: boolean): void;
|
|
2159
|
-
protected resetGeneratorOffsets(): void;
|
|
2160
|
-
protected setGeneratorOffset(gen: GeneratorType, value: number): void;
|
|
2161
|
-
protected resetDrumParams(): void;
|
|
2162
|
-
protected computeModulatorsAll(sourceUsesCC: -1 | 0 | 1, sourceIndex: number): void;
|
|
2163
|
-
protected setBankMSB(bankMSB: number): void;
|
|
2164
|
-
protected setBankLSB(bankLSB: number): void;
|
|
2239
|
+
nrpnParamLock: boolean;
|
|
2165
2240
|
/**
|
|
2166
|
-
*
|
|
2241
|
+
* Indicates whether the synthesizer is in monophonic retrigger mode.
|
|
2242
|
+
* This emulates the behavior of Microsoft GS Wavetable Synth,
|
|
2243
|
+
* Where a new note will kill the previous one if it is still playing.
|
|
2167
2244
|
*/
|
|
2168
|
-
|
|
2245
|
+
monophonicRetrigger: boolean;
|
|
2169
2246
|
}
|
|
2247
|
+
declare const DEFAULT_GLOBAL_SYSTEM_PARAMETERS: GlobalSystemParameter;
|
|
2170
2248
|
//#endregion
|
|
2171
2249
|
//#region src/synthesizer/audio_engine/sound_bank_manager.d.ts
|
|
2172
2250
|
declare class SoundBankManager {
|
|
@@ -2449,12 +2527,13 @@ interface ChannelSnapshot {
|
|
|
2449
2527
|
pitchWheels: Int16Array;
|
|
2450
2528
|
generators: ChannelGenerators;
|
|
2451
2529
|
midiParameters: ChannelMIDIParameter;
|
|
2530
|
+
lockedMIDIParameters: Record<keyof ChannelMIDIParameter, boolean>;
|
|
2452
2531
|
systemParameters: ChannelSystemParameter;
|
|
2453
2532
|
octaveTuning: Int8Array;
|
|
2454
2533
|
perNotePitch: boolean;
|
|
2455
2534
|
drumParams: DrumParameterSnapshot[];
|
|
2456
2535
|
drumChannel: boolean;
|
|
2457
|
-
|
|
2536
|
+
channel: number;
|
|
2458
2537
|
}
|
|
2459
2538
|
//#endregion
|
|
2460
2539
|
//#region src/synthesizer/audio_engine/synthesizer_snapshot.d.ts
|
|
@@ -2464,8 +2543,9 @@ interface SynthesizerSnapshot {
|
|
|
2464
2543
|
* Key modifiers.
|
|
2465
2544
|
*/
|
|
2466
2545
|
keyMappings: (KeyModifier | undefined)[][];
|
|
2467
|
-
systemParameters: GlobalSystemParameter;
|
|
2468
2546
|
midiParameters: GlobalMIDIParameter;
|
|
2547
|
+
lockedMIDIParameters: Record<keyof GlobalMIDIParameter, boolean>;
|
|
2548
|
+
systemParameters: GlobalSystemParameter;
|
|
2469
2549
|
reverbProcessor: ReverbProcessorSnapshot;
|
|
2470
2550
|
chorusProcessor: ChorusProcessorSnapshot;
|
|
2471
2551
|
delayProcessor: DelayProcessorSnapshot;
|
|
@@ -2579,7 +2659,7 @@ declare class SpessaSynthProcessor {
|
|
|
2579
2659
|
*/
|
|
2580
2660
|
private readonly synthCore;
|
|
2581
2661
|
/**
|
|
2582
|
-
*
|
|
2662
|
+
* For applying the snapshot after an override sound bank too.
|
|
2583
2663
|
*/
|
|
2584
2664
|
private savedSnapshot?;
|
|
2585
2665
|
/**
|
|
@@ -2638,12 +2718,19 @@ declare class SpessaSynthProcessor {
|
|
|
2638
2718
|
* @returns If a BasicPreset instance is returned, it will be used by the channel.
|
|
2639
2719
|
*/
|
|
2640
2720
|
onMissingPreset: (patch: MIDIPatch, system: MIDISystem) => BasicPreset | undefined;
|
|
2721
|
+
/**
|
|
2722
|
+
* Locks or unlocks a given Global MIDI Parameter.
|
|
2723
|
+
* This prevents any changes to it until it's unlocked.
|
|
2724
|
+
* @param parameter The Global MIDI Parameter to lock.
|
|
2725
|
+
* @param isLocked If the parameter should be locked.
|
|
2726
|
+
*/
|
|
2727
|
+
lockMIDIParameter<P extends keyof GlobalMIDIParameter>(parameter: P, isLocked: boolean): void;
|
|
2641
2728
|
/**
|
|
2642
2729
|
* Sets a system parameter of the synthesizer.
|
|
2643
|
-
* @param
|
|
2730
|
+
* @param parameter The type of the system parameter to set.
|
|
2644
2731
|
* @param value The value to set for the system parameter.
|
|
2645
2732
|
*/
|
|
2646
|
-
setSystemParameter<P extends keyof GlobalSystemParameter>(
|
|
2733
|
+
setSystemParameter<P extends keyof GlobalSystemParameter>(parameter: P, value: GlobalSystemParameter[P]): void;
|
|
2647
2734
|
/**
|
|
2648
2735
|
* Executes a full synthesizer reset.
|
|
2649
2736
|
* This will reset all controllers to their default values,
|
|
@@ -3070,6 +3157,11 @@ declare class Voice {
|
|
|
3070
3157
|
* MIDI channel number of the voice.
|
|
3071
3158
|
*/
|
|
3072
3159
|
channel: number;
|
|
3160
|
+
/**
|
|
3161
|
+
* Grouping voices for specific Note On messages.
|
|
3162
|
+
* Used for overlapping Note Ons.
|
|
3163
|
+
*/
|
|
3164
|
+
noteID: number;
|
|
3073
3165
|
/**
|
|
3074
3166
|
* MIDI note number of the voice.
|
|
3075
3167
|
* Direct number from the Note On message and is
|
|
@@ -3183,7 +3275,7 @@ declare class Voice {
|
|
|
3183
3275
|
* @param minNoteLength minimum note length in seconds
|
|
3184
3276
|
*/
|
|
3185
3277
|
releaseVoice(currentTime: number, minNoteLength?: number): void;
|
|
3186
|
-
setup(currentTime: number, channel: number, midiNote: number): void;
|
|
3278
|
+
setup(currentTime: number, channel: number, midiNote: number, noteID: number): void;
|
|
3187
3279
|
}
|
|
3188
3280
|
//#endregion
|
|
3189
3281
|
//#region src/soundbank/basic_soundbank/modulator_source.d.ts
|
|
@@ -3192,7 +3284,7 @@ declare class ModulatorSource {
|
|
|
3192
3284
|
* If this field is set to false, the controller should be mapped with a minimum value of 0 and a maximum value of 1. This is also
|
|
3193
3285
|
* called Unipolar. Thus, it behaves similar to the Modulation Wheel controller of the MIDI specification.
|
|
3194
3286
|
*
|
|
3195
|
-
* If this field is set to true, the controller
|
|
3287
|
+
* If this field is set to true, the controller should be mapped with a minimum value of -1 and a maximum value of 1. This is also
|
|
3196
3288
|
* called Bipolar. Thus, it behaves similar to the Pitch Wheel controller of the MIDI specification.
|
|
3197
3289
|
*/
|
|
3198
3290
|
isBipolar: boolean;
|
|
@@ -3706,6 +3798,50 @@ declare class MIDIMessage {
|
|
|
3706
3798
|
* @param data the message's binary data.
|
|
3707
3799
|
*/
|
|
3708
3800
|
constructor(ticks: number, byte: MIDIMessageType, data: Uint8Array<ArrayBuffer>);
|
|
3801
|
+
/**
|
|
3802
|
+
* Returns a new MIDI Pitch Wheel message.
|
|
3803
|
+
* @param ticks time of this message in absolute MIDI ticks.
|
|
3804
|
+
* @param channel the channel number of this message.
|
|
3805
|
+
* @param value the new value, between 0 and 16383, where 8192 is the center (no pitch change).
|
|
3806
|
+
*/
|
|
3807
|
+
static pitchWheel(ticks: number, channel: number, value: number): MIDIMessage;
|
|
3808
|
+
/**
|
|
3809
|
+
* Returns a new MIDI Channel Pressure message.
|
|
3810
|
+
* @param ticks time of this message in absolute MIDI ticks.
|
|
3811
|
+
* @param channel the channel number of this message.
|
|
3812
|
+
* @param value the new value, between 0 and 127.
|
|
3813
|
+
*/
|
|
3814
|
+
static channelPressure(ticks: number, channel: number, value: number): MIDIMessage;
|
|
3815
|
+
/**
|
|
3816
|
+
* Returns a new MIDI Program Change message.
|
|
3817
|
+
* @param ticks time of this message in absolute MIDI ticks.
|
|
3818
|
+
* @param channel the channel number of this message.
|
|
3819
|
+
* @param program the new MIDI program number, between 0 and 127.
|
|
3820
|
+
*/
|
|
3821
|
+
static programChange(ticks: number, channel: number, program: number): MIDIMessage;
|
|
3822
|
+
/**
|
|
3823
|
+
* Returns a new MIDI Controller Change message.
|
|
3824
|
+
* @param ticks time of this message in absolute MIDI ticks.
|
|
3825
|
+
* @param channel the channel number of this message.
|
|
3826
|
+
* @param controller the MIDI controller.
|
|
3827
|
+
* @param value the new value.
|
|
3828
|
+
*/
|
|
3829
|
+
static controllerChange(ticks: number, channel: number, controller: MIDIController, value: number): MIDIMessage;
|
|
3830
|
+
/**
|
|
3831
|
+
* Returns a new MIDI System Exclusive message.
|
|
3832
|
+
* @param ticks time of this message in absolute MIDI ticks.
|
|
3833
|
+
* @param data the data of the system exclusive message,
|
|
3834
|
+
* excluding the starting 0xF0 byte.
|
|
3835
|
+
*/
|
|
3836
|
+
static systemExclusive(ticks: number, data: number[]): MIDIMessage;
|
|
3837
|
+
/**
|
|
3838
|
+
* Returns a new MIDI Registered Parameter message. Sends both data MSB and LSB.
|
|
3839
|
+
* @param ticks time of this message in absolute MIDI ticks.
|
|
3840
|
+
* @param channel the channel number of this message.
|
|
3841
|
+
* @param parameter the 14-bit MIDI registered parameter number.
|
|
3842
|
+
* @param value the 14-bit new value.
|
|
3843
|
+
*/
|
|
3844
|
+
static registeredParameter(ticks: number, channel: number, parameter: number, value: number): MIDIMessage[];
|
|
3709
3845
|
}
|
|
3710
3846
|
//#endregion
|
|
3711
3847
|
//#region src/midi/midi_tools/modify_midi.d.ts
|
|
@@ -3732,15 +3868,30 @@ interface ChannelModification {
|
|
|
3732
3868
|
* - `MIDIPatch` - clear + sets the new patch according to the MIDI system at the start of the sequence.
|
|
3733
3869
|
*/
|
|
3734
3870
|
patch?: ClearableParameter<MIDIPatch>;
|
|
3871
|
+
/**
|
|
3872
|
+
* The new MIDI parameters of this channel.
|
|
3873
|
+
* - Key: the MIDI parameter name.
|
|
3874
|
+
* - value:
|
|
3875
|
+
* - `"clear"` - all changes for this parameter are removed.
|
|
3876
|
+
* - `specific value` - clear + sets the new parameter at the start of the song, effectively locking them to the set value.
|
|
3877
|
+
*/
|
|
3878
|
+
midiParams?: { [P in keyof ChannelMIDIParameter]?: ClearableParameter<ChannelMIDIParameter[P]> };
|
|
3735
3879
|
/**
|
|
3736
3880
|
* The channel key shift in semitones.
|
|
3737
3881
|
* Note on/off numbers are shifted.
|
|
3882
|
+
*
|
|
3883
|
+
* This differs from the `keyShift` MIDI Parameter in that it shifts the actual note numbers,
|
|
3884
|
+
* and doesn't delete or overwrite existing shifts.
|
|
3738
3885
|
*/
|
|
3739
3886
|
keyShift?: number;
|
|
3740
3887
|
/**
|
|
3741
3888
|
* The channel tuning in cents.
|
|
3742
3889
|
* Tuned using RPN Fine Tune.
|
|
3743
3890
|
* Range is `[-100; 99.986]` cents.
|
|
3891
|
+
*
|
|
3892
|
+
* This differs from the `fineTune` MIDI Parameter
|
|
3893
|
+
* in that it is relative to the tuning applied in the MIDI file,
|
|
3894
|
+
* and it does not overwrite it.
|
|
3744
3895
|
*/
|
|
3745
3896
|
fineTune?: number;
|
|
3746
3897
|
}
|
|
@@ -3759,6 +3910,17 @@ interface ModifyMIDIOptions {
|
|
|
3759
3910
|
* - `never` - not yet implemented.
|
|
3760
3911
|
*/
|
|
3761
3912
|
drumSetupParams?: ClearableParameter<never>;
|
|
3913
|
+
/**
|
|
3914
|
+
* The global MIDI parameter changes.
|
|
3915
|
+
* - Key: the MIDI parameter name.
|
|
3916
|
+
* - value:
|
|
3917
|
+
* - `"clear"` - all changes for this parameter are removed.
|
|
3918
|
+
* - `specific value` - clear + sets the new parameter at the start of the song, effectively locking them to the set value.
|
|
3919
|
+
*
|
|
3920
|
+
* Please note that `"clear"` is not supported for the `system` parameter,
|
|
3921
|
+
* as it may cause issues with the MIDI system detection and reset insertion.
|
|
3922
|
+
*/
|
|
3923
|
+
midiParams?: { [P in keyof GlobalMIDIParameter]?: ClearableParameter<GlobalMIDIParameter[P]> };
|
|
3762
3924
|
/**
|
|
3763
3925
|
* The desired GS reverb parameters.
|
|
3764
3926
|
* - `"clear"` - all existing parameter change MIDI messages are removed.
|
|
@@ -3947,7 +4109,7 @@ declare class BasicMIDI {
|
|
|
3947
4109
|
* It supports Standard MIDI Files (SMF), RIFF MIDI (RMIDI), and Extensible Music Format (XMF).
|
|
3948
4110
|
* It also handles embedded soundbanks in RMIDI files.
|
|
3949
4111
|
* If the file is an RMIDI file, it will extract the embedded soundbank and store
|
|
3950
|
-
* it in the `
|
|
4112
|
+
* it in the `embeddedSoundBank` property of the BasicMIDI instance.
|
|
3951
4113
|
* If the file is an XMF file, it will parse the XMF structure and extract the MIDI data.
|
|
3952
4114
|
*/
|
|
3953
4115
|
static fromArrayBuffer(arrayBuffer: ArrayBuffer, fileName?: string): BasicMIDI;
|
|
@@ -4026,7 +4188,9 @@ declare class BasicMIDI {
|
|
|
4026
4188
|
modify(opts: Partial<ModifyMIDIOptions>): void;
|
|
4027
4189
|
/**
|
|
4028
4190
|
* Modifies the sequence *in-place* according to the locked presets and controllers in the given snapshot.
|
|
4029
|
-
*
|
|
4191
|
+
*
|
|
4192
|
+
* Note that System Parameters `fineTune` and `keyShift` are passed to the relative tuning parameters of the channels.
|
|
4193
|
+
* Only locked MIDI parameters and controllers are applied.
|
|
4030
4194
|
* @param snapshot the snapshot to apply.
|
|
4031
4195
|
*/
|
|
4032
4196
|
applySnapshot(snapshot: SynthesizerSnapshot): void;
|
|
@@ -4197,19 +4361,28 @@ declare class MIDIBuilder extends BasicMIDI {
|
|
|
4197
4361
|
}
|
|
4198
4362
|
//#endregion
|
|
4199
4363
|
//#region src/midi/midi_tools/midi_utils.d.ts
|
|
4200
|
-
type
|
|
4364
|
+
type GlobalMIDIParameterMessage = { [P in keyof GlobalMIDIParameter]: {
|
|
4365
|
+
type: "Global MIDI Param";
|
|
4366
|
+
parameter: P;
|
|
4367
|
+
value: GlobalMIDIParameter[P];
|
|
4368
|
+
} }[keyof GlobalMIDIParameter];
|
|
4369
|
+
type ChannelMIDIParameterMessage = { [P in keyof ChannelMIDIParameter]: {
|
|
4370
|
+
type: "Channel MIDI Param";
|
|
4371
|
+
parameter: P;
|
|
4372
|
+
value: ChannelMIDIParameter[P];
|
|
4373
|
+
channel: number;
|
|
4374
|
+
} }[keyof ChannelMIDIParameter];
|
|
4375
|
+
type AnalyzedParameter = {
|
|
4201
4376
|
type: "Other";
|
|
4202
4377
|
} | {
|
|
4203
|
-
type: "
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
type: "GS Reset";
|
|
4212
|
-
} | {
|
|
4378
|
+
type: "Controller Change";
|
|
4379
|
+
controller: MIDIController;
|
|
4380
|
+
value: number;
|
|
4381
|
+
channel: number;
|
|
4382
|
+
} | ChannelMIDIParameterMessage | {
|
|
4383
|
+
type: "Drum Setup";
|
|
4384
|
+
};
|
|
4385
|
+
type AnalyzedMIDIMessage = AnalyzedParameter | {
|
|
4213
4386
|
type: "Reverb Param";
|
|
4214
4387
|
} | {
|
|
4215
4388
|
type: "Chorus Param";
|
|
@@ -4223,32 +4396,13 @@ type AnalyzedMIDIMessage = {
|
|
|
4223
4396
|
type: "Drums On";
|
|
4224
4397
|
channel: number;
|
|
4225
4398
|
isDrum: boolean;
|
|
4226
|
-
} | {
|
|
4227
|
-
type: "Drum Setup";
|
|
4228
4399
|
} | {
|
|
4229
4400
|
type: "Program Change";
|
|
4230
4401
|
channel: number;
|
|
4231
4402
|
value: number;
|
|
4232
4403
|
} | {
|
|
4233
|
-
type: "
|
|
4234
|
-
|
|
4235
|
-
value: number;
|
|
4236
|
-
channel: number;
|
|
4237
|
-
} | {
|
|
4238
|
-
type: "Master Key Shift";
|
|
4239
|
-
value: number;
|
|
4240
|
-
} | {
|
|
4241
|
-
type: "Key Shift";
|
|
4242
|
-
value: number;
|
|
4243
|
-
channel: number;
|
|
4244
|
-
} | {
|
|
4245
|
-
type: "Master Fine Tune";
|
|
4246
|
-
value: number;
|
|
4247
|
-
} | {
|
|
4248
|
-
type: "Fine Tune";
|
|
4249
|
-
value: number;
|
|
4250
|
-
channel: number;
|
|
4251
|
-
};
|
|
4404
|
+
type: "Display Data";
|
|
4405
|
+
} | GlobalMIDIParameterMessage;
|
|
4252
4406
|
/**
|
|
4253
4407
|
* A general purpose class for handling MIDI messages.
|
|
4254
4408
|
*/
|
|
@@ -4266,7 +4420,7 @@ declare class MIDIUtils {
|
|
|
4266
4420
|
* @param rpn The 14-bit RPN number.
|
|
4267
4421
|
* @param value The 14-bit value for that number.
|
|
4268
4422
|
*/
|
|
4269
|
-
static analyzeRPN(channel: number, rpn: number, value: number):
|
|
4423
|
+
static analyzeRPN(channel: number, rpn: number, value: number): AnalyzedParameter;
|
|
4270
4424
|
/**
|
|
4271
4425
|
* Analyzes a MIDI Non-Registered Parameter Number
|
|
4272
4426
|
* and returns an identification and data for it.
|
|
@@ -4274,7 +4428,27 @@ declare class MIDIUtils {
|
|
|
4274
4428
|
* @param nrpn The 14-bit NRPN number.
|
|
4275
4429
|
* @param value The 14-bit value for that number.
|
|
4276
4430
|
*/
|
|
4277
|
-
static analyzeNRPN(channel: number, nrpn: number, value: number):
|
|
4431
|
+
static analyzeNRPN(channel: number, nrpn: number, value: number): AnalyzedParameter;
|
|
4432
|
+
/**
|
|
4433
|
+
* Returns a list of MIDI events needed to set the given parameter.
|
|
4434
|
+
* @param ticks The ticks for all events.
|
|
4435
|
+
* @param system If the message has multiple ways of setting it,
|
|
4436
|
+
* this selects the preferred way. Otherwise, it prefers Universal (GM).
|
|
4437
|
+
* @param parameter The parameter to set.
|
|
4438
|
+
* @param value The value to set it to.
|
|
4439
|
+
*/
|
|
4440
|
+
static setGlobalMIDIParameter<P extends keyof GlobalMIDIParameter>(ticks: number, system: MIDISystem, parameter: P, value: GlobalMIDIParameter[P]): MIDIMessage[];
|
|
4441
|
+
/**
|
|
4442
|
+
* Returns a list of MIDI events needed to set the given parameter.
|
|
4443
|
+
* @param ticks The ticks for all events.
|
|
4444
|
+
* @param channel The channel number.
|
|
4445
|
+
* @param system If the message has multiple ways of setting it,
|
|
4446
|
+
* this selects the preferred way. Otherwise, it prefers Universal (GM).
|
|
4447
|
+
* @param parameter The parameter to set.
|
|
4448
|
+
* @param value The value to set it to.
|
|
4449
|
+
* @returns The list of `MIDIMessage`s that set the parameter.
|
|
4450
|
+
*/
|
|
4451
|
+
static setChannelMIDIParameter<P extends keyof ChannelMIDIParameter>(ticks: number, channel: number, system: MIDISystem, parameter: P, value: ChannelMIDIParameter[P]): MIDIMessage[];
|
|
4278
4452
|
/**
|
|
4279
4453
|
* Converts GS/XG "part number" to MIDI channel number.
|
|
4280
4454
|
* @param part The part number.
|
|
@@ -4292,7 +4466,7 @@ declare class MIDIUtils {
|
|
|
4292
4466
|
* @param a3 Address 3
|
|
4293
4467
|
* @param data Data, can be multiple bytes.
|
|
4294
4468
|
*/
|
|
4295
|
-
static
|
|
4469
|
+
static gs(a1: number, a2: number, a3: number, data: number[]): number[];
|
|
4296
4470
|
/**
|
|
4297
4471
|
* Gets a GS System Exclusive MIDI message.
|
|
4298
4472
|
* @param ticks The tick time of the message.
|
|
@@ -4303,18 +4477,41 @@ declare class MIDIUtils {
|
|
|
4303
4477
|
*/
|
|
4304
4478
|
static gsMessage(ticks: number, a1: number, a2: number, a3: number, data: number[]): MIDIMessage;
|
|
4305
4479
|
/**
|
|
4306
|
-
* Gets
|
|
4480
|
+
* Gets raw XG System Exclusive message bytes, without the 0xF0 status byte.
|
|
4481
|
+
* @param a1 Address 1
|
|
4482
|
+
* @param a2 Address 2
|
|
4483
|
+
* @param a3 Address 3
|
|
4484
|
+
* @param data Data, can be multiple bytes.
|
|
4485
|
+
*/
|
|
4486
|
+
static xg(a1: number, a2: number, a3: number, data: number[]): number[];
|
|
4487
|
+
/**
|
|
4488
|
+
* Gets a XG System Exclusive MIDI message.
|
|
4307
4489
|
* @param ticks The tick time of the message.
|
|
4308
|
-
* @param
|
|
4309
|
-
* @param
|
|
4310
|
-
*
|
|
4490
|
+
* @param a1 Address 1
|
|
4491
|
+
* @param a2 Address 2
|
|
4492
|
+
* @param a3 Address 3
|
|
4493
|
+
* @param data Data, can be multiple bytes.
|
|
4494
|
+
*/
|
|
4495
|
+
static xgMessage(ticks: number, a1: number, a2: number, a3: number, data: number[]): MIDIMessage;
|
|
4496
|
+
/**
|
|
4497
|
+
* Gets a raw Device Control System Exclusive message bytes, without the 0xF0 status byte.
|
|
4498
|
+
* @param subID The sub ID.
|
|
4499
|
+
* @param data Data, can be multiple bytes.
|
|
4500
|
+
*/
|
|
4501
|
+
static deviceControl(subID: number, data: number[]): number[];
|
|
4502
|
+
/**
|
|
4503
|
+
* Gets a Device Control System Exclusive MIDI message.
|
|
4504
|
+
* @param ticks The tick time of the message.
|
|
4505
|
+
* @param subID The sub ID.
|
|
4506
|
+
* @param data Data, can be multiple bytes.
|
|
4311
4507
|
*/
|
|
4312
|
-
static
|
|
4508
|
+
static deviceControlMessage(ticks: number, subID: number, data: number[]): MIDIMessage;
|
|
4313
4509
|
/**
|
|
4314
|
-
* Gets a
|
|
4510
|
+
* Gets a selected reset System Exclusive MIDI message.
|
|
4315
4511
|
* @param ticks The tick time of the message.
|
|
4512
|
+
* @param system The system to reset into.
|
|
4316
4513
|
*/
|
|
4317
|
-
static
|
|
4514
|
+
static reset(ticks: number, system: MIDISystem): MIDIMessage;
|
|
4318
4515
|
private static analyzeGM;
|
|
4319
4516
|
private static analyzeXG;
|
|
4320
4517
|
private static analyzeGS;
|