Class: GuitarProParser::Track
- Inherits:
-
Object
- Object
- GuitarProParser::Track
- 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
-
#auto_accentuation ⇒ Object
Returns the value of attribute auto_accentuation.
-
#auto_brush ⇒ Object
Returns the value of attribute auto_brush.
-
#auto_let_ring ⇒ Object
Returns the value of attribute auto_let_ring.
-
#banjo ⇒ Object
Returns the value of attribute banjo.
-
#bars ⇒ Object
Returns the value of attribute bars.
-
#capo ⇒ Object
Returns the value of attribute capo.
-
#color ⇒ Object
Returns the value of attribute color.
-
#diagrams_below_the_standard_notation ⇒ Object
Returns the value of attribute diagrams_below_the_standard_notation.
-
#diagrams_in_the_score ⇒ Object
Returns the value of attribute diagrams_in_the_score.
-
#diagrams_list_on_top_of_score ⇒ Object
Returns the value of attribute diagrams_list_on_top_of_score.
-
#drums ⇒ Object
Returns the value of attribute drums.
-
#equalizer ⇒ Object
Returns the value of attribute equalizer.
-
#extend_rhytmic_inside_the_tab ⇒ Object
Returns the value of attribute extend_rhytmic_inside_the_tab.
-
#force_channels_11_to_16 ⇒ Object
Returns the value of attribute force_channels_11_to_16.
-
#force_horizontal_beams ⇒ Object
Returns the value of attribute force_horizontal_beams.
-
#frets_count ⇒ Object
Returns the value of attribute frets_count.
-
#human_playing ⇒ Object
Returns the value of attribute human_playing.
-
#indicate_tuning ⇒ Object
Returns the value of attribute indicate_tuning.
-
#instrument_effect_1 ⇒ Object
Returns the value of attribute instrument_effect_1.
-
#instrument_effect_2 ⇒ Object
Returns the value of attribute instrument_effect_2.
-
#midi_bank ⇒ Object
Returns the value of attribute midi_bank.
-
#midi_channel ⇒ Object
Returns the value of attribute midi_channel.
-
#midi_channel_for_effects ⇒ Object
Returns the value of attribute midi_channel_for_effects.
-
#midi_port ⇒ Object
Returns the value of attribute midi_port.
-
#mute_playback ⇒ Object
Returns the value of attribute mute_playback.
-
#name ⇒ Object
Returns the value of attribute name.
-
#rse_playback ⇒ Object
Returns the value of attribute rse_playback.
-
#show_rythm_with_tab ⇒ Object
Returns the value of attribute show_rythm_with_tab.
-
#solo_playback ⇒ Object
Returns the value of attribute solo_playback.
-
#sound_bank ⇒ Object
Returns the value of attribute sound_bank.
-
#strings ⇒ Object
Returns the value of attribute strings.
-
#twelve_stringed_guitar ⇒ Object
Returns the value of attribute twelve_stringed_guitar.
Instance Method Summary collapse
-
#initialize ⇒ Track
constructor
A new instance of Track.
Constructor Details
#initialize ⇒ Track
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_accentuation ⇒ Object
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_brush ⇒ Object
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_ring ⇒ Object
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 |
#banjo ⇒ Object
Returns the value of attribute banjo.
48 49 50 |
# File 'lib/guitar_pro_parser/track.rb', line 48 def banjo @banjo end |
#bars ⇒ Object
Returns the value of attribute bars.
48 49 50 |
# File 'lib/guitar_pro_parser/track.rb', line 48 def @bars end |
#capo ⇒ Object
Returns the value of attribute capo.
48 49 50 |
# File 'lib/guitar_pro_parser/track.rb', line 48 def capo @capo end |
#color ⇒ Object
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_notation ⇒ Object
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_score ⇒ Object
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_score ⇒ Object
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 |
#drums ⇒ Object
Returns the value of attribute drums.
48 49 50 |
# File 'lib/guitar_pro_parser/track.rb', line 48 def drums @drums end |
#equalizer ⇒ Object
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_tab ⇒ Object
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_16 ⇒ Object
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_beams ⇒ Object
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_count ⇒ Object
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_playing ⇒ Object
Returns the value of attribute human_playing.
48 49 50 |
# File 'lib/guitar_pro_parser/track.rb', line 48 def @human_playing end |
#indicate_tuning ⇒ Object
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_1 ⇒ Object
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_2 ⇒ Object
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_bank ⇒ Object
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_channel ⇒ Object
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_effects ⇒ Object
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_port ⇒ Object
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_playback ⇒ Object
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 |
#name ⇒ Object
Returns the value of attribute name.
48 49 50 |
# File 'lib/guitar_pro_parser/track.rb', line 48 def name @name end |
#rse_playback ⇒ Object
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_tab ⇒ Object
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_playback ⇒ Object
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_bank ⇒ Object
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 |
#strings ⇒ Object
Returns the value of attribute strings.
48 49 50 |
# File 'lib/guitar_pro_parser/track.rb', line 48 def strings @strings end |
#twelve_stringed_guitar ⇒ Object
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 |