tttapa / Control-Surface

Arduino library for creating MIDI controllers and other MIDI devices.
GNU General Public License v3.0
1.19k stars 134 forks source link

8 SSD1306 0.66 64X48 OLEDS #164

Open henkmeid opened 4 years ago

henkmeid commented 4 years ago

Hello,

I ran into this project and i might be suitable for my needs. I have basically 2 questions:

  1. Is it possible to use a smaller size SPI 7pin OLED? I have 64x48.
  2. Is it possible to use 8 OLEDS by using extra digital pins for the CS lines?

Great project!

henkmeid commented 3 years ago

Static text works, whoohoo!

This might be a long shot, but I've been surprised about the capabilities of control surface before, but is it possible to add a push button which toggles between screen layouts?

For example: Layout 1: static text Layout 2: MCU information

image

henkmeid commented 3 years ago

is it possible to add a push button which toggles between screen layouts?

This would be perticular great on my mixer (Tascam DM4800) which has a GPI connection on the back, which can send 150ms 5V pulse which i can assign to function buttons on the mixer. So I can connect this to one of the remaining IO pins of the teensy to capture the pulse. So I could toggle between MCU information and multiple static text pages when I press the function button.

image

tttapa commented 3 years ago

A quick and dirty hack would be to move the logic that selects the layout into your custom display element (the one that now has the static text). Make sure it's defined last, so it'll be drawn after the other elements. Then you just clear the display before writing the static text to hide/overwrite all MCU information that was drawn earlier.

The clean solution is probably to add enable() and disable() methods to the DisplayElement class, so you can enable and disable them as you please. Only the enabled elements are picked up and drawn by Control Surface.
You should be able to add this easily enough, the logic is already there in the constructor and destructor, you can just reuse that code: https://github.com/tttapa/Control-Surface/blob/2d790de1c4196509ee8b80817d217c9889c6ddf8/src/Display/DisplayElement.hpp#L12-L29

henkmeid commented 3 years ago

quick and dirty

That worked! 👍

henkmeid commented 3 years ago

@tttapa

I got mute working over 2 virtual midi cables:

Bankable::NoteValue<1> mute[] = {
  {bank,{MCU::MUTE_1, CHANNEL_1, 0x0}},
  {bank,{MCU::MUTE_2, CHANNEL_1, 0x0}},
  {bank,{MCU::MUTE_3, CHANNEL_1, 0x0}},
  {bank,{MCU::MUTE_4, CHANNEL_1, 0x0}},
  {bank,{MCU::MUTE_5, CHANNEL_1, 0x0}},
  {bank,{MCU::MUTE_6, CHANNEL_1, 0x0}},
  {bank,{MCU::MUTE_7, CHANNEL_1, 0x0}},
  {bank,{MCU::MUTE_8, CHANNEL_1, 0x0}}, 
};

Bankable::NoteValue<1> mute2[] = {
  {bank,{MCU::MUTE_1, CHANNEL_1, 0x1}},
  {bank,{MCU::MUTE_2, CHANNEL_1, 0x1}},
  {bank,{MCU::MUTE_3, CHANNEL_1, 0x1}},
  {bank,{MCU::MUTE_4, CHANNEL_1, 0x1}},
  {bank,{MCU::MUTE_5, CHANNEL_1, 0x1}},
  {bank,{MCU::MUTE_6, CHANNEL_1, 0x1}},
  {bank,{MCU::MUTE_7, CHANNEL_1, 0x1}},
  {bank,{MCU::MUTE_8, CHANNEL_1, 0x1}}, 
};

How do i get virtual midi cable 2 (and 3, 4 etc) for tracknames in:

// Main MCU LCD screen, used to get track names
MCU::LCD<> lcd = {};
MCU::LCD<> lcd2 = {};
tttapa commented 3 years ago

The LCD constructor is not yet well documented on the master branch, but the second optional argument is the zero-based cable number. To get an LCD display on the second cable, you would use MCU::LCD<> lcd2{0, 1}, the third cable would be MCU::LCD<> lcd3{0, 2}, etc.

