Old 09-15-2018, 12:10 AM   #1
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default Teensy based OSC controller for Reaper

For anyone interested in building their own OSC controller for Reaper, I started a thread on a Teensy based OSC controller over at the PJRC Forum. My focus is on plugin control with extensive text feedback but the controller will of course also handle all the standard track functions.

Here's an example of the data received after triggering the 'reset all control surfaces' action:
Code:
SELECTED TRACK PARAMETERS
	Name		Clean Guitar
	Number		3
	Volume		0.00dB
	Pan		C
	Record		0
	Mute		0
	Solo		0
	Monitor		0

	Send 1		EMT Plate	-19.4dB		center
	Send 2		Time Cube	-46.9dB		center
	Send 3		Send 3		-inf dB		center
	Send 4		Send 4		-inf dB		center
	Send 5		                                		                		                
	Send 6		                                		                		                
	Send 7		                                		                		                
	Send 8		                                		                		                

	Insert 1	1	ReaTuner
	Insert 2	1	SPL TwinTube
	Insert 3	1	Dimension D Chorus
	Insert 4	0	
	Insert 5	0	
	Insert 6	0	
	Insert 7	0	
	Insert 8	0	

SELECTED INSERT PARAMETERS
	Preset		A
	Har On		On
	Sat On		On
	Freq		2
	Har		0.6140
	Sat		0.2000
	Output		0.5000
	Bypass		normal
	Wet		100
			
TRACK OVERVIEW
	1	-8.42dB		C	SEM		Oberheim SEM V		Lexicon
	2	0.00dB		C	Marshall	Big Muff		Lexicon
	3	0.00dB		C	Clean Guitar	ReaTuner		EMT Plate
	4	0.00dB		C	Piano		ReaInsert (Cockos)	Lexicon
	5	-9.72dB		C	Moog		ReaInsert (Cockos)	Lexicon
	6	0.00dB		C	ARP		ReaInsert (Cockos)	Lexicon
	7	-0.29dB		C	OB-6		ReaInsert (Cockos)	Send 1
	8	0.00dB		C	Prophet		ReaInsert (Cockos)	Send 1
	9	+1.13dB		C	Oppo					Lexicon
	10	0.00dB		C	Lexicon		Lexicon 224		Send 1
	11	0.00dB		C	EMT Plate	EMT 140			Send 1
	12	0.00dB		C	Time Cube	Cooper Time Cube	Send 1
	13	-inf dB		C	Track 13				Send 1
	14	-inf dB		C	Track 14				Send 1
	15	-inf dB		C	Track 15				Send 1
	16	-inf dB		C	Track 16				Send 1
A really great feature is the way naming works in Reaper, alias names created for plugins and/or parameters are sent over OSC!
Although the controller setup is pretty basic for now it's already possible to navigate to any plugin(parameter) for editing. Track number and name, plugin name and parameter name are displayed to provide context so the user knows exactly what's being edited and what the current setting is.
Reaper_OSC_test_small.jpg
I'm currently still exploring the possibilities, when I'm confident all the required functionality is available I'll start converting my Teensy based MIDI controller to OSC.
Zeus-DPC-Lexicon-front_small.jpg
The controller has 16 high resolution Bourns EM14 series optical rotary encoders for editing values and two 800x480 pixel displays for presenting data. The buttons on the controller are a subset of what's available on a Mackie MCU. The selection of functions is geared towards use for tracking and/or mastering i.e. working in detail on a single track.
The Reaper OSC interface also offers new possibilities for the controller, it will require some thinking to figure out how to make use of these possibilities with the current interface. The current MIDI controller plugin control only works with Logic Pro X, not with Reaper or any other DAW so I have to come up with something new anyhow.
Gerrit is offline   Reply With Quote
Old 09-15-2018, 12:50 AM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

Congratulations !
This in fact does seem like a very promising project !

BTW. (RE: " unfortunately OSC support is still rare") :
A friend of mine uses a RASPI 3 to connect his Guitar pedal board via OSC to an XR-18 Rack mixer. Works great. He did the programming in Python.
I use Reaper and OSCIIBot to connect my XTouch Compact to the same XR18. I did JSFX scripts and OSCIIBot Scripts in EEL for this.
Moreover the XR18 is connected via OSC with two Tablets (one Windows, and one Android) running the software provided with the XR18.

All lat the same time when practicing and "on stage".

-Michael

Last edited by mschnell; 09-15-2018 at 01:04 AM.
mschnell is online now   Reply With Quote
Old 09-15-2018, 03:23 AM   #3
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

