Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update midi.c #18

Closed
wants to merge 1 commit into from
Closed

Update midi.c #18

wants to merge 1 commit into from

Conversation

FedeUlivi
Copy link

Updated function Midi_BuildEvent because of malfunction and errors in PortMidi library. Tested with Notator and Cubase.
News:

  • note on/off handling
  • running status accordinf to MIDI spec
  • sys ex events.

Updated function  Midi_BuildEvent  because of malfunction and errors in PortMidi library. Tested  with Notator and Cubase.
News:
- note on/off handling
- running status accordinf to MIDI spec
- sys ex events.

// -- status byte
if (byte & 0x80)
if ((byte & 0x80) > 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does not make any sense. Or what's the difference to the previous behavior?

{
if (byte >= 0xF8)
{

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary white space change, please avoid that.

}

// -- data byte
else
{
if (processingSysex)
midimsg |= ((Uint32)byte) << shifts[bytesCollected++];
if ((expectStatus == true) && (runningStatus >= 0x80) && (processingSysex == false)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the Hatari coding style when adding new code.

huth pushed a commit that referenced this pull request Dec 12, 2021
And add trace output for parsed MIDI events.

Cleaned up version of a fix provided by FedeUlivi/federik0:
	#18
	https://www.atari-forum.com/viewtopic.php?p=426400#p426400

+ documentation update.
@huth
Copy link
Member

huth commented Dec 13, 2021

@huth huth closed this Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants