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

MIDI: dedicated input names for common types #33

Open
grrrwaaa opened this issue Dec 31, 2020 · 4 comments
Open

MIDI: dedicated input names for common types #33

grrrwaaa opened this issue Dec 31, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@grrrwaaa
Copy link
Contributor

Similar to the use of [out 5 midi_drum36] and [out 6 midi_cc1] etc., add support for [param midi_cc1], [param midi_drum36] etc.

@grrrwaaa grrrwaaa added the enhancement New feature or request label Dec 31, 2020
@grrrwaaa grrrwaaa self-assigned this Dec 31, 2020
@grrrwaaa
Copy link
Contributor Author

[param midi_cc1], [param midi_cc2_ch3], [param midi_bend], [param midi_bend_ch4], [param midi_drum36], [param midi_vel60], [param midi_vel64_ch5] now supported in dev. If channel is not specified, all channels receive (with exception of midi_drum, which defaults to channel 10).

The most obvious missing item is midi notes (pitches). This is tricky since a single [param] can't capture both pitch and velocity, but moreso because of polyphony. We could support translating midi pitch to a monophonic style cv pitch input, or even polyphony with note1, note2, etc., but this requires some schema for allocating notes (first held, last held, highest, lowest, etc.). It seems like this might be better handed over to user-level code? The older "raw" style of midi handling is still available as a fallback.

@grrrwaaa
Copy link
Contributor Author

grrrwaaa commented Jan 10, 2021

[param midi_clock] and [param midi_play] also included.

Note for future questions: Midi clock runs at 24ppqn. Although there will be a tiny bit of slop (0.3% per beat) and latency due to callback rate, it is almost certainly below threshold of perception (assuming even MIDI is reliable...) -- but dropped clocks are possible: At 180bpm that means 72 ticks per second, 13-14ms period. Daisy callbacks (param updates) are at worst every 1.5ms (and could be much faster), but still it's possible that clock pulses could be missed. An adaptive tap tempo style algorithm that can handle dropped events would be a good abstraction to add to Oopsy.

@grrrwaaa
Copy link
Contributor Author

grrrwaaa commented Mar 6, 2021

For allocating voices based on a kind of drum machine model, the dev branch of oopsy already has things like [param midi_drum36] which gives a velocity value scaled from 0 to 1. For allocating voices based on a pitch model, we might want to look at things in a similar way to existing MIDI voice handlers like MutantBrain, Yarns, Befaco MIDIThing etc, which have notions of fixed polyphony modes/apps. I’d like to put something together for [param] inputs along these lines too, which would probably be a lot easier to deal with (and perhaps less overhead) than the current raw midi input stream. So, e.g., [param midi_note2_pitch] would give you the midi pitch value of the 2nd held note. The existence of a "midi_note2" would put the note handling into a duophonic mode; the existence of a "midi_note4" would put it into quadraphonic, etc. These could also have _chX postfixes, so that several monophonic voices on different channels could also be supported. What I'm less sure about yet is how to set the voice priority (highest/lowest/last/first/cycling?) -- perhaps just [param midi_note2_last] ?

For reference:

@grrrwaaa
Copy link
Contributor Author

A ton of updates for both MIDI input & output are now in the dev branch.

Now documented here:

https://github.com/electro-smith/oopsy/wiki/MIDI-Input
https://github.com/electro-smith/oopsy/wiki/MIDI-output

Still on the (MAYBE) TODO list:

  • polyphonic note input handling
  • use low- and high-priority output buffers to separate event-like (note, clock, etc.) from signal-like (cc, bend, etc.) messages.
  • combined midi_play_out for stop(0)/continue(1)/start(-1) ?
  • sysex? (it's possible, but is it needed?)
  • midi input for activesense, reset (should this reload the app?), separate transport events?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant