// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: midi.proto

#ifndef GOOGLE_PROTOBUF_INCLUDED_midi_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_midi_2eproto

#include <limits>
#include <string>

#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3013000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3013000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif

#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h>  // IWYU pragma: export
#include <google/protobuf/extension_set.h>  // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_midi_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
}  // namespace internal
PROTOBUF_NAMESPACE_CLOSE

// Internal implementation detail -- do not use these members.
struct TableStruct_midi_2eproto {
  static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
    PROTOBUF_SECTION_VARIABLE(protodesc_cold);
  static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
    PROTOBUF_SECTION_VARIABLE(protodesc_cold);
  static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[14]
    PROTOBUF_SECTION_VARIABLE(protodesc_cold);
  static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
  static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
  static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_midi_2eproto;
namespace midi {
class Bar;
class BarDefaultTypeInternal;
extern BarDefaultTypeInternal _Bar_default_instance_;
class Dataset;
class DatasetDefaultTypeInternal;
extern DatasetDefaultTypeInternal _Dataset_default_instance_;
class Dataset_Item;
class Dataset_ItemDefaultTypeInternal;
extern Dataset_ItemDefaultTypeInternal _Dataset_Item_default_instance_;
class Event;
class EventDefaultTypeInternal;
extern EventDefaultTypeInternal _Event_default_instance_;
class MBar;
class MBarDefaultTypeInternal;
extern MBarDefaultTypeInternal _MBar_default_instance_;
class MEvent;
class MEventDefaultTypeInternal;
extern MEventDefaultTypeInternal _MEvent_default_instance_;
class MPiece;
class MPieceDefaultTypeInternal;
extern MPieceDefaultTypeInternal _MPiece_default_instance_;
class MTrack;
class MTrackDefaultTypeInternal;
extern MTrackDefaultTypeInternal _MTrack_default_instance_;
class Note;
class NoteDefaultTypeInternal;
extern NoteDefaultTypeInternal _Note_default_instance_;
class Piece;
class PieceDefaultTypeInternal;
extern PieceDefaultTypeInternal _Piece_default_instance_;
class Status;
class StatusDefaultTypeInternal;
extern StatusDefaultTypeInternal _Status_default_instance_;
class StatusTrack;
class StatusTrackDefaultTypeInternal;
extern StatusTrackDefaultTypeInternal _StatusTrack_default_instance_;
class Track;
class TrackDefaultTypeInternal;
extern TrackDefaultTypeInternal _Track_default_instance_;
class ValidTrack;
class ValidTrackDefaultTypeInternal;
extern ValidTrackDefaultTypeInternal _ValidTrack_default_instance_;
}  // namespace midi
PROTOBUF_NAMESPACE_OPEN
template<> ::midi::Bar* Arena::CreateMaybeMessage<::midi::Bar>(Arena*);
template<> ::midi::Dataset* Arena::CreateMaybeMessage<::midi::Dataset>(Arena*);
template<> ::midi::Dataset_Item* Arena::CreateMaybeMessage<::midi::Dataset_Item>(Arena*);
template<> ::midi::Event* Arena::CreateMaybeMessage<::midi::Event>(Arena*);
template<> ::midi::MBar* Arena::CreateMaybeMessage<::midi::MBar>(Arena*);
template<> ::midi::MEvent* Arena::CreateMaybeMessage<::midi::MEvent>(Arena*);
template<> ::midi::MPiece* Arena::CreateMaybeMessage<::midi::MPiece>(Arena*);
template<> ::midi::MTrack* Arena::CreateMaybeMessage<::midi::MTrack>(Arena*);
template<> ::midi::Note* Arena::CreateMaybeMessage<::midi::Note>(Arena*);
template<> ::midi::Piece* Arena::CreateMaybeMessage<::midi::Piece>(Arena*);
template<> ::midi::Status* Arena::CreateMaybeMessage<::midi::Status>(Arena*);
template<> ::midi::StatusTrack* Arena::CreateMaybeMessage<::midi::StatusTrack>(Arena*);
template<> ::midi::Track* Arena::CreateMaybeMessage<::midi::Track>(Arena*);
template<> ::midi::ValidTrack* Arena::CreateMaybeMessage<::midi::ValidTrack>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace midi {

// ===================================================================

class Note PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.Note) */ {
 public:
  inline Note() : Note(nullptr) {}
  virtual ~Note();

  Note(const Note& from);
  Note(Note&& from) noexcept
    : Note() {
    *this = ::std::move(from);
  }

