I remember struggling with the frequency stuff too and will have to
spend some time looking at the code to answer your questions. It's
all complicated by the fact these functions behave a bit differently
depending on the file format.
Re your second question, this is from the midi spec at
http://www.borg.com/~jglatt/tech/midispec/noteon.htm:"The second data byte is the velocity, a value from 0 to 127. "
Midi messages are genrally composed of strings of 2 or 3 bytes. The
note-on message has 3 bytes, one of which holds the velocity. The
velocity resolution happens to be 0-127, so 1 bit is indeed unused.
Feel free to clarify the comment if you think it is misleading.
Cheers,
Robin
On 16/06/06,
quantum_box@... <
quantum_box@...> wrote:
> I've recently tried to add the tuning modes, but I haven't got far as there have been problems understanding some of the code, so help would be appreciated. I have intensively examined functions like GetPeriodFromNote, GetFreqFromPeriod, TransposeToFrequency but I have had real problems figuring out how exactly they are used in getting right frequency of certain note; for example even the meaning of 'period' isn't clear. So basically is there a 'simple' answer to question
> "how note information is 'transformed' to frequency of played note"(I probably won't understand a complete answer, but even some simple description might help.). In mpt23 it seemed easy, but I would like to know the thing a bit better; for example, what is the pure numerical constant 8363 which is used as a plain number every here and there in the code?
>
> Although it is quite enough if try to understand to above things, but since I've also looked the midi-code a bit, I could ask that why in CViewPattern::OnMidiMsg(...) it is said that for example there are 8 bits for velocity(0-127) - 8 bits for 128 values(2^8 == 256)?
>
> -Ahti
>
> ...................................................................
> Luukku Plus paketilla pääset eroon tila- ja turvallisuusongelmista.
> Hanki Luukku Plus ja helpotat elämääsi.
http://www.mtv3.fi/luukku>
>
>
> _______________________________________________
> Modplug-developers mailing list
>
Modplug-developers@...
>
https://lists.sourceforge.net/lists/listinfo/modplug-developers>
_______________________________________________
Modplug-developers mailing list
Modplug-developers@...
https://lists.sourceforge.net/lists/listinfo/modplug-developers