From 2aa09e4fe975ea9a7f70e7e5abed2157d22160cb Mon Sep 17 00:00:00 2001 From: Matt Soucy Date: Mon, 2 Jan 2023 22:27:14 -0500 Subject: [PATCH] Add volume numbers for non-musicians --- 2022/11-setlist/deck.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/2022/11-setlist/deck.rb b/2022/11-setlist/deck.rb index f5b1eb4..f69130c 100644 --- a/2022/11-setlist/deck.rb +++ b/2022/11-setlist/deck.rb @@ -8,6 +8,17 @@ MUSIC = GameIcons.get('delapouite/musical-score'). recolor(fg: 'black', bg: 'white', fg_opacity: 1.0, bg_opacity: 0.0). string +VOLUMES = { + "ppp" => 1, + "pp" => 2, + "p" => 3, + "mp" => 4, + "mf" => 5, + "f" => 6, + "ff" => 7, + "fff" => 8, +} + data = Squib.yaml file: 'data.yml' Squib::Deck.new(cards: 18) do @@ -27,7 +38,7 @@ Squib::Deck.new(cards: 18) do } do |embed| embed.svg key: '{a}', width: 32, height: 32, data: AUDIENCE end - text layout: :type, markup: true, str: data.volume.map { |v| "#{v}" } + text layout: :type, markup: true, str: data.volume.map { |v| "#{v} (#{VOLUMES[v]})" } save format: :png save_sheet prefix: "sheet",