alphatheta-connect 0.19.2 → 0.21.1

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.
@@ -6,15 +6,46 @@ interface Options {
6
6
  playState: CDJStatus.PlayState.Cued | CDJStatus.PlayState.Playing;
7
7
  }
8
8
  /**
9
- * Generates the packet used to control the playstate of CDJs
9
+ * Generates the packet used to control the playstate of CDJs in active connection mode
10
10
  */
11
11
  export declare const makePlaystatePacket: ({ hostDevice, device, playState }: Options) => Uint8Array<ArrayBuffer>;
12
12
  export default class Control {
13
13
  #private;
14
14
  constructor(beatSocket: Socket, hostDevice: Device);
15
15
  /**
16
- * Start or stop a CDJ on the network
16
+ * Start or stop a CDJ on the network.
17
+ * Delegates automatically to Stagehand-specific transport control if connected in Stagehand mode.
17
18
  */
18
19
  setPlayState(device: Device, playState: Options['playState']): Promise<void>;
20
+ /**
21
+ * Send Stagehand PLAY command (paired 0x0f and 0x14 packets)
22
+ */
23
+ play(device: Device): Promise<void>;
24
+ /**
25
+ * Send Stagehand PAUSE command (paired 0x14 packet)
26
+ */
27
+ pause(device: Device): Promise<void>;
28
+ /**
29
+ * Send Stagehand SEEK forward command
30
+ * @param press - true to start seek, false to release
31
+ */
32
+ seekForward(device: Device, press: boolean): Promise<void>;
33
+ /**
34
+ * Send Stagehand SEEK backward command
35
+ * @param press - true to start seek, false to release
36
+ */
37
+ seekBackward(device: Device, press: boolean): Promise<void>;
38
+ /**
39
+ * Send Stagehand SKIP track command
40
+ * @param press - true to start skip, false to release
41
+ */
42
+ skip(device: Device, press: boolean): Promise<void>;
43
+ /**
44
+ * Send Stagehand preference write command (0x6b packet) to port 50002
45
+ */
46
+ setPreference(device: Device, options: {
47
+ onAir?: 'on' | 'off';
48
+ quantize?: number;
49
+ }): Promise<void>;
19
50
  }
20
51
  export {};
@@ -0,0 +1,20 @@
1
+ import { Device } from "../types";
2
+ /**
3
+ * Generates a Stagehand transport control packet (0x07, 56 bytes)
4
+ *
5
+ * @param hostDevice - The Stagehand device posing as sender
6
+ * @param op - The command opcode (e.g. 0x0f, 0x14, 0x18, 0x1a, 0x1b)
7
+ * @param press - Whether the action is press (true) or release (false)
8
+ * @param correlationByte - The randomized per-session correlation byte
9
+ */
10
+ export declare function makeStagehandTransportPacket(hostDevice: Device, op: number, press: boolean, correlationByte: number): Uint8Array;
11
+ /**
12
+ * Generates a Stagehand preference write packet (0x6b, 124 bytes)
13
+ *
14
+ * @param hostDevice - The Stagehand device posing as sender
15
+ * @param options - The preferences to write (onAir, quantize)
16
+ */
17
+ export declare function makeStagehandPrefWritePacket(hostDevice: Device, options: {
18
+ onAir?: 'on' | 'off';
19
+ quantize?: number;
20
+ }): Uint8Array;
package/lib/entities.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import type { BeatGrid, WaveformHD } from "./types";
2
1
  import type { Track as OneLibraryTrack } from 'onelibrary-connect';
2
+ import type { BeatGrid, WaveformHD } from "./types";
3
3
  /**
4
4
  * Re-export entity types from onelibrary-connect.
5
5
  * These types represent what is stored in the rekordbox database.
6
6
  */
7
- export { EntityFK } from 'onelibrary-connect';
8
7
  export type { Album, Artist, Artwork, Color, Genre, Key, Label, Playlist, PlaylistEntry, } from 'onelibrary-connect';
8
+ export { EntityFK } from 'onelibrary-connect';
9
9
  /**
10
10
  * Represents a track with both database fields and ANLZ analysis data.
11
11
  *
package/lib/index.d.ts CHANGED
@@ -3,16 +3,16 @@ export * from './mixstatus';
3
3
  export * from './network';
4
4
  export { default as PositionEmitter } from './status/position';
5
5
  export * from './passive';
6
+ export type { FileReader as ArtworkFileReader, ExtractedArtwork } from './artwork';
6
7
  export { extractArtwork, extractArtworkFromDevice, isArtworkExtractionSupported, PictureType, } from './artwork';
7
- export type { ExtractedArtwork, FileReader as ArtworkFileReader } from './artwork';
8
- export { extractFullMetadata, extractMetadataFromDevice, isMetadataExtractionSupported, } from './metadata';
9
8
  export type { ExtractedMetadata } from './metadata';
9
+ export { extractFullMetadata, extractMetadataFromDevice, isMetadataExtractionSupported, } from './metadata';
10
+ export type { AnlzResolver, AnlzResponse, AnlzResponse2EX, AnlzResponseDAT, AnlzResponseEXT, } from './localdb/rekordbox';
10
11
  export { loadAnlz } from './localdb/rekordbox';
11
12
  export { fetchFile } from './nfs';
12
- export type { AnlzResolver, AnlzResponse, AnlzResponse2EX, AnlzResponseDAT, AnlzResponseEXT } from './localdb/rekordbox';
13
13
  export type { DatabaseAdapter, DatabasePreference, DatabaseType, PlaylistQueryResult, } from 'onelibrary-connect';
14
14
  export { OneLibraryAdapter } from 'onelibrary-connect';
15
15
  export type { Category, DeviceProperty, HistorySession, HotCueBankList, MenuItem, MyTag, SortOption, } from 'onelibrary-connect';
16
- export { noopLogger } from './logger';
17
16
  export type { Logger } from './logger';
17
+ export { noopLogger } from './logger';
18
18
  export * from './types';