Old 12-06-2013, 04:11 PM   #1
---david
Human being with feelings
 
Join Date: Jan 2013
Posts: 52
Default Control Surface US-2400, Beta with some problems

***EDIT (2019-10-06)***
I haven't been actively involved in this for a couple of years, but there seems to be a well maintained fork of it over at Ruxton (thanks!): https://github.com/Ruxton/reaper-csurf-us2400
***

I love the US-2400 by Tascam, IMO it fills a gap in today's controller market. So after I was able to get one from cheap, I looked how it would play with Reaper – but alas, setup as a fake Mackie MCU suggested here in the forums (http://forum.cockos.com/showthread.php?t=85717) leaves something to be desired – no real working channel strip, actions placed on weird buttons, etc...

So I tried my hand at writing some C++. I have it in a kind of working state now, but I think a lot of things could be done better and I don't know how:

– The performance is quite a bit worse than with the MCU setup (especially with automation on read it seems like it's getting swamped with MIDI updates).
– When the US-2400 is selected as control surface in the preferences but not hooked up, Reaper crashes on start - I have absolutely no idea why.

If any of you would find the time to check it out, or just glance over the code and give me pointers (hey, I made a c++ pun) on how to improve performance and fix the crash on start-up, I would be really grateful.

All the needed stuff is on the Reaper Stash:
https://stash.reaper.fm/19043/Tascam...-BETA-BETA.zip

***EDIT***
The link above is outdated (and most of the problems fixed at least temporarily). Use the GitHub link in the post below for the current version
***EDIT***

Thanks!
David

Last edited by ---david; 10-06-2019 at 02:28 PM. Reason: Update
---david is offline   Reply With Quote
Old 12-06-2013, 05:41 PM   #2
---david
Human being with feelings
 
Join Date: Jan 2013
Posts: 52
Default

Just in the unlikely case that somebody has tried this already in the meantime: I forgot to include an important bit:

The US-2400 has to be in Native Mode, which AFAIK is a novelty of firmware 1.31, so you might have to update it. To activate Native Mode put the US-2400 to standby (so that the Power button 'breathes'), then keep Master Sel + Chan pushed while turning it back on – if you have the right firmware and Native Mode is active Chan should blink three times.

(I also updated the readme in the Reaper Stash.)
---david is offline   Reply With Quote
Old 12-08-2013, 03:47 AM   #3
Teddy
Human being with feelings
 
Join Date: Sep 2011
Posts: 198
Default

I'm writing a script for the us2400 using node.js and osc, and have found that I have to limit outgoing messages just slightly, or it drops some of them.

Once I added a tiny delay for messages in queue, the performance was much better. I don't have the code available right now, but can post the details in a few days if you're interested?
Teddy is offline   Reply With Quote
Old 12-08-2013, 08:45 AM   #4
mim
Human being with feelings
 
Join Date: Mar 2009
Posts: 370
Default

Quote:
Originally Posted by Teddy View Post
I'm writing a script for the us2400 using node.js and osc, and have found that I have to limit outgoing messages just slightly, or it drops some of them.

Once I added a tiny delay for messages in queue, the performance was much better. I don't have the code available right now, but can post the details in a few days if you're interested?
Hmm interesting...
Are you able to use your tascam us 2400 with node.js and osc ?

We are building a multitouch front end for Reaper using node.js and osc, it would be super cool for us to invite the US-2400 to the party ...
mim is offline   Reply With Quote
Old 12-08-2013, 09:03 AM   #5
Teddy
Human being with feelings
 
Join Date: Sep 2011
Posts: 198
Default

Quote:
Originally Posted by mim View Post
Hmm interesting...
Are you able to use your tascam us 2400 with node.js and osc ?

We are building a multitouch front end for Reaper using node.js and osc, it would be super cool for us to invite the US-2400 to the party ...
Wow, that's what I had in mind. I'm trying to build a controller using a Tascam Us-2400 and one iPad placed above each bank of eight tracks (so three in total). It's coming along quite nicely, but I haven't got started on the iPads yet. The us2400 works really well with node, and I have made a module for the communication. I can send it to you if you're interested.

I have to mention, though that the project is sort of on hold now, since my girlfriend got sick. Is your code on git anywhere? would love to have a look!
Teddy is offline   Reply With Quote
Old 12-08-2013, 02:54 PM   #6
mim
Human being with feelings
 
Join Date: Mar 2009
Posts: 370
Default

Quote:
Originally Posted by Teddy View Post
Wow, that's what I had in mind. I'm trying to build a controller using a Tascam Us-2400 and one iPad placed above each bank of eight tracks (so three in total).
We use a 42" screen with a multitouch overlay... We design the web page to "fit" the us 2400 banks of faders. (we made a REAPER mixer skin, that also fit us 2400 banks).

Quote:
Originally Posted by Teddy View Post
It's coming along quite nicely, but I haven't got started on the iPads yet. The us2400 works really well with node, and I have made a module for the communication. I can send it to you if you're interested.
Indeed, I'm curious how did you get from the midi port of the us2400 to node.js.

We didn't dig this part yet, because I think latency is still better using native MCU control surface in REAPER.(because osc latency is not yet user definissable). And since most of our work is to be fader jockey (movie post prod), volume latency is a huge deal. (not to mention volume data from mcu is "synced" with the project where osc is not)

However if we could setup REAPER to have the lowest latency with incoming OSC, then connecting the US 2400 to the node.js would be easier and more powerfull.

Quote:
Originally Posted by Teddy View Post
I have to mention, though that the project is sort of on hold now, since my girlfriend got sick.
I hope she'll get better soon... Take care of her!

Quote:
Originally Posted by Teddy View Post
Is your code on git anywhere? would love to have a look!
No it's not public yet, because we feel it is not ready to be shown yet ... My friend is the js developer and I am the python developer. We are aiming a very specific post prod workflow (and we're already having nice times mixing movies on our "mixing desk").

