Getting Started

Choose the route that matches your goal: use the Godot path when integrating the GDExtension in a game or tool, and use the contributor path when changing the native engine or wrapper.

Install The Prebuilt GDExtension

The recommended application path is the Project DJ Godot package. Its current package requires Godot 4.5 or newer. The lower-level extension descriptor in PDJE-Godot-Plugin has a compatibility minimum of Godot 4.4, but application users should follow the prebuilt package requirement.

  1. In your Godot project, open AssetLib, search for Project DJ Godot, and install it.

  2. Close Godot. From the project root, run Update_Project_DJ_Godot.bat on Windows or bash ./Update_Project_DJ_Godot.sh on Linux/macOS. The first run downloads the native libraries and Git LFS assets into addons/Project_DJ_Godot/.

  3. Reopen the project. This is a GDExtension package rather than an editor plugin, so its classes are registered by the extension; there is no separate Project Settings > Plugins activation step.

The updater and alternative direct-download instructions are maintained in the prebuilt package repository. Preserve the installed directory layout because the .gdextension file resolves platform libraries by relative res:// paths.

Create A Smoke-Test Scene

Add a regular Node as the scene root, then add a PDJE_Wrapper child named PDJE_Wrapper. Attach this script to the root:

extends Node

@onready var engine: PDJE_Wrapper = $PDJE_Wrapper

func _ready() -> void:
    if not engine.InitEngine("user://pdje/rootdb"):
        push_error("PDJE initialization failed")
        return

    print("PDJE initialized; tracks=", engine.SearchTrack(""))

A successful call proves that the extension loaded and that PDJE can open its writable root database. A new database contains no playable track until content is authored and pushed through Editor_Workflows or supplied by your project. Do not interpret an empty SearchTrack(“”) result as an extension-load failure.

Play An Existing Track

After the root database contains a rendered track, this minimal flow initializes, starts, and shuts down playback:

var tracks: Array = engine.SearchTrack("track-title")
if tracks.is_empty():
    push_error("Import or author track-title before playback")
    return

if not engine.InitPlayer(PDJE_Wrapper.FULL_PRE_RENDER, "track-title", 480):
    push_error("Player initialization failed")
    return

var player: PlayerWrapper = engine.GetPlayer()
if player == null or not player.Activate():
    push_error("Playback activation failed")
    engine.ResetPlayer()
    return

# Later, during controlled shutdown:
player.Deactivate()
engine.ResetPlayer()

Use Core_Engine for search-result fields, other player modes, live music and FX panels, cursor units, and wrapper lifetimes.

Choose A Reading Route

For Godot users

Use this route when you want to build a game or tool with PDJE-Godot-Plugin. The examples in the user workflow pages use GDScript and the actual Godot class names exposed by the extension.

  1. Read Core_Engine for engine initialization, search, playback, manual music/FX control, editor access, and the core data line.

  2. Read Editor_Workflows and Editor_Format when authoring music, mix, or note data.

  3. Read Input_Engine for keyboard, mouse, and MIDI capture.

  4. Read Judge_Engine after the input guide for rhythm-game note matching.

  5. Read Util_Engine for database, MIR/STFT, waveform, fuzzy-search, and Beat This helpers.

  6. Use Data_Lines when polling playback state or connecting input and judge modules.

  7. Use FX_ARGS for exact case-sensitive runtime effect keys.

For contributors and AI agents

Use this route when you need the design intent, module boundaries, data flow, invariants, or source anchors needed to understand and change either project.

  1. Read Developer_Onboarding for the project mental model and source orientation.

  2. Read the same module guide that owns the behavior you are changing.

  3. Read PDJE For AI Agents for canonical terminology, routing rules, and claims that require source verification.

  4. Use API Reference only after the workflow and concept guides. Generated API visibility does not by itself define the recommended integration path.

Documentation Map

  • Core_Engine — Godot engine initialization, track/music search, playback, player panels, editor entry, and contributor-facing Core concepts.

  • Editor_Workflows — project authoring, typed mutation, history, render/push, and preview.

  • Input_Engine — low-latency keyboard, mouse, and MIDI input through PDJE_Input_Module and InputLine.

  • Judge_Engine — synchronized note matching through PDJE_Judge_Module.

  • Util_Engine — Godot DB, MIR/STFT, waveform, fuzzy-search, and Beat This wrappers, plus native utility design boundaries for contributors.

  • Data_Lines — ownership, lifetime, threading, and Godot helper access for live state.

  • Editor_Format — editor-facing rows, JSON keys, binary payload concepts, interpolation, and preserved authoring tables.

  • FX_ARGS — exact case-sensitive FX argument key catalog.

  • Developer_Onboarding — contributor mental model and source map.

  • PDJE For AI Agents — agent-oriented retrieval and safe-answering guide.

The supported public usage surface is the Godot 4 GDExtension API shown in the GDScript workflow pages. Native C++ names appear only where contributors need implementation context.