Coder Social home page Coder Social logo

nfugue's People

Contributors

jiachen-zeng avatar mchudy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nfugue's Issues

Chords are played independently in MusicXML conversion

In this score, the 2nd measure is converted to

L0 E4h. D4i C4i AMIN L4 A2w

AMIN and E4h. are not played at the same time. The correct one will be

L0 E4h.+AMIN D4i C4i L4 A2w

But even if the Staccato string is correct, the duration is wrong when playing. The duration of all notes in harmony will be the duration of the last one.

Chord Inversions Not Playing as Single Chord

If you try the following the first inversion and second inversion won't play all the notes of the chord at the same time.


            using (var player = new Player())
            {
                Pattern pattern = new ChordProgression("I I^ I^^").AllChordsAs("$0 $0 $0 $0i Ri $1 $1 $1 $1 $2 $2 $2 $2").GetPattern();
                player.Play(pattern);
            }

Interestingly, this happens (to a much more noticeable extent) in the original JFugue 5.0.9. I tried this port with the hope that it wouldn't happen...

Also I don't mind trying to fix it. I just need help figuring out where to look. Thanks!

Parsing MusicXML error. `accidentalCount` is strange

This score

accidentalCount = 252
System.IndexOutOfRangeException
  HResult=0x80131508
  Message=索引超出了数组界限。
  Source=NFugue
  StackTrace:
   在 NFugue.Staccato.Subparsers.SignatureSubparser.ConvertAccidentalCountToKeyRootPositionInOctave(Int32 accidentalCount, Int32 scale) 在 D:\Data\编程\Projects\C#\NFugue\src\NFugue\Staccato\Subparsers\SignatureSubparser.cs 中: 第 121 行
   在 NFugue.Midi.MidiParser.KeySigParsed(MetaMessage meta) 在 D:\Data\编程\Projects\C#\NFugue\src\NFugue\Midi\MidiParser.cs 中: 第 227 行
   在 NFugue.Midi.MidiParser.ParseMetaMessage(MetaMessage message, MidiEvent event) 在 D:\Data\编程\Projects\C#\NFugue\src\NFugue\Midi\MidiParser.cs 中: 第 135 行
   在 NFugue.Midi.MidiParser.ParseEvent(MidiEvent event) 在 D:\Data\编程\Projects\C#\NFugue\src\NFugue\Midi\MidiParser.cs 中: 第 58 行
   在 NFugue.Midi.MidiParser.Parse(Sequence sequence) 在 D:\Data\编程\Projects\C#\NFugue\src\NFugue\Midi\MidiParser.cs 中: 第 28 行
   在 NFugue.Midi.Conversion.MidiFileConverter.LoadPatternFromMidi(String filePath) 在 D:\Data\编程\Projects\C#\NFugue\src\NFugue\Midi\Conversion\MidiFileConverter.cs 中: 第 37 行
   在 NFugue.ManualTests.Program.TestPlayMidi() 在 D:\Data\编程\Projects\C#\NFugue\tests\NFugue.ManualTests\Program.cs 中: 第 26 行
   在 NFugue.ManualTests.Program.Main(String[] args) 在 D:\Data\编程\Projects\C#\NFugue\tests\NFugue.ManualTests\Program.cs 中: 第 16 行

Using a non-US Culture may cause errors!

I'm Swedish and using Culture sv-SE, One of the things that this does is changing the decimal separator to a comma (,)

This leads to a lot of problem for all places that uses double.ToString or String Interpolation, e.g.

frequency = double.Parse(frequencyMatch.Groups[0].ToString());
qualifier =$"/{DefaultNoteSettings.DefaultDuration}"

They should (may) be changed to

frequency = double.Parse(frequencyMatch.Groups[0].ToString(), CultureInfo.InvariantCulture);
qualifier = FormattableString.Invariant($"/{DefaultNoteSettings.DefaultDuration}");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.