For future reference, in the next release, the argument will be of type Cable, and you would use MCU::LCD<> lcd2{0, CABLE_2}.

henkmeid commented 3 years ago

You are a legend 😃

henkmeid commented 3 years ago

So to update on my progress (will post my cleaned up code later). I have now got 8 displays of a Teensy 3.2, all with their own CS and Reset line. I've added a pushbutton which can cycle through 4 pages:

  1. Mackie Control
  2. Static information about the Tascam DM Mixer channels
  3. Customizable information which is stored in EEPROM which you can change by using serial commands
  4. Plain big channel numbers

I can set a default start page which is stored in EEPROM by a serial command.

I've just received a teensy 3.6 which has a lot more IO pins and my aim is to get 24+ displays working. I know its a big endeavor but i like a challenge 🤣

I still would like to get it working with just a single reset pin or a reset circuit, or else i'll be really tight on IO pins or have to start using multiplexers or shift registers, which i hope i can avoid 😁

If you do want to use an IO pin for the reset line, you can share a single IO pin for all displays, but you have to pass reset = false to the Adafruit_SSD1306::begin method for all displays except for the first one:

How would I approach this? Is this something I can set in the constructor of the displays here?

Adafruit_SSD1306 ssd1306Display_L {
 SCREEN_WIDTH, SCREEN_HEIGHT, &SPI,          OLED_DC,
 OLED_reset,   OLED_CS_L,     SPI_Frequency,
};

Or do I have to change something in the SSD1306 library or the controls surface library?

tttapa commented 3 years ago

How would I approach this? Is this something I can set in the constructor of the displays here?

Have you tried the code I posted here? https://github.com/tttapa/Control-Surface/issues/164#issuecomment-613114078

henkmeid commented 3 years ago

You mean this bit??

    // Initialize the Adafruit_SSD1306 display
    if (!disp.begin(SSD1306_SWITCHCAPVCC, 0, first))
      FATAL_ERROR(F("SSD1306 allocation failed."), 0x1306);

    first = false;

I can't believe i've missed this, my bad 🤦

Will give this a try, will let you know if this worked.

henkmeid commented 3 years ago

image

12 OLED's, 1 shared reset line, done!

I'm out of jumperwires now 😅

More on the way, will let you know how things move on!

henkmeid commented 3 years ago

image

24 OLED's, 1 shared reset pin, done.

It's a bit messy with all the wires, but I wanted to check on breadboards first before I starts designing new pcb's.

I also want to measure currents to see if it's all within specifications or if I have to consider an external power source.

Skotacus commented 3 years ago

Wow! I'm very impressed! Fantastic work! I have been searching around looking for code to pull plug-in Data from Logic Pro to populate something similar so that I can have an offboard EQ and Compressor that directly communicates with each tracks EQ and Compressor. I would like to use the I2C screens as well to display the EQ and compressor Data such as the Frequency, Gain, Q and Plugin Name if thats possible. Even if it is simply the Plugin Location in the channel strip. I would probably have to keep similar plugins in the same position across the DAW for each track but im okay with that if i can select a track and the EQ and compression data populate a control surface with dynamic displays and rotary encoders. Any ideas where to start or simply... Is this possible? I have a Behringer X-Touch that can display all of that information across the top scribble strips but its worthless on how it is laid out. I would like to replicate that section in a more easy to use control surface that can change depending on the plugin.

henkmeid commented 3 years ago

If i'm not mistaken, mackie control sends out 2 lines of display information, 2 lines of 6 or 7 charachters per channel, it all depends on how your DAW is formatting it. Control surface only supports mackie control, so you are stuck with this. If your behringers shows the desired information via the mackie control protocol then control surface should be able to show this too. With some custom logic you can format the text how and where you want to show this. @tttapa Right?

The same is true with the vpot rings, it all depends on which information your DAW is sending over the mackie control protocol. I use Cubase and I can switch between pan info and send info, but i haven't tried anything else, because my main focus is tracknames, panning, record, solo and mute.

Regarding i2c, I have only worked with SPI and i'm not sure if control surfuce supports I2C even though it uses the adafruit ssd1306 library, i'm sure @tttapa can clarify this.

