Class: Fet::MidilibInterface

Inherits:
Object
  • Object
show all
Includes:
MidiFileGenerator
Defined in:
lib/fet/midilib_interface.rb

Overview

Interface with the midilib library to generate MIDI files

Instance Method Summary collapse

Methods included from MidiFileGenerator

#create_chord_progression_of_question, #create_full_question, #create_listening_midi_file, #create_notes_only, #create_singing_midi_file

Constructor Details

#initialize(tempo:, progression:, notes:, info:, filename:) ⇒ MidilibInterface

Returns a new instance of MidilibInterface.



11
12
13
14
15
16
17
18
19
# File 'lib/fet/midilib_interface.rb', line 11

def initialize(tempo:, progression:, notes:, info:, filename:)
  self.tempo = tempo
  self.progression = progression
  self.notes = notes
  self.info = info
  self.filename = filename
  self.sequence = MIDI::Sequence.new
  self.track = generate_instrument_track
end