48 lines
1.3 KiB
Markdown
48 lines
1.3 KiB
Markdown
---
|
|
id:
|
|
aliases: []
|
|
title: "2025-12-19"
|
|
tags:
|
|
- authorship/original
|
|
- destiny/permanent
|
|
- status/draft
|
|
- type/daily
|
|
---
|
|
# 2025-12-19
|
|
|
|
## 2025-12-19 06:22
|
|
|
|
PowerShell module to assist in translating between banjo fingerings and concert notes,
|
|
as well as between [[lilypond]] and conventional notation.
|
|
|
|
```powershell
|
|
$Db4 = [Note]::FromLilyPond("des'")
|
|
$Db4.PlayInTime(1/4,120)
|
|
|
|
$str1 = [FrettedStringTuning]::FromOpen([Note]::FromLilyPond("d,,,"))
|
|
$str1c2 = $str1.Capo(2)
|
|
|
|
$openGtuning = [FrettedStringInstrumentTuning]::FromStringTunings(@(
|
|
[FrettedStringTuning]::FromOpen([Note]::FromLilyPond("d,,,")),
|
|
[FrettedStringTuning]::FromOpen([Note]::FromLilyPond("b,,")),
|
|
[FrettedStringTuning]::FromOpen([Note]::FromLilyPond("g,")),
|
|
[FrettedStringTuning]::FromOpen([Note]::FromLilyPond("d")),
|
|
[FrettedStringTuning]::FromOpen([Note]::FromLilyPond("g'")),
|
|
# note: the notation used above is concert octave,
|
|
# banjo is transposed up one octave.
|
|
))
|
|
$openGtuning.GetNoteFromFingering(4,11).PlayInTime(1/4,120) # play Db4
|
|
|
|
$openGc2tuning = $openGtuning.Capo(2)
|
|
$openGc2tuning.GetNoteFromFingering(4,9).PlayInTime(1/4,120) # play Db4
|
|
|
|
# TODO: class FrettedStringInstrument
|
|
|
|
```
|
|
|
|
```powershell
|
|
class Note {
|
|
[Note] TransposeOctave([Note]$note1,[Note]$note2) {}
|
|
[Note] TransposeOctave([int]$modifier) {}
|
|
}
|
|
``` |