Quote:
Originally Posted by mschnell View Post
Congratulations !
This in fact does seem like a very promising project !

BTW. (RE: " unfortunately OSC support is still rare") :
A friend of mine uses a RASPI 3 to connect his Guitar pedal board via OSC to an XR-18 Rack mixer. Works great. He did the programming in Python.
I use Reaper and OSCIIBot to connect my XTouch Compact to the same XR18. I did JSFX scripts and OSCIIBot Scripts in EEL for this.
Moreover the XR18 is connected via OSC with two Tablets (one Windows, and one Android) running the software provided with the XR18.

All lat the same time when practicing and "on stage".

-Michael
Thanks
Nice setup you created!

I thought about using a RPi as it would allow for more complex graphical user interface design and it has ethernet is built in. On the other hand, a RPi is much more complex with a complete operating system and all that goes with it. A Pi also requires more power, USB buspower is out of the question and I don't know if POE (power over ethernet) can supply enough power. My OSC test controller with 2.4" display is USB bus powered. A Teensy or Arduino is essentially very simple and your program (sketch in Arduino terms) is very close to the hardware itself. With the available OSC library it's pretty easy to get OSC working on a Teensy although not so obvious if you're just getting into Arduino/Teensy programming. The basic OSC controller is intended as a starting point for developing a custom controller, the sketch contains most of the functions one would need to receive and send OSC messages. There're tons of examples when it comes to MIDI controllers but there's very little OSC stuff which is a shame because OSC is really great if you want feedback i.e. for two-way controllers.
Gerrit is offline   Reply With Quote
Old 09-15-2018, 05:12 AM   #4
Sju
Human being with feelings
 
Join Date: Jun 2015
Posts: 685
Default

I'll be following the threads keenly. I've got an Arduino Micro which I intend to turn into a Faderport-like controller. Thank you for documenting your project!
Sju is offline   Reply With Quote
Old 09-15-2018, 05:20 AM   #5
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

AFAIR, POE can provide a lot of power as the switch and the device communicte which voltage is to be used, and can set 42 Volt. But I don't suppose, POE is implemented in the RASPi board, so additional hardware would be necessary. -> https://www.raspberrypi.org/products/poe-hat/

In fact OSC is less common than Midi, as USB is just plug and play, while OSC in by far the most incarnations is done via a network by UDP, and here you need to take care of knowing or detecting the correct IP addresses.

-Michael

Last edited by mschnell; 09-15-2018 at 06:25 AM.
mschnell is online now   Reply With Quote
Old 09-16-2018, 01:21 AM   #6
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

Quote:
Originally Posted by Sju View Post
I'll be following the threads keenly. I've got an Arduino Micro which I intend to turn into a Faderport-like controller. Thank you for documenting your project!
This thread might interest you too: Teensy 3.6 controlled motorfader panel. The panel is I2C controlled so multiple panels can be linked to one controller. It's part of a step sequencer I'm working on, ARP style with presets and multiple parameters. This thread on shift registers contains some more pictures of the interior and construction of my MIDI controller.
When it comes to MIDI over USB the Teensy is king. The MIDI library has undergone a major upgrade last January, USB, USB host and serial are now all handled the same way. A Teensy can be a standard USB MIDI device with up to 16 virtual ports, there's even an example of a 3x3 MIDI USB interface in the Teensyduino installation.
My DAW controller also doubles as a hardware synth controller over a separate MIDI port. It can receive bulk program dumps from several synths which are stored on micro SD card, all the programs for 6 synths are stored this way. The controller allows you to select programs (with names) and edit 16 parameters. For each of the 6 synths the edit state (+selected program) is maintained so I can switch between synths and the controller remembers the tweaks.

Quote:
Originally Posted by mschnell View Post
AFAIR, POE can provide a lot of power as the switch and the device communicte which voltage is to be used, and can set 42 Volt. But I don't suppose, POE is implemented in the RASPi board, so additional hardware would be necessary. -> https://www.raspberrypi.org/products/poe-hat/

In fact OSC is less common than Midi, as USB is just plug and play, while OSC in by far the most incarnations is done via a network by UDP, and here you need to take care of knowing or detecting the correct IP addresses.

-Michael
You're correct, MIDI over USB is simpler to connect and get working but I think the lack of uptake of OSC has more to do with inertia in the industry. It seems to be a classic example of the chicken-egg problem.

