Class: FiddleFluidSynth::ModuleBase

Inherits:
Object
  • Object
show all
Defined in:
lib/fiddle_fluidsynth/util/module_hier.rb,
lib/fiddle_fluidsynth/util/module_hier.rb,
lib/fiddle_fluidsynth/util/module_hier.rb,
lib/fiddle_fluidsynth/util/module_hier.rb,
lib/fiddle_fluidsynth/util/module_hier.rb

Overview

SoundFont

Defined Under Namespace

Classes: AudioOutput, CommandInterface, Logging, Settings, SoundFont, Synthesizer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent:, fluidsynth_instance:, value:, sub_new_f: true) ⇒ ModuleBase

Returns a new instance of ModuleBase.



60
61
62
63
64
65
66
67
68
69
70
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 60

def initialize( parent: , fluidsynth_instance: , value: , sub_new_f: true )
  @parent = parent
  @value  = value
  @fluidsynth_instance = fluidsynth_instance

  #
  if sub_new_f
    self.init_sub
  end

end

Instance Attribute Details

#fluidsynth_instanceObject (readonly)

Returns the value of attribute fluidsynth_instance.



78
79
80
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 78

def fluidsynth_instance
  @fluidsynth_instance
end

#parentObject (readonly)

Returns the value of attribute parent.



71
72
73
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 71

def parent
  @parent
end

#settingsObject (readonly)

Returns the value of attribute settings.



92
93
94
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 92

def settings
  @settings
end

#valueObject Also known as: itself, obj

Returns the value of attribute value.



72
73
74
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 72

def value
  @value
end

Instance Method Details

#init_subObject



80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 80

def init_sub
  @settings = Settings.new(
                parent: self,
                fluidsynth_instance: fluidsynth_instance, value: nil)
  #@audio_output     = AudioOutput.new(parent: self, fluidsynth_instance: fluidsynth_instance, value: nil)
  #@commandInterface = CommandInterface.new(parent: self, fluidsynth_instance: fluidsynth_instance, value: nil)
  #@logging          = Logging.new(parent: self, fluidsynth_instance: fluidsynth_instance, value: nil)
  @soundfont = SoundFont.new(
                 parent: self,
                 fluidsynth_instance: fluidsynth_instance,
                 value: fluidsynth_instance.sfonts.first)
end

#soundfont(at_sfid = 1) ⇒ Object



95
96
97
98
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 95

def soundfont( at_sfid = 1 )
  @soundfont.sfid = at_sfid
  @soundfont
end