Thanks to visit codestin.com
Credit goes to github.com

Skip to content

v5.0.0 #95

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

Merged
merged 51 commits into from
Apr 20, 2020
Merged

v5.0.0 #95

merged 51 commits into from
Apr 20, 2020

Conversation

franky47
Copy link
Member

@franky47 franky47 commented Mar 10, 2018

Arduino MIDI Library 5.0.0

Note: After nearly two years of stalling, we're going to release the changes in what used to be v4.4.0 into a major version change (5.0.0), to include @lathoub's transports (USB, BTLE, IPMIDI, etc..)

SysEx related features:

@franky47 franky47 self-assigned this Mar 10, 2018
Francois Best and others added 25 commits March 10, 2018 17:07
Don't do it globally as externals may have warnings we can't do much about.
fix: Implicit conversion & sign comparison compiler warnings

- Increase warning level for sources
- Fix implicit conversion & sign comparison warnings
Removed unused implementation of UsbMidiEventPacket
franky47 and others added 5 commits November 7, 2018 12:09
Fix typos, add USB support
Easily save over 200 bytes for the library by using the smallest type for these MIDI types.
changed default size of enums (int) to a smaller type
…138)

* stuff to ignore list

* Update midi_Defs.h

* added support for ActiveSensing

From: https://www.midi.org/specifications/item/table-1-summary-of-midi-message

Active Sensing. This message is intended to be sent repeatedly to tell the receiver that a connection is alive. Use of this message is optional. When initially received, the receiver will expect to receive another Active Sensing message each 300ms (max), and if it does not then it will assume that the connection has been terminated. At termination, the receiver will turn off all voices and return to normal (non- active sensing) operation.

* replaced ActiveSensing with Sender Active Sensing

Receiver active Sensing is not implemented (yet)

* added support for receiving SysEx command segments

Very long SysEx mesaages are cut in to multiple command segments
Where a normal SysEx starts with F0 and ends with F7, the first segment will start with F0 and end with F0, the middle section (optional) start with F7 and ends with F7 - the last segments starts with F7 and ends with F0

* lift and shift of the Serial code into a seperate class, allowing for other serializers

lift and shift of the Serial code into a seperate class, allowing for other serializers as AppleMIDI, USBMIDI, ipMIDI, BLE-MIDI

* added Platform class to abstract millis()

* add MidiType to beginTransmission

Avoids reparsing of the stream in the transport layer, in order to get the MidiType

* active sensing defaults to false, to avoid spamming devices

* set ActiveSensing Periodicity in ms

Gives more control over the bool value. Typical value is 300 (ms) - an Active Sensing command is send every 300ms; or 0 (zero) to disable sending ActiveSensing

* added namespace reference

* renamed Encoder -> Transport, added MidiType to beginTransmission in serialMIDI

* added callback for Message

before the specific callback are called, a generic mMessage callback can be fired to inform the user that 'a' message has been received.

* added send(MidiMessage), added (untested) bridge example

added send(MidiMessage) for Bridge application (that convert MIDI transport x into MIDI transport y), avoiding parsing entry a stream, setting up all callback - whilst this allows for passing the content, without to much processing/parsing.

Had to move mPendingMessageExpectedLenght into MidiMessage to avoid parsing the data again, just to know the size

Added Bridge example (untested)

* changed based on Franky47's feedback

- send: pass the message as a const ref, to avoid copies
- add mSerial.begin (with Baudrate - added Settings)
- ThruActivated defaults to true
- class name serialMIDI => SerialMIDI

* return reference to Transport layer

* return a *pointer* (not a ref) to the transport layer

* mPendingMessageExpectedLength as before

mMessage.length is reset to 0 before the callback, so bring back mPendingMessageExpectedLength as before, and set mMessage.length (and not reset it)

* DefaultPlatform for Arduino

* strong typing Channel in the callbacks

* aliasing for callbacks (and default initializers

* cleanup setHandleMessage

unfortunately, not using aliases yet (too complex)

* Fixed "FML" case: fall down here with an overflown SysEx..

Splitting larger incoming messages into smaller SysEx packets - using an RrtpMidi trick:
            //   first:  0xF0 .... 0xF0
            //   midlle: 0xF7 .... 0xF0
            //   last:   0xF7 .... 0xF7

see: https://tools.ietf.org/html/rfc4695#section-3.2

(Understanding this is not part of the original MIDI spec, but does allow for receiving very very large SysEx messages on a small footprint (does require some 'handy' parsing))

SysExMaxSize in Settings can be reduced significatly (16bytes works fine - pending use case)

* + receiver ActiveSensing, + error Callback

1) Active Sensing:
Once an ActiveSensing message is received, the system checks for timeouts: if no message is received within the specified 300ms (see in _Defs), an error is set and the checks for timeout stop.

