mchudy / nfugue Goto Github PK
View Code? Open in Web Editor NEWMusic programming for .NET - a port of JFugue
License: Apache License 2.0
Music programming for .NET - a port of JFugue
License: Apache License 2.0
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.
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!
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 行
Can you include the Saving of the Pattern to midi file as well in documentation.
Of course I see following is working perfectly
MidiFileConverter.SavePatternToMidi(pattern, @"test.midi");
<sound tempo="94.5"/>
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}");
The playing speed is so slow, but time signature is OK. JFugue is even slower...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.