About midi files loaded in Hise Midi player
-
I'm developing some sort of "Synthesia" for my piano students, it's a midi file player with visual keys for learning, in my case, piano music.
Synthesia is already existing but I thought I should test to write one in Hise.
So to my questions:
-
Is it possible for Hise to read tempo changes from a midi file? ritardando, accelerando... In that case, how would I do it?
-
Is it possible to read Time signature changes as well?
-
Since I write this app for piano music that is notated on a grand staff, is it possible to, from a midi file, read which is the right and which is the left hand system? (I guess I could separate the 2 hands and have them recorded on different midi channels, but I thought I should ask anyway.)
This is my project so far:
HiseSnippet 6651.3oc67z0aiijbxyrZ2y91OtMWNj7TRuB4NHO1iLk7myN6rikjkskGaIMRxdrGeNGnjZIwwTjZIojsl4LvADb.AHOjf7Tt2xOg6wjmxAjmxKAI+CNf.DffKAX+GjTU2MIaRQK4wyt2L4RD10CY2cUc0UUc8USxJVlMo11lVwlY15i5SiMyGFu1HCmt46ppYDq3Vwl4iiuqlMEaiZqoFK2n9p11zVwlYl6tCNlYl88hw980ONmptpQSpeSwhcjoVS59Z8zb7asxlOQSWea0Vz5Z8jF8JaVrooQdScyA.8b23Jw5q17b0NzRp3vtS7Xy79EZo4XZUyQ0gZGal2KmYqQ05ZdgAe7GoYq0Pmh2jNVM.Q7l21TuERwXqwx2USuUE20scrXyDuhOW3tbtvue7CzZo40tO236w5f3CgL+Xl6Dj7ta.xKsL4oHQdQPR2Qhj9.WACijzUGQsXjxrwOPbmLMjefkE0voF8qFPCHK95GK5ptEvUkaeeSy9ELTAJqkrnCQdCXn05Sk63qe7L28FuLSOwkYLbEsslNEWxy3dCLZb4Ah6sTcTicG86Dek0TRYTesmrQdcmb06jO0wYJr2g4ajQucp0ou7YGdP8TYaUuRg5FqpzMU6K6lMWKyiW3k5sVQO8KNXg5cqlqXGqExu6nKe5QaueoZc1MS9K28xRq0xJep0SUoTpgqevSN33CF0sao9MWuxQOe3w5Jcqr2QOX6kexPs1mzncScsSpbg5VG+jsF9fTNK+rEVidQ4Ton4a.y8vTY2dzxoVWMa99s69zM5T+vJ8K8hm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eTb9hjv7z8tWblerK8wkBu6QfeXbl3+cU92mDWnL9NKC7iiK1a71jEJ9nINW7i.qPMwYDIsef2sDOBO8zovCso0UYjfuMhhrWyCZX6FZMn5AMB7Vv8vDyk6t+NctbuN6xwvuQ8foko6aEiP7j.dKRd+.N48ci+L0gTVZZhsP38sMs5QXeFJFeKTvbz9W9lOGsxMc.RvKdrzxXNTeYBt8Dk3oGuo.iBWdaCKOow8GtoaiYjY6UTM7GzOq3uBtWp+827.M2jB+Y+lm9qeLO0RdZbksaBK1fehFADNP2lxR82Euje9u4eUpYIz+qe7tPT+fbIPjTe6jL36+NWxf+ekBu8+ar1Um5Rx6zRw+f3vV5LDlnj71QV9aiR386JyQO0lVl+jl7pafl39NrV.dqA6a+6rwO.umj18jPiGWIkRrdfoseRyl3dh6CVJiFlL2BXV9V.yJ2BXV8V.yZ2BXV+V.yFSDFzqR1ANl836qfFpTfUFnYlw6aW9L2M1+C.9VrSe
and it looks like this:
-
-
@ulrik First, that looks gorgeous, and thank you for posting your code. (I posted my working MIDI capture code a couple days ago - you may want to check out if you haven't already.)
Second, I have similar questions (also posted recently). Reading over the forum, I think a lot of us do. I'll let you know if I discover anything.
-
Time signature changes should not be a problem - internally it's counted in ticks anyway, but I'm afraid that adding support for tempo changes is beyond the scope of the MIDI Player as 99% of the use cases for this module are loop based sequencers that are synced to a external clock.
-
@Christoph-Hart said in About midi files loaded in Hise Midi player:
Time signature changes should not be a problem - internally it's counted in ticks anyway, but I'm afraid that adding support for tempo changes is beyond the scope of the MIDI Player as 99% of the use cases for this module are loop based sequencers that are synced to a external clock.
Ok I understand, but what do you mean about "...Time signature changes should not be a problem - internally it's counted in ticks anyway..."
How would I be able to recognize time signature changes in the middle of the music, can you give an example? -
@Christoph-Hart Somebody's not a progressive rock fan.
-
-
@ulrik Get some Flying Colors going, and I'm all in!