tttapa commented 3 years ago

Control surface only supports mackie control, so you are stuck with this.

The MCU::LCD class only supports the MCU protocol, because that's the only somewhat standardized protocol I'm aware of. If you can configure your DAW to send the display text or other data in a different format, I can show you how to receive it using Control Surface, most of the code to do that is already there.
I'm not really up to date with all modern DAWs and their MIDI support, but if you find a different protocol that is supported by DAWs that handles things like displays, by all means, let me know, and I'll probably add support for it in Control Surface.

With some custom logic you can format the text how and where you want to show this. @tttapa Right?

Indeed: the MCU::LCD::getText() method gives you access to the raw characters, as they are sent by the DAW. You're then free to format them however you like. You can wrap it in a display element, for example, as shown here https://github.com/tttapa/Control-Surface/issues/164#issuecomment-769138135.

Regarding i2c, I have only worked with SPI and i'm not sure if control surfuce supports I2C even though it uses the adafruit ssd1306 library, i'm sure @tttapa can clarify this.

You can use I2C, Control Surface simply uses the Adafruit_SSD1306 library. You might have to add the I2C address to the disp.begin() call in the display interface.

Personally I prefer SPI displays. They have much faster update rates than the I2C variants and you can just control each display with a different CS pin instead of having to worry about using different addresses or I2C multiplexers.

scotthc commented 2 years ago

henkmeid, I have a softube console 1 fader unit, would this unit be something that might work via usb using mackie control. I would ultimately like 10 channels of displays and would be more than willing to pay for them. I think many users of this console woudl be interested. I am not a coder, I have tried a few small arduino/visuino projects but dont have the time with my day gig and studio work. Thank you

henkmeid commented 2 years ago

henkmeid,

I have a softube console 1 fader unit, would this unit be something that might work via usb using mackie control. I would ultimately like 10 channels of displays and would be more than willing to pay for them. I think many users of this console woudl be interested. I am not a coder, I have tried a few small arduino/visuino projects but dont have the time with my day gig and studio work. Thank you

Hello!

I've actually spend the last few days working on this and I've made some progress. I've decided to make a a controller PCB and a OLED PCB, which can be interconnected.

image

At the moment I'm designing my final pcb's.

I guess this could work with your controller as well, as long as it supports the Mackie control protocol and you know how to use a virtual midi port and something like midi-ox, this isn't too hard.

scotthc commented 2 years ago

Oh that’s great news. Are you available to help me bobble thru this? Anyhow I’ll do what I can. I’d love to see this become a viable product. It’s been requested for years by many. Let me know how to proceed when the time is right. Thank you very much. Scott

Sent from my iPhone

On Jan 11, 2022, at 12:44 PM, henkmeid @.***> wrote:

 henkmeid,

I have a softube console 1 fader unit, would this unit be something that might work via usb using mackie control. I would ultimately like 10 channels of displays and would be more than willing to pay for them. I think many users of this console woudl be interested. I am not a coder, I have tried a few small arduino/visuino projects but dont have the time with my day gig and studio work. Thank you

Hello!

I've actually spend the last few days working on this and I've made some progress. I've decided to make a a controller PCB and a OLED PCB, which can be interconnected.

At the moment I'm designing my final pcb's.

I guess this could work with you controller as well, as long as it supports the Mackie control protocol and you know how to use a virtual midi port and something like midi-ox, this isn't too hard.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.

henkmeid commented 2 years ago

Can you measure what the pitch is between the channels on your controller?

I have a Tascam DM4800 and DM3200 where the pitch is 25mm, this forces me to use 0.66" oled instead of 0.96". If your pitch is greater than 28mm a 0.96mm would fit and you would have a little more screen to fit information in.

scotthc commented 2 years ago

30mm thank you, 10 faders. I’m interested in how this would keep in sync as I switch between banks of 10 channels. Thanks, I’m excited and hope we can work this out. Scott

Sent from my iPhone

On Jan 12, 2022, at 12:26 AM, henkmeid @.***> wrote:

 Can you measure what the pitch is between the channels on your controller?

