Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions examples/scenes/dunes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#
# ONE five-note motif: 5-8-7-5-4 (A-D-C-A-G in D minor pentatonic).
# A fourth leaps up, steps fall back, and it HANGS on 4 — a question.
# Every phrase in the piece is this sentence. The voice answers it
# Every phrase in the piece is this sentence. The lead answers it
# exactly once (bars 17-20); the harp's last light re-asks it, so the
# piece ENDS on the question — grief demands `resolution: incomplete`.
#
# Dialogue: voice asks -> cello answers (same reply both times) ->
# Dialogue: lead asks -> cello answers (same reply both times) ->
# violin echoes from far away. Never more than two melodic voices:
# under the climax the cello yields the floor to the strings.
#
Expand Down Expand Up @@ -62,7 +62,7 @@ motifs:
- { degree: 5, beats: 2 }
# bar 14: THE PEAK IS A SILENCE
- { degree: 0, beats: 4 }
# bars 15-16: cello takes over — voice says nothing
# bars 15-16: cello takes over — lead says nothing
- { degree: 0, beats: 8 }
# bars 17-20: the question asked one last time — and answered
- { degree: 5, beats: 0.75 }
Expand All @@ -82,7 +82,7 @@ motifs:
- { degree: -4, beats: 1 }
- { degree: -5, beats: 2 }
- { degree: -7, beats: 4 }
# bars 6-14: silent while the voice speaks — under the climax the
# bars 6-14: silent while the lead speaks — under the climax the
# cello yields the floor to the strings (never a third voice)
- { degree: 0, beats: 16 }
- { degree: 0, beats: 16 }
Expand Down Expand Up @@ -139,7 +139,9 @@ motifs:
- { degree: 4, beats: 6 }

tracks:
- { instrument: voice, pattern: melody, motif: voice_line, intensity: 0.8 }
# scoredata-open has no `voice` mapping; violin preserves the exposed,
# lyrical lead role while remaining supported by the renderer profile.
- { instrument: violin, pattern: melody, motif: voice_line, intensity: 0.8 }
- { instrument: cello, pattern: melody, motif: cello_answer, intensity: 0.55 }
- { instrument: violin, pattern: melody, motif: violin_far, intensity: 0.32 }
- { instrument: slow_strings, pattern: melody, motif: strings_wide, intensity: 0.6 }
Expand Down
4 changes: 2 additions & 2 deletions examples/scenes/epic.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Light epic — heroic horn fanfare over strings, choir and timpani.
# Light epic — heroic horn fanfare over strings, choir pad and timpani.
# Orchestral but airborne, not grimdark: an overworld banner theme.
title: Banner in the Wind
tempo: 104
Expand Down Expand Up @@ -30,7 +30,7 @@ tracks:
- instrument: strings # 1: orchestral bed
pattern: sustain
intensity: 0.55
- instrument: choir # 2: halo above the strings
- instrument: choir_pad # 2: supported halo above the strings
pattern: sustain
intensity: 0.35
- instrument: harp # 3: glinting motion
Expand Down
4 changes: 3 additions & 1 deletion src/doctor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ pub struct SoundLibraryReport {

#[derive(Debug, Clone, Serialize)]
pub struct Report {
pub scorekit_version: String,
pub ready: bool,
pub platform: PlatformReport,
pub requirements: RequirementsReport,
Expand All @@ -64,7 +65,7 @@ impl Report {

pub fn human(&self) -> String {
let mut lines = vec![
"scorekit doctor".to_owned(),
format!("scorekit doctor (scorekit {})", self.scorekit_version),
format!(
"platform: {}/{} ({})",
self.platform.os, self.platform.arch, self.platform.target
Expand Down Expand Up @@ -315,6 +316,7 @@ pub fn check() -> Report {
"missing"
};
Report {
scorekit_version: env!("CARGO_PKG_VERSION").to_owned(),
ready: ffmpeg && renderer,
requirements: RequirementsReport { ffmpeg, renderer },
hints: hints(&platform),
Expand Down
5 changes: 5 additions & 0 deletions tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ fn doctor_reports_platform_and_ready_toolchain_as_json() {
.assert()
.success();
let report: serde_json::Value = serde_json::from_slice(&out.get_output().stdout).unwrap();
assert_eq!(report["scorekit_version"], env!("CARGO_PKG_VERSION"));
assert_eq!(report["ready"], true);
assert_eq!(report["platform"]["os"], std::env::consts::OS);
assert_eq!(report["platform"]["arch"], std::env::consts::ARCH);
Expand Down Expand Up @@ -212,6 +213,10 @@ fn doctor_missing_renderer_returns_dependency_report_and_arch_help() {
assert_eq!(payload["code"], "doctor");
assert_eq!(payload["exit_code"], 3);
assert_eq!(payload["report"]["ready"], false);
assert_eq!(
payload["report"]["scorekit_version"],
env!("CARGO_PKG_VERSION")
);
assert_eq!(payload["report"]["requirements"]["ffmpeg"], true);
assert_eq!(payload["report"]["requirements"]["renderer"], false);
assert!(
Expand Down
Loading