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

New metronome callback #22

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
8258c9f
Fix off by one for knobs. The first knob in bank 0 now changes the ma…
Apr 24, 2019
04f71c9
Do not pause when pressing restart and we are already playing
Apr 24, 2019
af9ebd0
Repeat repeats the whole project
Apr 24, 2019
d184ae8
Merge pull request #1 from leonardder/moreActionsAndFixes
brummbrum May 13, 2019
8e434f3
Update niMidi.cpp
brummbrum May 13, 2019
6be3125
Track navigation in Mixer mode
brummbrum May 13, 2019
543e7c1
Merge pull request #2 from brummbrum/Test
brummbrum May 13, 2019
e5b1ef1
Stable
brummbrum May 13, 2019
4229c69
TrackSelect
brummbrum May 14, 2019
9b54422
More fixes
brummbrum May 14, 2019
9031be9
BankSelection Working
brummbrum May 15, 2019
59ccf32
Merge pull request #3 from brummbrum/BankSelection
brummbrum May 15, 2019
928a00e
Fixed Volume & Pan
brummbrum May 16, 2019
d871095
VU meter tests
brummbrum May 17, 2019
50ebd55
VU meter working
brummbrum May 17, 2019
87884f7
Cleanup1
brummbrum May 17, 2019
44cd80b
Cleanup2
brummbrum May 17, 2019
f3d2fcb
Merge branch 'MoreMixerUpdates' into master
brummbrum May 18, 2019
a4fda2c
Add log conversion library functions
brummbrum May 18, 2019
47a503f
Log VU meters calibrated
brummbrum May 18, 2019
77d5f22
fix & comment
brummbrum May 18, 2019
cf79108
Meter precision calibration finished
brummbrum May 20, 2019
3170cbd
Update niMidi.cpp
brummbrum May 20, 2019
b484e00
Ready for pulling Nav Patch
brummbrum May 20, 2019
ef46618
Merge branch 'master' into IncrNavPatch
brummbrum May 20, 2019
b6af0eb
Merge pull request #6 from brummbrum/IncrNavPatch
brummbrum May 20, 2019
0729a36
Update Readme
brummbrum May 20, 2019
24eda7a
Peak Meters Ready
brummbrum May 20, 2019
3b62589
Merge branch 'master' of https://github.com/brummbrum/reaKontrol
brummbrum May 20, 2019
e96e5f9
Peak Meters Calibrated
brummbrum May 20, 2019
8844e20
Substitute pow() with exp()
brummbrum May 20, 2019
f9e6eba
Code optimization (see comments)
brummbrum May 21, 2019
bbfec19
Bring back debug diagnostics
brummbrum May 21, 2019
75630b6
Update Readme
brummbrum May 21, 2019
00e1554
minus96dB and code simplification
brummbrum May 21, 2019
d753b28
Merge pull request #7 from brummbrum/MeterResolution-96dB
brummbrum May 22, 2019
27af86e
Sceleton for Volume Text
brummbrum May 22, 2019
23dfe72
Volume Text and Marker working
brummbrum May 22, 2019
8c082fb
Volume Text, Marker and Callback working
brummbrum May 23, 2019
7258d68
Merge pull request #8 from brummbrum/VolumeText_in_MixerView
brummbrum May 23, 2019
e814a3c
More ToDo comments
brummbrum May 23, 2019
d232fa7
Changes to tracklist update the Mixer View
brummbrum May 24, 2019
4b09ca3
Merge pull request #9 from brummbrum/TrackListChange
brummbrum May 24, 2019
291bba9
Transport Button Lights working
brummbrum May 24, 2019
4414a8a
Merge pull request #10 from brummbrum/Control_of_Button_Lights
brummbrum May 24, 2019
9657b30
Pan Marker and Callback working
brummbrum May 25, 2019
654ecac
Merge pull request #11 from brummbrum/PanText_in_Mixer_View
brummbrum May 25, 2019
4c93513
Volume & Pan change of selected track via 4D encoder
brummbrum May 25, 2019
4deff3e
Merge pull request #12 from brummbrum/SelectedTrack_Vol_Pan_Change
brummbrum May 25, 2019
72f06ea
Mute Solo Recarm
brummbrum May 27, 2019
48d9cc2
Mute and Solo Working
brummbrum May 27, 2019
2cb3c2e
Merge pull request #13 from brummbrum/Mute_Solo_RecArm_Callbacks
brummbrum May 27, 2019
a966ed4
Track names, master track, bank button lights
brummbrum May 27, 2019
a3108f7
Merge pull request #14 from brummbrum/TrackNameChanges
brummbrum May 27, 2019
7f3229d
Track(s) muted by solo implemented
brummbrum May 27, 2019
55271d8
Merge pull request #15 from brummbrum/TrackMutedBySolo
brummbrum May 27, 2019
2c2a2ab
Push Encoder to refocus bank
brummbrum May 27, 2019
547566b
Update readme.md
brummbrum May 27, 2019
e71fc66
Edit a few comments
brummbrum May 28, 2019
3d3c13a
Metronome Button Light Working
brummbrum May 28, 2019
fabac72
Merge pull request #16 from brummbrum/EXPERIMENTAL_MetronomeStateFeed…
brummbrum May 28, 2019
fcf8740
ToDo comments updated
brummbrum May 28, 2019
3d1d160
Update readme.md
brummbrum May 29, 2019
f2fa673
Metronome button light via callback
brummbrum Jun 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions include/reaper/WDL/db2val.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef _WDL_DB2VAL_H_
#define _WDL_DB2VAL_H_