I have a Tascam DM4800 and DM3200 where the pitch is 25mm, this forces me to use 0.66" oled instead of 0.96". If your pitch is greater than 28mm a 0.96mm would fit and you would have a little more screen to fit information in.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.

henkmeid commented 2 years ago

I just checked how the softube connects to your DAW, and its via plug in, not as a mackie control universal. This make the virtual midi and splitter solution not workable. However, there might be an option where you can use you softube as a plugin and the screens as a mackie control, but i don't know how this would sync up, it could either work or not work. This has to be tested. Making 10 screens on a pcb and getting it work is not a big problem, but i don't have a softtube so i cannot test the funtion in parallel.

scotthc commented 2 years ago

So I was thinking about this as well. I’m not an expert here. Could this be a completely different system? I’m using Cubase 11pm. So I’m assuming Cubase can drive more than 1 mackie protocol device. As I use the softube and scroll thru the banks if I select a channel the channel is selected in Cubase. Does tha then somehow tell our separate display what to display?

Sent from my iPhone

On Jan 13, 2022, at 12:55 AM, henkmeid @.***> wrote:

 I just checked how the softube connects to your DAW, and its via plug in, not as a mackie control universal. This make the virtual midi and splitter solution not workable. However, there might be an option where you can use you softube as a plugin and the screens as a mackie control, but i don't know how this would sync up, it could either work or not work. This has to be tested. Making 10 screens on a pcb and getting it work is not a big problem, but i don't have a softtube so i cannot test the funtion in parallel.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.

henkmeid commented 2 years ago

The only way to know is to test I guess.

Cubase can handle many MCU at once, that’s not the issue. But getting to line up the displays, banking, etc with the softube would require some testing.

I use cubase, so if you know someone in the Netherlands who could come over with a softube i could test it.

Trickster-git commented 2 years ago

@henkmeid Hi can you share you code?

henkmeid commented 1 year ago

Just a little update:

image

image

image

scotthc commented 1 year ago

Very nice. Please keep me in the loop as you progress. Thank you Scott

Sent from my iPhone

On Aug 24, 2022, at 1:22 PM, henkmeid @.***> wrote:

 Just a little update:

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

Trickster-git commented 1 year ago

Hi, can you share code?

rogerarends commented 1 year ago

Hi

Sorry for the late reply

These are the files I used with Studio 1 v3.5, the first one was to test the functionality using Mackie control. The second was my final "code" using 9 screens. It's kinda old and not very efficient cause I don't know C++ but works for me The icons might not work and I can't find the xbm files I made...good luck and I hope It helps you.

On Thu, Sep 29, 2022 at 9:07 PM Trickster-git @.***> wrote:

Hi, can you share code?

— Reply to this email directly, view it on GitHub https://github.com/tttapa/Control-Surface/issues/164#issuecomment-1262700178, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSCCYFAKTGNVBPM47CA3ILWAXSHDANCNFSM4MEOVTHQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Roberto-OA commented 1 year ago

@henkmeid @rogerarends Just as scotthc said, I'd be more than willing to pay for a functioning version of this.

I have a Tascam US-2400 and use Studio One 4 (thinking of updating it though), I did lots of research all over the internet and tried using some of the coding here, but as I'm not a programmer, I can't make sense of it enough so I can make it work.

If any of you guys could help me out, it's just a pain to have such an awesome controller and have to memorize all the channels over and over again when mixing =/

I'd love to work something out with you! All the hardware would be up to me to get and build a decent-looking thing, but I need a list of what exactly to buy and a working code.

Hope you all are well! Roberto

rogerarends commented 1 year ago

https://www.youtube.com/watch?v=XG3-uaSyzLo

instructions on setting up the Tascam US-2400 with Studio one. hope this helps and yes it is an awesome controller, mine got stolen bout 5 years ago.

https://www.youtube.com/c/HomeStudioTrainer [https://yt3.ggpht.com/JmWUQl-MIN9RoxnkmykIA2ocUnbCNjWJD1V4NLIInOeKvk-R-i7b2vBclfn4ARMm80XratfF=s900-c-k-c0x00ffffff-no-rj]https://www.youtube.com/c/HomeStudioTrainer Home Studio Trainer - YouTubehttps://www.youtube.com/c/HomeStudioTrainer Are you a beginner at home recording? Are you tired of videos and LIVESTREAMS that assume you already know the basics? Well, you will be treated differently here at Home Studio Trainer, where we ... www.youtube.com


From: Roberto-OA @.> Sent: Saturday, 01 October 2022 18:11 To: tttapa/Control-Surface @.> Cc: rogerarends @.>; Mention @.> Subject: Re: [tttapa/Control-Surface] 8 SSD1306 0.66 64X48 OLEDS (#164)

@henkmeidhttps://github.com/henkmeid @rogerarendshttps://github.com/rogerarends Just as scotthc said, I'd be more than willing to pay for a functioning version of this.

I have a Tascam US-2400 and use Studio One 4 (thinking of updating it though), I did lots of research all over the internet and tried using some of the coding here, but as I'm not a programmer, I can't make sense of it enough so I can make it work.

If any of you guys could help me out, it's just a pain to have such an awesome controller and have to memorize all the channels over and over again when mixing =/

I'd love to work something out with you! All the hardware would be up to me to get and build a decent-looking thing, but I need a list of what exactly to buy and a working code.

Hope you all are well! Roberto

— Reply to this email directly, view it on GitHubhttps://github.com/tttapa/Control-Surface/issues/164#issuecomment-1264409985, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJSCCYFJAAVFC7MPLP52UW3WBBPCNANCNFSM4MEOVTHQ. You are receiving this because you were mentioned.Message ID: @.***>

Roberto-OA commented 1 year ago

Hey, @rogerarends ! How are you doing?

I appreciate your quick answer, but I have no problems with setting up the controller. It works really fine over here!

What I need is just a way to not have to look at my computer screen each and every time I do anything while working on a mix, hence these scribble strips.

And damn, what a shame about yours! The guys that stole it really really wanted it! It is really clunky, hahah

rogerarends commented 1 year ago

Hi

So you would need 24 oleds in total... 12 if you split between 2 channels, but I would prefer having a screen above each fader. (You also using smaller screens, I used the 128x64) The most screens I could get working on a teensy 4 was nine before I had issues with interference and occasional freezing. I'm thinking using 3 teensy fours with 8 screens each. First one would be the coded as the master and the other two as extenders then somehow use the teensys USB host to send and receive from the tascam. I successfully used my teensy to pass through my Samson graphite keyboard, When I have a moment I will dig out my teensy and set it up again. I also edited the Mackie script in studio one to get everything working the way I wanted.

Only problem I see is possibly conflict with sending Mackie control data to both the teensys and the tascam simultaneously , although the teensys would only receive...

Give me about a week or so get everything working again... Might have to ask Pieter help with this if we get stuck.

On Tue, 04 Oct 2022, 15:32 Roberto-OA, @.***> wrote:

Hey, @rogerarends https://github.com/rogerarends ! How are you doing?

I appreciate your quick answer, but I have no problems with setting up the controller. It works really fine over here!

What I need is just a way to not have to look at my computer screen each and every time I do anything while working on a mix, hence these scribble strips.

And damn, what a shame about yours! The guys that stole it really really wanted it! It is really clunky, hahah

— Reply to this email directly, view it on GitHub https://github.com/tttapa/Control-Surface/issues/164#issuecomment-1267005047, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSCCYCPFZMKWNQ2G4FBMVLWBQWVDANCNFSM4MEOVTHQ . You are receiving this because you were mentioned.Message ID: @.***>

scotthc commented 1 year ago

I agree completely. Please keep us updated as I’m excited to give it a go with my softube console 1 setup.

Sent from my iPhone

On Oct 4, 2022, at 9:32 AM, Roberto-OA @.***> wrote:

 Hey, @rogerarends ! How are you doing?

I appreciate your quick answer, but I have no problems with setting up the controller. It works really fine over here!

What I need is just a way to not have to look at my computer screen each and every time I do anything while working on a mix, hence these scribble strips.

And damn, what a shame about yours! The guys that stole it really really wanted it! It is really clunky, hahah

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

henkmeid commented 1 year ago

I'm still working on the hardware, but work is getting in the way. I now have 24 oleds(3 banks of 8 Mackie Controls) working with my Tascam DM 4800, that is an oled per channel, with cubase. But due to the many jumperwires it can be a bit dodgy with the reset procedures of the oleds. So i will now design a pcb were everything is with fixed traces and hopefully this will result in a stable solution. Will post my findings once I get there.

Here is a photo of my test earlier with 16 oleds with a DM3200.

image

scotthc commented 1 year ago

Very good thank you

Sent from my iPhone

On Oct 4, 2022, at 12:50 PM, henkmeid @.***> wrote:

 I'm still working on the hardware, but work is getting in the way. I now have 24 oleds(3 banks of 8 Mackie Controls) working with my Tascam DM 4800, that is an oled per channel, with cubase. But due to the many jumperwires it can be a bit dodgy with the reset procedures of the oleds. So i will now design a pcb were everything is with fixed traces and hopefully this will result in a stable solution. Will post my findings once I get there.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

henkmeid commented 1 year ago

@rogerarends

Only problem I see is possibly conflict with sending Mackie control data to both the teensys and the tascam simultaneously , although the teensys would only receive...

Thats not a problem, this can easily be done with software. I use LoopBe for virtual midi ports and MidiOX as a midirouter, in my case routing is as follows:

Cubase Mackie control: MIDI IN: Tascam DM OUT 1-8 MIDI OUT: Virtual Midi 1 In MidiOX split the signal from Virtual Midi 1 to the Teensy Port 1 and Tascam DM IN 1-8 (Portnames can vary in your situation)

This works pretty good, only be aware that you cannot use the VU meters, this is too much information for MidiOX to handle and everything starts to lag. You have to filter out these specific events in MidiOX. (with this many screens on a single Teensy, the refresh rate is probably too low anyway to be useful).

I will make some screenshots when i'm at my audio pc.

Roberto-OA commented 1 year ago

Thanks all you guys for the awesome answers! There is promising stuff coming up from you!

@henkmeid That's a beautiful desk! The faders are so authoritative! I changed my TASCAM's for Behringer's X32 when I bought it. It looks less like a starship and more like a music thingy now! =)

@rogerarends That's interesting info! Hope you'll be able to make it work!

Oh, I didn't explain really well before what my intents are, but I "just" need the OLEDs to tell me the name of the channels inside Studio One and that they keep track of the banking when I change it with the US-2400. 'Just' is between quotes because I know that nothing is ever easy, principally when talking about tech!

rogerarends commented 1 year ago

Hey

I assume you only needed the oleds for Chanel names and levels as you're using the 2400.

Connected my keyboard and touch daw and was able to send and receive from both. Just have to finger out the extenders

Let you know soon about the oleds

On Thu, 06 Oct 2022, 19:00 Roberto-OA, @.***> wrote:

Thanks all you guys for the awesome answers! There is promising stuff coming up from you!

@henkmeid https://github.com/henkmeid That's a beautiful desk! The faders are so authoritative! I changed my TASCAM's for Behringer's X32 when I bought it. It looks less like a starship and more like a music thingy now! =)

@rogerarends https://github.com/rogerarends That's interesting info! Hope you'll be able to make it work!

Oh, I didn't explain really well before what my intents are, but I "just" need the OLEDs to tell me the name of the channels inside Studio One and that they keep track of the banking when I change it with the US-2400. 'Just' is between quotes because I know that nothing is ever easy, principally when talking about tech!

— Reply to this email directly, view it on GitHub https://github.com/tttapa/Control-Surface/issues/164#issuecomment-1270413310, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSCCYEVLGHIMTOFJVRLTODWB4ATPANCNFSM4MEOVTHQ . You are receiving this because you were mentioned.Message ID: @.***>

Roberto-OA commented 8 months ago

Hey, @rogerarends ! How are you doing, man?

Did you ever got things going forward with this?

I never actually corrected it, but I just need the channel names, not even metering is necessary.