Commit Graph

413 Commits

Author SHA1 Message Date
Francois Best 7ca289d84e chore: Fix internal method casing 2021-08-06 09:35:54 +02:00
François Best 0d605dc8a7
doc: Update contributors
Added @kant for PR #230
2021-08-01 20:02:40 +02:00
Darío Hereñú 3f0a2d3fdb Minor fix (line 65) 2021-08-01 20:00:28 +02:00
lathoub d501f4bb3d end method for Serial Transport
The Transport layer is started, but could never be stopped.
This change will allow the underlying library to call the end() method in the Transport layers (all other Transport layer have the end() method implemented)

Next step is to call the Transport end() method, when ending the MIDI instance
2021-06-08 20:36:38 +02:00
François Best d9149d19df
chore: Better description for Discussions 2020-12-09 14:04:49 +01:00
François Best a93fb27a1c
chore: Add link to Discussions in issue templates 2020-12-09 11:39:42 +01:00
François Best d967c0c389
chore: Disable generic issues
General community-related Q&A is moved to Discussions
2020-12-09 11:34:22 +01:00
François Best d3c361033d
chore: Suggest using Discussions first 2020-12-09 11:28:26 +01:00
François Best 33b294624a chore: Add Feature Request template
Also redirect issues to discussions for project help.
2020-12-09 11:26:09 +01:00
François Best 10ef10bfde feat: Add issue template for bug report 2020-12-09 11:20:27 +01:00
Felix Uhl da8ca5e69a Update search term for library manager 2020-09-16 16:39:29 +02:00
Felix Uhl e292cf61b0 Update library manager screenshot 2020-09-16 16:39:29 +02:00
stfufane 150cecd450 Fix sendPitchBend multiplication 2020-06-08 11:39:16 +02:00
lathoub ff3052ceb4 fix bug in MIDI_CREATE_CUSTOM_INSTANCE
- MIDI Setting in MIDI_CREATE_CUSTOM_INSTANCE, but Setting for SerialMIDI
- MACRO outside of Namespace
2020-05-16 15:51:03 +02:00
Francois Best e5ee620139 doc: Add contributor 2020-04-28 07:34:38 +02:00
Francois Best 0d9f6f4731 chore: Release 5.0.2
Includes fix for missing MIDI_CREATE_CUSTOM_INSTANCE,
see #150.
2020-04-28 07:31:42 +02:00
Rolel 42 80dfb8333c [FIX] Repair missing MIDI_CREATE_CUSTOM_INSTANCE
The MIDI_CREATE_CUSTOM_INSTANCE function was removed with 5.0 branch. This commit brings it back.
2020-04-28 07:28:24 +02:00
Francois Best d0110e4866 doc: Thru is off by default in other transports 2020-04-24 07:10:21 +02:00
Francois Best ce57d26d2c doc: Update example 2020-04-24 07:10:02 +02:00
Francois Best 47ce2acc16 chore: Update version & package metadata 2020-04-24 06:52:25 +02:00
Francois Best 1375b0b6aa doc: Update URL 2020-04-24 06:52:02 +02:00
Francois Best 116dba12eb chore: Update compiler config file 2020-04-24 06:49:55 +02:00
Francois Best aa4912b587 chore: Update version in documentation 2020-04-24 06:47:49 +02:00
Francois Best c0a66516f6
thruActivated as a property of the Transport layer (#148)
* thruActivated as a property of the Transport layer

* thruActivated defaults to true

Co-authored-by: lathoub <lathoub@gmail.com>
2020-04-24 06:44:59 +02:00
lathoub a5e31f15a4
thruActivated defaults to true 2020-04-23 22:14:59 +02:00
lathoub 99a981be5e thruActivated as a property of the Transport layer 2020-04-23 22:08:15 +02:00
Francois Best 419c74adfe doc: Add AppleMIDI & release notes 2020-04-20 17:33:46 +02:00
Francois Best 5e9a0165d9 docs: Contributions 2020-04-20 17:30:03 +02:00
Francois Best d600656f04 Merge branch dev into master 2020-04-20 17:09:02 +02:00
Francois Best 804e59669e
Merge pull request #95 from FortySevenEffects/feat/4.4.0
v5.0.0
2020-04-20 17:02:01 +02:00
Francois Best fc360d60b3 chore: Remove Google test coverage 2020-04-20 16:47:36 +02:00
Francois Best b384278b29 chore: Ignore edge cases for coverage 2020-04-20 15:36:12 +02:00
Francois Best ae49d3037d chore: Ignore external coverage 2020-04-20 15:31:26 +02:00
Francois Best 2d6bdd6dc2 doc: Move Documentation section up 2020-04-20 15:22:41 +02:00
Francois Best c2d17ec429 chore: Update lcov to latest available version 2020-04-20 15:22:18 +02:00
lathoub c1d2f476b8
Update unit-tests_MidiInput.cpp 2020-04-20 14:31:51 +02:00
lathoub 45fb2df88f
listen on channel 1 by default
Listening to all channels by default breaks backward compatibility
2020-04-20 14:17:43 +02:00
lathoub 05487c5415
Example not relevant for Due and ZERO as they lack support for SoftwareSerial 2020-04-20 14:11:58 +02:00
lathoub e06e3677f0
bug fix: HardwareSerial => SoftwareSerial 2020-04-20 13:09:39 +02:00
lathoub c5330945ee
Delete altPinSerialMIDI.h 2020-04-20 13:09:01 +02:00
lathoub 1e14162bf4
rewrote AltPinSerial to use SoftwareSerial 2020-04-20 13:08:49 +02:00
lathoub 9d43a8370e
added AltPinSerial example 2020-04-19 21:37:39 +02:00
lathoub b457f6db7c added USB Migration and other Transport mechanisms 2020-04-17 22:09:06 +02:00
lathoub be85c7b3e0 SerialUSB is of type Serial_, not HardwareSerial 2020-04-17 22:05:49 +02:00
Francois Best 23c53cafe1 fix: Remove USB-based Teensys from CI 2020-04-17 08:41:16 +02:00
Francois Best f8707ed49a chore: Add all Teensy boards to CI 2020-04-17 08:22:05 +02:00
Francois Best a9664ef4a4 fix: Use SysEx size in Settings 2020-04-17 08:15:42 +02:00
Francois Best 7a96fec0b5 chore: Update Google Test & remove USBMIDI 2020-04-17 08:15:01 +02:00
lathoub 2c657a38d1
Added support for Active Sensing and SysEx command segments (v4.4.0) (#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 bd2f6476b2.

* bring in other Platform (remove usb)

* added BaudRate

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

This reverts commit 122ebe1dc3.

* Revert "moved code to avoid doc clash"

This reverts commit ef878344cd.

* 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 <lathoub@gmail.com>
2020-04-08 10:36:10 +02:00
Francois Best cab564b995
Merge pull request #125 from lathoub/patch-1
changed default size of enums (int) to a smaller type
2019-08-29 12:28:05 +02:00