Module: FiddleFluidSynth::SequencerEventIF::EventIF
- Defined in:
- lib/fiddle_fluidsynth/sequencer/events.rb,
lib/fiddle_fluidsynth/sequencer/events.rb
Constant Summary collapse
- EVENT_TYPE_ARY =
setters (types)
[ # :note, :noteon, :noteoff, :all_sounds_off, :all_notes_off, :bank_select, :program_change, :program_select, :pitch_bend, :pitch_wheelsens, :modulation, # :sustain, :control_change, :pan, :volume, :reverb_send, :chorus_send, :timer, :channel_pressure, :key_pressure, :system_reset, # :unregistering, :scale, # last. ]
Instance Method Summary collapse
-
#dest(_self = self.itself) ⇒ Object
(also: #dst)
getter+setter.
- #dest=(_dst, _self = self.itself) ⇒ Object (also: #dst=)
- #from_midi_event(midi_ev, _self = self.itself) ⇒ Object
- #set_scale(v) ⇒ Object
- #set_type(type) ⇒ Object
-
#set_type_alias(kn) ⇒ Object
last.
- #source(_self = self.itself) ⇒ Object (also: #src)
- #source=(_src, _self = self.itself) ⇒ Object (also: #src=)
Instance Method Details
#dest(_self = self.itself) ⇒ Object Also known as: dst
getter+setter.
576 577 578 |
# File 'lib/fiddle_fluidsynth/sequencer/events.rb', line 576 def dest( _self = self.itself ) FFS.event_get_dest(_self) end |
#dest=(_dst, _self = self.itself) ⇒ Object Also known as: dst=
579 580 581 |
# File 'lib/fiddle_fluidsynth/sequencer/events.rb', line 579 def dest=( _dst, _self = self.itself ) FFS.event_set_dest(_self, dest: _dst) end |
#from_midi_event(midi_ev, _self = self.itself) ⇒ Object
569 570 571 |
# File 'lib/fiddle_fluidsynth/sequencer/events.rb', line 569 def from_midi_event( midi_ev, _self = self.itself ) FFS.event_from_midi_event(_self, midi_ev) end |
#set_scale(v) ⇒ Object
669 670 671 |
# File 'lib/fiddle_fluidsynth/sequencer/events.rb', line 669 def set_scale( v ) set_type(:scale, scale: v) end |
#set_type(type) ⇒ Object
641 642 643 644 645 646 647 648 649 650 651 652 653 |
# File 'lib/fiddle_fluidsynth/sequencer/events.rb', line 641 def set_type( type, ... ) _type = set_type_alias(type) type_s = _type.to_s.downcase unless EVENT_TYPE_ARY.include? type_s.to_sym raise "No such event type: #{type}. Select one of #{EVENT_TYPE_ARY}." end # meth_type = "event_" + type_s FFS.send(meth_type, self, ...) end |
#set_type_alias(kn) ⇒ Object
last.
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 |
# File 'lib/fiddle_fluidsynth/sequencer/events.rb', line 623 def set_type_alias( kn ) ret = kn.to_s.downcase.to_sym case kn when /^cc$/i ret = :control_change when /^mod$/i ret = :modulation when /^pc$/i ret = :program_change when /^psel$/i ret = :program_select when /^ps$/i ret = :program_select end ret end |
#source(_self = self.itself) ⇒ Object Also known as: src
586 587 588 |
# File 'lib/fiddle_fluidsynth/sequencer/events.rb', line 586 def source( _self = self.itself ) FFS.event_get_source(_self) end |
#source=(_src, _self = self.itself) ⇒ Object Also known as: src=
589 590 591 |
# File 'lib/fiddle_fluidsynth/sequencer/events.rb', line 589 def source=( _src, _self = self.itself ) FFS.event_set_source(_self, src: _src) end |