@ ---david, sorry I hijacked your thread !

Good to see you are aiming a native us2400 MCU support - I have not tested it yet -, but still I can give some ideas.

First -and easy- option would be to start with "mcp view" (to be sync with the mcp rather than the tcp); since the us 2400 has no "global view" button that allow to switch from tcp to mcp in the native MCU. (I'm using a midi keyboard for that)

Sometime with the native MCU, my US 2400 just do totally garbage, like wrecking the whole project with just a fader movement. I think it comes from the "overflow" Teddy is speaking of.
Since I don't use pan knobs on the us 2400 (because I think they are just crap), I'd like to be able to stream only the volume data to the us 2400, and maybe then have better performance and avoid the overflows.

Good Luck with your C code

Last edited by mim; 12-08-2013 at 03:00 PM.
mim is offline   Reply With Quote
Old 12-08-2013, 09:01 AM   #7
---david
Human being with feelings
 
Join Date: Jan 2013
Posts: 52
Default

Quote:
Originally Posted by Teddy View Post
I'm writing a script for the us2400 using node.js and osc, and have found that I have to limit outgoing messages just slightly, or it drops some of them.

Once I added a tiny delay for messages in queue, the performance was much better. I don't have the code available right now, but can post the details in a few days if you're interested?
Hey Teddy, thanks for your reply.

Node.js, huh. Sounds interesting (I only know that from a web / server context). Details would be at least interesting!

... although for starters it might probably be enough for now if I knew which direction you meant by 'outgoing' – user entry or the back channel from Reaper? (or both)?
---david is offline   Reply With Quote
Old 12-08-2013, 09:09 AM   #8
Teddy
Human being with feelings
 
Join Date: Sep 2011
Posts: 198
Default

Quote:
Originally Posted by ---david View Post
... although for starters it might probably be enough for now if I knew which direction you meant by 'outgoing' – user entry or the back channel from Reaper? (or both)?
I'm limiting the back-channel from Reaper (or node, in my case), so the us2400 has time to breathe and is not skipping some messages.

If you stress the user input with multiple faders at once, the tascam is sometimes skipping a fader MSB or LSB. I don't think you can do anything about that, though.
Teddy is offline   Reply With Quote
Old 05-02-2014, 02:36 PM   #9
mdmiller
Human being with feelings
 
Join Date: Mar 2013
Posts: 137
Default It Works!

It's working! Hooray!

I feel a little stupid. I didn't realize that using EarSketch not only screwed up my preferences file (Reaper wouldn't remember my changes) it also messed Python up.

