Skip to content

Commit

Permalink
fix #295
Browse files Browse the repository at this point in the history
  • Loading branch information
beweiche committed Jan 28, 2020
1 parent d8d0bf9 commit 4c43814
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 49 deletions.
76 changes: 32 additions & 44 deletions 200_zupfnoter.iml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,38 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="RVM: ruby-2.4.1" jdkType="RUBY_SDK" />
<orderEntry type="jdk" jdkName="RVM: ruby-2.6.3" jdkType="RUBY_SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.0.1, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.2, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.5, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.11.1, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="graphviz (v1.1.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.9.5, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="json (v2.2.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="json-schema-generator (v0.0.9, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jsonpath (v1.0.4, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.9.2, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.13.1, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="neatjson (v0.8.4, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="opal (v1.0.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="opal-jquery (v0.4.4, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="opal-sprockets (v0.4.5.1.0.3.7, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="parser (v2.5.3.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="pdf-core (v0.7.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="prawn (v2.2.2, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="process-group (v1.1.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="process-pipeline (v1.0.1, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="pry (v0.12.2, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack (v2.0.7, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rake (v12.3.2, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.10.3, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.10.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rb-readline (v0.5.5, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="redcarpet (v3.4.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.8.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.8.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.8.3, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.8.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.8.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rubyzip (v1.2.4, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass (v3.7.4, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass-listen (v4.0.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets (v3.7.2, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.9, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="to_regexp (v0.2.1, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ttfunk (v1.5.1, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="vector2d (v2.1.0, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="zip (v2.0.2, RVM: ruby-2.4.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.0, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.2, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.2, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.5, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.11.3, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="graphviz (v1.1.0, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="json-schema-generator (v0.0.9, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jsonpath (v1.0.4, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.9.2, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.14.1, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="neatjson (v0.8.4, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="opal (v1.0.0, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="opal-jquery (v0.4.4, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="opal-sprockets (v0.4.5.1.0.3.7, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="parser (v2.5.3.0, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="process-group (v1.1.0, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="process-pipeline (v1.0.1, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="pry (v0.12.2, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack (v2.0.8, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rake (v13.0.1, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.10.3, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.10.1, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rb-readline (v0.5.5, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="redcarpet (v3.4.0, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass (v3.7.4, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass-listen (v4.0.0, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets (v3.7.2, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.9, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="to_regexp (v0.2.1, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="vector2d (v2.1.0, RVM: ruby-2.6.3) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="zip (v2.0.2, RVM: ruby-2.6.3) [gem]" level="application" />
</component>
</module>
11 changes: 6 additions & 5 deletions 30_sources/SRC_Zupfnoter/src/abc2svg_to_harpnotes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ def _transform_bar(voice_element, index, voice_index)
# it shall not create a bar in harpnotes
# but do not check this in context of variants
# variant is stopped and not started nex
if ( (voice_element[:rbstop] == 2 and not voice_element[:rbstart] == 2))
if type.include? ":" # false # @is_first_measure ## first measure after a meter statment cannot suppress bar
if ((voice_element[:rbstop] == 2 and not voice_element[:rbstart] == 2))
if type.include? ":" # false # @is_first_measure ## first measure after a meter statment cannot suppress bar
@next_note_marks[:measure] = false unless (voice_element[:time] - @measure_start_time) == @wmeasure
end
end
Expand Down Expand Up @@ -484,7 +484,8 @@ def _transform_chordsymbol(entity, voice_id)

match = name.match(/^([^!#\<\>]+)([^\@]+)?(\@(\-?[0-9\.]+),(\-?[0-9\.]+))?$/)
if match
text = match[1]
text = match[1]
text = text.gsub("♯", "#").gsub("♭", "b") # todo: fix this if we have unicode support #295
position = $conf['defaults.notebound.chord.pos']
conf_key = "notebound.chord.#{voice_id}.#{entity.znid}.#{index}"
result << Harpnotes::Music::Chordsymbol.new(entity, {style: 'large', pos: position, text: text}, conf_key)
Expand Down Expand Up @@ -693,7 +694,7 @@ def _transform_key(voice_element)
def _transform_lyrics(voice_element)
if voice_element[:a_ly]
result = voice_element[:a_ly].first
result = result[:t]&.gsub("\n", "-").gsub("_", "") if result
result = result[:t] &.gsub("\n", "-").gsub("_", "") if result
else
result = ""
end
Expand Down Expand Up @@ -943,7 +944,7 @@ def _pop_slur
def _extract_chord_lines(voice_element)
chords = voice_element[:a_gch]
if chords
result = chords.select { |e| e[:type] == '^' ; true}.map { |e| e[:text] }
result = chords.select { |e| e[:type] == '^'; true }.map { |e| e[:text] }
else
result = []
end
Expand Down

0 comments on commit 4c43814

Please sign in to comment.