spessasynth_core 4.4.2 → 4.4.3
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 +197 -64
- package/dist/index.js +5269 -5237
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2212,6 +2212,11 @@ export interface GSReverbProcessor extends GSReverbParameter {
|
|
|
2212
2212
|
* Gets a snapshot of this effect processor instance.
|
|
2213
2213
|
*/
|
|
2214
2214
|
getSnapshot(): GSReverbParameter;
|
|
2215
|
+
/**
|
|
2216
|
+
* Restores this effect processor instance from a snapshot.
|
|
2217
|
+
* @param snapshot The snapshot to restore.
|
|
2218
|
+
*/
|
|
2219
|
+
applySnapshot(snapshot: GSReverbParameter): void;
|
|
2215
2220
|
}
|
|
2216
2221
|
/**
|
|
2217
2222
|
* GS-compatible chorus parameters.
|
|
@@ -2300,6 +2305,11 @@ export interface GSChorusProcessor extends GSChorusParameter {
|
|
|
2300
2305
|
* Gets a snapshot of this effect processor instance.
|
|
2301
2306
|
*/
|
|
2302
2307
|
getSnapshot(): GSChorusParameter;
|
|
2308
|
+
/**
|
|
2309
|
+
* Restores this effect processor instance from a snapshot.
|
|
2310
|
+
* @param snapshot The snapshot to restore.
|
|
2311
|
+
*/
|
|
2312
|
+
applySnapshot(snapshot: GSChorusParameter): void;
|
|
2303
2313
|
}
|
|
2304
2314
|
/**
|
|
2305
2315
|
* GS-compatible delay parameters.
|
|
@@ -2408,50 +2418,112 @@ export interface GSDelayProcessor extends GSDelayParameter {
|
|
|
2408
2418
|
* Gets a snapshot of this effect processor instance.
|
|
2409
2419
|
*/
|
|
2410
2420
|
getSnapshot(): GSDelayParameter;
|
|
2421
|
+
/**
|
|
2422
|
+
* Restores this effect processor instance from a snapshot.
|
|
2423
|
+
* @param snapshot The snapshot to restore.
|
|
2424
|
+
*/
|
|
2425
|
+
applySnapshot(snapshot: GSDelayParameter): void;
|
|
2411
2426
|
}
|
|
2412
2427
|
/**
|
|
2413
|
-
*
|
|
2428
|
+
* GS-compatible insertion effect (EFX) parameters.
|
|
2414
2429
|
*
|
|
2415
2430
|
* @group Synthesizer.GS Effects
|
|
2416
2431
|
*/
|
|
2417
|
-
export interface
|
|
2418
|
-
/**
|
|
2419
|
-
* The EFX type of this processor, stored as `MSB << 8 | LSB`.
|
|
2420
|
-
* For example `0x30`, `0x10` is `0x3010`.
|
|
2421
|
-
*/
|
|
2422
|
-
readonly type: number;
|
|
2432
|
+
export interface GSInsertionParameter {
|
|
2423
2433
|
/**
|
|
2424
|
-
* `0-
|
|
2434
|
+
* `0-127`
|
|
2425
2435
|
*
|
|
2426
2436
|
* This parameter sets the amount of insertion sound that will be sent to the reverb.
|
|
2427
2437
|
* Higher values result in more sound being sent.
|
|
2428
2438
|
*/
|
|
2429
2439
|
sendLevelToReverb: number;
|
|
2430
2440
|
/**
|
|
2431
|
-
* `0-
|
|
2441
|
+
* `0-127`
|
|
2432
2442
|
*
|
|
2433
2443
|
* This parameter sets the amount of insertion sound that will be sent to the chorus.
|
|
2434
2444
|
* Higher values result in more sound being sent.
|
|
2435
2445
|
*/
|
|
2436
2446
|
sendLevelToChorus: number;
|
|
2437
2447
|
/**
|
|
2438
|
-
* `0-
|
|
2448
|
+
* `0-127`
|
|
2439
2449
|
*
|
|
2440
2450
|
* This parameter sets the amount of insertion sound that will be sent to the delay.
|
|
2441
2451
|
* Higher values result in more sound being sent.
|
|
2442
2452
|
*/
|
|
2443
2453
|
sendLevelToDelay: number;
|
|
2454
|
+
}
|
|
2455
|
+
/**
|
|
2456
|
+
* A snapshot of a {@link GSInsertionBlock}.
|
|
2457
|
+
*
|
|
2458
|
+
* @group Synthesizer.GS Effects
|
|
2459
|
+
*/
|
|
2460
|
+
export interface GSInsertionBlockSnapshot extends GSInsertionParameter {
|
|
2461
|
+
/**
|
|
2462
|
+
* The EFX type of this block, stored as `MSB << 8 | LSB`.
|
|
2463
|
+
* For example `0x30`, `0x10` is `0x3010`.
|
|
2464
|
+
*
|
|
2465
|
+
* This is the requested type, even if the block does not support it.
|
|
2466
|
+
*
|
|
2467
|
+
* > **Tip**
|
|
2468
|
+
* >
|
|
2469
|
+
* > Refer to [SC-8850 Owner's Manual](https://cdn.roland.com/assets/media/pdf/SC-8850_OM.pdf) (p.88, 237) for more information.
|
|
2470
|
+
*/
|
|
2471
|
+
type: number;
|
|
2472
|
+
/**
|
|
2473
|
+
* The 20 EFX parameters (0-19). Their meaning depends on the effect type.
|
|
2474
|
+
*
|
|
2475
|
+
* Value `255` means the parameter has not been changed since the type was set, so it uses the type default.
|
|
2476
|
+
*/
|
|
2477
|
+
params: Uint8Array;
|
|
2478
|
+
}
|
|
2479
|
+
/**
|
|
2480
|
+
* The Insertion effect (EFX) processes the parts (channels) that have EFX assigned
|
|
2481
|
+
* (see {@link ChannelMIDIParameter.efxAssign}) and is routed straight to the output.
|
|
2482
|
+
* It can additionally send its output to the reverb, chorus and delay.
|
|
2483
|
+
*
|
|
2484
|
+
* This is a Roland GS-compatible insertion interface.
|
|
2485
|
+
*
|
|
2486
|
+
* It is used when {@link GlobalMIDIParameter.system} is `gm` `gm2` or `gs`,
|
|
2487
|
+
* but it is only enabled when an insertion parameter is set via a system exclusive message.
|
|
2488
|
+
*
|
|
2489
|
+
* {@link SpessaSynthProcessor} allows you to supply a custom insertion block.
|
|
2490
|
+
* A custom insertion block must implement this interface.
|
|
2491
|
+
*
|
|
2492
|
+
* ### Editing the parameters
|
|
2493
|
+
*
|
|
2494
|
+
* Editing the parameters can be done via GS system exclusive messages.
|
|
2495
|
+
*
|
|
2496
|
+
* > **Tip**
|
|
2497
|
+
* >
|
|
2498
|
+
* > Refer to [SC-8850 Owner's Manual](https://cdn.roland.com/assets/media/pdf/SC-8850_OM.pdf) (p.88, 237) for more information.
|
|
2499
|
+
*
|
|
2500
|
+
* @group Synthesizer.GS Effects
|
|
2501
|
+
*/
|
|
2502
|
+
export interface GSInsertionBlock extends GSInsertionParameter {
|
|
2503
|
+
/**
|
|
2504
|
+
* Sets the EFX type of the block.
|
|
2505
|
+
*
|
|
2506
|
+
* Type change resets the parameters and the send levels to their defaults.
|
|
2507
|
+
* Behavior for unsupported types is up to the implementation.
|
|
2508
|
+
*
|
|
2509
|
+
* @param type The 16-bit type value to use, `MSB << 8 | LSB`.
|
|
2510
|
+
*/
|
|
2511
|
+
setType(type: number): void;
|
|
2512
|
+
/**
|
|
2513
|
+
* Gets the current 16-bit type of the block.
|
|
2514
|
+
* @returns The 16-bit (`MSB << 8 | LSB`) type requested by the last {@link setType} call.
|
|
2515
|
+
*/
|
|
2516
|
+
getType(): number;
|
|
2444
2517
|
/**
|
|
2445
|
-
* Resets
|
|
2446
|
-
* This does not need to reset send levels.
|
|
2518
|
+
* Resets this block to default values, including the EFX type and the send levels.
|
|
2447
2519
|
*/
|
|
2448
2520
|
reset(): void;
|
|
2449
2521
|
/**
|
|
2450
|
-
* Sets
|
|
2451
|
-
* @param
|
|
2452
|
-
* @param value The
|
|
2522
|
+
* Sets the given EFX parameter to the given value.
|
|
2523
|
+
* @param param The parameter number (0-based, 0-19).
|
|
2524
|
+
* @param value The 7-bit value.
|
|
2453
2525
|
*/
|
|
2454
|
-
setParameter(
|
|
2526
|
+
setParameter(param: number, value: number): void;
|
|
2455
2527
|
/**
|
|
2456
2528
|
* Process the effect and **adds** it to the output.
|
|
2457
2529
|
* @param inputLeft The left input buffer to process. It always starts at index 0.
|
|
@@ -2465,31 +2537,15 @@ export interface GSInsertionProcessor {
|
|
|
2465
2537
|
* @param sampleCount The amount of samples to mix. This will never be larger than {@link SynthProcessorOptions.maxBufferSize} of the parent {@link SpessaSynthProcessor} instance.
|
|
2466
2538
|
*/
|
|
2467
2539
|
process(inputLeft: Float32Array, inputRight: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, outputChorus: Float32Array, outputDelay: Float32Array, startIndex: number, sampleCount: number): void;
|
|
2468
|
-
}
|
|
2469
|
-
/**
|
|
2470
|
-
* Represents stored GS-compatible insertion processor data.
|
|
2471
|
-
*
|
|
2472
|
-
* @group Synthesizer.GS Effects
|
|
2473
|
-
*/
|
|
2474
|
-
export interface GSInsertionProcessorSnapshot {
|
|
2475
2540
|
/**
|
|
2476
|
-
*
|
|
2477
|
-
* For example `0x30`, `0x10` is `0x3010`.
|
|
2478
|
-
*
|
|
2479
|
-
* > **Tip**
|
|
2480
|
-
* >
|
|
2481
|
-
* > Refer to [SC-8850 Owner's Manual](https://cdn.roland.com/assets/media/pdf/SC-8850_OM.pdf) (p.88, 237) for more information.
|
|
2541
|
+
* Gets a snapshot of this insertion block.
|
|
2482
2542
|
*/
|
|
2483
|
-
|
|
2543
|
+
getSnapshot(): GSInsertionBlockSnapshot;
|
|
2484
2544
|
/**
|
|
2485
|
-
*
|
|
2486
|
-
*
|
|
2487
|
-
* the length totaling to 23.
|
|
2488
|
-
*
|
|
2489
|
-
* Value `255` means "no change" for that parameter.
|
|
2490
|
-
*
|
|
2545
|
+
* Restores this insertion block from a snapshot.
|
|
2546
|
+
* @param snapshot The snapshot to restore.
|
|
2491
2547
|
*/
|
|
2492
|
-
|
|
2548
|
+
applySnapshot(snapshot: GSInsertionBlockSnapshot): void;
|
|
2493
2549
|
}
|
|
2494
2550
|
/**
|
|
2495
2551
|
* A snapshot of a {@link XGEffectBlock}.
|
|
@@ -3370,9 +3426,9 @@ interface SynthesizerSnapshot {
|
|
|
3370
3426
|
*/
|
|
3371
3427
|
gsDelayProcessor: GSDelayParameter;
|
|
3372
3428
|
/**
|
|
3373
|
-
* A snapshot of the insertion
|
|
3429
|
+
* A snapshot of the GS insertion block.
|
|
3374
3430
|
*/
|
|
3375
|
-
|
|
3431
|
+
gsInsertionBlock: GSInsertionBlockSnapshot;
|
|
3376
3432
|
/**
|
|
3377
3433
|
* A snapshot of the XG reverb block.
|
|
3378
3434
|
*/
|
|
@@ -3411,6 +3467,7 @@ interface SynthesizerSnapshot {
|
|
|
3411
3467
|
* - {@link GSReverbProcessor} - How to implement your own GS reverb processor.
|
|
3412
3468
|
* - {@link GSChorusProcessor} - How to implement your own GS chorus processor.
|
|
3413
3469
|
* - {@link GSDelayProcessor} - How to implement your own GS delay processor.
|
|
3470
|
+
* - {@link GSInsertionBlock} - How to implement your own GS insertion processor.
|
|
3414
3471
|
*
|
|
3415
3472
|
* #### XG
|
|
3416
3473
|
*
|
|
@@ -3700,7 +3757,6 @@ export declare class SpessaSynthProcessor {
|
|
|
3700
3757
|
*/
|
|
3701
3758
|
private processXGInsertion;
|
|
3702
3759
|
private createMIDIChannelInternal;
|
|
3703
|
-
private registerInsertionProcessor;
|
|
3704
3760
|
private processMessageInternal;
|
|
3705
3761
|
/**
|
|
3706
3762
|
* Assigns priorities to the voices.
|
|
@@ -4510,9 +4566,12 @@ export type GlobalMIDIParameterChangeEvent = { [P in keyof GlobalMIDIParameter]:
|
|
|
4510
4566
|
/**
|
|
4511
4567
|
* The parameter names of an effect processor, or `macro` for the effect's macro.
|
|
4512
4568
|
*
|
|
4569
|
+
* When a macro is applied, an event is first emitted for every parameter it sets,
|
|
4570
|
+
* then the `macro` event.
|
|
4571
|
+
*
|
|
4513
4572
|
* @group Synthesizer.Events
|
|
4514
4573
|
*/
|
|
4515
|
-
export type FXType<K> = Exclude<keyof K, "process" | "getSnapshot"> | "macro";
|
|
4574
|
+
export type FXType<K> = Exclude<keyof K, "process" | "getSnapshot" | "applySnapshot"> | "macro";
|
|
4516
4575
|
/**
|
|
4517
4576
|
* This event is triggered when an effect processor has one of its parameters changed.
|
|
4518
4577
|
*
|
|
@@ -4521,7 +4580,7 @@ export type FXType<K> = Exclude<keyof K, "process" | "getSnapshot"> | "macro";
|
|
|
4521
4580
|
* - {@link GSReverbProcessor} (`effect: "gsReverb"`)
|
|
4522
4581
|
* - {@link GSChorusProcessor} (`effect: "gsChorus"`)
|
|
4523
4582
|
* - {@link GSDelayProcessor} (`effect: "gsDelay"`)
|
|
4524
|
-
* -
|
|
4583
|
+
* - {@link GSInsertionBlock} (`effect: "gsInsertion"`)
|
|
4525
4584
|
* - {@link XGReverbBlock} (`effect: "xgReverb"`)
|
|
4526
4585
|
* - {@link XGChorusBlock} (`effect: "xgChorus"`)
|
|
4527
4586
|
* - {@link XGVariationBlock} (`effect: "xgVariation"`)
|
|
@@ -4536,7 +4595,7 @@ export type EffectChangeEvent = {
|
|
|
4536
4595
|
*/
|
|
4537
4596
|
effect: "gsReverb";
|
|
4538
4597
|
/**
|
|
4539
|
-
* The parameter, see {@link GSReverbProcessor}, or `macro
|
|
4598
|
+
* The parameter, see {@link GSReverbProcessor}, or `macro` (see {@link FXType}).
|
|
4540
4599
|
*/
|
|
4541
4600
|
parameter: FXType<GSReverbProcessor>;
|
|
4542
4601
|
/**
|
|
@@ -4549,7 +4608,7 @@ export type EffectChangeEvent = {
|
|
|
4549
4608
|
*/
|
|
4550
4609
|
effect: "gsChorus";
|
|
4551
4610
|
/**
|
|
4552
|
-
* The parameter, see {@link GSChorusProcessor}, or `macro
|
|
4611
|
+
* The parameter, see {@link GSChorusProcessor}, or `macro` (see {@link FXType}).
|
|
4553
4612
|
*/
|
|
4554
4613
|
parameter: FXType<GSChorusProcessor>;
|
|
4555
4614
|
/**
|
|
@@ -4562,7 +4621,7 @@ export type EffectChangeEvent = {
|
|
|
4562
4621
|
*/
|
|
4563
4622
|
effect: "gsDelay";
|
|
4564
4623
|
/**
|
|
4565
|
-
* The parameter, see {@link GSDelayProcessor}, or `macro
|
|
4624
|
+
* The parameter, see {@link GSDelayProcessor}, or `macro` (see {@link FXType}).
|
|
4566
4625
|
*/
|
|
4567
4626
|
parameter: FXType<GSDelayProcessor>;
|
|
4568
4627
|
/**
|
|
@@ -4575,15 +4634,12 @@ export type EffectChangeEvent = {
|
|
|
4575
4634
|
*/
|
|
4576
4635
|
effect: "gsInsertion";
|
|
4577
4636
|
/**
|
|
4578
|
-
* The parameter that was changed
|
|
4579
|
-
*
|
|
4580
|
-
*
|
|
4581
|
-
* - `
|
|
4582
|
-
* - `0x3` - EFX param 1
|
|
4583
|
-
* - `0x16` - EFX param 20 (usually level)
|
|
4584
|
-
* - `0x17` - EFX send to reverb
|
|
4637
|
+
* The parameter that was changed:
|
|
4638
|
+
* - `"type"` - 16-bit effect type (`MSB << 8 | LSB`). Note that this resets the parameters and the send levels!
|
|
4639
|
+
* - `"sendLevelToReverb" | "sendLevelToChorus" | "sendLevelToDelay"` - send levels (7-bit), see {@link GSInsertionParameter}.
|
|
4640
|
+
* - `number` - 0-based type-specific EFX parameter index (0-19). EFX parameter 1 is 0. Value is 7-bit.
|
|
4585
4641
|
*/
|
|
4586
|
-
parameter: number;
|
|
4642
|
+
parameter: "type" | keyof GSInsertionParameter | number;
|
|
4587
4643
|
/**
|
|
4588
4644
|
* The new value for the parameter.
|
|
4589
4645
|
*/
|
|
@@ -4839,7 +4895,7 @@ export interface SynthesizerEvent {
|
|
|
4839
4895
|
* - {@link GSReverbProcessor} (`effect: "gsReverb"`)
|
|
4840
4896
|
* - {@link GSChorusProcessor} (`effect: "gsChorus"`)
|
|
4841
4897
|
* - {@link GSDelayProcessor} (`effect: "gsDelay"`)
|
|
4842
|
-
* -
|
|
4898
|
+
* - {@link GSInsertionBlock} (`effect: "gsInsertion"`)
|
|
4843
4899
|
* - {@link XGReverbBlock} (`effect: "xgReverb"`)
|
|
4844
4900
|
* - {@link XGChorusBlock} (`effect: "xgChorus"`)
|
|
4845
4901
|
* - {@link XGVariationBlock} (`effect: "xgVariation"`)
|
|
@@ -5159,6 +5215,10 @@ export interface SynthProcessorOptions {
|
|
|
5159
5215
|
* Optional custom GS delay processor for the synthesizer. Leave undefined to use {@link DefaultGSDelay}.
|
|
5160
5216
|
*/
|
|
5161
5217
|
gsDelayProcessor?: GSDelayProcessor;
|
|
5218
|
+
/**
|
|
5219
|
+
* Optional custom GS insertion block for the synthesizer. Leave undefined to use {@link DefaultGSInsertion}.
|
|
5220
|
+
*/
|
|
5221
|
+
gsInsertionBlock?: GSInsertionBlock;
|
|
5162
5222
|
/**
|
|
5163
5223
|
* Optional custom XG reverb block for the synthesizer. Leave undefined to use {@link DefaultXGReverb}.
|
|
5164
5224
|
*
|
|
@@ -5693,9 +5753,9 @@ interface ModifyMIDIOptions {
|
|
|
5693
5753
|
/**
|
|
5694
5754
|
* The GS Insertion Effect parameters.
|
|
5695
5755
|
* - `"clear"` - all existing parameter change MIDI messages are cleared.
|
|
5696
|
-
* - {@link
|
|
5756
|
+
* - {@link GSInsertionBlockSnapshot} - clear + the new parameters are set via System Exclusive messages.
|
|
5697
5757
|
*/
|
|
5698
|
-
gsInsertionParams?: ClearableParameter<
|
|
5758
|
+
gsInsertionParams?: ClearableParameter<GSInsertionBlockSnapshot>;
|
|
5699
5759
|
/**
|
|
5700
5760
|
* The desired XG reverb parameters.
|
|
5701
5761
|
* - `"clear"` - all existing parameter change MIDI messages are removed.
|
|
@@ -6786,27 +6846,33 @@ export declare class MIDIUtils {
|
|
|
6786
6846
|
/**
|
|
6787
6847
|
* Returns a MIDI event needed to set the given GS Reverb Parameter.
|
|
6788
6848
|
* @param ticks The MIDI tick time for the output event.
|
|
6789
|
-
* @param parameter The parameter to set.
|
|
6849
|
+
* @param parameter The parameter to set, or `"macro"` to select a reverb macro.
|
|
6790
6850
|
* @param value The value to set it to.
|
|
6791
6851
|
* @returns The {@link MIDIMessage} needed to set this GS Reverb Parameter.
|
|
6792
6852
|
*/
|
|
6793
|
-
static setGSReverbParameter<P extends
|
|
6853
|
+
static setGSReverbParameter<P extends GSReverbParameterMessage["parameter"]>(ticks: number, parameter: P, value: Extract<GSReverbParameterMessage, {
|
|
6854
|
+
parameter: P;
|
|
6855
|
+
}>["value"]): MIDIMessage;
|
|
6794
6856
|
/**
|
|
6795
6857
|
* Returns a MIDI event needed to set the given GS Chorus Parameter.
|
|
6796
6858
|
* @param ticks The MIDI tick time for the output event.
|
|
6797
|
-
* @param parameter The parameter to set.
|
|
6859
|
+
* @param parameter The parameter to set, or `"macro"` to select a chorus macro.
|
|
6798
6860
|
* @param value The value to set it to.
|
|
6799
6861
|
* @returns The {@link MIDIMessage} needed to set this GS Chorus Parameter.
|
|
6800
6862
|
*/
|
|
6801
|
-
static setGSChorusParameter<P extends
|
|
6863
|
+
static setGSChorusParameter<P extends GSChorusParameterMessage["parameter"]>(ticks: number, parameter: P, value: Extract<GSChorusParameterMessage, {
|
|
6864
|
+
parameter: P;
|
|
6865
|
+
}>["value"]): MIDIMessage;
|
|
6802
6866
|
/**
|
|
6803
6867
|
* Returns a MIDI event needed to set the given GS Delay Parameter.
|
|
6804
6868
|
* @param ticks The MIDI tick time for the output event.
|
|
6805
|
-
* @param parameter The parameter to set.
|
|
6869
|
+
* @param parameter The parameter to set, or `"macro"` to select a delay macro.
|
|
6806
6870
|
* @param value The value to set it to.
|
|
6807
6871
|
* @returns The {@link MIDIMessage} needed to set this GS Delay Parameter.
|
|
6808
6872
|
*/
|
|
6809
|
-
static setGSDelayParameter<P extends
|
|
6873
|
+
static setGSDelayParameter<P extends GSDelayParameterMessage["parameter"]>(ticks: number, parameter: P, value: Extract<GSDelayParameterMessage, {
|
|
6874
|
+
parameter: P;
|
|
6875
|
+
}>["value"]): MIDIMessage;
|
|
6810
6876
|
/**
|
|
6811
6877
|
* Returns a MIDI event needed to set the given GS Insertion Parameter.
|
|
6812
6878
|
* @param ticks The MIDI tick time for the output event.
|
|
@@ -6850,7 +6916,7 @@ export declare class MIDIUtils {
|
|
|
6850
6916
|
* @param value The value to set it to.
|
|
6851
6917
|
* @returns The {@link MIDIMessage} needed to set this XG Variation Parameter.
|
|
6852
6918
|
*/
|
|
6853
|
-
static setXGVariationParameter(ticks: number, parameter:
|
|
6919
|
+
static setXGVariationParameter<P extends XGVariationParameterMessage["parameter"]>(ticks: number, parameter: P, value: P extends "connection" ? XGVariationConnection : number): MIDIMessage;
|
|
6854
6920
|
/**
|
|
6855
6921
|
* Returns a MIDI event needed to set the given XG Insertion Parameter (EFFECT 2).
|
|
6856
6922
|
* @param ticks The MIDI tick time for the output event.
|
|
@@ -6876,7 +6942,7 @@ export declare class MIDIUtils {
|
|
|
6876
6942
|
/**
|
|
6877
6943
|
* Returns a list of MIDI events needed to set the given parameter.
|
|
6878
6944
|
* @param ticks The MIDI tick time for output events.
|
|
6879
|
-
* @param channel The channel number.
|
|
6945
|
+
* @param channel The channel number. Channels above 15 are wrapped to 0-15, so the port offset is ignored.
|
|
6880
6946
|
* @param system If the message has multiple ways of setting it,
|
|
6881
6947
|
* this selects the preferred way. Otherwise, it prefers Universal (GM).
|
|
6882
6948
|
* @param parameter The parameter to set.
|
|
@@ -7003,6 +7069,15 @@ export declare class MIDIUtils {
|
|
|
7003
7069
|
* @returns The system exclusive MIDI message.
|
|
7004
7070
|
*/
|
|
7005
7071
|
static reset(ticks: number, system: MIDISystem): MIDIMessage;
|
|
7072
|
+
/**
|
|
7073
|
+
* Returns the GS or XG SysEx message that sets a part parameter of the given channel.
|
|
7074
|
+
* @param ticks The MIDI tick time for the output event.
|
|
7075
|
+
* @param channel The channel number (0-15).
|
|
7076
|
+
* @param system The system to prepare the message for. Any value other than `xg` will result in a GS-style message.
|
|
7077
|
+
* @param parameter The parameter to set.
|
|
7078
|
+
* @param data The 7-bit data byte.
|
|
7079
|
+
*/
|
|
7080
|
+
private static partParamMessage;
|
|
7006
7081
|
private static analyzeGM;
|
|
7007
7082
|
private static analyzeXG;
|
|
7008
7083
|
private static analyzeGS;
|
|
@@ -7432,6 +7507,7 @@ export declare class DefaultGSReverb implements GSReverbProcessor {
|
|
|
7432
7507
|
*/
|
|
7433
7508
|
process(input: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, startIndex: number, sampleCount: number): void;
|
|
7434
7509
|
getSnapshot(): GSReverbParameter;
|
|
7510
|
+
applySnapshot(snapshot: GSReverbParameter): void;
|
|
7435
7511
|
private updateFeedback;
|
|
7436
7512
|
private updateLowpass;
|
|
7437
7513
|
private updateGain;
|
|
@@ -7503,6 +7579,7 @@ export declare class DefaultGSChorus implements GSChorusProcessor {
|
|
|
7503
7579
|
set level(value: number);
|
|
7504
7580
|
process(input: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, outputDelay: Float32Array, startIndex: number, sampleCount: number): void;
|
|
7505
7581
|
getSnapshot(): GSChorusParameter;
|
|
7582
|
+
applySnapshot(snapshot: GSChorusParameter): void;
|
|
7506
7583
|
}
|
|
7507
7584
|
/**
|
|
7508
7585
|
* The default GS Delay implementation for {@link SpessaSynthProcessor}.
|
|
@@ -7597,9 +7674,65 @@ export declare class DefaultGSDelay implements GSDelayProcessor {
|
|
|
7597
7674
|
*/
|
|
7598
7675
|
process(input: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, startIndex: number, sampleCount: number): void;
|
|
7599
7676
|
getSnapshot(): GSDelayParameter;
|
|
7677
|
+
applySnapshot(snapshot: GSDelayParameter): void;
|
|
7600
7678
|
private updateDelayTimes;
|
|
7601
7679
|
private updateGain;
|
|
7602
7680
|
}
|
|
7681
|
+
/**
|
|
7682
|
+
* The default implementation for {@link GSInsertionBlock}.
|
|
7683
|
+
*
|
|
7684
|
+
* @group Synthesizer.GS Effects
|
|
7685
|
+
* @sealed
|
|
7686
|
+
*/
|
|
7687
|
+
export declare class DefaultGSInsertion implements GSInsertionBlock {
|
|
7688
|
+
sendLevelToReverb: number;
|
|
7689
|
+
sendLevelToChorus: number;
|
|
7690
|
+
sendLevelToDelay: number;
|
|
7691
|
+
/**
|
|
7692
|
+
* The list of effects available in this block.
|
|
7693
|
+
* Effect type: processor.
|
|
7694
|
+
*/
|
|
7695
|
+
private readonly effectMap;
|
|
7696
|
+
/**
|
|
7697
|
+
* The processor used when the requested type is not available.
|
|
7698
|
+
*/
|
|
7699
|
+
private readonly fallbackProcessor;
|
|
7700
|
+
/**
|
|
7701
|
+
* The currently used processor.
|
|
7702
|
+
*/
|
|
7703
|
+
private processor;
|
|
7704
|
+
/**
|
|
7705
|
+
* The requested EFX type.
|
|
7706
|
+
*/
|
|
7707
|
+
private type;
|
|
7708
|
+
/**
|
|
7709
|
+
* The parameters set since the last type change.
|
|
7710
|
+
* 255 means the parameter uses the type default.
|
|
7711
|
+
*/
|
|
7712
|
+
private readonly params;
|
|
7713
|
+
/**
|
|
7714
|
+
* The left output of the processor.
|
|
7715
|
+
*/
|
|
7716
|
+
private readonly outputLeft;
|
|
7717
|
+
/**
|
|
7718
|
+
* The right output of the processor.
|
|
7719
|
+
*/
|
|
7720
|
+
private readonly outputRight;
|
|
7721
|
+
/**
|
|
7722
|
+
* Constructs a new default GS insertion block.
|
|
7723
|
+
* @param sampleRate The sample rate, in Hertz.
|
|
7724
|
+
* @param maxBufferSize The maximum buffer size the synthesizer can render at once.
|
|
7725
|
+
* Attempting to `.process()` more samples than this will result in an error.
|
|
7726
|
+
*/
|
|
7727
|
+
constructor(sampleRate: number, maxBufferSize: number);
|
|
7728
|
+
setType(type: number): void;
|
|
7729
|
+
getType(): number;
|
|
7730
|
+
reset(): void;
|
|
7731
|
+
setParameter(param: number, value: number): void;
|
|
7732
|
+
process(inputLeft: Float32Array, inputRight: Float32Array, outputLeft: Float32Array, outputRight: Float32Array, outputReverb: Float32Array, outputChorus: Float32Array, outputDelay: Float32Array, startIndex: number, sampleCount: number): void;
|
|
7733
|
+
getSnapshot(): GSInsertionBlockSnapshot;
|
|
7734
|
+
applySnapshot(snapshot: GSInsertionBlockSnapshot): void;
|
|
7735
|
+
}
|
|
7603
7736
|
/**
|
|
7604
7737
|
* Synthesizer's default voice cap.
|
|
7605
7738
|
*
|