  inline Note& operator=(const Note& from) {
    CopyFrom(from);
    return *this;
  }
  inline Note& operator=(Note&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const Note& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const Note* internal_default_instance() {
    return reinterpret_cast<const Note*>(
               &_Note_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    0;

  friend void swap(Note& a, Note& b) {
    a.Swap(&b);
  }
  inline void Swap(Note* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(Note* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline Note* New() const final {
    return CreateMaybeMessage<Note>(nullptr);
  }

  Note* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<Note>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const Note& from);
  void MergeFrom(const Note& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(Note* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.Note";
  }
  protected:
  explicit Note(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kStartFieldNumber = 1,
    kEndFieldNumber = 2,
    kVelocityFieldNumber = 3,
    kPitchFieldNumber = 4,
    kInstrumentFieldNumber = 5,
    kTrackFieldNumber = 6,
    kQstartFieldNumber = 7,
    kQendFieldNumber = 8,
    kBarFieldNumber = 9,
    kIsDrumFieldNumber = 10,
  };
  // optional int32 start = 1;
  bool has_start() const;
  private:
  bool _internal_has_start() const;
  public:
  void clear_start();
  ::PROTOBUF_NAMESPACE_ID::int32 start() const;
  void set_start(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_start() const;
  void _internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 end = 2;
  bool has_end() const;
  private:
  bool _internal_has_end() const;
  public:
  void clear_end();
  ::PROTOBUF_NAMESPACE_ID::int32 end() const;
  void set_end(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_end() const;
  void _internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 velocity = 3;
  bool has_velocity() const;
  private:
  bool _internal_has_velocity() const;
  public:
  void clear_velocity();
  ::PROTOBUF_NAMESPACE_ID::int32 velocity() const;
  void set_velocity(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_velocity() const;
  void _internal_set_velocity(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 pitch = 4;
  bool has_pitch() const;
  private:
  bool _internal_has_pitch() const;
  public:
  void clear_pitch();
  ::PROTOBUF_NAMESPACE_ID::int32 pitch() const;
  void set_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_pitch() const;
  void _internal_set_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 instrument = 5;
  bool has_instrument() const;
  private:
  bool _internal_has_instrument() const;
  public:
  void clear_instrument();
  ::PROTOBUF_NAMESPACE_ID::int32 instrument() const;
  void set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_instrument() const;
  void _internal_set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 track = 6;
  bool has_track() const;
  private:
  bool _internal_has_track() const;
  public:
  void clear_track();
  ::PROTOBUF_NAMESPACE_ID::int32 track() const;
  void set_track(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_track() const;
  void _internal_set_track(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 qstart = 7;
  bool has_qstart() const;
  private:
  bool _internal_has_qstart() const;
  public:
  void clear_qstart();
  ::PROTOBUF_NAMESPACE_ID::int32 qstart() const;
  void set_qstart(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_qstart() const;
  void _internal_set_qstart(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 qend = 8;
  bool has_qend() const;
  private:
  bool _internal_has_qend() const;
  public:
  void clear_qend();
  ::PROTOBUF_NAMESPACE_ID::int32 qend() const;
  void set_qend(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_qend() const;
  void _internal_set_qend(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 bar = 9;
  bool has_bar() const;
  private:
  bool _internal_has_bar() const;
  public:
  void clear_bar();
  ::PROTOBUF_NAMESPACE_ID::int32 bar() const;
  void set_bar(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_bar() const;
  void _internal_set_bar(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional bool is_drum = 10;
  bool has_is_drum() const;
  private:
  bool _internal_has_is_drum() const;
  public:
  void clear_is_drum();
  bool is_drum() const;
  void set_is_drum(bool value);
  private:
  bool _internal_is_drum() const;
  void _internal_set_is_drum(bool value);
  public:

  // @@protoc_insertion_point(class_scope:midi.Note)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  ::PROTOBUF_NAMESPACE_ID::int32 start_;
  ::PROTOBUF_NAMESPACE_ID::int32 end_;
  ::PROTOBUF_NAMESPACE_ID::int32 velocity_;
  ::PROTOBUF_NAMESPACE_ID::int32 pitch_;
  ::PROTOBUF_NAMESPACE_ID::int32 instrument_;
  ::PROTOBUF_NAMESPACE_ID::int32 track_;
  ::PROTOBUF_NAMESPACE_ID::int32 qstart_;
  ::PROTOBUF_NAMESPACE_ID::int32 qend_;
  ::PROTOBUF_NAMESPACE_ID::int32 bar_;
  bool is_drum_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class Event PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.Event) */ {
 public:
  inline Event() : Event(nullptr) {}
  virtual ~Event();

  Event(const Event& from);
  Event(Event&& from) noexcept
    : Event() {
    *this = ::std::move(from);
  }

  inline Event& operator=(const Event& from) {
    CopyFrom(from);
    return *this;
  }
  inline Event& operator=(Event&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const Event& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const Event* internal_default_instance() {
    return reinterpret_cast<const Event*>(
               &_Event_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    1;

  friend void swap(Event& a, Event& b) {
    a.Swap(&b);
  }
  inline void Swap(Event* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(Event* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline Event* New() const final {
    return CreateMaybeMessage<Event>(nullptr);
  }

  Event* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<Event>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const Event& from);
  void MergeFrom(const Event& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(Event* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.Event";
  }
  protected:
  explicit Event(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kTimeFieldNumber = 1,
    kVelocityFieldNumber = 2,
    kPitchFieldNumber = 3,
    kInstrumentFieldNumber = 4,
    kTrackFieldNumber = 5,
    kQtimeFieldNumber = 6,
    kBarFieldNumber = 7,
    kIsDrumFieldNumber = 8,
    kShouldPruneFieldNumber = 9,
    kTrackTypeFieldNumber = 10,
  };
  // optional int32 time = 1;
  bool has_time() const;
  private:
  bool _internal_has_time() const;
  public:
  void clear_time();
  ::PROTOBUF_NAMESPACE_ID::int32 time() const;
  void set_time(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_time() const;
  void _internal_set_time(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 velocity = 2;
  bool has_velocity() const;
  private:
  bool _internal_has_velocity() const;
  public:
  void clear_velocity();
  ::PROTOBUF_NAMESPACE_ID::int32 velocity() const;
  void set_velocity(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_velocity() const;
  void _internal_set_velocity(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 pitch = 3;
  bool has_pitch() const;
  private:
  bool _internal_has_pitch() const;
  public:
  void clear_pitch();
  ::PROTOBUF_NAMESPACE_ID::int32 pitch() const;
  void set_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_pitch() const;
  void _internal_set_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 instrument = 4;
  bool has_instrument() const;
  private:
  bool _internal_has_instrument() const;
  public:
  void clear_instrument();
  ::PROTOBUF_NAMESPACE_ID::int32 instrument() const;
  void set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_instrument() const;
  void _internal_set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 track = 5;
  bool has_track() const;
  private:
  bool _internal_has_track() const;
  public:
  void clear_track();
  ::PROTOBUF_NAMESPACE_ID::int32 track() const;
  void set_track(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_track() const;
  void _internal_set_track(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 qtime = 6;
  bool has_qtime() const;
  private:
  bool _internal_has_qtime() const;
  public:
  void clear_qtime();
  ::PROTOBUF_NAMESPACE_ID::int32 qtime() const;
  void set_qtime(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_qtime() const;
  void _internal_set_qtime(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 bar = 7;
  bool has_bar() const;
  private:
  bool _internal_has_bar() const;
  public:
  void clear_bar();
  ::PROTOBUF_NAMESPACE_ID::int32 bar() const;
  void set_bar(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_bar() const;
  void _internal_set_bar(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional bool is_drum = 8;
  bool has_is_drum() const;
  private:
  bool _internal_has_is_drum() const;
  public:
  void clear_is_drum();
  bool is_drum() const;
  void set_is_drum(bool value);
  private:
  bool _internal_is_drum() const;
  void _internal_set_is_drum(bool value);
  public:

  // optional bool should_prune = 9;
  bool has_should_prune() const;
  private:
  bool _internal_has_should_prune() const;
  public:
  void clear_should_prune();
  bool should_prune() const;
  void set_should_prune(bool value);
  private:
  bool _internal_should_prune() const;
  void _internal_set_should_prune(bool value);
  public:

  // optional int32 track_type = 10;
  bool has_track_type() const;
  private:
  bool _internal_has_track_type() const;
  public:
  void clear_track_type();
  ::PROTOBUF_NAMESPACE_ID::int32 track_type() const;
  void set_track_type(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_track_type() const;
  void _internal_set_track_type(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // @@protoc_insertion_point(class_scope:midi.Event)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  ::PROTOBUF_NAMESPACE_ID::int32 time_;
  ::PROTOBUF_NAMESPACE_ID::int32 velocity_;
  ::PROTOBUF_NAMESPACE_ID::int32 pitch_;
  ::PROTOBUF_NAMESPACE_ID::int32 instrument_;
  ::PROTOBUF_NAMESPACE_ID::int32 track_;
  ::PROTOBUF_NAMESPACE_ID::int32 qtime_;
  ::PROTOBUF_NAMESPACE_ID::int32 bar_;
  bool is_drum_;
  bool should_prune_;
  ::PROTOBUF_NAMESPACE_ID::int32 track_type_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class Bar PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.Bar) */ {
 public:
  inline Bar() : Bar(nullptr) {}
  virtual ~Bar();

  Bar(const Bar& from);
  Bar(Bar&& from) noexcept
    : Bar() {
    *this = ::std::move(from);
  }

  inline Bar& operator=(const Bar& from) {
    CopyFrom(from);
    return *this;
  }
  inline Bar& operator=(Bar&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const Bar& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const Bar* internal_default_instance() {
    return reinterpret_cast<const Bar*>(
               &_Bar_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    2;

  friend void swap(Bar& a, Bar& b) {
    a.Swap(&b);
  }
  inline void Swap(Bar* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(Bar* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline Bar* New() const final {
    return CreateMaybeMessage<Bar>(nullptr);
  }

  Bar* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<Bar>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const Bar& from);
  void MergeFrom(const Bar& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(Bar* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.Bar";
  }
  protected:
  explicit Bar(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kEventsFieldNumber = 1,
    kTimeFieldNumber = 4,
    kIsFourFourFieldNumber = 2,
    kHasNotesFieldNumber = 3,
    kShouldPruneFieldNumber = 6,
    kIsDrumFieldNumber = 7,
    kBeatLengthFieldNumber = 5,
  };
  // repeated int32 events = 1;
  int events_size() const;
  private:
  int _internal_events_size() const;
  public:
  void clear_events();
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_events(int index) const;
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
      _internal_events() const;
  void _internal_add_events(::PROTOBUF_NAMESPACE_ID::int32 value);
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
      _internal_mutable_events();
  public:
  ::PROTOBUF_NAMESPACE_ID::int32 events(int index) const;
  void set_events(int index, ::PROTOBUF_NAMESPACE_ID::int32 value);
  void add_events(::PROTOBUF_NAMESPACE_ID::int32 value);
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
      events() const;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
      mutable_events();

  // optional int32 time = 4;
  bool has_time() const;
  private:
  bool _internal_has_time() const;
  public:
  void clear_time();
  ::PROTOBUF_NAMESPACE_ID::int32 time() const;
  void set_time(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_time() const;
  void _internal_set_time(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional bool is_four_four = 2;
  bool has_is_four_four() const;
  private:
  bool _internal_has_is_four_four() const;
  public:
  void clear_is_four_four();
  bool is_four_four() const;
  void set_is_four_four(bool value);
  private:
  bool _internal_is_four_four() const;
  void _internal_set_is_four_four(bool value);
  public:

  // optional bool has_notes = 3;
  bool has_has_notes() const;
  private:
  bool _internal_has_has_notes() const;
  public:
  void clear_has_notes();
  bool has_notes() const;
  void set_has_notes(bool value);
  private:
  bool _internal_has_notes() const;
  void _internal_set_has_notes(bool value);
  public:

  // optional bool should_prune = 6;
  bool has_should_prune() const;
  private:
  bool _internal_has_should_prune() const;
  public:
  void clear_should_prune();
  bool should_prune() const;
  void set_should_prune(bool value);
  private:
  bool _internal_should_prune() const;
  void _internal_set_should_prune(bool value);
  public:

  // optional bool is_drum = 7;
  bool has_is_drum() const;
  private:
  bool _internal_has_is_drum() const;
  public:
  void clear_is_drum();
  bool is_drum() const;
  void set_is_drum(bool value);
  private:
  bool _internal_is_drum() const;
  void _internal_set_is_drum(bool value);
  public:

  // optional float beat_length = 5;
  bool has_beat_length() const;
  private:
  bool _internal_has_beat_length() const;
  public:
  void clear_beat_length();
  float beat_length() const;
  void set_beat_length(float value);
  private:
  float _internal_beat_length() const;
  void _internal_set_beat_length(float value);
  public:

  // @@protoc_insertion_point(class_scope:midi.Bar)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > events_;
  ::PROTOBUF_NAMESPACE_ID::int32 time_;
  bool is_four_four_;
  bool has_notes_;
  bool should_prune_;
  bool is_drum_;
  float beat_length_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class Track PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.Track) */ {
 public:
  inline Track() : Track(nullptr) {}
  virtual ~Track();

  Track(const Track& from);
  Track(Track&& from) noexcept
    : Track() {
    *this = ::std::move(from);
  }

  inline Track& operator=(const Track& from) {
    CopyFrom(from);
    return *this;
  }
  inline Track& operator=(Track&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const Track& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const Track* internal_default_instance() {
    return reinterpret_cast<const Track*>(
               &_Track_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    3;

  friend void swap(Track& a, Track& b) {
    a.Swap(&b);
  }
  inline void Swap(Track* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(Track* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline Track* New() const final {
    return CreateMaybeMessage<Track>(nullptr);
  }

  Track* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<Track>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const Track& from);
  void MergeFrom(const Track& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(Track* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.Track";
  }
  protected:
  explicit Track(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kBarsFieldNumber = 1,
    kMinPitchFieldNumber = 3,
    kMaxPitchFieldNumber = 4,
    kInstrumentFieldNumber = 5,
    kAvPolyphonyFieldNumber = 6,
    kNoteDensityFieldNumber = 7,
    kIsDrumFieldNumber = 2,
    kShouldPruneFieldNumber = 12,
    kNoteDensityV2FieldNumber = 8,
    kTeTrackFieldNumber = 9,
    kMaxPolyphonyFieldNumber = 10,
    kTypeFieldNumber = 11,
    kOrderFieldNumber = 13,
  };
  // repeated .midi.Bar bars = 1;
  int bars_size() const;
  private:
  int _internal_bars_size() const;
  public:
  void clear_bars();
  ::midi::Bar* mutable_bars(int index);
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Bar >*
      mutable_bars();
  private:
  const ::midi::Bar& _internal_bars(int index) const;
  ::midi::Bar* _internal_add_bars();
  public:
  const ::midi::Bar& bars(int index) const;
  ::midi::Bar* add_bars();
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Bar >&
      bars() const;

  // optional int32 min_pitch = 3;
  bool has_min_pitch() const;
  private:
  bool _internal_has_min_pitch() const;
  public:
  void clear_min_pitch();
  ::PROTOBUF_NAMESPACE_ID::int32 min_pitch() const;
  void set_min_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_min_pitch() const;
  void _internal_set_min_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 max_pitch = 4;
  bool has_max_pitch() const;
  private:
  bool _internal_has_max_pitch() const;
  public:
  void clear_max_pitch();
  ::PROTOBUF_NAMESPACE_ID::int32 max_pitch() const;
  void set_max_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_max_pitch() const;
  void _internal_set_max_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 instrument = 5;
  bool has_instrument() const;
  private:
  bool _internal_has_instrument() const;
  public:
  void clear_instrument();
  ::PROTOBUF_NAMESPACE_ID::int32 instrument() const;
  void set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_instrument() const;
  void _internal_set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional float av_polyphony = 6;
  bool has_av_polyphony() const;
  private:
  bool _internal_has_av_polyphony() const;
  public:
  void clear_av_polyphony();
  float av_polyphony() const;
  void set_av_polyphony(float value);
  private:
  float _internal_av_polyphony() const;
  void _internal_set_av_polyphony(float value);
  public:

  // optional int32 note_density = 7;
  bool has_note_density() const;
  private:
  bool _internal_has_note_density() const;
  public:
  void clear_note_density();
  ::PROTOBUF_NAMESPACE_ID::int32 note_density() const;
  void set_note_density(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_note_density() const;
  void _internal_set_note_density(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional bool is_drum = 2;
  bool has_is_drum() const;
  private:
  bool _internal_has_is_drum() const;
  public:
  void clear_is_drum();
  bool is_drum() const;
  void set_is_drum(bool value);
  private:
  bool _internal_is_drum() const;
  void _internal_set_is_drum(bool value);
  public:

  // optional bool should_prune = 12;
  bool has_should_prune() const;
  private:
  bool _internal_has_should_prune() const;
  public:
  void clear_should_prune();
  bool should_prune() const;
  void set_should_prune(bool value);
  private:
  bool _internal_should_prune() const;
  void _internal_set_should_prune(bool value);
  public:

  // optional int32 note_density_v2 = 8;
  bool has_note_density_v2() const;
  private:
  bool _internal_has_note_density_v2() const;
  public:
  void clear_note_density_v2();
  ::PROTOBUF_NAMESPACE_ID::int32 note_density_v2() const;
  void set_note_density_v2(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_note_density_v2() const;
  void _internal_set_note_density_v2(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 te_track = 9;
  bool has_te_track() const;
  private:
  bool _internal_has_te_track() const;
  public:
  void clear_te_track();
  ::PROTOBUF_NAMESPACE_ID::int32 te_track() const;
  void set_te_track(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_te_track() const;
  void _internal_set_te_track(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 max_polyphony = 10;
  bool has_max_polyphony() const;
  private:
  bool _internal_has_max_polyphony() const;
  public:
  void clear_max_polyphony();
  ::PROTOBUF_NAMESPACE_ID::int32 max_polyphony() const;
  void set_max_polyphony(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_max_polyphony() const;
  void _internal_set_max_polyphony(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 type = 11;
  bool has_type() const;
  private:
  bool _internal_has_type() const;
  public:
  void clear_type();
  ::PROTOBUF_NAMESPACE_ID::int32 type() const;
  void set_type(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_type() const;
  void _internal_set_type(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 order = 13;
  bool has_order() const;
  private:
  bool _internal_has_order() const;
  public:
  void clear_order();
  ::PROTOBUF_NAMESPACE_ID::int32 order() const;
  void set_order(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_order() const;
  void _internal_set_order(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // @@protoc_insertion_point(class_scope:midi.Track)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Bar > bars_;
  ::PROTOBUF_NAMESPACE_ID::int32 min_pitch_;
  ::PROTOBUF_NAMESPACE_ID::int32 max_pitch_;
  ::PROTOBUF_NAMESPACE_ID::int32 instrument_;
  float av_polyphony_;
  ::PROTOBUF_NAMESPACE_ID::int32 note_density_;
  bool is_drum_;
  bool should_prune_;
  ::PROTOBUF_NAMESPACE_ID::int32 note_density_v2_;
  ::PROTOBUF_NAMESPACE_ID::int32 te_track_;
  ::PROTOBUF_NAMESPACE_ID::int32 max_polyphony_;
  ::PROTOBUF_NAMESPACE_ID::int32 type_;
  ::PROTOBUF_NAMESPACE_ID::int32 order_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class ValidTrack PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.ValidTrack) */ {
 public:
  inline ValidTrack() : ValidTrack(nullptr) {}
  virtual ~ValidTrack();

  ValidTrack(const ValidTrack& from);
  ValidTrack(ValidTrack&& from) noexcept
    : ValidTrack() {
    *this = ::std::move(from);
  }

  inline ValidTrack& operator=(const ValidTrack& from) {
    CopyFrom(from);
    return *this;
  }
  inline ValidTrack& operator=(ValidTrack&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const ValidTrack& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const ValidTrack* internal_default_instance() {
    return reinterpret_cast<const ValidTrack*>(
               &_ValidTrack_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    4;

  friend void swap(ValidTrack& a, ValidTrack& b) {
    a.Swap(&b);
  }
  inline void Swap(ValidTrack* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(ValidTrack* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline ValidTrack* New() const final {
    return CreateMaybeMessage<ValidTrack>(nullptr);
  }

  ValidTrack* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<ValidTrack>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const ValidTrack& from);
  void MergeFrom(const ValidTrack& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(ValidTrack* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.ValidTrack";
  }
  protected:
  explicit ValidTrack(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kTracksFieldNumber = 1,
  };
  // repeated int32 tracks = 1;
  int tracks_size() const;
  private:
  int _internal_tracks_size() const;
  public:
  void clear_tracks();
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_tracks(int index) const;
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
      _internal_tracks() const;
  void _internal_add_tracks(::PROTOBUF_NAMESPACE_ID::int32 value);
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
      _internal_mutable_tracks();
  public:
  ::PROTOBUF_NAMESPACE_ID::int32 tracks(int index) const;
  void set_tracks(int index, ::PROTOBUF_NAMESPACE_ID::int32 value);
  void add_tracks(::PROTOBUF_NAMESPACE_ID::int32 value);
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
      tracks() const;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
      mutable_tracks();

  // @@protoc_insertion_point(class_scope:midi.ValidTrack)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > tracks_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class Piece PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.Piece) */ {
 public:
  inline Piece() : Piece(nullptr) {}
  virtual ~Piece();

  Piece(const Piece& from);
  Piece(Piece&& from) noexcept
    : Piece() {
    *this = ::std::move(from);
  }

  inline Piece& operator=(const Piece& from) {
    CopyFrom(from);
    return *this;
  }
  inline Piece& operator=(Piece&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const Piece& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const Piece* internal_default_instance() {
    return reinterpret_cast<const Piece*>(
               &_Piece_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    5;

  friend void swap(Piece& a, Piece& b) {
    a.Swap(&b);
  }
  inline void Swap(Piece* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(Piece* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline Piece* New() const final {
    return CreateMaybeMessage<Piece>(nullptr);
  }

  Piece* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<Piece>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const Piece& from);
  void MergeFrom(const Piece& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(Piece* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.Piece";
  }
  protected:
  explicit Piece(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kTracksFieldNumber = 1,
    kEventsFieldNumber = 2,
    kValidSegmentsFieldNumber = 7,
    kValidTracksFieldNumber = 8,
    kMsdCd1FieldNumber = 9,
    kMsdCd2FieldNumber = 10,
    kMsdCd2CFieldNumber = 11,
    kValidTracksV2FieldNumber = 13,
    kResolutionFieldNumber = 3,
    kTempoFieldNumber = 4,
    kMinPitchFieldNumber = 5,
    kMaxPitchFieldNumber = 6,
    kSegmentLengthFieldNumber = 12,
  };
  // repeated .midi.Track tracks = 1;
  int tracks_size() const;
  private:
  int _internal_tracks_size() const;
  public:
  void clear_tracks();
  ::midi::Track* mutable_tracks(int index);
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Track >*
      mutable_tracks();
  private:
  const ::midi::Track& _internal_tracks(int index) const;
  ::midi::Track* _internal_add_tracks();
  public:
  const ::midi::Track& tracks(int index) const;
  ::midi::Track* add_tracks();
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Track >&
      tracks() const;

  // repeated .midi.Event events = 2;
  int events_size() const;
  private:
  int _internal_events_size() const;
  public:
  void clear_events();
  ::midi::Event* mutable_events(int index);
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Event >*
      mutable_events();
  private:
  const ::midi::Event& _internal_events(int index) const;
  ::midi::Event* _internal_add_events();
  public:
  const ::midi::Event& events(int index) const;
  ::midi::Event* add_events();
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Event >&
      events() const;

  // repeated int32 valid_segments = 7;
  int valid_segments_size() const;
  private:
  int _internal_valid_segments_size() const;
  public:
  void clear_valid_segments();
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_valid_segments(int index) const;
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
      _internal_valid_segments() const;
  void _internal_add_valid_segments(::PROTOBUF_NAMESPACE_ID::int32 value);
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
      _internal_mutable_valid_segments();
  public:
  ::PROTOBUF_NAMESPACE_ID::int32 valid_segments(int index) const;
  void set_valid_segments(int index, ::PROTOBUF_NAMESPACE_ID::int32 value);
  void add_valid_segments(::PROTOBUF_NAMESPACE_ID::int32 value);
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
      valid_segments() const;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
      mutable_valid_segments();

  // repeated uint32 valid_tracks = 8;
  int valid_tracks_size() const;
  private:
  int _internal_valid_tracks_size() const;
  public:
  void clear_valid_tracks();
  private:
  ::PROTOBUF_NAMESPACE_ID::uint32 _internal_valid_tracks(int index) const;
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 >&
      _internal_valid_tracks() const;
  void _internal_add_valid_tracks(::PROTOBUF_NAMESPACE_ID::uint32 value);
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 >*
      _internal_mutable_valid_tracks();
  public:
  ::PROTOBUF_NAMESPACE_ID::uint32 valid_tracks(int index) const;
  void set_valid_tracks(int index, ::PROTOBUF_NAMESPACE_ID::uint32 value);
  void add_valid_tracks(::PROTOBUF_NAMESPACE_ID::uint32 value);
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 >&
      valid_tracks() const;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 >*
      mutable_valid_tracks();

  // repeated string msd_cd1 = 9;
  int msd_cd1_size() const;
  private:
  int _internal_msd_cd1_size() const;
  public:
  void clear_msd_cd1();
  const std::string& msd_cd1(int index) const;
  std::string* mutable_msd_cd1(int index);
  void set_msd_cd1(int index, const std::string& value);
  void set_msd_cd1(int index, std::string&& value);
  void set_msd_cd1(int index, const char* value);
  void set_msd_cd1(int index, const char* value, size_t size);
  std::string* add_msd_cd1();
  void add_msd_cd1(const std::string& value);
  void add_msd_cd1(std::string&& value);
  void add_msd_cd1(const char* value);
  void add_msd_cd1(const char* value, size_t size);
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& msd_cd1() const;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_msd_cd1();
  private:
  const std::string& _internal_msd_cd1(int index) const;
  std::string* _internal_add_msd_cd1();
  public:

  // repeated string msd_cd2 = 10;
  int msd_cd2_size() const;
  private:
  int _internal_msd_cd2_size() const;
  public:
  void clear_msd_cd2();
  const std::string& msd_cd2(int index) const;
  std::string* mutable_msd_cd2(int index);
  void set_msd_cd2(int index, const std::string& value);
  void set_msd_cd2(int index, std::string&& value);
  void set_msd_cd2(int index, const char* value);
  void set_msd_cd2(int index, const char* value, size_t size);
  std::string* add_msd_cd2();
  void add_msd_cd2(const std::string& value);
  void add_msd_cd2(std::string&& value);
  void add_msd_cd2(const char* value);
  void add_msd_cd2(const char* value, size_t size);
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& msd_cd2() const;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_msd_cd2();
  private:
  const std::string& _internal_msd_cd2(int index) const;
  std::string* _internal_add_msd_cd2();
  public:

  // repeated string msd_cd2c = 11;
  int msd_cd2c_size() const;
  private:
  int _internal_msd_cd2c_size() const;
  public:
  void clear_msd_cd2c();
  const std::string& msd_cd2c(int index) const;
  std::string* mutable_msd_cd2c(int index);
  void set_msd_cd2c(int index, const std::string& value);
  void set_msd_cd2c(int index, std::string&& value);
  void set_msd_cd2c(int index, const char* value);
  void set_msd_cd2c(int index, const char* value, size_t size);
  std::string* add_msd_cd2c();
  void add_msd_cd2c(const std::string& value);
  void add_msd_cd2c(std::string&& value);
  void add_msd_cd2c(const char* value);
  void add_msd_cd2c(const char* value, size_t size);
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& msd_cd2c() const;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_msd_cd2c();
  private:
  const std::string& _internal_msd_cd2c(int index) const;
  std::string* _internal_add_msd_cd2c();
  public:

  // repeated .midi.ValidTrack valid_tracks_v2 = 13;
  int valid_tracks_v2_size() const;
  private:
  int _internal_valid_tracks_v2_size() const;
  public:
  void clear_valid_tracks_v2();
  ::midi::ValidTrack* mutable_valid_tracks_v2(int index);
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::ValidTrack >*
      mutable_valid_tracks_v2();
  private:
  const ::midi::ValidTrack& _internal_valid_tracks_v2(int index) const;
  ::midi::ValidTrack* _internal_add_valid_tracks_v2();
  public:
  const ::midi::ValidTrack& valid_tracks_v2(int index) const;
  ::midi::ValidTrack* add_valid_tracks_v2();
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::ValidTrack >&
      valid_tracks_v2() const;

  // optional int32 resolution = 3;
  bool has_resolution() const;
  private:
  bool _internal_has_resolution() const;
  public:
  void clear_resolution();
  ::PROTOBUF_NAMESPACE_ID::int32 resolution() const;
  void set_resolution(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_resolution() const;
  void _internal_set_resolution(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 tempo = 4;
  bool has_tempo() const;
  private:
  bool _internal_has_tempo() const;
  public:
  void clear_tempo();
  ::PROTOBUF_NAMESPACE_ID::int32 tempo() const;
  void set_tempo(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_tempo() const;
  void _internal_set_tempo(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 min_pitch = 5;
  bool has_min_pitch() const;
  private:
  bool _internal_has_min_pitch() const;
  public:
  void clear_min_pitch();
  ::PROTOBUF_NAMESPACE_ID::int32 min_pitch() const;
  void set_min_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_min_pitch() const;
  void _internal_set_min_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 max_pitch = 6;
  bool has_max_pitch() const;
  private:
  bool _internal_has_max_pitch() const;
  public:
  void clear_max_pitch();
  ::PROTOBUF_NAMESPACE_ID::int32 max_pitch() const;
  void set_max_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_max_pitch() const;
  void _internal_set_max_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 segment_length = 12;
  bool has_segment_length() const;
  private:
  bool _internal_has_segment_length() const;
  public:
  void clear_segment_length();
  ::PROTOBUF_NAMESPACE_ID::int32 segment_length() const;
  void set_segment_length(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_segment_length() const;
  void _internal_set_segment_length(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // @@protoc_insertion_point(class_scope:midi.Piece)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Track > tracks_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Event > events_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > valid_segments_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 > valid_tracks_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> msd_cd1_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> msd_cd2_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> msd_cd2c_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::ValidTrack > valid_tracks_v2_;
  ::PROTOBUF_NAMESPACE_ID::int32 resolution_;
  ::PROTOBUF_NAMESPACE_ID::int32 tempo_;
  ::PROTOBUF_NAMESPACE_ID::int32 min_pitch_;
  ::PROTOBUF_NAMESPACE_ID::int32 max_pitch_;
  ::PROTOBUF_NAMESPACE_ID::int32 segment_length_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class StatusTrack PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.StatusTrack) */ {
 public:
  inline StatusTrack() : StatusTrack(nullptr) {}
  virtual ~StatusTrack();

  StatusTrack(const StatusTrack& from);
  StatusTrack(StatusTrack&& from) noexcept
    : StatusTrack() {
    *this = ::std::move(from);
  }

  inline StatusTrack& operator=(const StatusTrack& from) {
    CopyFrom(from);
    return *this;
  }
  inline StatusTrack& operator=(StatusTrack&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const StatusTrack& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const StatusTrack* internal_default_instance() {
    return reinterpret_cast<const StatusTrack*>(
               &_StatusTrack_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    6;

  friend void swap(StatusTrack& a, StatusTrack& b) {
    a.Swap(&b);
  }
  inline void Swap(StatusTrack* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(StatusTrack* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline StatusTrack* New() const final {
    return CreateMaybeMessage<StatusTrack>(nullptr);
  }

  StatusTrack* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<StatusTrack>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const StatusTrack& from);
  void MergeFrom(const StatusTrack& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(StatusTrack* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.StatusTrack";
  }
  protected:
  explicit StatusTrack(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kSelectedBarsFieldNumber = 5,
    kInstrumentFieldNumber = 3,
    kTrackIdFieldNumber = 1,
    kTrackTypeFieldNumber = 2,
    kDensityFieldNumber = 4,
  };
  // repeated bool selected_bars = 5;
  int selected_bars_size() const;
  private:
  int _internal_selected_bars_size() const;
  public:
  void clear_selected_bars();
  private:
  bool _internal_selected_bars(int index) const;
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >&
      _internal_selected_bars() const;
  void _internal_add_selected_bars(bool value);
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >*
      _internal_mutable_selected_bars();
  public:
  bool selected_bars(int index) const;
  void set_selected_bars(int index, bool value);
  void add_selected_bars(bool value);
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >&
      selected_bars() const;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >*
      mutable_selected_bars();

  // optional string instrument = 3;
  bool has_instrument() const;
  private:
  bool _internal_has_instrument() const;
  public:
  void clear_instrument();
  const std::string& instrument() const;
  void set_instrument(const std::string& value);
  void set_instrument(std::string&& value);
  void set_instrument(const char* value);
  void set_instrument(const char* value, size_t size);
  std::string* mutable_instrument();
  std::string* release_instrument();
  void set_allocated_instrument(std::string* instrument);
  private:
  const std::string& _internal_instrument() const;
  void _internal_set_instrument(const std::string& value);
  std::string* _internal_mutable_instrument();
  public:

  // optional int32 track_id = 1;
  bool has_track_id() const;
  private:
  bool _internal_has_track_id() const;
  public:
  void clear_track_id();
  ::PROTOBUF_NAMESPACE_ID::int32 track_id() const;
  void set_track_id(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_track_id() const;
  void _internal_set_track_id(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 track_type = 2;
  bool has_track_type() const;
  private:
  bool _internal_has_track_type() const;
  public:
  void clear_track_type();
  ::PROTOBUF_NAMESPACE_ID::int32 track_type() const;
  void set_track_type(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_track_type() const;
  void _internal_set_track_type(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 density = 4;
  bool has_density() const;
  private:
  bool _internal_has_density() const;
  public:
  void clear_density();
  ::PROTOBUF_NAMESPACE_ID::int32 density() const;
  void set_density(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_density() const;
  void _internal_set_density(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // @@protoc_insertion_point(class_scope:midi.StatusTrack)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool > selected_bars_;
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr instrument_;
  ::PROTOBUF_NAMESPACE_ID::int32 track_id_;
  ::PROTOBUF_NAMESPACE_ID::int32 track_type_;
  ::PROTOBUF_NAMESPACE_ID::int32 density_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class Status PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.Status) */ {
 public:
  inline Status() : Status(nullptr) {}
  virtual ~Status();

  Status(const Status& from);
  Status(Status&& from) noexcept
    : Status() {
    *this = ::std::move(from);
  }

  inline Status& operator=(const Status& from) {
    CopyFrom(from);
    return *this;
  }
  inline Status& operator=(Status&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const Status& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const Status* internal_default_instance() {
    return reinterpret_cast<const Status*>(
               &_Status_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    7;

  friend void swap(Status& a, Status& b) {
    a.Swap(&b);
  }
  inline void Swap(Status* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(Status* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline Status* New() const final {
    return CreateMaybeMessage<Status>(nullptr);
  }

  Status* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<Status>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const Status& from);
  void MergeFrom(const Status& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(Status* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.Status";
  }
  protected:
  explicit Status(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kTracksFieldNumber = 1,
  };
  // repeated .midi.StatusTrack tracks = 1;
  int tracks_size() const;
  private:
  int _internal_tracks_size() const;
  public:
  void clear_tracks();
  ::midi::StatusTrack* mutable_tracks(int index);
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::StatusTrack >*
      mutable_tracks();
  private:
  const ::midi::StatusTrack& _internal_tracks(int index) const;
  ::midi::StatusTrack* _internal_add_tracks();
  public:
  const ::midi::StatusTrack& tracks(int index) const;
  ::midi::StatusTrack* add_tracks();
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::StatusTrack >&
      tracks() const;

  // @@protoc_insertion_point(class_scope:midi.Status)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::StatusTrack > tracks_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class MEvent PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.MEvent) */ {
 public:
  inline MEvent() : MEvent(nullptr) {}
  virtual ~MEvent();

  MEvent(const MEvent& from);
  MEvent(MEvent&& from) noexcept
    : MEvent() {
    *this = ::std::move(from);
  }

  inline MEvent& operator=(const MEvent& from) {
    CopyFrom(from);
    return *this;
  }
  inline MEvent& operator=(MEvent&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const MEvent& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const MEvent* internal_default_instance() {
    return reinterpret_cast<const MEvent*>(
               &_MEvent_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    8;

  friend void swap(MEvent& a, MEvent& b) {
    a.Swap(&b);
  }
  inline void Swap(MEvent* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(MEvent* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline MEvent* New() const final {
    return CreateMaybeMessage<MEvent>(nullptr);
  }

  MEvent* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<MEvent>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const MEvent& from);
  void MergeFrom(const MEvent& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(MEvent* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.MEvent";
  }
  protected:
  explicit MEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kTimeFieldNumber = 1,
    kVelocityFieldNumber = 2,
    kPitchFieldNumber = 3,
  };
  // optional int32 time = 1;
  bool has_time() const;
  private:
  bool _internal_has_time() const;
  public:
  void clear_time();
  ::PROTOBUF_NAMESPACE_ID::int32 time() const;
  void set_time(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_time() const;
  void _internal_set_time(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 velocity = 2;
  bool has_velocity() const;
  private:
  bool _internal_has_velocity() const;
  public:
  void clear_velocity();
  ::PROTOBUF_NAMESPACE_ID::int32 velocity() const;
  void set_velocity(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_velocity() const;
  void _internal_set_velocity(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 pitch = 3;
  bool has_pitch() const;
  private:
  bool _internal_has_pitch() const;
  public:
  void clear_pitch();
  ::PROTOBUF_NAMESPACE_ID::int32 pitch() const;
  void set_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_pitch() const;
  void _internal_set_pitch(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // @@protoc_insertion_point(class_scope:midi.MEvent)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  ::PROTOBUF_NAMESPACE_ID::int32 time_;
  ::PROTOBUF_NAMESPACE_ID::int32 velocity_;
  ::PROTOBUF_NAMESPACE_ID::int32 pitch_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class MBar PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.MBar) */ {
 public:
  inline MBar() : MBar(nullptr) {}
  virtual ~MBar();

  MBar(const MBar& from);
  MBar(MBar&& from) noexcept
    : MBar() {
    *this = ::std::move(from);
  }

  inline MBar& operator=(const MBar& from) {
    CopyFrom(from);
    return *this;
  }
  inline MBar& operator=(MBar&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const MBar& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const MBar* internal_default_instance() {
    return reinterpret_cast<const MBar*>(
               &_MBar_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    9;

  friend void swap(MBar& a, MBar& b) {
    a.Swap(&b);
  }
  inline void Swap(MBar* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(MBar* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline MBar* New() const final {
    return CreateMaybeMessage<MBar>(nullptr);
  }

  MBar* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<MBar>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const MBar& from);
  void MergeFrom(const MBar& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(MBar* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.MBar";
  }
  protected:
  explicit MBar(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kEventsFieldNumber = 1,
    kBeatLengthFieldNumber = 2,
  };
  // repeated int32 events = 1;
  int events_size() const;
  private:
  int _internal_events_size() const;
  public:
  void clear_events();
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_events(int index) const;
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
      _internal_events() const;
  void _internal_add_events(::PROTOBUF_NAMESPACE_ID::int32 value);
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
      _internal_mutable_events();
  public:
  ::PROTOBUF_NAMESPACE_ID::int32 events(int index) const;
  void set_events(int index, ::PROTOBUF_NAMESPACE_ID::int32 value);
  void add_events(::PROTOBUF_NAMESPACE_ID::int32 value);
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
      events() const;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
      mutable_events();

  // optional float beat_length = 2;
  bool has_beat_length() const;
  private:
  bool _internal_has_beat_length() const;
  public:
  void clear_beat_length();
  float beat_length() const;
  void set_beat_length(float value);
  private:
  float _internal_beat_length() const;
  void _internal_set_beat_length(float value);
  public:

  // @@protoc_insertion_point(class_scope:midi.MBar)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > events_;
  float beat_length_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class MTrack PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.MTrack) */ {
 public:
  inline MTrack() : MTrack(nullptr) {}
  virtual ~MTrack();

  MTrack(const MTrack& from);
  MTrack(MTrack&& from) noexcept
    : MTrack() {
    *this = ::std::move(from);
  }

  inline MTrack& operator=(const MTrack& from) {
    CopyFrom(from);
    return *this;
  }
  inline MTrack& operator=(MTrack&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const MTrack& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const MTrack* internal_default_instance() {
    return reinterpret_cast<const MTrack*>(
               &_MTrack_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    10;

  friend void swap(MTrack& a, MTrack& b) {
    a.Swap(&b);
  }
  inline void Swap(MTrack* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(MTrack* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline MTrack* New() const final {
    return CreateMaybeMessage<MTrack>(nullptr);
  }

  MTrack* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<MTrack>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const MTrack& from);
  void MergeFrom(const MTrack& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(MTrack* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.MTrack";
  }
  protected:
  explicit MTrack(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kBarsFieldNumber = 1,
    kResampleBarsFieldNumber = 5,
    kInstrumentFieldNumber = 2,
    kDensityFieldNumber = 3,
    kTypeFieldNumber = 4,
  };
  // repeated .midi.MBar bars = 1;
  int bars_size() const;
  private:
  int _internal_bars_size() const;
  public:
  void clear_bars();
  ::midi::MBar* mutable_bars(int index);
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MBar >*
      mutable_bars();
  private:
  const ::midi::MBar& _internal_bars(int index) const;
  ::midi::MBar* _internal_add_bars();
  public:
  const ::midi::MBar& bars(int index) const;
  ::midi::MBar* add_bars();
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MBar >&
      bars() const;

  // repeated int32 resample_bars = 5;
  int resample_bars_size() const;
  private:
  int _internal_resample_bars_size() const;
  public:
  void clear_resample_bars();
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_resample_bars(int index) const;
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
      _internal_resample_bars() const;
  void _internal_add_resample_bars(::PROTOBUF_NAMESPACE_ID::int32 value);
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
      _internal_mutable_resample_bars();
  public:
  ::PROTOBUF_NAMESPACE_ID::int32 resample_bars(int index) const;
  void set_resample_bars(int index, ::PROTOBUF_NAMESPACE_ID::int32 value);
  void add_resample_bars(::PROTOBUF_NAMESPACE_ID::int32 value);
  const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
      resample_bars() const;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
      mutable_resample_bars();

  // optional int32 instrument = 2;
  bool has_instrument() const;
  private:
  bool _internal_has_instrument() const;
  public:
  void clear_instrument();
  ::PROTOBUF_NAMESPACE_ID::int32 instrument() const;
  void set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_instrument() const;
  void _internal_set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 density = 3;
  bool has_density() const;
  private:
  bool _internal_has_density() const;
  public:
  void clear_density();
  ::PROTOBUF_NAMESPACE_ID::int32 density() const;
  void set_density(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_density() const;
  void _internal_set_density(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // optional int32 type = 4;
  bool has_type() const;
  private:
  bool _internal_has_type() const;
  public:
  void clear_type();
  ::PROTOBUF_NAMESPACE_ID::int32 type() const;
  void set_type(::PROTOBUF_NAMESPACE_ID::int32 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::int32 _internal_type() const;
  void _internal_set_type(::PROTOBUF_NAMESPACE_ID::int32 value);
  public:

  // @@protoc_insertion_point(class_scope:midi.MTrack)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MBar > bars_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > resample_bars_;
  ::PROTOBUF_NAMESPACE_ID::int32 instrument_;
  ::PROTOBUF_NAMESPACE_ID::int32 density_;
  ::PROTOBUF_NAMESPACE_ID::int32 type_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class MPiece PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.MPiece) */ {
 public:
  inline MPiece() : MPiece(nullptr) {}
  virtual ~MPiece();

  MPiece(const MPiece& from);
  MPiece(MPiece&& from) noexcept
    : MPiece() {
    *this = ::std::move(from);
  }

  inline MPiece& operator=(const MPiece& from) {
    CopyFrom(from);
    return *this;
  }
  inline MPiece& operator=(MPiece&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const MPiece& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const MPiece* internal_default_instance() {
    return reinterpret_cast<const MPiece*>(
               &_MPiece_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    11;

  friend void swap(MPiece& a, MPiece& b) {
    a.Swap(&b);
  }
  inline void Swap(MPiece* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(MPiece* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline MPiece* New() const final {
    return CreateMaybeMessage<MPiece>(nullptr);
  }

  MPiece* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<MPiece>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const MPiece& from);
  void MergeFrom(const MPiece& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(MPiece* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.MPiece";
  }
  protected:
  explicit MPiece(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kTracksFieldNumber = 1,
    kEventsFieldNumber = 2,
  };
  // repeated .midi.MTrack tracks = 1;
  int tracks_size() const;
  private:
  int _internal_tracks_size() const;
  public:
  void clear_tracks();
  ::midi::MTrack* mutable_tracks(int index);
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MTrack >*
      mutable_tracks();
  private:
  const ::midi::MTrack& _internal_tracks(int index) const;
  ::midi::MTrack* _internal_add_tracks();
  public:
  const ::midi::MTrack& tracks(int index) const;
  ::midi::MTrack* add_tracks();
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MTrack >&
      tracks() const;

  // repeated .midi.MEvent events = 2;
  int events_size() const;
  private:
  int _internal_events_size() const;
  public:
  void clear_events();
  ::midi::MEvent* mutable_events(int index);
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MEvent >*
      mutable_events();
  private:
  const ::midi::MEvent& _internal_events(int index) const;
  ::midi::MEvent* _internal_add_events();
  public:
  const ::midi::MEvent& events(int index) const;
  ::midi::MEvent* add_events();
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MEvent >&
      events() const;

  // @@protoc_insertion_point(class_scope:midi.MPiece)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MTrack > tracks_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MEvent > events_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class Dataset_Item PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.Dataset.Item) */ {
 public:
  inline Dataset_Item() : Dataset_Item(nullptr) {}
  virtual ~Dataset_Item();

  Dataset_Item(const Dataset_Item& from);
  Dataset_Item(Dataset_Item&& from) noexcept
    : Dataset_Item() {
    *this = ::std::move(from);
  }

  inline Dataset_Item& operator=(const Dataset_Item& from) {
    CopyFrom(from);
    return *this;
  }
  inline Dataset_Item& operator=(Dataset_Item&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const Dataset_Item& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const Dataset_Item* internal_default_instance() {
    return reinterpret_cast<const Dataset_Item*>(
               &_Dataset_Item_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    12;

  friend void swap(Dataset_Item& a, Dataset_Item& b) {
    a.Swap(&b);
  }
  inline void Swap(Dataset_Item* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(Dataset_Item* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline Dataset_Item* New() const final {
    return CreateMaybeMessage<Dataset_Item>(nullptr);
  }

  Dataset_Item* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<Dataset_Item>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const Dataset_Item& from);
  void MergeFrom(const Dataset_Item& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(Dataset_Item* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.Dataset.Item";
  }
  protected:
  explicit Dataset_Item(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  enum : int {
    kStartFieldNumber = 1,
    kEndFieldNumber = 2,
    kSrcSizeFieldNumber = 3,
  };
  // required uint64 start = 1;
  bool has_start() const;
  private:
  bool _internal_has_start() const;
  public:
  void clear_start();
  ::PROTOBUF_NAMESPACE_ID::uint64 start() const;
  void set_start(::PROTOBUF_NAMESPACE_ID::uint64 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::uint64 _internal_start() const;
  void _internal_set_start(::PROTOBUF_NAMESPACE_ID::uint64 value);
  public:

  // required uint64 end = 2;
  bool has_end() const;
  private:
  bool _internal_has_end() const;
  public:
  void clear_end();
  ::PROTOBUF_NAMESPACE_ID::uint64 end() const;
  void set_end(::PROTOBUF_NAMESPACE_ID::uint64 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::uint64 _internal_end() const;
  void _internal_set_end(::PROTOBUF_NAMESPACE_ID::uint64 value);
  public:

  // required uint64 src_size = 3;
  bool has_src_size() const;
  private:
  bool _internal_has_src_size() const;
  public:
  void clear_src_size();
  ::PROTOBUF_NAMESPACE_ID::uint64 src_size() const;
  void set_src_size(::PROTOBUF_NAMESPACE_ID::uint64 value);
  private:
  ::PROTOBUF_NAMESPACE_ID::uint64 _internal_src_size() const;
  void _internal_set_src_size(::PROTOBUF_NAMESPACE_ID::uint64 value);
  public:

  // @@protoc_insertion_point(class_scope:midi.Dataset.Item)
 private:
  class _Internal;

  // helper for ByteSizeLong()
  size_t RequiredFieldsByteSizeFallback() const;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  ::PROTOBUF_NAMESPACE_ID::uint64 start_;
  ::PROTOBUF_NAMESPACE_ID::uint64 end_;
  ::PROTOBUF_NAMESPACE_ID::uint64 src_size_;
  friend struct ::TableStruct_midi_2eproto;
};
// -------------------------------------------------------------------

class Dataset PROTOBUF_FINAL :
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:midi.Dataset) */ {
 public:
  inline Dataset() : Dataset(nullptr) {}
  virtual ~Dataset();

  Dataset(const Dataset& from);
  Dataset(Dataset&& from) noexcept
    : Dataset() {
    *this = ::std::move(from);
  }

  inline Dataset& operator=(const Dataset& from) {
    CopyFrom(from);
    return *this;
  }
  inline Dataset& operator=(Dataset&& from) noexcept {
    if (GetArena() == from.GetArena()) {
      if (this != &from) InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
  }
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  }

  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
    return GetDescriptor();
  }
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
    return GetMetadataStatic().descriptor;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
    return GetMetadataStatic().reflection;
  }
  static const Dataset& default_instance();

  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  static inline const Dataset* internal_default_instance() {
    return reinterpret_cast<const Dataset*>(
               &_Dataset_default_instance_);
  }
  static constexpr int kIndexInFileMessages =
    13;

  friend void swap(Dataset& a, Dataset& b) {
    a.Swap(&b);
  }
  inline void Swap(Dataset* other) {
    if (other == this) return;
    if (GetArena() == other->GetArena()) {
      InternalSwap(other);
    } else {
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(Dataset* other) {
    if (other == this) return;
    GOOGLE_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  inline Dataset* New() const final {
    return CreateMaybeMessage<Dataset>(nullptr);
  }

  Dataset* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
    return CreateMaybeMessage<Dataset>(arena);
  }
  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  void CopyFrom(const Dataset& from);
  void MergeFrom(const Dataset& from);
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  bool IsInitialized() const final;

  size_t ByteSizeLong() const final;
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  int GetCachedSize() const final { return _cached_size_.Get(); }

  private:
  inline void SharedCtor();
  inline void SharedDtor();
  void SetCachedSize(int size) const final;
  void InternalSwap(Dataset* other);
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
    return "midi.Dataset";
  }
  protected:
  explicit Dataset(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  private:
  static void ArenaDtor(void* object);
  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  public:

  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  private:
  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_midi_2eproto);
    return ::descriptor_table_midi_2eproto.file_level_metadata[kIndexInFileMessages];
  }

  public:

  // nested types ----------------------------------------------------

  typedef Dataset_Item Item;

  // accessors -------------------------------------------------------

  enum : int {
    kTrainFieldNumber = 1,
    kValidFieldNumber = 2,
    kTestFieldNumber = 3,
  };
  // repeated .midi.Dataset.Item train = 1;
  int train_size() const;
  private:
  int _internal_train_size() const;
  public:
  void clear_train();
  ::midi::Dataset_Item* mutable_train(int index);
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item >*
      mutable_train();
  private:
  const ::midi::Dataset_Item& _internal_train(int index) const;
  ::midi::Dataset_Item* _internal_add_train();
  public:
  const ::midi::Dataset_Item& train(int index) const;
  ::midi::Dataset_Item* add_train();
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item >&
      train() const;

  // repeated .midi.Dataset.Item valid = 2;
  int valid_size() const;
  private:
  int _internal_valid_size() const;
  public:
  void clear_valid();
  ::midi::Dataset_Item* mutable_valid(int index);
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item >*
      mutable_valid();
  private:
  const ::midi::Dataset_Item& _internal_valid(int index) const;
  ::midi::Dataset_Item* _internal_add_valid();
  public:
  const ::midi::Dataset_Item& valid(int index) const;
  ::midi::Dataset_Item* add_valid();
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item >&
      valid() const;

  // repeated .midi.Dataset.Item test = 3;
  int test_size() const;
  private:
  int _internal_test_size() const;
  public:
  void clear_test();
  ::midi::Dataset_Item* mutable_test(int index);
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item >*
      mutable_test();
  private:
  const ::midi::Dataset_Item& _internal_test(int index) const;
  ::midi::Dataset_Item* _internal_add_test();
  public:
  const ::midi::Dataset_Item& test(int index) const;
  ::midi::Dataset_Item* add_test();
  const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item >&
      test() const;

  // @@protoc_insertion_point(class_scope:midi.Dataset)
 private:
  class _Internal;

  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  typedef void InternalArenaConstructable_;
  typedef void DestructorSkippable_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item > train_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item > valid_;
  ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item > test_;
  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  friend struct ::TableStruct_midi_2eproto;
};
// ===================================================================


// ===================================================================

#ifdef __GNUC__
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif  // __GNUC__
// Note

// optional int32 start = 1;
inline bool Note::_internal_has_start() const {
  bool value = (_has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline bool Note::has_start() const {
  return _internal_has_start();
}
inline void Note::clear_start() {
  start_ = 0;
  _has_bits_[0] &= ~0x00000001u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::_internal_start() const {
  return start_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::start() const {
  // @@protoc_insertion_point(field_get:midi.Note.start)
  return _internal_start();
}
inline void Note::_internal_set_start(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000001u;
  start_ = value;
}
inline void Note::set_start(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_start(value);
  // @@protoc_insertion_point(field_set:midi.Note.start)
}

// optional int32 end = 2;
inline bool Note::_internal_has_end() const {
  bool value = (_has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline bool Note::has_end() const {
  return _internal_has_end();
}
inline void Note::clear_end() {
  end_ = 0;
  _has_bits_[0] &= ~0x00000002u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::_internal_end() const {
  return end_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::end() const {
  // @@protoc_insertion_point(field_get:midi.Note.end)
  return _internal_end();
}
inline void Note::_internal_set_end(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000002u;
  end_ = value;
}
inline void Note::set_end(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_end(value);
  // @@protoc_insertion_point(field_set:midi.Note.end)
}

// optional int32 velocity = 3;
inline bool Note::_internal_has_velocity() const {
  bool value = (_has_bits_[0] & 0x00000004u) != 0;
  return value;
}
inline bool Note::has_velocity() const {
  return _internal_has_velocity();
}
inline void Note::clear_velocity() {
  velocity_ = 0;
  _has_bits_[0] &= ~0x00000004u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::_internal_velocity() const {
  return velocity_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::velocity() const {
  // @@protoc_insertion_point(field_get:midi.Note.velocity)
  return _internal_velocity();
}
inline void Note::_internal_set_velocity(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000004u;
  velocity_ = value;
}
inline void Note::set_velocity(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_velocity(value);
  // @@protoc_insertion_point(field_set:midi.Note.velocity)
}

// optional int32 pitch = 4;
inline bool Note::_internal_has_pitch() const {
  bool value = (_has_bits_[0] & 0x00000008u) != 0;
  return value;
}
inline bool Note::has_pitch() const {
  return _internal_has_pitch();
}
inline void Note::clear_pitch() {
  pitch_ = 0;
  _has_bits_[0] &= ~0x00000008u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::_internal_pitch() const {
  return pitch_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::pitch() const {
  // @@protoc_insertion_point(field_get:midi.Note.pitch)
  return _internal_pitch();
}
inline void Note::_internal_set_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000008u;
  pitch_ = value;
}
inline void Note::set_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_pitch(value);
  // @@protoc_insertion_point(field_set:midi.Note.pitch)
}

// optional int32 instrument = 5;
inline bool Note::_internal_has_instrument() const {
  bool value = (_has_bits_[0] & 0x00000010u) != 0;
  return value;
}
inline bool Note::has_instrument() const {
  return _internal_has_instrument();
}
inline void Note::clear_instrument() {
  instrument_ = 0;
  _has_bits_[0] &= ~0x00000010u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::_internal_instrument() const {
  return instrument_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::instrument() const {
  // @@protoc_insertion_point(field_get:midi.Note.instrument)
  return _internal_instrument();
}
inline void Note::_internal_set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000010u;
  instrument_ = value;
}
inline void Note::set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_instrument(value);
  // @@protoc_insertion_point(field_set:midi.Note.instrument)
}

// optional int32 track = 6;
inline bool Note::_internal_has_track() const {
  bool value = (_has_bits_[0] & 0x00000020u) != 0;
  return value;
}
inline bool Note::has_track() const {
  return _internal_has_track();
}
inline void Note::clear_track() {
  track_ = 0;
  _has_bits_[0] &= ~0x00000020u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::_internal_track() const {
  return track_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::track() const {
  // @@protoc_insertion_point(field_get:midi.Note.track)
  return _internal_track();
}
inline void Note::_internal_set_track(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000020u;
  track_ = value;
}
inline void Note::set_track(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_track(value);
  // @@protoc_insertion_point(field_set:midi.Note.track)
}

// optional int32 qstart = 7;
inline bool Note::_internal_has_qstart() const {
  bool value = (_has_bits_[0] & 0x00000040u) != 0;
  return value;
}
inline bool Note::has_qstart() const {
  return _internal_has_qstart();
}
inline void Note::clear_qstart() {
  qstart_ = 0;
  _has_bits_[0] &= ~0x00000040u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::_internal_qstart() const {
  return qstart_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::qstart() const {
  // @@protoc_insertion_point(field_get:midi.Note.qstart)
  return _internal_qstart();
}
inline void Note::_internal_set_qstart(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000040u;
  qstart_ = value;
}
inline void Note::set_qstart(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_qstart(value);
  // @@protoc_insertion_point(field_set:midi.Note.qstart)
}

// optional int32 qend = 8;
inline bool Note::_internal_has_qend() const {
  bool value = (_has_bits_[0] & 0x00000080u) != 0;
  return value;
}
inline bool Note::has_qend() const {
  return _internal_has_qend();
}
inline void Note::clear_qend() {
  qend_ = 0;
  _has_bits_[0] &= ~0x00000080u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::_internal_qend() const {
  return qend_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::qend() const {
  // @@protoc_insertion_point(field_get:midi.Note.qend)
  return _internal_qend();
}
inline void Note::_internal_set_qend(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000080u;
  qend_ = value;
}
inline void Note::set_qend(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_qend(value);
  // @@protoc_insertion_point(field_set:midi.Note.qend)
}

// optional int32 bar = 9;
inline bool Note::_internal_has_bar() const {
  bool value = (_has_bits_[0] & 0x00000100u) != 0;
  return value;
}
inline bool Note::has_bar() const {
  return _internal_has_bar();
}
inline void Note::clear_bar() {
  bar_ = 0;
  _has_bits_[0] &= ~0x00000100u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::_internal_bar() const {
  return bar_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Note::bar() const {
  // @@protoc_insertion_point(field_get:midi.Note.bar)
  return _internal_bar();
}
inline void Note::_internal_set_bar(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000100u;
  bar_ = value;
}
inline void Note::set_bar(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_bar(value);
  // @@protoc_insertion_point(field_set:midi.Note.bar)
}

// optional bool is_drum = 10;
inline bool Note::_internal_has_is_drum() const {
  bool value = (_has_bits_[0] & 0x00000200u) != 0;
  return value;
}
inline bool Note::has_is_drum() const {
  return _internal_has_is_drum();
}
inline void Note::clear_is_drum() {
  is_drum_ = false;
  _has_bits_[0] &= ~0x00000200u;
}
inline bool Note::_internal_is_drum() const {
  return is_drum_;
}
inline bool Note::is_drum() const {
  // @@protoc_insertion_point(field_get:midi.Note.is_drum)
  return _internal_is_drum();
}
inline void Note::_internal_set_is_drum(bool value) {
  _has_bits_[0] |= 0x00000200u;
  is_drum_ = value;
}
inline void Note::set_is_drum(bool value) {
  _internal_set_is_drum(value);
  // @@protoc_insertion_point(field_set:midi.Note.is_drum)
}

// -------------------------------------------------------------------

// Event

// optional int32 time = 1;
inline bool Event::_internal_has_time() const {
  bool value = (_has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline bool Event::has_time() const {
  return _internal_has_time();
}
inline void Event::clear_time() {
  time_ = 0;
  _has_bits_[0] &= ~0x00000001u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::_internal_time() const {
  return time_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::time() const {
  // @@protoc_insertion_point(field_get:midi.Event.time)
  return _internal_time();
}
inline void Event::_internal_set_time(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000001u;
  time_ = value;
}
inline void Event::set_time(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_time(value);
  // @@protoc_insertion_point(field_set:midi.Event.time)
}

// optional int32 velocity = 2;
inline bool Event::_internal_has_velocity() const {
  bool value = (_has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline bool Event::has_velocity() const {
  return _internal_has_velocity();
}
inline void Event::clear_velocity() {
  velocity_ = 0;
  _has_bits_[0] &= ~0x00000002u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::_internal_velocity() const {
  return velocity_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::velocity() const {
  // @@protoc_insertion_point(field_get:midi.Event.velocity)
  return _internal_velocity();
}
inline void Event::_internal_set_velocity(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000002u;
  velocity_ = value;
}
inline void Event::set_velocity(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_velocity(value);
  // @@protoc_insertion_point(field_set:midi.Event.velocity)
}

// optional int32 pitch = 3;
inline bool Event::_internal_has_pitch() const {
  bool value = (_has_bits_[0] & 0x00000004u) != 0;
  return value;
}
inline bool Event::has_pitch() const {
  return _internal_has_pitch();
}
inline void Event::clear_pitch() {
  pitch_ = 0;
  _has_bits_[0] &= ~0x00000004u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::_internal_pitch() const {
  return pitch_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::pitch() const {
  // @@protoc_insertion_point(field_get:midi.Event.pitch)
  return _internal_pitch();
}
inline void Event::_internal_set_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000004u;
  pitch_ = value;
}
inline void Event::set_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_pitch(value);
  // @@protoc_insertion_point(field_set:midi.Event.pitch)
}

// optional int32 instrument = 4;
inline bool Event::_internal_has_instrument() const {
  bool value = (_has_bits_[0] & 0x00000008u) != 0;
  return value;
}
inline bool Event::has_instrument() const {
  return _internal_has_instrument();
}
inline void Event::clear_instrument() {
  instrument_ = 0;
  _has_bits_[0] &= ~0x00000008u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::_internal_instrument() const {
  return instrument_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::instrument() const {
  // @@protoc_insertion_point(field_get:midi.Event.instrument)
  return _internal_instrument();
}
inline void Event::_internal_set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000008u;
  instrument_ = value;
}
inline void Event::set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_instrument(value);
  // @@protoc_insertion_point(field_set:midi.Event.instrument)
}

// optional int32 track = 5;
inline bool Event::_internal_has_track() const {
  bool value = (_has_bits_[0] & 0x00000010u) != 0;
  return value;
}
inline bool Event::has_track() const {
  return _internal_has_track();
}
inline void Event::clear_track() {
  track_ = 0;
  _has_bits_[0] &= ~0x00000010u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::_internal_track() const {
  return track_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::track() const {
  // @@protoc_insertion_point(field_get:midi.Event.track)
  return _internal_track();
}
inline void Event::_internal_set_track(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000010u;
  track_ = value;
}
inline void Event::set_track(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_track(value);
  // @@protoc_insertion_point(field_set:midi.Event.track)
}

// optional int32 qtime = 6;
inline bool Event::_internal_has_qtime() const {
  bool value = (_has_bits_[0] & 0x00000020u) != 0;
  return value;
}
inline bool Event::has_qtime() const {
  return _internal_has_qtime();
}
inline void Event::clear_qtime() {
  qtime_ = 0;
  _has_bits_[0] &= ~0x00000020u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::_internal_qtime() const {
  return qtime_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::qtime() const {
  // @@protoc_insertion_point(field_get:midi.Event.qtime)
  return _internal_qtime();
}
inline void Event::_internal_set_qtime(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000020u;
  qtime_ = value;
}
inline void Event::set_qtime(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_qtime(value);
  // @@protoc_insertion_point(field_set:midi.Event.qtime)
}

// optional int32 bar = 7;
inline bool Event::_internal_has_bar() const {
  bool value = (_has_bits_[0] & 0x00000040u) != 0;
  return value;
}
inline bool Event::has_bar() const {
  return _internal_has_bar();
}
inline void Event::clear_bar() {
  bar_ = 0;
  _has_bits_[0] &= ~0x00000040u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::_internal_bar() const {
  return bar_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::bar() const {
  // @@protoc_insertion_point(field_get:midi.Event.bar)
  return _internal_bar();
}
inline void Event::_internal_set_bar(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000040u;
  bar_ = value;
}
inline void Event::set_bar(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_bar(value);
  // @@protoc_insertion_point(field_set:midi.Event.bar)
}

// optional bool is_drum = 8;
inline bool Event::_internal_has_is_drum() const {
  bool value = (_has_bits_[0] & 0x00000080u) != 0;
  return value;
}
inline bool Event::has_is_drum() const {
  return _internal_has_is_drum();
}
inline void Event::clear_is_drum() {
  is_drum_ = false;
  _has_bits_[0] &= ~0x00000080u;
}
inline bool Event::_internal_is_drum() const {
  return is_drum_;
}
inline bool Event::is_drum() const {
  // @@protoc_insertion_point(field_get:midi.Event.is_drum)
  return _internal_is_drum();
}
inline void Event::_internal_set_is_drum(bool value) {
  _has_bits_[0] |= 0x00000080u;
  is_drum_ = value;
}
inline void Event::set_is_drum(bool value) {
  _internal_set_is_drum(value);
  // @@protoc_insertion_point(field_set:midi.Event.is_drum)
}

// optional bool should_prune = 9;
inline bool Event::_internal_has_should_prune() const {
  bool value = (_has_bits_[0] & 0x00000100u) != 0;
  return value;
}
inline bool Event::has_should_prune() const {
  return _internal_has_should_prune();
}
inline void Event::clear_should_prune() {
  should_prune_ = false;
  _has_bits_[0] &= ~0x00000100u;
}
inline bool Event::_internal_should_prune() const {
  return should_prune_;
}
inline bool Event::should_prune() const {
  // @@protoc_insertion_point(field_get:midi.Event.should_prune)
  return _internal_should_prune();
}
inline void Event::_internal_set_should_prune(bool value) {
  _has_bits_[0] |= 0x00000100u;
  should_prune_ = value;
}
inline void Event::set_should_prune(bool value) {
  _internal_set_should_prune(value);
  // @@protoc_insertion_point(field_set:midi.Event.should_prune)
}

// optional int32 track_type = 10;
inline bool Event::_internal_has_track_type() const {
  bool value = (_has_bits_[0] & 0x00000200u) != 0;
  return value;
}
inline bool Event::has_track_type() const {
  return _internal_has_track_type();
}
inline void Event::clear_track_type() {
  track_type_ = 0;
  _has_bits_[0] &= ~0x00000200u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::_internal_track_type() const {
  return track_type_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Event::track_type() const {
  // @@protoc_insertion_point(field_get:midi.Event.track_type)
  return _internal_track_type();
}
inline void Event::_internal_set_track_type(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000200u;
  track_type_ = value;
}
inline void Event::set_track_type(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_track_type(value);
  // @@protoc_insertion_point(field_set:midi.Event.track_type)
}

// -------------------------------------------------------------------

// Bar

// repeated int32 events = 1;
inline int Bar::_internal_events_size() const {
  return events_.size();
}
inline int Bar::events_size() const {
  return _internal_events_size();
}
inline void Bar::clear_events() {
  events_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Bar::_internal_events(int index) const {
  return events_.Get(index);
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Bar::events(int index) const {
  // @@protoc_insertion_point(field_get:midi.Bar.events)
  return _internal_events(index);
}
inline void Bar::set_events(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) {
  events_.Set(index, value);
  // @@protoc_insertion_point(field_set:midi.Bar.events)
}
inline void Bar::_internal_add_events(::PROTOBUF_NAMESPACE_ID::int32 value) {
  events_.Add(value);
}
inline void Bar::add_events(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_add_events(value);
  // @@protoc_insertion_point(field_add:midi.Bar.events)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
Bar::_internal_events() const {
  return events_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
Bar::events() const {
  // @@protoc_insertion_point(field_list:midi.Bar.events)
  return _internal_events();
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
Bar::_internal_mutable_events() {
  return &events_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
Bar::mutable_events() {
  // @@protoc_insertion_point(field_mutable_list:midi.Bar.events)
  return _internal_mutable_events();
}

// optional bool is_four_four = 2;
inline bool Bar::_internal_has_is_four_four() const {
  bool value = (_has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline bool Bar::has_is_four_four() const {
  return _internal_has_is_four_four();
}
inline void Bar::clear_is_four_four() {
  is_four_four_ = false;
  _has_bits_[0] &= ~0x00000002u;
}
inline bool Bar::_internal_is_four_four() const {
  return is_four_four_;
}
inline bool Bar::is_four_four() const {
  // @@protoc_insertion_point(field_get:midi.Bar.is_four_four)
  return _internal_is_four_four();
}
inline void Bar::_internal_set_is_four_four(bool value) {
  _has_bits_[0] |= 0x00000002u;
  is_four_four_ = value;
}
inline void Bar::set_is_four_four(bool value) {
  _internal_set_is_four_four(value);
  // @@protoc_insertion_point(field_set:midi.Bar.is_four_four)
}

// optional bool has_notes = 3;
inline bool Bar::_internal_has_has_notes() const {
  bool value = (_has_bits_[0] & 0x00000004u) != 0;
  return value;
}
inline bool Bar::has_has_notes() const {
  return _internal_has_has_notes();
}
inline void Bar::clear_has_notes() {
  has_notes_ = false;
  _has_bits_[0] &= ~0x00000004u;
}
inline bool Bar::_internal_has_notes() const {
  return has_notes_;
}
inline bool Bar::has_notes() const {
  // @@protoc_insertion_point(field_get:midi.Bar.has_notes)
  return _internal_has_notes();
}
inline void Bar::_internal_set_has_notes(bool value) {
  _has_bits_[0] |= 0x00000004u;
  has_notes_ = value;
}
inline void Bar::set_has_notes(bool value) {
  _internal_set_has_notes(value);
  // @@protoc_insertion_point(field_set:midi.Bar.has_notes)
}

// optional int32 time = 4;
inline bool Bar::_internal_has_time() const {
  bool value = (_has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline bool Bar::has_time() const {
  return _internal_has_time();
}
inline void Bar::clear_time() {
  time_ = 0;
  _has_bits_[0] &= ~0x00000001u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Bar::_internal_time() const {
  return time_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Bar::time() const {
  // @@protoc_insertion_point(field_get:midi.Bar.time)
  return _internal_time();
}
inline void Bar::_internal_set_time(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000001u;
  time_ = value;
}
inline void Bar::set_time(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_time(value);
  // @@protoc_insertion_point(field_set:midi.Bar.time)
}

// optional float beat_length = 5;
inline bool Bar::_internal_has_beat_length() const {
  bool value = (_has_bits_[0] & 0x00000020u) != 0;
  return value;
}
inline bool Bar::has_beat_length() const {
  return _internal_has_beat_length();
}
inline void Bar::clear_beat_length() {
  beat_length_ = 0;
  _has_bits_[0] &= ~0x00000020u;
}
inline float Bar::_internal_beat_length() const {
  return beat_length_;
}
inline float Bar::beat_length() const {
  // @@protoc_insertion_point(field_get:midi.Bar.beat_length)
  return _internal_beat_length();
}
inline void Bar::_internal_set_beat_length(float value) {
  _has_bits_[0] |= 0x00000020u;
  beat_length_ = value;
}
inline void Bar::set_beat_length(float value) {
  _internal_set_beat_length(value);
  // @@protoc_insertion_point(field_set:midi.Bar.beat_length)
}

// optional bool should_prune = 6;
inline bool Bar::_internal_has_should_prune() const {
  bool value = (_has_bits_[0] & 0x00000008u) != 0;
  return value;
}
inline bool Bar::has_should_prune() const {
  return _internal_has_should_prune();
}
inline void Bar::clear_should_prune() {
  should_prune_ = false;
  _has_bits_[0] &= ~0x00000008u;
}
inline bool Bar::_internal_should_prune() const {
  return should_prune_;
}
inline bool Bar::should_prune() const {
  // @@protoc_insertion_point(field_get:midi.Bar.should_prune)
  return _internal_should_prune();
}
inline void Bar::_internal_set_should_prune(bool value) {
  _has_bits_[0] |= 0x00000008u;
  should_prune_ = value;
}
inline void Bar::set_should_prune(bool value) {
  _internal_set_should_prune(value);
  // @@protoc_insertion_point(field_set:midi.Bar.should_prune)
}

// optional bool is_drum = 7;
inline bool Bar::_internal_has_is_drum() const {
  bool value = (_has_bits_[0] & 0x00000010u) != 0;
  return value;
}
inline bool Bar::has_is_drum() const {
  return _internal_has_is_drum();
}
inline void Bar::clear_is_drum() {
  is_drum_ = false;
  _has_bits_[0] &= ~0x00000010u;
}
inline bool Bar::_internal_is_drum() const {
  return is_drum_;
}
inline bool Bar::is_drum() const {
  // @@protoc_insertion_point(field_get:midi.Bar.is_drum)
  return _internal_is_drum();
}
inline void Bar::_internal_set_is_drum(bool value) {
  _has_bits_[0] |= 0x00000010u;
  is_drum_ = value;
}
inline void Bar::set_is_drum(bool value) {
  _internal_set_is_drum(value);
  // @@protoc_insertion_point(field_set:midi.Bar.is_drum)
}

// -------------------------------------------------------------------

// Track

// repeated .midi.Bar bars = 1;
inline int Track::_internal_bars_size() const {
  return bars_.size();
}
inline int Track::bars_size() const {
  return _internal_bars_size();
}
inline void Track::clear_bars() {
  bars_.Clear();
}
inline ::midi::Bar* Track::mutable_bars(int index) {
  // @@protoc_insertion_point(field_mutable:midi.Track.bars)
  return bars_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Bar >*
Track::mutable_bars() {
  // @@protoc_insertion_point(field_mutable_list:midi.Track.bars)
  return &bars_;
}
inline const ::midi::Bar& Track::_internal_bars(int index) const {
  return bars_.Get(index);
}
inline const ::midi::Bar& Track::bars(int index) const {
  // @@protoc_insertion_point(field_get:midi.Track.bars)
  return _internal_bars(index);
}
inline ::midi::Bar* Track::_internal_add_bars() {
  return bars_.Add();
}
inline ::midi::Bar* Track::add_bars() {
  // @@protoc_insertion_point(field_add:midi.Track.bars)
  return _internal_add_bars();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Bar >&
Track::bars() const {
  // @@protoc_insertion_point(field_list:midi.Track.bars)
  return bars_;
}

// optional bool is_drum = 2;
inline bool Track::_internal_has_is_drum() const {
  bool value = (_has_bits_[0] & 0x00000020u) != 0;
  return value;
}
inline bool Track::has_is_drum() const {
  return _internal_has_is_drum();
}
inline void Track::clear_is_drum() {
  is_drum_ = false;
  _has_bits_[0] &= ~0x00000020u;
}
inline bool Track::_internal_is_drum() const {
  return is_drum_;
}
inline bool Track::is_drum() const {
  // @@protoc_insertion_point(field_get:midi.Track.is_drum)
  return _internal_is_drum();
}
inline void Track::_internal_set_is_drum(bool value) {
  _has_bits_[0] |= 0x00000020u;
  is_drum_ = value;
}
inline void Track::set_is_drum(bool value) {
  _internal_set_is_drum(value);
  // @@protoc_insertion_point(field_set:midi.Track.is_drum)
}

// optional int32 min_pitch = 3;
inline bool Track::_internal_has_min_pitch() const {
  bool value = (_has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline bool Track::has_min_pitch() const {
  return _internal_has_min_pitch();
}
inline void Track::clear_min_pitch() {
  min_pitch_ = 0;
  _has_bits_[0] &= ~0x00000001u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::_internal_min_pitch() const {
  return min_pitch_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::min_pitch() const {
  // @@protoc_insertion_point(field_get:midi.Track.min_pitch)
  return _internal_min_pitch();
}
inline void Track::_internal_set_min_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000001u;
  min_pitch_ = value;
}
inline void Track::set_min_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_min_pitch(value);
  // @@protoc_insertion_point(field_set:midi.Track.min_pitch)
}

// optional int32 max_pitch = 4;
inline bool Track::_internal_has_max_pitch() const {
  bool value = (_has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline bool Track::has_max_pitch() const {
  return _internal_has_max_pitch();
}
inline void Track::clear_max_pitch() {
  max_pitch_ = 0;
  _has_bits_[0] &= ~0x00000002u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::_internal_max_pitch() const {
  return max_pitch_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::max_pitch() const {
  // @@protoc_insertion_point(field_get:midi.Track.max_pitch)
  return _internal_max_pitch();
}
inline void Track::_internal_set_max_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000002u;
  max_pitch_ = value;
}
inline void Track::set_max_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_max_pitch(value);
  // @@protoc_insertion_point(field_set:midi.Track.max_pitch)
}

// optional int32 instrument = 5;
inline bool Track::_internal_has_instrument() const {
  bool value = (_has_bits_[0] & 0x00000004u) != 0;
  return value;
}
inline bool Track::has_instrument() const {
  return _internal_has_instrument();
}
inline void Track::clear_instrument() {
  instrument_ = 0;
  _has_bits_[0] &= ~0x00000004u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::_internal_instrument() const {
  return instrument_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::instrument() const {
  // @@protoc_insertion_point(field_get:midi.Track.instrument)
  return _internal_instrument();
}
inline void Track::_internal_set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000004u;
  instrument_ = value;
}
inline void Track::set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_instrument(value);
  // @@protoc_insertion_point(field_set:midi.Track.instrument)
}

// optional float av_polyphony = 6;
inline bool Track::_internal_has_av_polyphony() const {
  bool value = (_has_bits_[0] & 0x00000008u) != 0;
  return value;
}
inline bool Track::has_av_polyphony() const {
  return _internal_has_av_polyphony();
}
inline void Track::clear_av_polyphony() {
  av_polyphony_ = 0;
  _has_bits_[0] &= ~0x00000008u;
}
inline float Track::_internal_av_polyphony() const {
  return av_polyphony_;
}
inline float Track::av_polyphony() const {
  // @@protoc_insertion_point(field_get:midi.Track.av_polyphony)
  return _internal_av_polyphony();
}
inline void Track::_internal_set_av_polyphony(float value) {
  _has_bits_[0] |= 0x00000008u;
  av_polyphony_ = value;
}
inline void Track::set_av_polyphony(float value) {
  _internal_set_av_polyphony(value);
  // @@protoc_insertion_point(field_set:midi.Track.av_polyphony)
}

// optional int32 note_density = 7;
inline bool Track::_internal_has_note_density() const {
  bool value = (_has_bits_[0] & 0x00000010u) != 0;
  return value;
}
inline bool Track::has_note_density() const {
  return _internal_has_note_density();
}
inline void Track::clear_note_density() {
  note_density_ = 0;
  _has_bits_[0] &= ~0x00000010u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::_internal_note_density() const {
  return note_density_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::note_density() const {
  // @@protoc_insertion_point(field_get:midi.Track.note_density)
  return _internal_note_density();
}
inline void Track::_internal_set_note_density(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000010u;
  note_density_ = value;
}
inline void Track::set_note_density(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_note_density(value);
  // @@protoc_insertion_point(field_set:midi.Track.note_density)
}

// optional int32 note_density_v2 = 8;
inline bool Track::_internal_has_note_density_v2() const {
  bool value = (_has_bits_[0] & 0x00000080u) != 0;
  return value;
}
inline bool Track::has_note_density_v2() const {
  return _internal_has_note_density_v2();
}
inline void Track::clear_note_density_v2() {
  note_density_v2_ = 0;
  _has_bits_[0] &= ~0x00000080u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::_internal_note_density_v2() const {
  return note_density_v2_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::note_density_v2() const {
  // @@protoc_insertion_point(field_get:midi.Track.note_density_v2)
  return _internal_note_density_v2();
}
inline void Track::_internal_set_note_density_v2(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000080u;
  note_density_v2_ = value;
}
inline void Track::set_note_density_v2(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_note_density_v2(value);
  // @@protoc_insertion_point(field_set:midi.Track.note_density_v2)
}

// optional int32 te_track = 9;
inline bool Track::_internal_has_te_track() const {
  bool value = (_has_bits_[0] & 0x00000100u) != 0;
  return value;
}
inline bool Track::has_te_track() const {
  return _internal_has_te_track();
}
inline void Track::clear_te_track() {
  te_track_ = 0;
  _has_bits_[0] &= ~0x00000100u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::_internal_te_track() const {
  return te_track_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::te_track() const {
  // @@protoc_insertion_point(field_get:midi.Track.te_track)
  return _internal_te_track();
}
inline void Track::_internal_set_te_track(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000100u;
  te_track_ = value;
}
inline void Track::set_te_track(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_te_track(value);
  // @@protoc_insertion_point(field_set:midi.Track.te_track)
}

// optional int32 max_polyphony = 10;
inline bool Track::_internal_has_max_polyphony() const {
  bool value = (_has_bits_[0] & 0x00000200u) != 0;
  return value;
}
inline bool Track::has_max_polyphony() const {
  return _internal_has_max_polyphony();
}
inline void Track::clear_max_polyphony() {
  max_polyphony_ = 0;
  _has_bits_[0] &= ~0x00000200u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::_internal_max_polyphony() const {
  return max_polyphony_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::max_polyphony() const {
  // @@protoc_insertion_point(field_get:midi.Track.max_polyphony)
  return _internal_max_polyphony();
}
inline void Track::_internal_set_max_polyphony(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000200u;
  max_polyphony_ = value;
}
inline void Track::set_max_polyphony(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_max_polyphony(value);
  // @@protoc_insertion_point(field_set:midi.Track.max_polyphony)
}

// optional int32 type = 11;
inline bool Track::_internal_has_type() const {
  bool value = (_has_bits_[0] & 0x00000400u) != 0;
  return value;
}
inline bool Track::has_type() const {
  return _internal_has_type();
}
inline void Track::clear_type() {
  type_ = 0;
  _has_bits_[0] &= ~0x00000400u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::_internal_type() const {
  return type_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::type() const {
  // @@protoc_insertion_point(field_get:midi.Track.type)
  return _internal_type();
}
inline void Track::_internal_set_type(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000400u;
  type_ = value;
}
inline void Track::set_type(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_type(value);
  // @@protoc_insertion_point(field_set:midi.Track.type)
}

// optional bool should_prune = 12;
inline bool Track::_internal_has_should_prune() const {
  bool value = (_has_bits_[0] & 0x00000040u) != 0;
  return value;
}
inline bool Track::has_should_prune() const {
  return _internal_has_should_prune();
}
inline void Track::clear_should_prune() {
  should_prune_ = false;
  _has_bits_[0] &= ~0x00000040u;
}
inline bool Track::_internal_should_prune() const {
  return should_prune_;
}
inline bool Track::should_prune() const {
  // @@protoc_insertion_point(field_get:midi.Track.should_prune)
  return _internal_should_prune();
}
inline void Track::_internal_set_should_prune(bool value) {
  _has_bits_[0] |= 0x00000040u;
  should_prune_ = value;
}
inline void Track::set_should_prune(bool value) {
  _internal_set_should_prune(value);
  // @@protoc_insertion_point(field_set:midi.Track.should_prune)
}

// optional int32 order = 13;
inline bool Track::_internal_has_order() const {
  bool value = (_has_bits_[0] & 0x00000800u) != 0;
  return value;
}
inline bool Track::has_order() const {
  return _internal_has_order();
}
inline void Track::clear_order() {
  order_ = 0;
  _has_bits_[0] &= ~0x00000800u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::_internal_order() const {
  return order_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Track::order() const {
  // @@protoc_insertion_point(field_get:midi.Track.order)
  return _internal_order();
}
inline void Track::_internal_set_order(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000800u;
  order_ = value;
}
inline void Track::set_order(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_order(value);
  // @@protoc_insertion_point(field_set:midi.Track.order)
}

// -------------------------------------------------------------------

// ValidTrack

// repeated int32 tracks = 1;
inline int ValidTrack::_internal_tracks_size() const {
  return tracks_.size();
}
inline int ValidTrack::tracks_size() const {
  return _internal_tracks_size();
}
inline void ValidTrack::clear_tracks() {
  tracks_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::int32 ValidTrack::_internal_tracks(int index) const {
  return tracks_.Get(index);
}
inline ::PROTOBUF_NAMESPACE_ID::int32 ValidTrack::tracks(int index) const {
  // @@protoc_insertion_point(field_get:midi.ValidTrack.tracks)
  return _internal_tracks(index);
}
inline void ValidTrack::set_tracks(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) {
  tracks_.Set(index, value);
  // @@protoc_insertion_point(field_set:midi.ValidTrack.tracks)
}
inline void ValidTrack::_internal_add_tracks(::PROTOBUF_NAMESPACE_ID::int32 value) {
  tracks_.Add(value);
}
inline void ValidTrack::add_tracks(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_add_tracks(value);
  // @@protoc_insertion_point(field_add:midi.ValidTrack.tracks)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
ValidTrack::_internal_tracks() const {
  return tracks_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
ValidTrack::tracks() const {
  // @@protoc_insertion_point(field_list:midi.ValidTrack.tracks)
  return _internal_tracks();
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
ValidTrack::_internal_mutable_tracks() {
  return &tracks_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
ValidTrack::mutable_tracks() {
  // @@protoc_insertion_point(field_mutable_list:midi.ValidTrack.tracks)
  return _internal_mutable_tracks();
}

// -------------------------------------------------------------------

// Piece

// repeated .midi.Track tracks = 1;
inline int Piece::_internal_tracks_size() const {
  return tracks_.size();
}
inline int Piece::tracks_size() const {
  return _internal_tracks_size();
}
inline void Piece::clear_tracks() {
  tracks_.Clear();
}
inline ::midi::Track* Piece::mutable_tracks(int index) {
  // @@protoc_insertion_point(field_mutable:midi.Piece.tracks)
  return tracks_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Track >*
Piece::mutable_tracks() {
  // @@protoc_insertion_point(field_mutable_list:midi.Piece.tracks)
  return &tracks_;
}
inline const ::midi::Track& Piece::_internal_tracks(int index) const {
  return tracks_.Get(index);
}
inline const ::midi::Track& Piece::tracks(int index) const {
  // @@protoc_insertion_point(field_get:midi.Piece.tracks)
  return _internal_tracks(index);
}
inline ::midi::Track* Piece::_internal_add_tracks() {
  return tracks_.Add();
}
inline ::midi::Track* Piece::add_tracks() {
  // @@protoc_insertion_point(field_add:midi.Piece.tracks)
  return _internal_add_tracks();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Track >&
Piece::tracks() const {
  // @@protoc_insertion_point(field_list:midi.Piece.tracks)
  return tracks_;
}

// repeated .midi.Event events = 2;
inline int Piece::_internal_events_size() const {
  return events_.size();
}
inline int Piece::events_size() const {
  return _internal_events_size();
}
inline void Piece::clear_events() {
  events_.Clear();
}
inline ::midi::Event* Piece::mutable_events(int index) {
  // @@protoc_insertion_point(field_mutable:midi.Piece.events)
  return events_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Event >*
Piece::mutable_events() {
  // @@protoc_insertion_point(field_mutable_list:midi.Piece.events)
  return &events_;
}
inline const ::midi::Event& Piece::_internal_events(int index) const {
  return events_.Get(index);
}
inline const ::midi::Event& Piece::events(int index) const {
  // @@protoc_insertion_point(field_get:midi.Piece.events)
  return _internal_events(index);
}
inline ::midi::Event* Piece::_internal_add_events() {
  return events_.Add();
}
inline ::midi::Event* Piece::add_events() {
  // @@protoc_insertion_point(field_add:midi.Piece.events)
  return _internal_add_events();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Event >&
Piece::events() const {
  // @@protoc_insertion_point(field_list:midi.Piece.events)
  return events_;
}

// optional int32 resolution = 3;
inline bool Piece::_internal_has_resolution() const {
  bool value = (_has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline bool Piece::has_resolution() const {
  return _internal_has_resolution();
}
inline void Piece::clear_resolution() {
  resolution_ = 0;
  _has_bits_[0] &= ~0x00000001u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Piece::_internal_resolution() const {
  return resolution_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Piece::resolution() const {
  // @@protoc_insertion_point(field_get:midi.Piece.resolution)
  return _internal_resolution();
}
inline void Piece::_internal_set_resolution(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000001u;
  resolution_ = value;
}
inline void Piece::set_resolution(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_resolution(value);
  // @@protoc_insertion_point(field_set:midi.Piece.resolution)
}

// optional int32 tempo = 4;
inline bool Piece::_internal_has_tempo() const {
  bool value = (_has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline bool Piece::has_tempo() const {
  return _internal_has_tempo();
}
inline void Piece::clear_tempo() {
  tempo_ = 0;
  _has_bits_[0] &= ~0x00000002u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Piece::_internal_tempo() const {
  return tempo_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Piece::tempo() const {
  // @@protoc_insertion_point(field_get:midi.Piece.tempo)
  return _internal_tempo();
}
inline void Piece::_internal_set_tempo(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000002u;
  tempo_ = value;
}
inline void Piece::set_tempo(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_tempo(value);
  // @@protoc_insertion_point(field_set:midi.Piece.tempo)
}

// optional int32 min_pitch = 5;
inline bool Piece::_internal_has_min_pitch() const {
  bool value = (_has_bits_[0] & 0x00000004u) != 0;
  return value;
}
inline bool Piece::has_min_pitch() const {
  return _internal_has_min_pitch();
}
inline void Piece::clear_min_pitch() {
  min_pitch_ = 0;
  _has_bits_[0] &= ~0x00000004u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Piece::_internal_min_pitch() const {
  return min_pitch_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Piece::min_pitch() const {
  // @@protoc_insertion_point(field_get:midi.Piece.min_pitch)
  return _internal_min_pitch();
}
inline void Piece::_internal_set_min_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000004u;
  min_pitch_ = value;
}
inline void Piece::set_min_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_min_pitch(value);
  // @@protoc_insertion_point(field_set:midi.Piece.min_pitch)
}

// optional int32 max_pitch = 6;
inline bool Piece::_internal_has_max_pitch() const {
  bool value = (_has_bits_[0] & 0x00000008u) != 0;
  return value;
}
inline bool Piece::has_max_pitch() const {
  return _internal_has_max_pitch();
}
inline void Piece::clear_max_pitch() {
  max_pitch_ = 0;
  _has_bits_[0] &= ~0x00000008u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Piece::_internal_max_pitch() const {
  return max_pitch_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Piece::max_pitch() const {
  // @@protoc_insertion_point(field_get:midi.Piece.max_pitch)
  return _internal_max_pitch();
}
inline void Piece::_internal_set_max_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000008u;
  max_pitch_ = value;
}
inline void Piece::set_max_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_max_pitch(value);
  // @@protoc_insertion_point(field_set:midi.Piece.max_pitch)
}

// repeated int32 valid_segments = 7;
inline int Piece::_internal_valid_segments_size() const {
  return valid_segments_.size();
}
inline int Piece::valid_segments_size() const {
  return _internal_valid_segments_size();
}
inline void Piece::clear_valid_segments() {
  valid_segments_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Piece::_internal_valid_segments(int index) const {
  return valid_segments_.Get(index);
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Piece::valid_segments(int index) const {
  // @@protoc_insertion_point(field_get:midi.Piece.valid_segments)
  return _internal_valid_segments(index);
}
inline void Piece::set_valid_segments(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) {
  valid_segments_.Set(index, value);
  // @@protoc_insertion_point(field_set:midi.Piece.valid_segments)
}
inline void Piece::_internal_add_valid_segments(::PROTOBUF_NAMESPACE_ID::int32 value) {
  valid_segments_.Add(value);
}
inline void Piece::add_valid_segments(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_add_valid_segments(value);
  // @@protoc_insertion_point(field_add:midi.Piece.valid_segments)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
Piece::_internal_valid_segments() const {
  return valid_segments_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
Piece::valid_segments() const {
  // @@protoc_insertion_point(field_list:midi.Piece.valid_segments)
  return _internal_valid_segments();
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
Piece::_internal_mutable_valid_segments() {
  return &valid_segments_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
Piece::mutable_valid_segments() {
  // @@protoc_insertion_point(field_mutable_list:midi.Piece.valid_segments)
  return _internal_mutable_valid_segments();
}

// repeated uint32 valid_tracks = 8;
inline int Piece::_internal_valid_tracks_size() const {
  return valid_tracks_.size();
}
inline int Piece::valid_tracks_size() const {
  return _internal_valid_tracks_size();
}
inline void Piece::clear_valid_tracks() {
  valid_tracks_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::uint32 Piece::_internal_valid_tracks(int index) const {
  return valid_tracks_.Get(index);
}
inline ::PROTOBUF_NAMESPACE_ID::uint32 Piece::valid_tracks(int index) const {
  // @@protoc_insertion_point(field_get:midi.Piece.valid_tracks)
  return _internal_valid_tracks(index);
}
inline void Piece::set_valid_tracks(int index, ::PROTOBUF_NAMESPACE_ID::uint32 value) {
  valid_tracks_.Set(index, value);
  // @@protoc_insertion_point(field_set:midi.Piece.valid_tracks)
}
inline void Piece::_internal_add_valid_tracks(::PROTOBUF_NAMESPACE_ID::uint32 value) {
  valid_tracks_.Add(value);
}
inline void Piece::add_valid_tracks(::PROTOBUF_NAMESPACE_ID::uint32 value) {
  _internal_add_valid_tracks(value);
  // @@protoc_insertion_point(field_add:midi.Piece.valid_tracks)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 >&
Piece::_internal_valid_tracks() const {
  return valid_tracks_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 >&
Piece::valid_tracks() const {
  // @@protoc_insertion_point(field_list:midi.Piece.valid_tracks)
  return _internal_valid_tracks();
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 >*
Piece::_internal_mutable_valid_tracks() {
  return &valid_tracks_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 >*
Piece::mutable_valid_tracks() {
  // @@protoc_insertion_point(field_mutable_list:midi.Piece.valid_tracks)
  return _internal_mutable_valid_tracks();
}

// repeated string msd_cd1 = 9;
inline int Piece::_internal_msd_cd1_size() const {
  return msd_cd1_.size();
}
inline int Piece::msd_cd1_size() const {
  return _internal_msd_cd1_size();
}
inline void Piece::clear_msd_cd1() {
  msd_cd1_.Clear();
}
inline std::string* Piece::add_msd_cd1() {
  // @@protoc_insertion_point(field_add_mutable:midi.Piece.msd_cd1)
  return _internal_add_msd_cd1();
}
inline const std::string& Piece::_internal_msd_cd1(int index) const {
  return msd_cd1_.Get(index);
}
inline const std::string& Piece::msd_cd1(int index) const {
  // @@protoc_insertion_point(field_get:midi.Piece.msd_cd1)
  return _internal_msd_cd1(index);
}
inline std::string* Piece::mutable_msd_cd1(int index) {
  // @@protoc_insertion_point(field_mutable:midi.Piece.msd_cd1)
  return msd_cd1_.Mutable(index);
}
inline void Piece::set_msd_cd1(int index, const std::string& value) {
  // @@protoc_insertion_point(field_set:midi.Piece.msd_cd1)
  msd_cd1_.Mutable(index)->assign(value);
}
inline void Piece::set_msd_cd1(int index, std::string&& value) {
  // @@protoc_insertion_point(field_set:midi.Piece.msd_cd1)
  msd_cd1_.Mutable(index)->assign(std::move(value));
}
inline void Piece::set_msd_cd1(int index, const char* value) {
  GOOGLE_DCHECK(value != nullptr);
  msd_cd1_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:midi.Piece.msd_cd1)
}
inline void Piece::set_msd_cd1(int index, const char* value, size_t size) {
  msd_cd1_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:midi.Piece.msd_cd1)
}
inline std::string* Piece::_internal_add_msd_cd1() {
  return msd_cd1_.Add();
}
inline void Piece::add_msd_cd1(const std::string& value) {
  msd_cd1_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:midi.Piece.msd_cd1)
}
inline void Piece::add_msd_cd1(std::string&& value) {
  msd_cd1_.Add(std::move(value));
  // @@protoc_insertion_point(field_add:midi.Piece.msd_cd1)
}
inline void Piece::add_msd_cd1(const char* value) {
  GOOGLE_DCHECK(value != nullptr);
  msd_cd1_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:midi.Piece.msd_cd1)
}
inline void Piece::add_msd_cd1(const char* value, size_t size) {
  msd_cd1_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:midi.Piece.msd_cd1)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>&
Piece::msd_cd1() const {
  // @@protoc_insertion_point(field_list:midi.Piece.msd_cd1)
  return msd_cd1_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>*
Piece::mutable_msd_cd1() {
  // @@protoc_insertion_point(field_mutable_list:midi.Piece.msd_cd1)
  return &msd_cd1_;
}

// repeated string msd_cd2 = 10;
inline int Piece::_internal_msd_cd2_size() const {
  return msd_cd2_.size();
}
inline int Piece::msd_cd2_size() const {
  return _internal_msd_cd2_size();
}
inline void Piece::clear_msd_cd2() {
  msd_cd2_.Clear();
}
inline std::string* Piece::add_msd_cd2() {
  // @@protoc_insertion_point(field_add_mutable:midi.Piece.msd_cd2)
  return _internal_add_msd_cd2();
}
inline const std::string& Piece::_internal_msd_cd2(int index) const {
  return msd_cd2_.Get(index);
}
inline const std::string& Piece::msd_cd2(int index) const {
  // @@protoc_insertion_point(field_get:midi.Piece.msd_cd2)
  return _internal_msd_cd2(index);
}
inline std::string* Piece::mutable_msd_cd2(int index) {
  // @@protoc_insertion_point(field_mutable:midi.Piece.msd_cd2)
  return msd_cd2_.Mutable(index);
}
inline void Piece::set_msd_cd2(int index, const std::string& value) {
  // @@protoc_insertion_point(field_set:midi.Piece.msd_cd2)
  msd_cd2_.Mutable(index)->assign(value);
}
inline void Piece::set_msd_cd2(int index, std::string&& value) {
  // @@protoc_insertion_point(field_set:midi.Piece.msd_cd2)
  msd_cd2_.Mutable(index)->assign(std::move(value));
}
inline void Piece::set_msd_cd2(int index, const char* value) {
  GOOGLE_DCHECK(value != nullptr);
  msd_cd2_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:midi.Piece.msd_cd2)
}
inline void Piece::set_msd_cd2(int index, const char* value, size_t size) {
  msd_cd2_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:midi.Piece.msd_cd2)
}
inline std::string* Piece::_internal_add_msd_cd2() {
  return msd_cd2_.Add();
}
inline void Piece::add_msd_cd2(const std::string& value) {
  msd_cd2_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:midi.Piece.msd_cd2)
}
inline void Piece::add_msd_cd2(std::string&& value) {
  msd_cd2_.Add(std::move(value));
  // @@protoc_insertion_point(field_add:midi.Piece.msd_cd2)
}
inline void Piece::add_msd_cd2(const char* value) {
  GOOGLE_DCHECK(value != nullptr);
  msd_cd2_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:midi.Piece.msd_cd2)
}
inline void Piece::add_msd_cd2(const char* value, size_t size) {
  msd_cd2_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:midi.Piece.msd_cd2)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>&
Piece::msd_cd2() const {
  // @@protoc_insertion_point(field_list:midi.Piece.msd_cd2)
  return msd_cd2_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>*
Piece::mutable_msd_cd2() {
  // @@protoc_insertion_point(field_mutable_list:midi.Piece.msd_cd2)
  return &msd_cd2_;
}

// repeated string msd_cd2c = 11;
inline int Piece::_internal_msd_cd2c_size() const {
  return msd_cd2c_.size();
}
inline int Piece::msd_cd2c_size() const {
  return _internal_msd_cd2c_size();
}
inline void Piece::clear_msd_cd2c() {
  msd_cd2c_.Clear();
}
inline std::string* Piece::add_msd_cd2c() {
  // @@protoc_insertion_point(field_add_mutable:midi.Piece.msd_cd2c)
  return _internal_add_msd_cd2c();
}
inline const std::string& Piece::_internal_msd_cd2c(int index) const {
  return msd_cd2c_.Get(index);
}
inline const std::string& Piece::msd_cd2c(int index) const {
  // @@protoc_insertion_point(field_get:midi.Piece.msd_cd2c)
  return _internal_msd_cd2c(index);
}
inline std::string* Piece::mutable_msd_cd2c(int index) {
  // @@protoc_insertion_point(field_mutable:midi.Piece.msd_cd2c)
  return msd_cd2c_.Mutable(index);
}
inline void Piece::set_msd_cd2c(int index, const std::string& value) {
  // @@protoc_insertion_point(field_set:midi.Piece.msd_cd2c)
  msd_cd2c_.Mutable(index)->assign(value);
}
inline void Piece::set_msd_cd2c(int index, std::string&& value) {
  // @@protoc_insertion_point(field_set:midi.Piece.msd_cd2c)
  msd_cd2c_.Mutable(index)->assign(std::move(value));
}
inline void Piece::set_msd_cd2c(int index, const char* value) {
  GOOGLE_DCHECK(value != nullptr);
  msd_cd2c_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:midi.Piece.msd_cd2c)
}
inline void Piece::set_msd_cd2c(int index, const char* value, size_t size) {
  msd_cd2c_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:midi.Piece.msd_cd2c)
}
inline std::string* Piece::_internal_add_msd_cd2c() {
  return msd_cd2c_.Add();
}
inline void Piece::add_msd_cd2c(const std::string& value) {
  msd_cd2c_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:midi.Piece.msd_cd2c)
}
inline void Piece::add_msd_cd2c(std::string&& value) {
  msd_cd2c_.Add(std::move(value));
  // @@protoc_insertion_point(field_add:midi.Piece.msd_cd2c)
}
inline void Piece::add_msd_cd2c(const char* value) {
  GOOGLE_DCHECK(value != nullptr);
  msd_cd2c_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:midi.Piece.msd_cd2c)
}
inline void Piece::add_msd_cd2c(const char* value, size_t size) {
  msd_cd2c_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:midi.Piece.msd_cd2c)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>&
Piece::msd_cd2c() const {
  // @@protoc_insertion_point(field_list:midi.Piece.msd_cd2c)
  return msd_cd2c_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>*
Piece::mutable_msd_cd2c() {
  // @@protoc_insertion_point(field_mutable_list:midi.Piece.msd_cd2c)
  return &msd_cd2c_;
}

// optional int32 segment_length = 12;
inline bool Piece::_internal_has_segment_length() const {
  bool value = (_has_bits_[0] & 0x00000010u) != 0;
  return value;
}
inline bool Piece::has_segment_length() const {
  return _internal_has_segment_length();
}
inline void Piece::clear_segment_length() {
  segment_length_ = 0;
  _has_bits_[0] &= ~0x00000010u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Piece::_internal_segment_length() const {
  return segment_length_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 Piece::segment_length() const {
  // @@protoc_insertion_point(field_get:midi.Piece.segment_length)
  return _internal_segment_length();
}
inline void Piece::_internal_set_segment_length(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000010u;
  segment_length_ = value;
}
inline void Piece::set_segment_length(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_segment_length(value);
  // @@protoc_insertion_point(field_set:midi.Piece.segment_length)
}

// repeated .midi.ValidTrack valid_tracks_v2 = 13;
inline int Piece::_internal_valid_tracks_v2_size() const {
  return valid_tracks_v2_.size();
}
inline int Piece::valid_tracks_v2_size() const {
  return _internal_valid_tracks_v2_size();
}
inline void Piece::clear_valid_tracks_v2() {
  valid_tracks_v2_.Clear();
}
inline ::midi::ValidTrack* Piece::mutable_valid_tracks_v2(int index) {
  // @@protoc_insertion_point(field_mutable:midi.Piece.valid_tracks_v2)
  return valid_tracks_v2_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::ValidTrack >*
Piece::mutable_valid_tracks_v2() {
  // @@protoc_insertion_point(field_mutable_list:midi.Piece.valid_tracks_v2)
  return &valid_tracks_v2_;
}
inline const ::midi::ValidTrack& Piece::_internal_valid_tracks_v2(int index) const {
  return valid_tracks_v2_.Get(index);
}
inline const ::midi::ValidTrack& Piece::valid_tracks_v2(int index) const {
  // @@protoc_insertion_point(field_get:midi.Piece.valid_tracks_v2)
  return _internal_valid_tracks_v2(index);
}
inline ::midi::ValidTrack* Piece::_internal_add_valid_tracks_v2() {
  return valid_tracks_v2_.Add();
}
inline ::midi::ValidTrack* Piece::add_valid_tracks_v2() {
  // @@protoc_insertion_point(field_add:midi.Piece.valid_tracks_v2)
  return _internal_add_valid_tracks_v2();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::ValidTrack >&
Piece::valid_tracks_v2() const {
  // @@protoc_insertion_point(field_list:midi.Piece.valid_tracks_v2)
  return valid_tracks_v2_;
}

// -------------------------------------------------------------------

// StatusTrack

// optional int32 track_id = 1;
inline bool StatusTrack::_internal_has_track_id() const {
  bool value = (_has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline bool StatusTrack::has_track_id() const {
  return _internal_has_track_id();
}
inline void StatusTrack::clear_track_id() {
  track_id_ = 0;
  _has_bits_[0] &= ~0x00000002u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 StatusTrack::_internal_track_id() const {
  return track_id_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 StatusTrack::track_id() const {
  // @@protoc_insertion_point(field_get:midi.StatusTrack.track_id)
  return _internal_track_id();
}
inline void StatusTrack::_internal_set_track_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000002u;
  track_id_ = value;
}
inline void StatusTrack::set_track_id(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_track_id(value);
  // @@protoc_insertion_point(field_set:midi.StatusTrack.track_id)
}

// optional int32 track_type = 2;
inline bool StatusTrack::_internal_has_track_type() const {
  bool value = (_has_bits_[0] & 0x00000004u) != 0;
  return value;
}
inline bool StatusTrack::has_track_type() const {
  return _internal_has_track_type();
}
inline void StatusTrack::clear_track_type() {
  track_type_ = 0;
  _has_bits_[0] &= ~0x00000004u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 StatusTrack::_internal_track_type() const {
  return track_type_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 StatusTrack::track_type() const {
  // @@protoc_insertion_point(field_get:midi.StatusTrack.track_type)
  return _internal_track_type();
}
inline void StatusTrack::_internal_set_track_type(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000004u;
  track_type_ = value;
}
inline void StatusTrack::set_track_type(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_track_type(value);
  // @@protoc_insertion_point(field_set:midi.StatusTrack.track_type)
}

// optional string instrument = 3;
inline bool StatusTrack::_internal_has_instrument() const {
  bool value = (_has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline bool StatusTrack::has_instrument() const {
  return _internal_has_instrument();
}
inline void StatusTrack::clear_instrument() {
  instrument_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  _has_bits_[0] &= ~0x00000001u;
}
inline const std::string& StatusTrack::instrument() const {
  // @@protoc_insertion_point(field_get:midi.StatusTrack.instrument)
  return _internal_instrument();
}
inline void StatusTrack::set_instrument(const std::string& value) {
  _internal_set_instrument(value);
  // @@protoc_insertion_point(field_set:midi.StatusTrack.instrument)
}
inline std::string* StatusTrack::mutable_instrument() {
  // @@protoc_insertion_point(field_mutable:midi.StatusTrack.instrument)
  return _internal_mutable_instrument();
}
inline const std::string& StatusTrack::_internal_instrument() const {
  return instrument_.Get();
}
inline void StatusTrack::_internal_set_instrument(const std::string& value) {
  _has_bits_[0] |= 0x00000001u;
  instrument_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
}
inline void StatusTrack::set_instrument(std::string&& value) {
  _has_bits_[0] |= 0x00000001u;
  instrument_.Set(
    &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
  // @@protoc_insertion_point(field_set_rvalue:midi.StatusTrack.instrument)
}
inline void StatusTrack::set_instrument(const char* value) {
  GOOGLE_DCHECK(value != nullptr);
  _has_bits_[0] |= 0x00000001u;
  instrument_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
              GetArena());
  // @@protoc_insertion_point(field_set_char:midi.StatusTrack.instrument)
}
inline void StatusTrack::set_instrument(const char* value,
    size_t size) {
  _has_bits_[0] |= 0x00000001u;
  instrument_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
      reinterpret_cast<const char*>(value), size), GetArena());
  // @@protoc_insertion_point(field_set_pointer:midi.StatusTrack.instrument)
}
inline std::string* StatusTrack::_internal_mutable_instrument() {
  _has_bits_[0] |= 0x00000001u;
  return instrument_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline std::string* StatusTrack::release_instrument() {
  // @@protoc_insertion_point(field_release:midi.StatusTrack.instrument)
  if (!_internal_has_instrument()) {
    return nullptr;
  }
  _has_bits_[0] &= ~0x00000001u;
  return instrument_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
}
inline void StatusTrack::set_allocated_instrument(std::string* instrument) {
  if (instrument != nullptr) {
    _has_bits_[0] |= 0x00000001u;
  } else {
    _has_bits_[0] &= ~0x00000001u;
  }
  instrument_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), instrument,
      GetArena());
  // @@protoc_insertion_point(field_set_allocated:midi.StatusTrack.instrument)
}

// optional int32 density = 4;
inline bool StatusTrack::_internal_has_density() const {
  bool value = (_has_bits_[0] & 0x00000008u) != 0;
  return value;
}
inline bool StatusTrack::has_density() const {
  return _internal_has_density();
}
inline void StatusTrack::clear_density() {
  density_ = 0;
  _has_bits_[0] &= ~0x00000008u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 StatusTrack::_internal_density() const {
  return density_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 StatusTrack::density() const {
  // @@protoc_insertion_point(field_get:midi.StatusTrack.density)
  return _internal_density();
}
inline void StatusTrack::_internal_set_density(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000008u;
  density_ = value;
}
inline void StatusTrack::set_density(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_density(value);
  // @@protoc_insertion_point(field_set:midi.StatusTrack.density)
}

// repeated bool selected_bars = 5;
inline int StatusTrack::_internal_selected_bars_size() const {
  return selected_bars_.size();
}
inline int StatusTrack::selected_bars_size() const {
  return _internal_selected_bars_size();
}
inline void StatusTrack::clear_selected_bars() {
  selected_bars_.Clear();
}
inline bool StatusTrack::_internal_selected_bars(int index) const {
  return selected_bars_.Get(index);
}
inline bool StatusTrack::selected_bars(int index) const {
  // @@protoc_insertion_point(field_get:midi.StatusTrack.selected_bars)
  return _internal_selected_bars(index);
}
inline void StatusTrack::set_selected_bars(int index, bool value) {
  selected_bars_.Set(index, value);
  // @@protoc_insertion_point(field_set:midi.StatusTrack.selected_bars)
}
inline void StatusTrack::_internal_add_selected_bars(bool value) {
  selected_bars_.Add(value);
}
inline void StatusTrack::add_selected_bars(bool value) {
  _internal_add_selected_bars(value);
  // @@protoc_insertion_point(field_add:midi.StatusTrack.selected_bars)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >&
StatusTrack::_internal_selected_bars() const {
  return selected_bars_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >&
StatusTrack::selected_bars() const {
  // @@protoc_insertion_point(field_list:midi.StatusTrack.selected_bars)
  return _internal_selected_bars();
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >*
StatusTrack::_internal_mutable_selected_bars() {
  return &selected_bars_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >*
StatusTrack::mutable_selected_bars() {
  // @@protoc_insertion_point(field_mutable_list:midi.StatusTrack.selected_bars)
  return _internal_mutable_selected_bars();
}

// -------------------------------------------------------------------

// Status

// repeated .midi.StatusTrack tracks = 1;
inline int Status::_internal_tracks_size() const {
  return tracks_.size();
}
inline int Status::tracks_size() const {
  return _internal_tracks_size();
}
inline void Status::clear_tracks() {
  tracks_.Clear();
}
inline ::midi::StatusTrack* Status::mutable_tracks(int index) {
  // @@protoc_insertion_point(field_mutable:midi.Status.tracks)
  return tracks_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::StatusTrack >*
Status::mutable_tracks() {
  // @@protoc_insertion_point(field_mutable_list:midi.Status.tracks)
  return &tracks_;
}
inline const ::midi::StatusTrack& Status::_internal_tracks(int index) const {
  return tracks_.Get(index);
}
inline const ::midi::StatusTrack& Status::tracks(int index) const {
  // @@protoc_insertion_point(field_get:midi.Status.tracks)
  return _internal_tracks(index);
}
inline ::midi::StatusTrack* Status::_internal_add_tracks() {
  return tracks_.Add();
}
inline ::midi::StatusTrack* Status::add_tracks() {
  // @@protoc_insertion_point(field_add:midi.Status.tracks)
  return _internal_add_tracks();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::StatusTrack >&
Status::tracks() const {
  // @@protoc_insertion_point(field_list:midi.Status.tracks)
  return tracks_;
}

// -------------------------------------------------------------------

// MEvent

// optional int32 time = 1;
inline bool MEvent::_internal_has_time() const {
  bool value = (_has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline bool MEvent::has_time() const {
  return _internal_has_time();
}
inline void MEvent::clear_time() {
  time_ = 0;
  _has_bits_[0] &= ~0x00000001u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MEvent::_internal_time() const {
  return time_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MEvent::time() const {
  // @@protoc_insertion_point(field_get:midi.MEvent.time)
  return _internal_time();
}
inline void MEvent::_internal_set_time(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000001u;
  time_ = value;
}
inline void MEvent::set_time(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_time(value);
  // @@protoc_insertion_point(field_set:midi.MEvent.time)
}

// optional int32 velocity = 2;
inline bool MEvent::_internal_has_velocity() const {
  bool value = (_has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline bool MEvent::has_velocity() const {
  return _internal_has_velocity();
}
inline void MEvent::clear_velocity() {
  velocity_ = 0;
  _has_bits_[0] &= ~0x00000002u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MEvent::_internal_velocity() const {
  return velocity_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MEvent::velocity() const {
  // @@protoc_insertion_point(field_get:midi.MEvent.velocity)
  return _internal_velocity();
}
inline void MEvent::_internal_set_velocity(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000002u;
  velocity_ = value;
}
inline void MEvent::set_velocity(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_velocity(value);
  // @@protoc_insertion_point(field_set:midi.MEvent.velocity)
}

// optional int32 pitch = 3;
inline bool MEvent::_internal_has_pitch() const {
  bool value = (_has_bits_[0] & 0x00000004u) != 0;
  return value;
}
inline bool MEvent::has_pitch() const {
  return _internal_has_pitch();
}
inline void MEvent::clear_pitch() {
  pitch_ = 0;
  _has_bits_[0] &= ~0x00000004u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MEvent::_internal_pitch() const {
  return pitch_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MEvent::pitch() const {
  // @@protoc_insertion_point(field_get:midi.MEvent.pitch)
  return _internal_pitch();
}
inline void MEvent::_internal_set_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000004u;
  pitch_ = value;
}
inline void MEvent::set_pitch(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_pitch(value);
  // @@protoc_insertion_point(field_set:midi.MEvent.pitch)
}

// -------------------------------------------------------------------

// MBar

// repeated int32 events = 1;
inline int MBar::_internal_events_size() const {
  return events_.size();
}
inline int MBar::events_size() const {
  return _internal_events_size();
}
inline void MBar::clear_events() {
  events_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MBar::_internal_events(int index) const {
  return events_.Get(index);
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MBar::events(int index) const {
  // @@protoc_insertion_point(field_get:midi.MBar.events)
  return _internal_events(index);
}
inline void MBar::set_events(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) {
  events_.Set(index, value);
  // @@protoc_insertion_point(field_set:midi.MBar.events)
}
inline void MBar::_internal_add_events(::PROTOBUF_NAMESPACE_ID::int32 value) {
  events_.Add(value);
}
inline void MBar::add_events(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_add_events(value);
  // @@protoc_insertion_point(field_add:midi.MBar.events)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
MBar::_internal_events() const {
  return events_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
MBar::events() const {
  // @@protoc_insertion_point(field_list:midi.MBar.events)
  return _internal_events();
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
MBar::_internal_mutable_events() {
  return &events_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
MBar::mutable_events() {
  // @@protoc_insertion_point(field_mutable_list:midi.MBar.events)
  return _internal_mutable_events();
}

// optional float beat_length = 2;
inline bool MBar::_internal_has_beat_length() const {
  bool value = (_has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline bool MBar::has_beat_length() const {
  return _internal_has_beat_length();
}
inline void MBar::clear_beat_length() {
  beat_length_ = 0;
  _has_bits_[0] &= ~0x00000001u;
}
inline float MBar::_internal_beat_length() const {
  return beat_length_;
}
inline float MBar::beat_length() const {
  // @@protoc_insertion_point(field_get:midi.MBar.beat_length)
  return _internal_beat_length();
}
inline void MBar::_internal_set_beat_length(float value) {
  _has_bits_[0] |= 0x00000001u;
  beat_length_ = value;
}
inline void MBar::set_beat_length(float value) {
  _internal_set_beat_length(value);
  // @@protoc_insertion_point(field_set:midi.MBar.beat_length)
}

// -------------------------------------------------------------------

// MTrack

// repeated .midi.MBar bars = 1;
inline int MTrack::_internal_bars_size() const {
  return bars_.size();
}
inline int MTrack::bars_size() const {
  return _internal_bars_size();
}
inline void MTrack::clear_bars() {
  bars_.Clear();
}
inline ::midi::MBar* MTrack::mutable_bars(int index) {
  // @@protoc_insertion_point(field_mutable:midi.MTrack.bars)
  return bars_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MBar >*
MTrack::mutable_bars() {
  // @@protoc_insertion_point(field_mutable_list:midi.MTrack.bars)
  return &bars_;
}
inline const ::midi::MBar& MTrack::_internal_bars(int index) const {
  return bars_.Get(index);
}
inline const ::midi::MBar& MTrack::bars(int index) const {
  // @@protoc_insertion_point(field_get:midi.MTrack.bars)
  return _internal_bars(index);
}
inline ::midi::MBar* MTrack::_internal_add_bars() {
  return bars_.Add();
}
inline ::midi::MBar* MTrack::add_bars() {
  // @@protoc_insertion_point(field_add:midi.MTrack.bars)
  return _internal_add_bars();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MBar >&
MTrack::bars() const {
  // @@protoc_insertion_point(field_list:midi.MTrack.bars)
  return bars_;
}

// optional int32 instrument = 2;
inline bool MTrack::_internal_has_instrument() const {
  bool value = (_has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline bool MTrack::has_instrument() const {
  return _internal_has_instrument();
}
inline void MTrack::clear_instrument() {
  instrument_ = 0;
  _has_bits_[0] &= ~0x00000001u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MTrack::_internal_instrument() const {
  return instrument_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MTrack::instrument() const {
  // @@protoc_insertion_point(field_get:midi.MTrack.instrument)
  return _internal_instrument();
}
inline void MTrack::_internal_set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000001u;
  instrument_ = value;
}
inline void MTrack::set_instrument(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_instrument(value);
  // @@protoc_insertion_point(field_set:midi.MTrack.instrument)
}

// optional int32 density = 3;
inline bool MTrack::_internal_has_density() const {
  bool value = (_has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline bool MTrack::has_density() const {
  return _internal_has_density();
}
inline void MTrack::clear_density() {
  density_ = 0;
  _has_bits_[0] &= ~0x00000002u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MTrack::_internal_density() const {
  return density_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MTrack::density() const {
  // @@protoc_insertion_point(field_get:midi.MTrack.density)
  return _internal_density();
}
inline void MTrack::_internal_set_density(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000002u;
  density_ = value;
}
inline void MTrack::set_density(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_density(value);
  // @@protoc_insertion_point(field_set:midi.MTrack.density)
}

// optional int32 type = 4;
inline bool MTrack::_internal_has_type() const {
  bool value = (_has_bits_[0] & 0x00000004u) != 0;
  return value;
}
inline bool MTrack::has_type() const {
  return _internal_has_type();
}
inline void MTrack::clear_type() {
  type_ = 0;
  _has_bits_[0] &= ~0x00000004u;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MTrack::_internal_type() const {
  return type_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MTrack::type() const {
  // @@protoc_insertion_point(field_get:midi.MTrack.type)
  return _internal_type();
}
inline void MTrack::_internal_set_type(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _has_bits_[0] |= 0x00000004u;
  type_ = value;
}
inline void MTrack::set_type(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_set_type(value);
  // @@protoc_insertion_point(field_set:midi.MTrack.type)
}

// repeated int32 resample_bars = 5;
inline int MTrack::_internal_resample_bars_size() const {
  return resample_bars_.size();
}
inline int MTrack::resample_bars_size() const {
  return _internal_resample_bars_size();
}
inline void MTrack::clear_resample_bars() {
  resample_bars_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MTrack::_internal_resample_bars(int index) const {
  return resample_bars_.Get(index);
}
inline ::PROTOBUF_NAMESPACE_ID::int32 MTrack::resample_bars(int index) const {
  // @@protoc_insertion_point(field_get:midi.MTrack.resample_bars)
  return _internal_resample_bars(index);
}
inline void MTrack::set_resample_bars(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) {
  resample_bars_.Set(index, value);
  // @@protoc_insertion_point(field_set:midi.MTrack.resample_bars)
}
inline void MTrack::_internal_add_resample_bars(::PROTOBUF_NAMESPACE_ID::int32 value) {
  resample_bars_.Add(value);
}
inline void MTrack::add_resample_bars(::PROTOBUF_NAMESPACE_ID::int32 value) {
  _internal_add_resample_bars(value);
  // @@protoc_insertion_point(field_add:midi.MTrack.resample_bars)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
MTrack::_internal_resample_bars() const {
  return resample_bars_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >&
MTrack::resample_bars() const {
  // @@protoc_insertion_point(field_list:midi.MTrack.resample_bars)
  return _internal_resample_bars();
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
MTrack::_internal_mutable_resample_bars() {
  return &resample_bars_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >*
MTrack::mutable_resample_bars() {
  // @@protoc_insertion_point(field_mutable_list:midi.MTrack.resample_bars)
  return _internal_mutable_resample_bars();
}

// -------------------------------------------------------------------

// MPiece

// repeated .midi.MTrack tracks = 1;
inline int MPiece::_internal_tracks_size() const {
  return tracks_.size();
}
inline int MPiece::tracks_size() const {
  return _internal_tracks_size();
}
inline void MPiece::clear_tracks() {
  tracks_.Clear();
}
inline ::midi::MTrack* MPiece::mutable_tracks(int index) {
  // @@protoc_insertion_point(field_mutable:midi.MPiece.tracks)
  return tracks_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MTrack >*
MPiece::mutable_tracks() {
  // @@protoc_insertion_point(field_mutable_list:midi.MPiece.tracks)
  return &tracks_;
}
inline const ::midi::MTrack& MPiece::_internal_tracks(int index) const {
  return tracks_.Get(index);
}
inline const ::midi::MTrack& MPiece::tracks(int index) const {
  // @@protoc_insertion_point(field_get:midi.MPiece.tracks)
  return _internal_tracks(index);
}
inline ::midi::MTrack* MPiece::_internal_add_tracks() {
  return tracks_.Add();
}
inline ::midi::MTrack* MPiece::add_tracks() {
  // @@protoc_insertion_point(field_add:midi.MPiece.tracks)
  return _internal_add_tracks();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MTrack >&
MPiece::tracks() const {
  // @@protoc_insertion_point(field_list:midi.MPiece.tracks)
  return tracks_;
}

// repeated .midi.MEvent events = 2;
inline int MPiece::_internal_events_size() const {
  return events_.size();
}
inline int MPiece::events_size() const {
  return _internal_events_size();
}
inline void MPiece::clear_events() {
  events_.Clear();
}
inline ::midi::MEvent* MPiece::mutable_events(int index) {
  // @@protoc_insertion_point(field_mutable:midi.MPiece.events)
  return events_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MEvent >*
MPiece::mutable_events() {
  // @@protoc_insertion_point(field_mutable_list:midi.MPiece.events)
  return &events_;
}
inline const ::midi::MEvent& MPiece::_internal_events(int index) const {
  return events_.Get(index);
}
inline const ::midi::MEvent& MPiece::events(int index) const {
  // @@protoc_insertion_point(field_get:midi.MPiece.events)
  return _internal_events(index);
}
inline ::midi::MEvent* MPiece::_internal_add_events() {
  return events_.Add();
}
inline ::midi::MEvent* MPiece::add_events() {
  // @@protoc_insertion_point(field_add:midi.MPiece.events)
  return _internal_add_events();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::MEvent >&
MPiece::events() const {
  // @@protoc_insertion_point(field_list:midi.MPiece.events)
  return events_;
}

// -------------------------------------------------------------------

// Dataset_Item

// required uint64 start = 1;
inline bool Dataset_Item::_internal_has_start() const {
  bool value = (_has_bits_[0] & 0x00000001u) != 0;
  return value;
}
inline bool Dataset_Item::has_start() const {
  return _internal_has_start();
}
inline void Dataset_Item::clear_start() {
  start_ = PROTOBUF_ULONGLONG(0);
  _has_bits_[0] &= ~0x00000001u;
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 Dataset_Item::_internal_start() const {
  return start_;
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 Dataset_Item::start() const {
  // @@protoc_insertion_point(field_get:midi.Dataset.Item.start)
  return _internal_start();
}
inline void Dataset_Item::_internal_set_start(::PROTOBUF_NAMESPACE_ID::uint64 value) {
  _has_bits_[0] |= 0x00000001u;
  start_ = value;
}
inline void Dataset_Item::set_start(::PROTOBUF_NAMESPACE_ID::uint64 value) {
  _internal_set_start(value);
  // @@protoc_insertion_point(field_set:midi.Dataset.Item.start)
}

// required uint64 end = 2;
inline bool Dataset_Item::_internal_has_end() const {
  bool value = (_has_bits_[0] & 0x00000002u) != 0;
  return value;
}
inline bool Dataset_Item::has_end() const {
  return _internal_has_end();
}
inline void Dataset_Item::clear_end() {
  end_ = PROTOBUF_ULONGLONG(0);
  _has_bits_[0] &= ~0x00000002u;
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 Dataset_Item::_internal_end() const {
  return end_;
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 Dataset_Item::end() const {
  // @@protoc_insertion_point(field_get:midi.Dataset.Item.end)
  return _internal_end();
}
inline void Dataset_Item::_internal_set_end(::PROTOBUF_NAMESPACE_ID::uint64 value) {
  _has_bits_[0] |= 0x00000002u;
  end_ = value;
}
inline void Dataset_Item::set_end(::PROTOBUF_NAMESPACE_ID::uint64 value) {
  _internal_set_end(value);
  // @@protoc_insertion_point(field_set:midi.Dataset.Item.end)
}

// required uint64 src_size = 3;
inline bool Dataset_Item::_internal_has_src_size() const {
  bool value = (_has_bits_[0] & 0x00000004u) != 0;
  return value;
}
inline bool Dataset_Item::has_src_size() const {
  return _internal_has_src_size();
}
inline void Dataset_Item::clear_src_size() {
  src_size_ = PROTOBUF_ULONGLONG(0);
  _has_bits_[0] &= ~0x00000004u;
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 Dataset_Item::_internal_src_size() const {
  return src_size_;
}
inline ::PROTOBUF_NAMESPACE_ID::uint64 Dataset_Item::src_size() const {
  // @@protoc_insertion_point(field_get:midi.Dataset.Item.src_size)
  return _internal_src_size();
}
inline void Dataset_Item::_internal_set_src_size(::PROTOBUF_NAMESPACE_ID::uint64 value) {
  _has_bits_[0] |= 0x00000004u;
  src_size_ = value;
}
inline void Dataset_Item::set_src_size(::PROTOBUF_NAMESPACE_ID::uint64 value) {
  _internal_set_src_size(value);
  // @@protoc_insertion_point(field_set:midi.Dataset.Item.src_size)
}

// -------------------------------------------------------------------

// Dataset

// repeated .midi.Dataset.Item train = 1;
inline int Dataset::_internal_train_size() const {
  return train_.size();
}
inline int Dataset::train_size() const {
  return _internal_train_size();
}
inline void Dataset::clear_train() {
  train_.Clear();
}
inline ::midi::Dataset_Item* Dataset::mutable_train(int index) {
  // @@protoc_insertion_point(field_mutable:midi.Dataset.train)
  return train_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item >*
Dataset::mutable_train() {
  // @@protoc_insertion_point(field_mutable_list:midi.Dataset.train)
  return &train_;
}
inline const ::midi::Dataset_Item& Dataset::_internal_train(int index) const {
  return train_.Get(index);
}
inline const ::midi::Dataset_Item& Dataset::train(int index) const {
  // @@protoc_insertion_point(field_get:midi.Dataset.train)
  return _internal_train(index);
}
inline ::midi::Dataset_Item* Dataset::_internal_add_train() {
  return train_.Add();
}
inline ::midi::Dataset_Item* Dataset::add_train() {
  // @@protoc_insertion_point(field_add:midi.Dataset.train)
  return _internal_add_train();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item >&
Dataset::train() const {
  // @@protoc_insertion_point(field_list:midi.Dataset.train)
  return train_;
}

// repeated .midi.Dataset.Item valid = 2;
inline int Dataset::_internal_valid_size() const {
  return valid_.size();
}
inline int Dataset::valid_size() const {
  return _internal_valid_size();
}
inline void Dataset::clear_valid() {
  valid_.Clear();
}
inline ::midi::Dataset_Item* Dataset::mutable_valid(int index) {
  // @@protoc_insertion_point(field_mutable:midi.Dataset.valid)
  return valid_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item >*
Dataset::mutable_valid() {
  // @@protoc_insertion_point(field_mutable_list:midi.Dataset.valid)
  return &valid_;
}
inline const ::midi::Dataset_Item& Dataset::_internal_valid(int index) const {
  return valid_.Get(index);
}
inline const ::midi::Dataset_Item& Dataset::valid(int index) const {
  // @@protoc_insertion_point(field_get:midi.Dataset.valid)
  return _internal_valid(index);
}
inline ::midi::Dataset_Item* Dataset::_internal_add_valid() {
  return valid_.Add();
}
inline ::midi::Dataset_Item* Dataset::add_valid() {
  // @@protoc_insertion_point(field_add:midi.Dataset.valid)
  return _internal_add_valid();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item >&
Dataset::valid() const {
  // @@protoc_insertion_point(field_list:midi.Dataset.valid)
  return valid_;
}

// repeated .midi.Dataset.Item test = 3;
inline int Dataset::_internal_test_size() const {
  return test_.size();
}
inline int Dataset::test_size() const {
  return _internal_test_size();
}
inline void Dataset::clear_test() {
  test_.Clear();
}
inline ::midi::Dataset_Item* Dataset::mutable_test(int index) {
  // @@protoc_insertion_point(field_mutable:midi.Dataset.test)
  return test_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item >*
Dataset::mutable_test() {
  // @@protoc_insertion_point(field_mutable_list:midi.Dataset.test)
  return &test_;
}
inline const ::midi::Dataset_Item& Dataset::_internal_test(int index) const {
  return test_.Get(index);
}
inline const ::midi::Dataset_Item& Dataset::test(int index) const {
  // @@protoc_insertion_point(field_get:midi.Dataset.test)
  return _internal_test(index);
}
inline ::midi::Dataset_Item* Dataset::_internal_add_test() {
  return test_.Add();
}
inline ::midi::Dataset_Item* Dataset::add_test() {
  // @@protoc_insertion_point(field_add:midi.Dataset.test)
  return _internal_add_test();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::midi::Dataset_Item >&
Dataset::test() const {
  // @@protoc_insertion_point(field_list:midi.Dataset.test)
  return test_;
}

#ifdef __GNUC__
  #pragma GCC diagnostic pop
#endif  // __GNUC__
// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------

// -------------------------------------------------------------------


// @@protoc_insertion_point(namespace_scope)

}  // namespace midi

// @@protoc_insertion_point(global_scope)

#include <google/protobuf/port_undef.inc>
#endif  // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_midi_2eproto
