@jpdutoit/squelchy 0.0.1 → 0.0.2

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/index.d.ts CHANGED
@@ -244,16 +244,21 @@ export declare const Hat: {
244
244
  };
245
245
  /**
246
246
  * Gate + pitch CV for driving patchable modules (Envelope trig, V/Oct inputs).
247
- * `gate` goes 1 at `time`, back to 0 after `duration`; `pitch` holds the midi
248
- * value (semitones = the project's V/Oct unit). Both are ConstantSourceNodes.
247
+ * `gate` goes to the hit's velocity at `time`, back to 0 after `duration`;
248
+ * `pitch` holds the note (absolute key position, 69 = A4), typed as the
249
+ * library's pitch signal like every other V/OCT output. Both are
250
+ * ConstantSourceNodes.
249
251
  */
252
+ export interface NoteCvInstance {
253
+ /** Gate CV: the hit's velocity while a note is held, 0 otherwise. */
254
+ gate: ConstantSourceNode;
255
+ /** Pitch CV: the current note (69 = A4), held between notes. */
256
+ pitch: ConstantSourceNode & Signal<Note>;
257
+ trigger(time: Seconds, hit?: Partial<Hit<Note>>): void;
258
+ dispose(): void;
259
+ }
250
260
  export declare const NoteCv: {
251
- create(ctx: BaseAudioContext): {
252
- gate: ConstantSourceNode;
253
- pitch: ConstantSourceNode;
254
- trigger(time: Seconds, h?: Partial<Hit<Note>>): void;
255
- dispose(): void;
256
- };
261
+ create(ctx: BaseAudioContext): NoteCvInstance;
257
262
  };
258
263
  export declare function pulse(target: AudioNode, when?: number): void;
259
264
  /** Canonical percussion voice keys shared by every sample set and by any
@@ -299,9 +304,11 @@ export declare function loadSampleSet(ctx: BaseAudioContext, set: SampleSetInfo,
299
304
  baseUrl?: string;
300
305
  fetch?: typeof fetch;
301
306
  }): Promise<LoadedSampleSet>;
302
- /** A one-sample voice. velocity 0..1 scales level; `value` (semitones) repitches. */
307
+ /** A one-sample voice. velocity 0..1 scales level; a number `value`
308
+ * repitches in semitones, anything else (e.g. `true` from steps()) plays it
309
+ * unshifted. */
303
310
  export declare const SampleVoice: {
304
- create(ctx: BaseAudioContext, kit: LoadedSampleSet, key: VoiceKey): VoiceInstance<number>;
311
+ create(ctx: BaseAudioContext, kit: LoadedSampleSet, key: VoiceKey): VoiceInstance<number | boolean>;
305
312
  };
306
313
  export declare const SampleSets: {
307
314
  readonly "roland-808": {