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

Fix MIDI output #666

Merged
merged 3 commits into from
Mar 7, 2019
Merged

Conversation

elpescado
Copy link
Contributor

@elpescado elpescado commented Oct 14, 2018

I have been looking at #411 and tried to fix Issues with incorrect MIDI values. It seems that Hydrogen sends wrong MIDI note (24 tones lower than it should) - for example it sends 12 instead of 36. I fixed that and I hope I hadn't break anything else.

Acceptance criteria

  1. Instrument should send MIDI Note On message with pich set to MIDI note of
    instrument being played. That Note On message should be followed by
    Note Off message with the same pitch.

Eg. playing instrument with note 36 should play note 36 (C3).

  1. When "Use output note as input note" is not enabled,
    n-th instrument should respond to NoteOn messages
    with pitch set to 35+n.

Eg. Note On with pitch 47 (B3) should trigger 12th instrument

  1. When "Use output note as input note" is enabled,
    each instrument should respond to Note On messages with pitch
    set to MIDI note assigned to that instrument.

Eg. Note On with pitch 56 (G#4) should trigger instrument that
has MIDI note set to 56.

  1. When exporting MIDI file, exported MIDI notes should have
    correct pitches (i.e. the same pitches that are assigned to
    respective instruments).

Eg. every note from instrument with MIDI note 38 should
have pitch 38 (D3) in output MIDI file.

That case should be covered by automated tests

Test results

Hydrogen provides 4 MIDI drivers: ALSA, CoreMIDI, Jack and PortMIDI. Unfortunately, I've been only able to test CoreMIDI, so I need your help! Please write your test results along with driver name in comment, and I'll update the table:

ALSA CoreMIDI Jack PortMIDI
Case 1
Case 2
Case 3
Case 4

In my testing I've been using MidiPipe utility:

zrzut ekranu 2018-10-14 o 20 47 12

I think there are similar utilities for other platforms.


Note names assume C5 = 60

@jduemes
Copy link

jduemes commented Jan 14, 2019

I tested your branch (hydrogen-git untagged.7aae0a8a6ad8f7e6f06e.r3325.d1ccfeb2-1)
Jack and Alsa: Check positive for all 4 cases.

$ uname -r
4.20.0-arch1-1-ARCH

@thijz
Copy link
Member

thijz commented Jan 16, 2019

i will test when i find the time
great to see that you are working on thes @elpescado !

@jeremyz jeremyz merged commit 6ac6c29 into hydrogen-music:master Mar 7, 2019
@elpescado elpescado deleted the bugfix/fix_midi_pitch branch March 7, 2019 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants