Skip to content

Commit

Permalink
Release 1.0.4. (#56)
Browse files Browse the repository at this point in the history
* Fix misinterpreted Note On messages. (#55)

* Tweak comment.

* Fix license test.

* Bump version number and update CHANGELOG.
  • Loading branch information
odub authored Nov 16, 2017
1 parent 8b5d5ed commit a1cd261
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## [1.0.4] - 2017-11-16
### Fixed
- Fixed an error where Note On messages were misinterpreted as Control Change
messages. Thanks [@grz0zrg].
- Updated LICENSE file to match other ROLI ISC licensed projects. Thanks
[@bensupper].

## [1.0.3] - 2017-10-18
### Fixed
- Fixed error in docs usage example.
Expand All @@ -10,7 +17,7 @@

### Fixed
- Fixed scroll positions set by in-page links in docs.
- Fixed script tag src typo in docs.
- Fixed script tag src typo in docs. Thanks [@manifestinteractive].

## [1.0.1] - 2017-06-19
### Fixed
Expand All @@ -33,6 +40,12 @@ scaled rather than raw 14-bit integers.
### Removed
- Removed `recorder` class.

[@grz0zrg]: https://github.com/grz0zrg
[@manifestinteractive]: https://github.com/manifestinteractive
[@bensupper]: https://github.com/bensupper

[1.0.4]: https://github.com/WeAreRoli/mpejs/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/WeAreRoli/mpejs/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/WeAreRoli/mpejs/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/WeAreRoli/mpejs/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/WeAreRoli/mpejs/compare/v0.1.8...v1.0.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mpe",
"version": "1.0.3",
"version": "1.0.4",
"description": "Next generation MIDI for the web",
"keywords": [
"mpe",
Expand Down
4 changes: 3 additions & 1 deletion src/mpeInstrument/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ const deriveActionType = (midiMessageType, channel, dataBytes) => {
case types.NOTE_ON:
// A note on with velocity 0 is a treated as a note off
if (dataBytes[1] === 0) return types.NOTE_OFF;
break;
case types.CONTROL_CHANGE:
// CC 74 is used for timbre messages
if (dataBytes[0] === 74) return types.TIMBRE;
// CC 123 on the master channel is an all notes off message
if (dataBytes[0] === 123 && channel === 1) return types.ALL_NOTES_OFF;
break;
}
return midiMessageType;
};
Expand All @@ -45,7 +47,7 @@ const deriveTypeSpecificData = (baseData, currentStateCallback) => {
return { noteNumber: dataBytes[0], noteOnVelocity: dataBytes[1], channelScope };
}
case types.NOTE_OFF:
// A note on with velocity 0 is treated as a note off with velocity 64
// A Note On with velocity 0 is treated as a note off with velocity 64
return midiMessageType === types.NOTE_ON ?
{ noteNumber: dataBytes[0], noteOffVelocity: defaults.NOTE_OFF_VELOCITY } :
{ noteNumber: dataBytes[0], noteOffVelocity: dataBytes[1] };
Expand Down
4 changes: 2 additions & 2 deletions test/functional/metadata.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs';

describe('license', () => {
it('contains an up to date copyright notice', () => {
const license = fs.readFileSync('./LICENSE', 'utf8');
expect(license).to.include(`Copyright (c) ${new Date().getFullYear()}, ROLI Ltd.`);
const license = fs.readFileSync('./LICENSE.txt', 'utf8');
expect(license).to.include(`Copyright (c) ${new Date().getFullYear()} ROLI Ltd.`);
});
});

0 comments on commit a1cd261

Please sign in to comment.