Wait, what?TonE wrote:Then I do not understand why B2 equals to 15, as seen in the screenshot above.
Which screenshot? I was talking about the text file vicentefer attached to his last message.
Code: Select all
struct Note : IComparer<Note>
{
public long time;
public int noteId;
public int Compare(Note x, Note y) { return x.time.CompareTo(y.time); }
}
class Program
{
static void Main(string[] args)
{
if (args.Length != 1 || !File.Exists(args[0]))
{
Console.WriteLine("Pass in the name of a file that exists.");
return;
}
List<Note> notes = new List<Note>();
using (StreamReader reader = new StreamReader(args[0]))
{
Regex expression = new Regex("([0-9]+) On ch=[1-9][0-9]? n=([1-9][0-9]*) v=[1-9][0-9]*");
while (!reader.EndOfStream)
{
Match m = expression.Match(reader.ReadLine());
if (!m.Success) continue;
long time;
int noteId;
if (!long.TryParse(m.Groups[1].Value, out time)) continue;
if (!int.TryParse(m.Groups[2].Value, out noteId)) continue;
Note note = new Note();
note.time = time;
note.noteId = noteId;
notes.Add(note);
}
}
notes.Sort(new Note());
StringBuilder result = new StringBuilder();
foreach (Note n in notes) result.AppendFormat("{0} ", n.noteId);
Console.WriteLine(result.ToString().Trim());
}
}
Unhandled Exception: System.Runtime.InteropServices.ExternalException: Requested Clipboard operation did not succeed.
at System.Windows.Forms.Clipboard.ThrowIfFailed(Int32 hr)
... SetDataObject ...
... SetText ...
... SetText(String text)
at MidiTextParser.Program.Main(String[] args)
that's a good idea. right now it uses dynamic programming, so finds the absolute minimum, but the addition of heuristics on top of it can provide improvements. I got an idea,ish after reading your post, still hazy though. in a few days it would be clearer.Couldn't wrist position be "learned" over a few notes?
it's unimportant. the notes are for just for finding the distances between the keys; notes do not matter at all. (c-d-e is the same as f-g-a due to the placement of black keys)What is C1 for a midi pitch number in the range of 0..127 or is this unimportant?
exactly, the actual version won't have hundreds of parameters (I'm still hiding about 100 parameters, was lazy to implement in the GUI, those empty tabs ), they would probably be hidden in a advanced user part. only parameters may be "hand size: small - medium - large", "left-right hand" etc. But right now, I/you constantly modify the parameters, so tried to squeeze as much as I couldFor now, the GUI feels like a research interface.
wow, yes it's simple, and I was thinking of doing a non-synthesia version for sheet music in the future and searched for a midi sheet generator with fingerings to use along AFP. lilypond looks very nice and simple, I'll definitely look to it.You should look at lilypond both for input and output.
..Until someone mades this library, maybe we can use a "midi to txt" like you can find in http://www.midiox.com/
thanks! that really helps. I can add the midi drag box to AFP as soon as I got the time. should be a lot more easier to test.I just made my little program run the MIDI-to-Text conversion for you
ah, yes. that was mentioned for a little bit.it works apart from the fact AFP 0.1.01 does not convert midi pitch numbers correctly to note names.
It seems AFP starts mapping
0 --> R (est)
1 --> A1
2 --> A1#
...
60 --> G5#
...
127 --> D11#
instead it should be, keeping the 0 reserved to a rest which is unconventional but practical in AFP, as noone uses normally that deep/low pitches in .mid files:
1 --> C#x
2 --> Dx
...
12 --> C(x+1)
...
well, right now it's for testing only, so it's a bit messy.Are there going to be a guide on how to use this?
Reading the first and second posts made by Frost is too much for my eyes. Sorry if I couldn't give out more detailed explanations.
That's weird. Do you have some weird permissions thing going on? You must have .NET 2.0 or it wouldn't run, so that shouldn't be the problem.TonE wrote:Thanks Nicholas, it works, only copying to clipboard creates: [an exception]
It's size dependent. All 76-key keyboards will start on the same note, etc., but not necessarily the same note as any other size keyboard. I dug up pictures of each on Google a while back when I needed the values for Synthesia. I don't have them on me right now.Frost wrote:... but what is the layout of smaller, 49-key, 76-key etc. keyboards? Do they also start with an A? C? Manufacturer dependent?
No, only Hanon 10 exercise, right hand part only.Nicholas wrote:Are you trying to convert a super-huge MIDI? The clipboard is supposed to be able to take anything, but if there are a few thousand notes, maybe that is doing something weird?
Frost, 1=C# because 0=C. I would prefer the MIDI standard, why, because it is a standard. Actually you should not care much about me as I will not test anything much if I do not know exactly what is going on inside, I would prefer waiting, finding, reading and understanding the papers you mentioned, only one paper I could not find yet. ( Jacobs, Refinements to the Ergonomic Model for Keyboard Fingering, 2001 )Now, you say midi pitches start with 1=C# ?
Which standard would you prefer? Should I take 1 as the first key of the piano, or as the midi pitch number? Which would be more comfortable for you?
I attached the Jacobs paper.Having a short glance on last paper you mentioned, Kasimi et al., A Simple Algorithm for Automatic Generation of Polyphonic Piano Fingerings, 2007, I did not like the model shown in Figure 5., Cost function cvertical for finger pair 2,5.
To me it seems the point x=1 with its value y=10 should be lower than both points at x=10 and x=11, or the other way around, the both points at x=10 and x=11 should be much higher/bigger than 10. Why, I tried it on the keys myself, to me it feeled not equally difficult. But of course I do not know what you did exactly in your AFP application. But it is good to see someone comes up with new fresh energy and input here into the forum.
actually, method is really very straight forward, I'll try to write a simple guide about the internal workflow and the rules, people can suggest their rules to make it better. I'll also release the source code once I clean up it a little bit.Actually you should not care much about me as I will not test anything much if I do not know exactly what is going on inside, I would prefer waiting, finding, reading and understanding the papers you mentioned
(Without derailing this too much further, because what you guys are discussing is way more important, the best I can find is that some other application has the clipboard "open" so the copy can't go through. Don't you have AutoHotKey monitoring the clipboard? Although... if Synthesia can still write to it, this little app should be able to, too.)TonE wrote:No, only Hanon 10 exercise, right hand part only.
On a scale of 1 to 100, how important is it? If it's over 80, please make a subforum for this active development in the Development Updates. If possible, you can promote the developers to be a part of the Synthesia work team, possibly Concept Division.Nicholas wrote:(Without derailing this too much further, because what you guys are discussing is way more important, the best I can find is that some other application has the clipboard "open" so the copy can't go through. Don't you have AutoHotKey monitoring the clipboard? Although... if Synthesia can still write to it, this little app should be able to, too.)
Frost, thanks for sharing the "refinements paper" and I feel much better now after reading your text above. I would love to contribute wherever I can, as many others in this forum might like/want to in the same way. However to join the forces in this forum, it would be very helping or flow increasing if already gained insights would be shared in a short and efficient way here in the forum, that followers of the same topic do not have to do the same work again. They could spend their energies for "error checking of the steps made so far" and for further steps from that point. We would decrease redundant work.actually, method is really very straight forward, I'll try to write a simple guide about the internal workflow and the rules, people can suggest their rules to make it better. I'll also release the source code once I clean up it a little bit.