一键导入
javafx-midi-device-integration
Connect JavaFX to javax.sound.midi devices, sequencers, and receivers with safe FX-thread bridging.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Connect JavaFX to javax.sound.midi devices, sequencers, and receivers with safe FX-thread bridging.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | javafx-midi-device-integration |
| description | Connect JavaFX to javax.sound.midi devices, sequencers, and receivers with safe FX-thread bridging. |
| triggers | ["javafx midi","javax.sound.midi javafx","javafx sequencer midi","midi receiver javafx"] |
| compatibility | {"java":"17+","javafx":"21+"} |
| category | platform-integration |
| tags | ["midi","java-sound","receiver","sequencer","hardware"] |
| metadata | {"scope":"repository","maturity":"starter"} |
| allowed-tools | ["view","rg","apply_patch"] |
Use this skill when a JavaFX app must talk to javax.sound.midi: play MIDI files, open hardware
devices, decode note/control events, or route MIDI activity into JavaFX UI state.
import javax.sound.midi.MidiChannel;
import javax.sound.midi.MidiSystem;
import javax.sound.midi.ShortMessage;
import javax.sound.midi.Synthesizer;
import javafx.application.Platform;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;
public class MidiMonitorView extends VBox {
private MidiChannel channel;
public MidiMonitorView() throws Exception {
var status = new Label("Idle");
getChildren().add(status);
Synthesizer synthesizer = MidiSystem.getSynthesizer();
synthesizer.open();
channel = synthesizer.getChannels()[0];
ShortMessage noteOn = new ShortMessage();
noteOn.setMessage(ShortMessage.NOTE_ON, 0, 60, 96);
channel.noteOn(noteOn.getData1(), noteOn.getData2());
Platform.runLater(() -> status.setText("Played note " + noteOn.getData1()));
}
}
module com.example.app {
requires java.desktop;
requires javafx.controls;
}
Synthesizer and MidiChannel for direct sound generation, Sequencer for MIDI file
playback, and MidiDevice discovery when hardware routing matters.Receiver.send(...) and other MIDI callbacks as non-FX threads; bridge UI updates with
Platform.runLater(...).ShortMessage carefully: command, channel, note/controller number, and velocity/value.NOTE_ON with velocity 0 is effectively NOTE_OFF.Build JavaFX 3D modeling tools and print/export workflows with isolated geometry generation and preview rendering.
Choose and integrate mature third-party JavaFX control libraries for forms, productivity widgets, theming, and developer workflow support.
Build JavaFX terminal emulators or shell-style console panes with background process I/O, ANSI handling, and safe FX-thread updates.
Build node-based JavaFX workflow editors, graph canvases, and visual programming surfaces with clean model separation.
Animate JavaFX UIs with Timeline, Transition, Canvas, and AnimationTimer-based render loops.
Manage the JavaFX Application lifecycle, primary stage setup, startup sequencing, and shutdown behavior.