I started playing with some Python scripts for Reaper on my development machine and all was well. When I tried to run the scripts in the studio I found out that non EarSketch Python scripts and Reaper were no longer friends. Since the EarSketch scripts worked and EarSketch uses Python, it never occurred to me that there would be a problem with regular Python scripts.

Anyway, it works now and I'm anxious to start testing.

Thanks David! I knew it was something on my end.

My advice to all: Don't install EarSketch even though it has some cool features.
mdmiller is offline   Reply With Quote
Old 05-19-2014, 01:46 AM   #10
bishbash
Human being with feelings
 
Join Date: May 2014
Location: UK
Posts: 4
Default WONDERFUL!

Been an engineer for 35 years and I really cannot get by without faders, so I just got a us2400 (isn't ebay wonderful!). I tried 8 channel systems but the bank switching really got in the way.
It's all about the immediate link between what you are hearing and what you are doing, not having to think about selecting something and then selecting something else with a mouse before you can hear it.
Some test mixes of 30 - 40 channel live recordings are instantly better.
Working with the WT Imperial theme on two large monitors - lovely.

Give David a knighthood!

Only thing left to solve - a proper meter bridge. How can I get the track names / levels OUT of the system to an external device? I'm thinking get the data out to a small processor (eg Raspberry Pi, Arduino) and drive some small displays mounted above the encoders.

Not going to hijack the thread - if it turns into anything, I'll start anew.
Cheers
bishbash is offline   Reply With Quote
Old 06-01-2014, 01:52 PM   #11
---david
Human being with feelings
 
Join Date: Jan 2013
Posts: 52
Default

Wow guys,

Sorry I've been away for so long, I've never gotten even one notification about the thread, so today I was just checking in to see if anything happened here ( ... ) and am overwhelmed by the flood of good news!!

I'm so glad it's working for everyone – especially for you, Mark!

Quote:
Originally Posted by mdmiller View Post
I didn't realize that using EarSketch not only screwed up my preferences file (Reaper wouldn't remember my changes) it also messed Python up.
I'll put that into the documentation.

Quote:
Originally Posted by aer View Post
Would it be possible to have a setting where the rotary controllers are output as pitchbends or CCs split across the other midi ports? (similarly to how you got the joystick to port 2 by duplicating the controllers)

For now I am going to try and continue to hack my way through with the blunt machete that is my stunted programming knowledge. Also going to pick my brother's brains when I can, as he is a programmer with a fair bit of experience working in C++, Python and Reaper.
Hey Matt, at least the more important half of it is easily done, you (or maybe your brother) just have to change a couple of lines to get this going:

The magic happens in lines 726 to about 743 of reaper-csurf-us2400.cpp. 727 - 732 are what the extension should do if it gets an encoder message, simply change 'OnEncoderChange()' to 'kbd_OnMidiEvent()' as I have already done in the joystick section (741 - 744) -- 'm_midi_in_dev + x' decides which of the US2400 MIDI ports it should use (+1 -> Port 2, +2 -> Port 3 etc).

Before compiling your customized version, you'll only have to set the options in lines 13 and 14, depending if you want to use Metermode or the 'M'-Button.

That should get it to work in one direction at least - the other direction (sending parameter changes to the led rings) is much more complicated, I'm afraid.

Sorry I'm not doing it myself, but I'm really short on time lately (took me a month to check on the thread ...)

Quote:
Originally Posted by bishbash View Post
Only thing left to solve - a proper meter bridge. How can I get the track names / levels OUT of the system to an external device? I'm thinking get the data out to a small processor (eg Raspberry Pi, Arduino) and drive some small displays mounted above the encoders.
Most people seem to like the combination with iPads mounted on top of the US-2400, maybe that's easier than building something from scratch? Price might be an issue though, first generation iPads are still a hundred bucks on E-Bay (at least in Germany).

If you actually build one yourself with Arduino or whatever, keep us updated – I for one would really like to see that!

---

... It's such a shame, I barely had time to use the thing myself in the last weeks (other obligations) – but it really makes my heart sing to see how many of you are enjoying this!

