From a text file, i should get the necessary information in order to create a beat map, a representation of what we see in music sheets, from this text file:

3 measures
3 4 time signature
4 beats
4 note, measure 1
3 note, measure 1
1R rest, measure 1
4 note, measure 1
4 4 time signature
1 beat, measure 1
0 note, measure 1
2 4 time signature
1 beat, measure 1
1R (corresponds to the half rest)

How do I determine the number of measures[Line 1],
the time signature of each measure[LINE 2,8,11],
the number of beats for each measure[Lines 3,9,12]
and their durations(each note)?

All i can do is a code that reads from this file :(
Any suggestion would be welcome

Reason why I should be able to get this is to create an output that looks like:
(output should be redirected to a text file)

||-----------|----------|---------|---------|-----------||----
||---4-------|----------|---------|---------|-----------||----
||-----------|----------|---------|---------|-----------||----
||-----------|----------|---------|---------|-----------||----
||---4-------|----------|---------|---------|-----------||----
||-----------|----------|---------|---------|-----------||----
10          Mary       had                  a           11

In which

This corresponds to a Measure 10 with 4/4 time, and the lyrics laid out among its four beats, 1 of which is a rest (so that it had to be skipped).

The beats must be spaced out proportionally in relation to each other. For example, a half beat is noticeably wider than a quarter beat, which is noticeably wider than an eighth beat, and so on.

If there are multiple measures then they must be laid out side by side. There should only be one column of double-pipes ("||") in between them. The left vertical line should have the measure number below it, just as you saw above (10).

From a text file, i should get the necessary information in order to create a beat map, a representation of what we see in music sheets, from this text file:

3 measures
3 4 time signature
4 beats
4 note, measure 1
3 note, measure 1
1R rest, measure 1
4 note, measure 1
4 4 time signature
1 beat, measure 1
0 note, measure 1
2 4 time signature
1 beat, measure 1
1R (corresponds to the half rest)

How do I determine the number of measures[Line 1],
the time signature of each measure[LINE 2,8,11],
the number of beats for each measure[Lines 3,9,12]
and their durations(each note)?

All i can do is a code that reads from this file :(
Any suggestion would be welcome

Reason why I should be able to get this is to create an output that looks like:
(output should be redirected to a text file)

||-----------|----------|---------|---------|-----------||----
||---4-------|----------|---------|---------|-----------||----
||-----------|----------|---------|---------|-----------||----
||-----------|----------|---------|---------|-----------||----
||---4-------|----------|---------|---------|-----------||----
||-----------|----------|---------|---------|-----------||----
10          Mary       had                  a           11

In which

This corresponds to a Measure 10 with 4/4 time, and the lyrics laid out among its four beats, 1 of which is a rest (so that it had to be skipped).

The beats must be spaced out proportionally in relation to each other. For example, a half beat is noticeably wider than a quarter beat, which is noticeably wider than an eighth beat, and so on.

If there are multiple measures then they must be laid out side by side. There should only be one column of double-pipes ("||") in between them. The left vertical line should have the measure number below it, just as you saw above (10).

SORRY i cant help you because i am also a new learner.

commented: Then don't bother posting! -4
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.