MIDI is an excellent protocol for what is was designed to do but detailed textual feedback was not part of the design. There has been a recent extension of the MIDI standard to accommodate messages for querying and receiving more detailed data on the state of devices but it all seems a bit bolted on to me. Same with NRPN, an addition to patch a limitation in the standard.
OSC has been designed from the ground up to go beyond the limitations of MIDI, it's a much more modern protocol with decent datatypes. I think it's an elegant protocol with immense possibilities which deserves more attention.
Gerrit is offline   Reply With Quote
Old 09-16-2018, 03:38 AM   #7
Sju
Human being with feelings
 
Join Date: Jun 2015
Posts: 685
Default

Quote:
Originally Posted by Gerrit View Post
This thread might interest you too: Teensy 3.6 controlled motorfader panel. The panel is I2C controlled so multiple panels can be linked to one controller. It's part of a step sequencer I'm working on, ARP style with presets and multiple parameters. This thread on shift registers contains some more pictures of the interior and construction of my MIDI controller.
Yeah, I was also thinking about adding channel strip elements like EQ control and feedback with encoders and led rings, for which I'd need shift registers and I guess the I2C stuff. Lots of learning to do...

Cheers!
Sju is offline   Reply With Quote
Old 09-17-2018, 09:29 AM   #8
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Posts: 3,668
Default

cool. this dwarfs my Teensy project, which was to add 2 non-motorized sliders and a sonar sensor to my launchpad pro.

one slider sends pitchbend 0 => 8191 and the other sends pitchbend -8191 => 0 (hard stops are farrrr better than a center detent).

the sonar sensor is a Parallax PING i bought in 2007. it also outputs pitchbend, but on another channel and only because it's high resolution, because it gets converted into OSC in bidule and used for general FX learns.
__________________
mccrabney scripts: MIDI edits from the Arrange screen ala jjos/MPC sequencer
|sis - - - anacru| isn't what we performed: pls no extra noteons in loop recording
| - - - - - anacru|sis <==this is what we actually performed.
mccrabney is offline   Reply With Quote
Old 09-17-2018, 09:31 AM   #9
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Posts: 3,668
Default

question - what osc library are you using with Teensy?

i started going this route on another project but balked at a Processing osc-receiver component that i had a harder time wrangling
__________________
mccrabney scripts: MIDI edits from the Arrange screen ala jjos/MPC sequencer
|sis - - - anacru| isn't what we performed: pls no extra noteons in loop recording
| - - - - - anacru|sis <==this is what we actually performed.
mccrabney is offline   Reply With Quote
Old 09-17-2018, 11:12 AM   #10
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

Quote:
Originally Posted by mccrabney View Post
cool. this dwarfs my Teensy project, which was to add 2 non-motorized sliders and a sonar sensor to my launchpad pro.

one slider sends pitchbend 0 => 8191 and the other sends pitchbend -8191 => 0 (hard stops are farrrr better than a center detent).

the sonar sensor is a Parallax PING i bought in 2007. it also outputs pitchbend, but on another channel and only because it's high resolution, because it gets converted into OSC in bidule and used for general FX learns.
Thanks

For actual pitch bend you do indeed need that high resolution. I don't know what the actual (internal) resolution of plugin parameters is, this kind of info is never in the manual.

Quote:
Originally Posted by mccrabney View Post
question - what osc library are you using with Teensy?

i started going this route on another project but balked at a Processing osc-receiver component that i had a harder time wrangling
I use the CNMAT library, this is part of the default Teensyduino install. In the code there's just this include:
Code:
#include <OSCBundle.h>
One of the nice things of the Reaper OSC interface is that you can address parameters by track/fx/parameter number:
Code:
/track/1/fx/1/fxparam/1/value		0.500
This will set the first parameter of the first plugin on the first track to 50% of it's range and it doesn't matter what track or plugin is selected (either in Reaper or the controller). It's like the inverse of the MIDI/OSC learn function, in this case the control is mapped the a certain parameter instead of a parameter being mapped to a MIDI/OSC control. Of course if tracks are inserted or deleted on has to update the numbers somehow, but nevertheless it offers some interesting possibilities. I connected an expression pedal to my test setup and added some code so that when the rotary encoder is pushed the selected parameter will be linked to the pedal. Works really well to quickly assign a pedal (or something else) to a parameter


Here's the updated code:OSC_Controller_20180917.zip
Gerrit is offline   Reply With Quote
Old 12-04-2018, 05:54 AM   #11
SebyMusic
Human being with feelings
 
Join Date: Apr 2018
Posts: 211
Default Any news?

Hi, do you have any news on your project?
tks
Seby
SebyMusic is offline   Reply With Quote
Old 12-05-2018, 01:16 AM   #12
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

