Class: GuitarProParser::Track

Inherits:
Object
  • Object
show all
Defined in:
lib/guitar_pro_parser/track.rb

Overview

This class represents tracks. Beside track’s settings (see attributes) it contain bars (@bars attribute) that contain beats and notes.

Attributes

  • drums (boolean) Drums track

  • twelve_stringed_guitar (boolean) 12 stringed guitar track

  • banjo (boolean) Banjo track

  • solo_playback (boolean) Marked for solo playback (> 5.0 only)

  • mute_playback (boolean) Marked for mute playback (> 5.0 only)

  • rse_playback (boolean) Use RSE playback (track instrument option) (> 5.0 only)

  • indicate_tuning (boolean) Indicate tuning on the score (track properties) (> 5.0 only)

  • name (string) Track name

  • strings (array) Array of MIDI notes each string plays open. E.g. [E5, B4, G4, D4, A3, E3] for standart tuning

  • midi_port (integer) MIDI port used

  • midi_channel (integer) MIDI channel used (must be 10 if this is a drum track)

  • midi_channel_for_effects (integer) MIDI channel used for effects

  • frets_count (integer) Number of frets used for this instrument

  • capo (integer) The fret number at which a capo is placed (0 for no capo)

  • color (array) Track color (RGB intensities). E.g. [255, 0, 0] for red.

  • diagrams_below_the_standard_notation (boolean) Diagrams/chords below the standard notation (> 5.0 only)

  • show_rythm_with_tab (boolean) Show rhythm with tab (> 5.0 only)

  • force_horizontal_beams (boolean) Force horizontal beams (> 5.0 only)

  • force_channels_11_to_16 (boolean) Force channels 11 to 16 (> 5.0 only)

  • diagrams_list_on_top_of_score (boolean) Diagrams list on top of the score (> 5.0 only)

  • diagrams_in_the_score (boolean) Diagrams in the score (> 5.0 only)

  • auto_let_ring (boolean) Auto-Let Ring (> 5.0 only)

  • auto_brush (boolean) Auto Brush (> 5.0 only)

  • extend_rhytmic_inside_the_tab (boolean) Extend rhythmic inside the tab (> 5.0 only)

  • midi_bank (integer) MIDI bank (> 5.0 only)

  • human_playing (integer) Human playing in percents (track instrument options) (> 5.0 only)

  • auto_accentuation (integer) Auto-Accentuation on the Beat (track instrument options) (> 5.0 only) # TODO Not sure that it works

  • sound_bank (integer) Selected sound bank (track instrument options) (> 5.0 only)

  • equalizer (array) Equalizer setup. Represented as array with this values:

      number of increments of .1dB the volume for the low frequency band is lowered
      number of increments of .1dB the volume for the mid frequency band is lowered
      number of increments of .1dB the volume for the high frequency band is lowered
      number of increments of .1dB the volume for all frequencies is lowered (gain)
    (> 5.0 only)
    
  • instrument_effect_1 (string) Track instrument effect 1 (> 5.0 only)

  • instrument_effect_2 (string) Track instrument effect 2 (> 5.0 only)

  • bars (array) Bars of this track

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTrack

Returns a new instance of Track.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/guitar_pro_parser/track.rb', line 81

def initialize
  # Initialize attributes by default values
  @drums = false
  @twelve_stringed_guitar = false
  @banjo = false
  @solo_playback = false
  @mute_playback = false
  @rse_playback = false
  @indicate_tuning = false
  @name = 'Track'
  @strings = %w(E5 B4 G4 D4 A3 E3)
  @midi_port = 1
  @midi_channel = 16
  @midi_channel_for_effects = 16
  @frets_count = 24
  @capo = 0
  @color = [255, 0, 0]

  @diagrams_below_the_standard_notation = false
  @show_rythm_with_tab = false
  @force_horizontal_beams = false
  @force_channels_11_to_16 = false
  @diagrams_list_on_top_of_score = false
  @diagrams_in_the_score = false

  @auto_let_ring = false
  @auto_brush = false
  @extend_rhytmic_inside_the_tab = false

  @midi_bank = 0
  @human_playing = 0
  @auto_accentuation = 0
  @sound_bank = 0

  @equalizer = Array.new(4, 0)

  @instrument_effect_1 = ''
  @instrument_effect_2 = ''

  @bars = []
