<commit_before>use v6;

class MIDI:auth<github:jonathanstowe>:ver<v0.0.1> {
    class Header {
        has Str     $.MThd          = "MThd";
        has uint32  $.header-length = 6;
        has uint16  $.format        = 1;
        has uint16  $.track-chunks  = 0;
        has uint16  $.division      = 96;
    }

=begin comment

say MIDI::Header.new;
#!perl6

use v6;

my $file = open "foo.mid", :bin;

my Buf $buf = Buf.new();

my Str $preamble;
my Int $header_length;
my Int $format;
my Int $n;
my Int $division;
<commit_msg>Sketch out class structure<commit_after>use v6;

class MIDI:auth<github:jonathanstowe>:ver<v0.0.1> {
    class Track {
        class Event {
        }

        has Str     $.MTrk      = "Mtrk";
        has uint32  $.length    = 0;

        has Event @.events;

    }

    class Header {
        has Str     $.MThd          = "MThd";
        has uint32  $.header-length = 6;
        has uint16  $.format        = 1;
        has uint16  $.track-chunks  = 0;
        has uint16  $.division      = 96;

    }

    has Header $.header;
    has Track @.tracks;


=begin comment

say MIDI::Header.new;
#!perl6

use v6;

my $file = open "foo.mid", :bin;

my Buf $buf = Buf.new();

my Str $preamble;
my Int $header_length;
my Int $format;
my Int $n;
my Int $division;

{'fraction_non_alphanumeric': 0.12986003110419908, 'fraction_numerical': 0.03188180404354588, 'mean_word_length': 1.925, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1006283', 'n_tokens_mistral': 516, 'n_tokens_neox': 473, 'n_words': 138}