#include <math.h>

#define TWENTY_OVER_LN10 8.6858896380650365530225783783321
#define LN10_OVER_TWENTY 0.11512925464970228420089957273422
#define DB2VAL(x) exp((x)*LN10_OVER_TWENTY)
static inline double VAL2DB(double x)
{
if (x < 0.0000000298023223876953125) return -150.0;
double v=log(x)*TWENTY_OVER_LN10;
return v<-150.0?-150.0:v;
}


#endif
93 changes: 24 additions & 69 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,24 @@
# ReaKontrol

- Author: James Teh &lt;[email protected]&gt; & other contributors
- Copyright: 2018-2019 James Teh & other contributors
- License: GNU General Public License version 2.0

ReaKontrol is a [REAPER](https://www.reaper.fm/) extension which provides advanced host integration for [Native Instruments Komplete Kontrol keyboards](https://www.native-instruments.com/en/products/komplete/keyboards/).
It currently only runs on Windows and requires REAPER 5.92 or later.

ReaKontrol supports Komplete Kontrol S-series Mk2, A-series and M-series keyboards.
While some initial work has been done to support S-series Mk1 keyboards, this is not yet functional.

## Supported Functionality
The following functionality is currently supported:

- Focus follow; i.e. the Komplete Kontrol instance is switched automatically when a track is selected.
- Transport buttons: Play, Restart, Record, Stop, Metronome, Tempo
- Edit buttons: Undo, Redo
- Track navigation
- Clip navigation: moves between project markers
- Mixer view: volume/pan adjustment with the 8 knobs
- The track name and mute, solo and armed states are displayed as appropriate.

## Download and Installation
For now, there is no installer.
You can [download the latest build of the extension here](https://osara.reaperaccessibility.com/reaper_kontrol.dll).

Once downloaded, simply copy the `reaper_kontrol.dll` file you downloaded to the `%appdata%\REAPER\UserPlugins` folder using Windows File Explorer.
You can get to this folder by copying the name above and pasting it into either the Windows Run dialog or the File Explorer address bar.

You do not need to add a control surface or perform any other configuration in REAPER.
Komplete Kontrol Host integration should work as soon as you start REAPER with a Komplete Kontrol keyboard connected.

## Reporting Issues
Issues should be reported [on GitHub](https://github.com/jcsteh/reaKontrol/issues).

## Building
This section is for those interested in building ReaKontrol from source code.

### Getting the Source Code
The ReaKontrol Git repository is located at https://github.com/jcsteh/reaKontrol.git.
You can clone it with the following command, which will place files in a directory named reaKontrol:

```
git clone https://github.com/jcsteh/reaKontrol.git
```

### Dependencies
To build ReaKontrol, you will need:

- Microsoft Visual Studio 2017 Community:
* Visual Studio 2019 is not yet supported.
* [Download Visual Studio 2017 Community](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15)
* When installing Visual Studio, you need to enable the following:
- On the Workloads tab, in the Windows group: Desktop development with C++
- Python, version 2.7:
* This is needed by SCons.
* Python 3 and later are not yet supported.
* [Download Python](https://www.python.org/downloads/)
- [SCons](https://www.scons.org/), version 3.0.4 or later:
* Once Python is installed, you should be able to install SCons by simply running this at the command line: `pip install scons`

### How to Build
To build ReaKontrol, from a command prompt, simply change to the ReaKontrol checkout directory and run `scons`.
The resulting dll can be found in the `build` directory.

## Contributors
- James Teh
- Leonard de Ruijter
# ReaKontrol-Fork
- Fork of the excellent ReaKontrol repository published by James Teh: https://github.com/jcsteh/reaKontrol
- Fork Author: brumbear@pacificpeaks
- Fork Copyright: 2019 Pacific Peaks Studio, see individual copyrights in source code
- License: GNU General Public License version 2.0.
- License Notes: As the original work is published under GPLv2 the modified programs are also licensed under GPLv2. May be updated to GPLv3 if copyright holder of original work agrees to update too.

## Feature Integration & Releases
This fork is mainly a bleeding edge development branch aiming to continuously add functionality to ReaKontrol.
- New features will be merged continously into this fork's master @ https://github.com/brummbrum/reaKontrol
- Testing and calibration is done with NI S-Series Mk2 Komplete Kontrol Keyboard.
- When a critcial amount of functionality has been reached there will be stable releases in a dedicated release branch.
- Binaries are available for releases (Windows only): https://github.com/brummbrum/reaKontrol/releases

## Upstream Integration into Parent Repository
- New features are also offered to the upstream repository @ https://github.com/jcsteh/reaKontrol
- Some updated features may or may not be merged with the upstream master due to possibly different priorities
- The sequence in which new features are published may be different between this fork and the upstream repository due to possibly different priorities

## Which branch should you follow?
- To the extent that features are integrated into the upstream master it is recommended to stick to the parent repository @ https://github.com/jcsteh/reaKontrol. The parent repository also takes into account dependencies to OSARA relevant for users using screen readers.

## Build instructions and additional description
- Please refer to the parent repository @ https://github.com/jcsteh/reaKontrol
11 changes: 11 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,17 @@ BaseSurface::~BaseSurface() {
}

void BaseSurface::Run() {
// ToDo: Rather than putting this in BaseSurface consider to just override Run() in NiMidiSurface and call the superclass : BaseSurface::Run()
const int METER_UPDATE = 0; // Update on every call for now (approx. 30/s)
static int simpleTimer = 0;
if (simpleTimer < METER_UPDATE) {
++simpleTimer;
}
else {
simpleTimer = 0;
this->_peakMixerUpdate();
}
// --------------------------------------------------------------------------------
if (!this->_midiIn) {
return;
}
Expand Down
4 changes: 4 additions & 0 deletions src/mcu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ class McuSurface: public BaseSurface {
this->_sendRaw(message);
}

void _peakMixerUpdate() override {
// DUMMY. Currently only implemented for niMiDi (Mk2). Maybe better to move Run() callback into niMidi.cpp and mcu.cpp?
}

private:
void _sendRaw(const string& message) {
// MIDI_event_t includes 4 bytes for the message, but we need more.
Expand Down
Loading