Hi Willy,

2013/2/24 Willy Foobar <[email protected]>:
> Hallo lmuse team,
>
> Dear Werner Schweer,
>
>
>
> I am a follower of lmuse for a long time.
>
>
>
> I need for a project of myine a tool to parse midi files.
>
> My understanding of all of the MIDI events is quite far.
>
> But I have problems in understanding the runstate issue.
>
>
>
> I used grepmidi.cpp at basis.
>
>
>
> The only problem is,
>
> How to handle midi events that don't have the uppermost bit set.
>
> // semms to have anything in common with "runstate".
>
>
>
> in grepmidi.cpp: in line 146 and folowing are some commandos I don't find
> any match in the documentation.
>
>
>
> ..................................
>
> if ((me & 0x80) == 0) {
>
> if (runstate == -1)
>
> return -6; //WHAT IS THIS ABOUT 1)

According to the main loop the program exits when there is no running state.
Why the program needs this I do not know.

>
> a = me; //WHAT IS THIS ABOUT 2)
>
> me = runstate; //WHAT IS THIS ABOUT 3)

I would not say I understand how this works or the details of the spec
but the definition of running state can be read here:
http://home.roadrunner.com/~jgglatt/tech/midispec/run.htm

It seems to me the program keeps track of the last midi event when
using running state.
"a" above stands for aftertouch I think.

>
> }
>
> }
>
> switch (me & 0xf0) {
>
> case 0x80:
>
> case 0x90:
>
> case 0xa0:
>
> case 0xb0:
>
> case 0xe0:
>
> getc(f);
>
> ++cpos;
>
> case 0xc0:
>
> case 0xd0:
>
> if (a == -1) { //WHAT IS HIS ABOUT 4)
>
> a = getc(f);
>
> ++cpos;
>
> }
>
> runstate = me; //WHAT IS HIS ABOUT 5)
>
> break;
>
> case 0xf0: // SYSTEM-EVENT
>
> ..................
>
>
>
>
>
> can anybody explain me what the marked issues really are about.
>
>
>
> I use the MIDI docs:
>
>
>
> "MIDI File Format - The Sonix Spot"
>
> "Standard MIDI - File Format Spec. 1.1"
>
>
>
> Yours,
>
> Willy

I don't know if Werner saw your original question but since the
program is very old I'd say he probably does not remember.
I can't say I have ever tried using it myself so I don't know if it
was perhaps made for some specific use.

Since you brought it up I guess we should do one of two things, either
get it working in a documented way or remove it.
Preferrably getting it working but that requires we understand what it
should do.

Willy, what is it exactly you want the program to do?

Regards,
Robert

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Lmuse-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmuse-developer

Reply via email to