Skip to content

Instantly share code, notes, and snippets.

@alanwhite
alanwhite / MeasurePartsModels.java
Created November 27, 2021 23:04
Cramming extracts of the musical measure and part models into a single gist for the sake of a blog post
public class MeasureModel extends ScoreContainerModel {
// snip ...
private List<PartModel> parts = new ArrayList<PartModel>();
// snip ...
public List<PartModel> getParts() {
return parts;
@alanwhite
alanwhite / BaseNoteModel.java
Created November 27, 2021 22:51
Representing optional beams in the note class
public class BaseNoteModel extends StaffElementModel {
// snip ...
/*
* A note or rest can have multiple beams
*/
private Optional<List<BeamEnum>> beams = Optional.empty();
// snip ...
@alanwhite
alanwhite / BeamEnum.java
Last active November 27, 2021 23:16
Code snippets for music note beam modelling
package xyz.arwhite.music.models;
public enum BeamEnum {
BACKWARD_HOOK { public String toString() {
return "backward hook";
}},
BEGIN { public String toString() {
return "begin";
all:
children:
workers:
hosts:
pico2:
ansible_host: 192.168.0.202
pico3:
ansible_host: 192.168.0.203
pico4:
ansible_host: 192.168.0.204