2) added a callback for errors. 2 errors are defined: parse error and ActiveSensing timeout

* cleanup of basic example

use LED_BUILTIN

* + Manufacturer System Exclusive ID (incomplete)

* + noteValues

* added SendCommon, consistent with SendRealTime

including:

sendClock, sendStart, sendStop, sendContinue, sendActiveSensing, sendSystemReset

* UseSenderActiveSensing & UseReceiverActiveSensing to enable/disable Active Sensing

UseSenderActiveSensing & UseReceiverActiveSensing in Settings are global switches to turn on/off ActiveSensing (and save memory)

* use #defined value, not the literal

* cleanup

* removed deprecated MidiFilterMode (to be removed for v5)

* getting ready for v5

* prepare for v5

* updating authors

* Removed USB examples

* added header

* removed typedef

when instanciating multiple instances of SerialMIDI, a redefinition error accors because of typing of the serial##Name.
Fix: removed the typdef, a bit harder to read, but avoided complex #ifdef

* move bridge example to other Transport mechanisms

* Update Bench.ino

* Create NoteNames.ino

demonstrate use of MIDI_NAMESPACE::NoteValues[inNote].strptr

* moved #version to MIDI.h

#version of the library does not belong in general MIDI definitions
(making midi_Defs.h as generic as possible - usable on other platforms)

* adding comment section

* shorter syntax using iif

* moved code to avoid doc clash

* added Tick (0xF9)

* Simplified NoteValues

Need need for extra index (that is the same as the noteName anyway)

* Removed Undefined_F9 (Tick) as an invalid token (so it valid now)

* removed references to USB in the test scripts

* setting the CMake env

* removed USB references

* struggling with travis

* LCOV_EXCL_LINE in sendCommon

* order of initialization

* reorder variables for initialisation

* extending platforms

* adding boards (but not the Zero)

* fixing cmake

* moved RingBuffer to SerialMock

* fix cmake removing RingBuffer

* Update CMakeLists.txt

* using bitwire operators (works on all platforms)

* Update midi_Platform.h

* removed NoteNames

* simplify test (will be rolled back later)

* Update unit-tests_MidiInput.cpp

* Update unit-tests_MidiInput.cpp

* Revert "Update midi_Platform.h"

This reverts commit bd2f647.

* bring in other Platform (remove usb)

* added BaudRate

* Revert "using bitwire operators (works on all platforms)"

This reverts commit 122ebe1.

* Revert "moved code to avoid doc clash"

This reverts commit ef87834.

* restored after very funcky commits and rollbacks (Sorry!)

* add Transport layer

* removed SerialMock test

* Update unit-tests_MidiInput.cpp

* Update unit-tests_MidiInput.cpp

* Update unit-tests_MidiInput.cpp

* Update unit-tests_MidiInput.cpp

* fixed MidiInterface<SerialMock => MidiInterface<Transport

* SerialMIDI should not aware of the channel

* Update unit-tests_MidiThru.cpp

* Update midi_Defs.h

* avoid shadow parameters and buf fix

* Update CMakeLists.txt

* Update unit-tests_MidiOutput.cpp

* Update midi_Settings.h

* Update unit-tests_MidiInput.cpp

* Update unit-tests_MidiInput.cpp

* Update unit-tests_MidiInput.cpp

* tmp removed teensy, bug fix sendCommon (unsigned, not byte)

* Update unit-tests_MidiInput.cpp

* fix for Leonardo

* Update DualMerger.ino

* adding tests_MidiInputCallbacks

* Update unit-tests_MidiInputCallbacks.cpp

* preparing to release 5.0.0

* added Alternative Pin for Serial port example

* default listen on all channel as in #96

* Update unit-tests_MidiInput.cpp

Co-authored-by: lathoub <[email protected]>
@franky47 franky47 changed the title feature/4.4.0 v5.0.0 Apr 14, 2020
@franky47
Copy link
Member Author

franky47 commented Apr 14, 2020

Some steps before releasing 5.0.0:

  • Fix Teensy boards in Travis CI (teensy20 has been renamed teensy2, there might be other changes)
  • Release notes
    • Migration guide for USB transport
    • Links to transports in README.md

@franky47 franky47 added this to the v5.0 milestone Apr 14, 2020
@franky47 franky47 linked an issue Apr 14, 2020 that may be closed by this pull request
@franky47 franky47 mentioned this pull request Apr 14, 2020
@franky47 franky47 merged commit 804e596 into dev Apr 20, 2020
@franky47 franky47 deleted the feat/4.4.0 branch April 24, 2020 04:24
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.

Roadmap to v5
3 participants