end

Instance Attribute Details

#auto_accentuationObject

Returns the value of attribute auto_accentuation.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def auto_accentuation
  @auto_accentuation
end

#auto_brushObject

Returns the value of attribute auto_brush.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def auto_brush
  @auto_brush
end

#auto_let_ringObject

Returns the value of attribute auto_let_ring.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def auto_let_ring
  @auto_let_ring
end

#banjoObject

Returns the value of attribute banjo.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def banjo
  @banjo
end

#barsObject

Returns the value of attribute bars.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def bars
  @bars
end

#capoObject

Returns the value of attribute capo.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def capo
  @capo
end

#colorObject

Returns the value of attribute color.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def color
  @color
end

#diagrams_below_the_standard_notationObject

Returns the value of attribute diagrams_below_the_standard_notation.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def diagrams_below_the_standard_notation
  @diagrams_below_the_standard_notation
end

#diagrams_in_the_scoreObject

Returns the value of attribute diagrams_in_the_score.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def diagrams_in_the_score
  @diagrams_in_the_score
end

#diagrams_list_on_top_of_scoreObject

Returns the value of attribute diagrams_list_on_top_of_score.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def diagrams_list_on_top_of_score
  @diagrams_list_on_top_of_score
end

#drumsObject

Returns the value of attribute drums.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def drums
  @drums
end

#equalizerObject

Returns the value of attribute equalizer.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def equalizer
  @equalizer
end

#extend_rhytmic_inside_the_tabObject

Returns the value of attribute extend_rhytmic_inside_the_tab.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def extend_rhytmic_inside_the_tab
  @extend_rhytmic_inside_the_tab
end

#force_channels_11_to_16Object

Returns the value of attribute force_channels_11_to_16.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def force_channels_11_to_16
  @force_channels_11_to_16
end

#force_horizontal_beamsObject

Returns the value of attribute force_horizontal_beams.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def force_horizontal_beams
  @force_horizontal_beams
end

#frets_countObject

Returns the value of attribute frets_count.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def frets_count
  @frets_count
end

#human_playingObject

Returns the value of attribute human_playing.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def human_playing
  @human_playing
end

#indicate_tuningObject

Returns the value of attribute indicate_tuning.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def indicate_tuning
  @indicate_tuning
end

#instrument_effect_1Object

Returns the value of attribute instrument_effect_1.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def instrument_effect_1
  @instrument_effect_1
end

#instrument_effect_2Object

Returns the value of attribute instrument_effect_2.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def instrument_effect_2
  @instrument_effect_2
end

#midi_bankObject

Returns the value of attribute midi_bank.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def midi_bank
  @midi_bank
end

#midi_channelObject

Returns the value of attribute midi_channel.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def midi_channel
  @midi_channel
end

#midi_channel_for_effectsObject

Returns the value of attribute midi_channel_for_effects.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def midi_channel_for_effects
  @midi_channel_for_effects
end

#midi_portObject

Returns the value of attribute midi_port.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def midi_port
  @midi_port
end

#mute_playbackObject

Returns the value of attribute mute_playback.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def mute_playback
  @mute_playback
end

#nameObject

Returns the value of attribute name.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def name
  @name
end

#rse_playbackObject

Returns the value of attribute rse_playback.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def rse_playback
  @rse_playback
end

#show_rythm_with_tabObject

Returns the value of attribute show_rythm_with_tab.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def show_rythm_with_tab
  @show_rythm_with_tab
end

#solo_playbackObject

Returns the value of attribute solo_playback.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def solo_playback
  @solo_playback
end

#sound_bankObject

Returns the value of attribute sound_bank.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def sound_bank
  @sound_bank
end

#stringsObject

Returns the value of attribute strings.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def strings
  @strings
end

#twelve_stringed_guitarObject

Returns the value of attribute twelve_stringed_guitar.



48
49
50
# File 'lib/guitar_pro_parser/track.rb', line 48

def twelve_stringed_guitar
  @twelve_stringed_guitar
end