If you find bugs (and I'm sure you will), feel free to use the issue-tracker on GitHub or post them here – although I can't promise any fixes in the months to come (I'm pretty much booked to the end of the year) ... so, if there is someone out there with time and skills to fix something by themselves - that would be so great! - Just fork it on GitHub!
---david is offline   Reply With Quote
Old 06-08-2014, 04:02 AM   #12
bishbash
Human being with feelings
 
Join Date: May 2014
Location: UK
Posts: 4
Default levels out to meterbridge

Following up to my Meterbridge on US2400 idea.
What is the SIMPLEST way to get the track names / actual meter readings (not fader levels) OUT to an external system / device?
Are they / can they be mapped to MIDI CCs? If so, how do I find out which ones so I can trap them?
I have some programing skills but hacking/recompiling csurf etc is beyond me. Intermediate level JavaScript / Python etc is probably OK
Need to get this sorted before I can decide whether to do the custom hardware thing or a stack of tablets.
Cheers
bishbash is offline   Reply With Quote
Old 06-08-2014, 04:34 AM   #13
mim
Human being with feelings
 
Join Date: Mar 2009
Posts: 370
Default

Quote:
Originally Posted by bishbash View Post
Following up to my Meterbridge on US2400 idea.
What is the SIMPLEST way to get the track names / actual meter readings (not fader levels) OUT to an external system / device?
Are they / can they be mapped to MIDI CCs? If so, how do I find out which ones so I can trap them?
I have some programing skills but hacking/recompiling csurf etc is beyond me. Intermediate level JavaScript / Python etc is probably OK
Need to get this sorted before I can decide whether to do the custom hardware thing or a stack of tablets.
Cheers
OSC is probably the simplest way to go. You can have meters and track names. And it can be setuped as a 24 tracks bank synced to the mixer in REAPER (as this csurf driver).
mim is offline   Reply With Quote
Old 06-08-2014, 04:36 AM   #14
---david
Human being with feelings
 
Join Date: Jan 2013
Posts: 52
Default

Quote:
Originally Posted by bishbash View Post
Following up to my Meterbridge on US2400 idea.
What is the SIMPLEST way to get the track names / actual meter readings (not fader levels) OUT to an external system / device?
Are they / can they be mapped to MIDI CCs? If so, how do I find out which ones so I can trap them?
I have some programing skills but hacking/recompiling csurf etc is beyond me. Intermediate level JavaScript / Python etc is probably OK
Need to get this sorted before I can decide whether to do the custom hardware thing or a stack of tablets.
Cheers
Hey bishbash,

as far as I know, ReaScript (Python) can only help you with triggered actions (like, select tracks, then do something with them).

To do something realtime (e.g. getting tracknames, levels in a permanent loop) you'll have to use the Reaper API in C++, where you can hook into this kind of stuff.

I might be wrong, though -- Teddy and mim (see beginning of this thread) both are (were?) building Reaper front ends for tablets and/or US2400 using OSC (as far as I understand it, a newer and better variant of MIDI: http://en.wikipedia.org/wiki/Open_Sound_Control) and node.js (which I believe is doing server side stuff in JavaScript: http://nodejs.org/).

C++ can seem daunting, but now that I've done ReaScript / Python, some other stuff in JS and pure C++-Reaper API, I think the differences really are not so big as people think (except strings. Strings really, really suck in C++)

The biggest hurdle to me was to get the environment right and the project to compile -- maybe because of the low level of the language and therefore the closeness to the OS, dependencies are a nightmare in C++. You should prepare for a couple of days filled with frustration and a lot of googling, but after that it's just code like anything else.

There is a custom action inside Reaper that prints the list of functions the current API is capable of (search Action List for 'developer') -- seeing that list got me hooked. I'm pretty sure the functions you need are in there.

You could also always hire a programmer for it -- being proficient in C++, this should be an easy job.

Good luck, and keep us posted -- maybe one day I can buy a meterbridge kit from you!
David
---david is offline   Reply With Quote
Old 06-09-2014, 09:19 AM   #15
aer
Human being with feelings
 
Join Date: Apr 2013
Location: Brighton, UK
Posts: 6
Default

Quote:
Originally Posted by ---david View Post
Hey Matt, at least the more important half of it is easily done, you (or maybe your brother) just have to change a couple of lines to get this going:

The magic happens in lines 726 to about 743 of reaper-csurf-us2400.cpp. 727 - 732 are what the extension should do if it gets an encoder message, simply change 'OnEncoderChange()' to 'kbd_OnMidiEvent()' as I have already done in the joystick section (741 - 744) -- 'm_midi_in_dev + x' decides which of the US2400 MIDI ports it should use (+1 -> Port 2, +2 -> Port 3 etc).

Before compiling your customized version, you'll only have to set the options in lines 13 and 14, depending if you want to use Metermode or the 'M'-Button.

That should get it to work in one direction at least - the other direction (sending parameter changes to the led rings) is much more complicated, I'm afraid.

Sorry I'm not doing it myself, but I'm really short on time lately (took me a month to check on the thread ...)
Thanks for the reply David, glad you raised the issue of bi-directional control. That is a bit of game changer I hadn't thought about.

I have built a tester patch in Lemur on the iPad working with the US2400 directly ported into it using MIDI PORT 1 (not communicating directly with Reaper). It accepts the control signals from the US2400 and converts them to OSC, and then sends them back out to LEDs. However I can't see how to get this to work only when the CHAN button is pressed using your csurf script and MIDI PORT 2 talking to Lemur.

I will keep thinking and see if I can hack together bi-directional control via the csurf script. Does anyone know if you can get the script to listen directly to OSC messages? That way I could send messages specifically for the encoder LEDs or fader positions into the script.

@bishbash

Reaper outputs extremely accurate floating point OSC messages which can be used for meters. This is far easier to work with than attempting to convert that data into midi and then retranslate at the meter.

I can't say for TouchOSC as I haven't tried, but setting up accurate meters in Lemur on an iPad is very possible. You would just set up Lemur as an extra OSC control surface. I could build you a lemur patch which would work with the default Reaper OSC messages for meters and track names. It would be easier (and a lot lot lot lot cheaper) to only use 1 ipad for all your metering. But you could technically have one over each fader module. It might not look as elegant but you could fit 24 meters in 3 rows on the ipad screen. These would then be set up to follow the mixer bank defined by the US2400 (as @mim stated)

The option to build a bank of hardware meters would be using small lcd screens and arduinos. I am pretty sure these could again be told to listen to the same OSC messages. I couldn't offer any help on this as I don't have any experience using an arduino myself. There is a good online community for them and a quick search shows a few people attempting to make led meters or LCD screen based meters, also OSC implementation.

Just to throw an alternative solution out there, I have one of these monitors http://www.amazon.co.uk/LENOVO-T52DE.../dp/B005L2NA54
sat on top of the controller displaying my mixer window in Reaper.

Hope this helps.
__________________
soundcloud.com/aer-uk
aer is offline   Reply With Quote
Old 10-13-2020, 07:44 AM   #16
ACatNamedEaster
Human being with feelings
 
Join Date: Oct 2020
Posts: 1
Default

Hi David. I've been following this development for a good while now. In fact, I don't think I've ever participated in any kind of online forum before and I joined here specifically to engage on this one. First, I wantesd to say that this extension is genius and I really appreciate all the work that's gone into it. I picked up a US-2400 some time ago just assuming it would work in MCU mode with Reaper which, as you know it does but leaves a lot of funtionality to be desired. Using your extension and Reaper's command logs, and teaching myself a bit of Python, I'm managed to get the thing doing essentially everything I wanted it to and rarely even have to touch a mouse or keyboard in session. Kudos on that.

Having said that, I do have some of the issues described here and by other users--mainly that multiple tracks sending control messages seems to either cause severe delays in the US-2400's response time, or occasionlly locks it up all together. I see this thread has been inactive for about a year now, but I was wondering if you'd ever discovered any remedy to that?


Quote:
Originally Posted by ---david View Post
.
– When the US-2400 is selected as control surface in the preferences but not hooked up, Reaper crashes on start - I have absolutely no idea why.

If any of you would find the time to check it out, or just glance over the code and give me pointers (hey, I made a c++ pun) on how to improve performance and fix the crash on start-up, I would be really grateful.
I don't know if it helps, but the only time I had this issue was using the metermode extension and only after the upgrasde to Reaper 6 (both worked fine in 5); the mkey extension seems to work just fine which, is fine because as you also know, the neat little LED rings on the US-2400 are nearly useless as any kind of actual metering anyway.If I forget to turn on the US-2400, I just get the message that the control surface is unavailable, but Reaper works just fine.
ACatNamedEaster 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 03:34 PM.


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