Skip to main content

Crate vibelang_http

Crate vibelang_http 

Source
Expand description

HTTP REST API server for VibeLang (core2 backend).

Provides a REST API and WebSocket endpoint for querying and controlling a running VibeLang session using the vibelang-core2 runtime.

§Features

  • Full CRUD operations for voices, patterns, melodies, sequences
  • Transport control (play, stop, seek, tempo)
  • Effect and sample management
  • MIDI routing and callbacks
  • Real-time WebSocket events
  • Live state queries (active synths, meters)

§Usage

use vibelang_http::{start_server, AppState};
use vibelang_core::RuntimeHandle;

let handle = runtime.handle();
let state = runtime.state();
tokio::spawn(async move {
    start_server(handle, state, 1606, None).await;
});

Structs§

ActiveFade
ActiveSequence
ActiveSynth
AppState
Shared application state for HTTP handlers.
Effect
EffectCreate
EffectUpdate
ErrorResponse
EvalJob
Internal request sent to the main thread for evaluation
EvalResult
Result of code evaluation
FadeCreate
Group
GroupCreate
GroupUpdate
LiveState
LoopStatus
Melody
MelodyCreate
MelodyEvent
MelodyUpdate
MeterLevel
NoteOffRequest
NoteOnRequest
ParamSet
Pattern
PatternCreate
PatternEvent
PatternUpdate
Sample
SampleLoad
SampleSlice
SeekRequest
Sequence
SequenceClip
SequenceCreate
SequenceStartRequest
SequenceUpdate
SourceLocation
StartRequest
StopRequest
SynthDefInfo
SynthDefParam
TimeSignature
TransportState
TransportUpdate
TriggerRequest
Voice
VoiceCreate
VoiceUpdate
WebSocketEvent
WebSocket event sent to clients.

Enums§

FadeTargetType
LoopState
SynthDefSource

Functions§

start_server
Start the HTTP server on the specified port.

Type Aliases§

EvalSender
Sender type for eval requests.
MeterLevels
MeterLevels is a map from group path to meter level.