Quote:
Originally Posted by SebyMusic View Post
Hi, do you have any news on your project?
tks
Seby
No, the project is on hold for the time being. I'm currently working on a large step & pattern sequencer project with 16 motor faders. My hope is that the issue with the OSC parameter feedback is resolved when my sequencer is finished and I'll resume working on the controller. The missing text feedback is a real bummer because I would need to implemented parameter mapping definitions for all the plugin I use so I decided to work on my sequencer first.
Gerrit is offline   Reply With Quote
Old 12-28-2018, 02:58 AM   #13
benf
Human being with feelings
 
benf's Avatar
 
Join Date: Oct 2008
Location: France
Posts: 3,697
Default

I'm very interested in your project. Currently buying devices to do my own interface.
__________________
Ma Zique
Mes Partoches
benf is offline   Reply With Quote
Old 12-28-2018, 03:37 AM   #14
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

Quote:
Originally Posted by benf View Post
I'm very interested in your project. Currently buying devices to do my own interface.
Although there's some additional complexity using OSC (ethernet adapter for the Teensy and IP number configuration) for controlling Reaper it's definitely the way to go, especially if you're building a controller for handling channels & sends. For plugin control there's still the text feedback issue but if you don't have displays on your controller or use LED rings for feedback that's not a problem.
The current version of the code already contains all the basic functions needed for creating a serious controller, see the comments in the code for the hardware setup.
Gerrit is offline   Reply With Quote
Old 01-04-2019, 04:44 AM   #15
benf
Human being with feelings
 
benf's Avatar
 
Join Date: Oct 2008
Location: France
Posts: 3,697
Default

Yes. That's my purpose : control the selected track, navigate through the tracks, navigate through and select regions, play and record and probably much more.
So I need OSC instead of MIDI to get the tracks and regions names, volume and panning levels, mute, solo and record states and so on.

Thanks a lot for sharing your work.
__________________
Ma Zique
Mes Partoches
benf is offline   Reply With Quote
Old 01-04-2019, 05:17 AM   #16
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

Quote:
Originally Posted by benf View Post
Yes. That's my purpose : control the selected track, navigate through the tracks, navigate through and select regions, play and record and probably much more.
So I need OSC instead of MIDI to get the tracks and regions names, volume and panning levels, mute, solo and record states and so on.

Thanks a lot for sharing your work.
What kind of setup do you have in mind? Type of encoders, display(s) etc.? How many tracks? If possible budget wise I would recommend using optical rotary encoders like the Bourns EM14, they have a high resolution and feel like high end potentiometers.

Except for the stuff regarding regions the basics for everything you mention are already in the code, adding support for regions shouldn't be difficult it's just that I didn't look into it.
Gerrit is offline   Reply With Quote
Old 01-04-2019, 02:00 PM   #17
benf
Human being with feelings
 
benf's Avatar
 
Join Date: Oct 2008
Location: France
Posts: 3,697
Default

I was thinking of those 24 steps rotary encoders : https://www.gotronic.fr/pj-66.pdf, not optical ones because they look a bit expensive to me. Don't you think they are strong or precise enough ?
My purpose is to use one for volume, another one for panning/width (with a button to switch) and a last one to select tracks, navigate on the timeline and through regions (with another function switching button).
I will too have buttons for mute, solo, record and automation modes for the track control (I just need to control one track at a time).
Other buttons for play and record and probably some for track templates additions.
I will have a display for the track name, its volume level and panning indications.
That's all for the moment.
__________________
Ma Zique
Mes Partoches
benf is offline   Reply With Quote
Old 01-04-2019, 03:03 PM   #18
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

Quote:
Originally Posted by benf View Post
I was thinking of those 24 steps rotary encoders : https://www.gotronic.fr/pj-66.pdf, not optical ones because they look a bit expensive to me. Don't you think they are strong or precise enough ?
My purpose is to use one for volume, another one for panning/width (with a button to switch) and a last one to select tracks, navigate on the timeline and through regions (with another function switching button).
I will too have buttons for mute, solo, record and automation modes for the track control (I just need to control one track at a time).
Other buttons for play and record and probably some for track templates additions.
I will have a display for the track name, its volume level and panning indications.
That's all for the moment.
24 pulses will translate to 96 steps per revolution. Because in OSC values are passed as normalised floating point numbers you can always map the 96 steps to cover the full range of a parameter. The question is if you think that's enough, it might not be if you want to use the controller for 'riding the knobs'.
For track selection it is not important to have hight resolution so inexpensive encoders will do.
It's a question of of how far you want to go with the build. Do you intend to make your own front panel for the controller or have it made for you?

