Class: FiddleFluidSynth::ModuleBase::SoundFont::Bank::Presets
- Inherits:
-
FiddleFluidSynth::ModuleBase::SoundFont::Bank
- Object
- FiddleFluidSynth::ModuleBase
- FiddleFluidSynth::ModuleBase::SoundFont
- FiddleFluidSynth::ModuleBase::SoundFont::Bank
- FiddleFluidSynth::ModuleBase::SoundFont::Bank::Presets
- Defined in:
- lib/fiddle_fluidsynth/util/module_hier.rb,
lib/fiddle_fluidsynth/util/module_hier.rb
Instance Attribute Summary collapse
-
#num ⇒ Object
Returns the value of attribute num.
Attributes inherited from FiddleFluidSynth::ModuleBase::SoundFont
Attributes inherited from FiddleFluidSynth::ModuleBase
#fluidsynth_instance, #parent, #settings
Instance Method Summary collapse
- #bknum ⇒ Object
- #init_sub ⇒ Object
-
#initialize(parent:, fluidsynth_instance:, value:, sub_new_f: true) ⇒ Presets
constructor
A new instance of Presets.
-
#name ⇒ Object
..
- #pre_num ⇒ Object
- #value ⇒ Object
Methods inherited from FiddleFluidSynth::ModuleBase::SoundFont::Bank
Methods inherited from FiddleFluidSynth::ModuleBase::SoundFont
#bank, #count, #full_path, #load, #preset_iter, #preset_iter_reset, #scan_presets
Methods inherited from FiddleFluidSynth::ModuleBase
Constructor Details
#initialize(parent:, fluidsynth_instance:, value:, sub_new_f: true) ⇒ Presets
Returns a new instance of Presets.
345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 345 def initialize( parent: , fluidsynth_instance: , value: , sub_new_f: true ) super(parent: parent, fluidsynth_instance: fluidsynth_instance, value: fluidsynth_instance.synth, sub_new_f: false) # @num = nil # if sub_new_f self.init_sub end end |
Instance Attribute Details
#num ⇒ Object
Returns the value of attribute num.
358 359 360 |
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 358 def num @num end |
Instance Method Details
#bknum ⇒ Object
383 384 385 386 387 388 389 |
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 383 def bknum preset_obj = self.value _bknum = self.fluidsynth_instance.preset_get_banknum(preset_obj) ret = _bknum ret end |
#init_sub ⇒ Object
369 370 371 |
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 369 def init_sub # nothing todo. end |
#name ⇒ Object
.
374 375 376 377 378 379 380 381 |
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 374 def name preset_obj = self.value _name = self.fluidsynth_instance.preset_get_name(preset_obj).to_s ret = _name ret end |
#pre_num ⇒ Object
391 392 393 394 395 396 397 |
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 391 def pre_num preset_obj = self.value _num = self.fluidsynth_instance.preset_get_num(preset_obj) ret = _num ret end |
#value ⇒ Object
360 361 362 363 364 365 366 367 368 |
# File 'lib/fiddle_fluidsynth/util/module_hier.rb', line 360 def value bknum = self.parent.bknum prenum = self.num sfont = self.parent.parent.value ret = self.fluidsynth_instance. sfont_get_preset(sfont: sfont, bknum: bknum, prenum: prenum) ret end |