Beware of overloading functions. On my controller there's a scroll wheel that scrolls through the song or selects presets on a synth depending on the mode the controller is in and I often found myself changing sounds when I wanted to scroll through the song.
Here's a picture of my plugin and synth controller:



It currently uses Mackie Control Protocol over two virtual midi ports and a separate port for synth control. I used 64PPR (256 steps per revolution) EM14 rotary encoders because I wanted to cover the MIDI range (0-127) with a single 300 degree turn so as to mimic the movement of a potmeter. The result is that the movement of the encoder, the virtual knob on the controller screen and the one on the computer monitor all perfectly match.
When I have finished my sequencer project I'll start on changing the code of this controller to also support OSC.
Gerrit is offline   Reply With Quote
Old 01-05-2019, 09:14 AM   #19
benf
Human being with feelings
 
benf's Avatar
 
Join Date: Oct 2008
Location: France
Posts: 3,697
Default

Thanks for answering. Most of the time, I modify volume with big steps. So if I need to lower the steps, I just have to add a button to latch from big to fine steps by applying a different coefficient.
For panning, I think 24 steps are enough for me too.
__________________
Ma Zique
Mes Partoches
benf is offline   Reply With Quote
Old 01-22-2019, 10:56 AM   #20
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Quote:
Originally Posted by benf View Post
Thanks for answering. Most of the time, I modify volume with big steps. So if I need to lower the steps, I just have to add a button to latch from big to fine steps by applying a different coefficient.
For big steps I am using the 1dB volume change actions, up and down. For finer changes you could use something else. Having the right 1dB value settings is not a bad starting point. At least it is very comfortable to change from any input device:
- qwerty, big
- qwerty, small of laptop
- something like ShuttleXpress for the left hand, using two outest buttons there, one for 1db up, other for 1db down, but then you have lots of clack clack sounds, but then you can divide work among two hands, right hand does mouseovering on any track, be it on tcp or mcp, no click needed anywhere, just mouseovering, left hand can do immediately 1db up or down, together with this custom action:
PHP Code:
CustomVOLUME DOWN 1 dB
  Track
Select track under mouse
  Script
me2beats_Nudge selected tracks volume down by 1 db.lua 
You never need to see any mixer for this, take a huge arrange, mouseover, up or down 1dB. You can mix from any situation, immediately. Only possible with Reaper superpowers. Stoneagedaws like Cubase or Krüppelmididaws like Ableton Live can go home.

Btw. the project looks great, gratulations and thanks for sharing your ideas and results. You lower device seems to me like a big knob, something like ShuttleXpress, plus a few buttons, so like a qwerty, only less keys.

Last edited by TonE; 01-22-2019 at 11:02 AM.
TonE is offline   Reply With Quote
Old 05-13-2019, 06:36 AM   #21
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

Finally some progress to report. See the thread on the Teensy forum for details: PoE powered OSC controller for Reaper DAW
I created a development prototype with a 7" display and 6 rotary encoders. The four encoders below the display for adjusting parameters are not indented, the two encoders to the right of the display are used for scrolling through the song and the tracks are indented.
Track mode:


To make it more obvious which plugin is selected and what the parameters are I created mappings containing additional metadata (like the parameter step count) and references to custom controls. Plugins are identified by looking up the name.
Plugin mode:
Gerrit is offline   Reply With Quote
Old 05-17-2019, 03:05 AM   #22
Nantho
Human being with feelings
 
Join Date: Mar 2013
Posts: 213
Default

Very impressive !

I wish I were able to build such an amazing and useful tool...
Nantho is offline   Reply With Quote
Old 05-18-2019, 06:40 AM   #23
Gerrit
Human being with feelings
 
Join Date: Aug 2018
Location: Maastricht
Posts: 92
Default

Quote:
Originally Posted by Nantho View Post
Very impressive !

I wish I were able to build such an amazing and useful tool...
Thanks

I understand that not everybody is able to build this kind of controller, even a full blown kit would be a challenge if you're not experienced soldering small components. For the people that could build such a controller but wouldn't know where to start there's the code (currently some 2000 lines) and the PCB (all through hole, no SMD) to help them get going.
It's a shame that OSC has not yet been adopted more, a classic chicken-egg problem; There're no controllers because DAW support is lacking and DAWs don't implement it because there're no controllers. Reaper is really ahead of the pack when it comes to OSC support.
Currently I'm working on the PCB design for the large controller with the two screens and 16 rotary encoders. I already determined that 4 rotary encoders is not enough for controlling plugins, there's just too much switching of parameter pages involved to be practical. For track control only (volume, pan, sends) the four encoders work very nice.
Gerrit is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:08 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.