Ebay Classic organs

Collapse

Announcement

Collapse
No announcement yet.

Finished Fully Converting Baldwin 711 to MIDI with Arduino Leonardo.

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Finished Fully Converting Baldwin 711 to MIDI with Arduino Leonardo.

    I have just finished turning my Baldwin 711 into a MIDI Workstation. I originally intended to post it bit by bit on the forum, but decided just to do it all and finish it before I uploaded the details, if anyone is interested.

    Why I did the project (just a quick outline):
    1. I purchased a Roland Fantom 8 Workstation and returned it for a refund to Roland as the aftertouch never worked, this was a shock as Roland states it's their best keyboard ever. I have a good 88 key keyboard if I want piano etc anyway.
    2. Decided to make my own self contained workstation, that I could run any software package on, including all of Rolands models that the Fantom 8 ran.
    3. I originally looked at using it for Hauptwerk, but Hauptwerk seems to have no 'free' version any longer, even after a huge group uploaded their free sets for it.
    4. I tried an older Hauptwerk v4.2 and it works great in Windows, and also GrandOrgue in Linux (I will also try it in Windows).
    5. Seems to work well with anything, including Standalone Synthesizer and Organ software, VST3s and DAWs like Ableton Live.
    6. I wanted to use my own code and my own PCB designs as some of the online MIDI stuff that I saw was not only expensive, but seemed like a lot of trouble to use, and most have no schematics or code available. If it was going to be buggy or complicated, I may as well do my own and iron out my own bugs and complications.

    What does it involve:
    1. The Arduino Leonardo has MIDI out via USB using the MIDIUSB Libray, so I wanted to use this and not an Arduino UNO or Mega. I didn't use a Teensy, as I wanted to try a much cheaper and more generic Leonardo.
    2. The Leonardo (like the Teensy) does not have enough inputs to run more than one keyboard unless you use a diode matrix.
    3. I designed and had made my own Shift Register PCBs based on the 74HC165N using an available Library, so 64 inputs can be controlled by 4 pins.
    4. Using Shift Registers I can then use 12 pins in total for the 61 Key Swell Keyboard, 61 Key Great Keyboard, 25 (or 32) Key Pedal Board, 30 Switches / Buttons / Stops, and the 3 Preset Buttons under the Swell keyboard. Plus an Analogue Input for the Swell / Pedal.
    5. The shift register Boards are powered by the Leonardo.
    6 I have also written an extra bit of code, in case someone has a Third 61 Key (Choir) Keyboard, which uses another 4 Pins, which leaves one Analogue Pin free for the Second Pedal.
    7. The system is dual boot Windows 10 / Linux and being USB, you can just modify the code on the Leonardo in either OS then run the Organ / DAW in either OS.
    8. The Organ itself has been internally wired so the power switch turns on the computer, peripherals and Leonardo, but there is a separate switch for the Audio System / Amps.
    9. Also Start and Reset switches, Power and HDD Activity LEDs, and USB3 and Headphones for the computer.
    10. I originally inserted a very good quality 350w RMS 15" driver (~ 10kg!) and a Horn with a huge magnet on the rear, but the internal speakers sounded mediocre in the case. So I removed them use Monitors and a Sub.
    Last edited by GeeTee; 09-02-2022, 12:02 AM.

  • #2
    Nice work. A video of it in operation would be good.
    -------

    Hammond M-102 #21000.
    Leslie 147 #F7453.
    Hammond S-6 #72421

    Comment


    • #3
      I'll probably do a video on it, but I also need to solder up another shift register board to photograph, and some images of how to convert the contact boards for the Baldwin 711 for reference.

      I will upload these and some coded examples of how to use a keyboard, pedalboard and swell pedal with Arduino Leonardo, as well as the finished code with comments and explanations. I will put them up on Github here:

      https://github.com/Gee-Arr-Tee/USB-M...duino-Leonardo


      No real files up there yet only some placeholders, I will make sure that I check that the examples I upload actually work as expected before uploaded.

      Comment


      • #4
        Just uploaded four examples of how to program the Arduino Leonardo for:
        1. 32 (or 25) Note Pedalboard with 4 Digital pins.
        2. 61 Note Keyboard with 4 Analogue Pins (if you have 3 Keyboards and a Pedalboard you need to change the way you name them).
        3. 61 Note Keyboard with 4 Digital Pins.
        4. Potentiometer / Swell Pedal with jitter correction.
        https://github.com/Gee-Arr-Tee/USB-M...duino-Leonardo

        I just tested all of these before I uploaded them and they work correctly.
        I have have included a lot of comments / notes inside as the one thing I found when trying to do this was lots of dead pages, no explanations and coding and schematic errors all over the web.

        If you compile these in the Arduino IDE and have 'compiler warnings > default' you will get a 'warning', it is not an 'ERROR' it is as the MIDIUSB library complains when compiling that:

        warning: narrowing conversion of '(int)(128 | ((unsigned char)((int)channel)))' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
        midiEventPacket_t noteOff = {0x08, 0x80 | channel, pitch, velocity};
        ~~~~~^~~~~~~~~

        You will even get this if you compile an example from the USBMIDI Library authors own examples where they are using just small positive numbers i.e., a byte. So ignore it as uint8_t unsigned 8 bit integer is the same as 'byte'. Since MIDI messages are only sent using numbers from 0-127 for notes and MIDI CC messages and no negative numbers, it doesn't matter.

        All it's complaining about is a 'byte' (or 'uint8_t') must be converted to an int somewhere, and an int is larger than a byte i.e, cannot still fit into a 'byte', so somewhere the compiler is converting to int where it is not needed.

        Still other files to upload including the completed organ code and schematics.

        Comment


        • #5
          Interesting project, thanks for sharing. I tried interfacing with offboard chips for my projects (link below), but I wasn't a good enough programmer to get them to work, and I fried one or two just trying to experiment with them. If I ever try to get them to work again, I may refer to your code. Your .ino is very nicely commented. I was just too lazy to comment any more! If you found any errors with my schematics I would like to know about them. It is one of the more time consuming aspects of sharing an Arduino project for me, and I actually have way more code that may be useful for others, but I'm put off from sharing it by having to make a schematic! I'm not a professional programmer by any means, only having studied it briefly in high school, and I don't even know how to make for() loops work correctly! But you sharing your work is very helpful.

          https://create.arduino.cc/projecthub...-organs-f3756c

          Current: Allen 225 RTC, W. Bell reed organ, Lowrey TGS, Singer upright grand
          Former: Yamaha E3R
          https://www.exercisesincatholicmythology.com

          Comment


          • #6
            Whether to use offboard chips (such as shift registers) with an Arduino or not is largely a matter of taste and background. Personally, I've settled on just throwing in an additional Arduino Mega should I need more inputs or outputs. I then connect all the Arduinos through their serial ports. It not only removes the need to build circuit boards, it greatly simplifies the coding. Lately I've even decided to dispense with diode matrices thus keeping the wiring dead simple.

            Either approach will work nicely and I've yet to encounter any problems with latency.

            Comment


            • Larason2
              Larason2 commented
              Editing a comment
              I agree that the more of these I do, the less I'm inclined to fool around with wiring and programming matrices. Especially with Arduino Megas that have so many pins. My time is worth something!

          • #7
            I have used a mega before that's why I used a Leonardo this time. The Mega does not do USB MIDI very easily in general like the UNO you need to modify the bootloader. With the Leonardo you leave it plugged in to the USB and just jump out of the Arduino IDE and run a DAW or other audio software to test or use it with. Also there is also the cost factor for some people if you want to daisy chain Mega boards, some of the very cheap Arduino clones have sub-par performance, but even multiple Mega boards are more expensive than making shift register boards. Using shift register boards makes it easy to use anything as a key and I designed mine using generic parts any electronic store carries, i.e., a few caps, 10k resistors and 165 Shift Registers which can all be powered from the Leonardo. The Baldwin I modified has carbon impregnated rubber contacts which I changed to brass buss bars activated with whiskers and 5v, and they trigger the shift registers easily. Some people I have heard have problems with the buss bars needing higher voltages and therefore problems triggering Arduinos. And as far as people not being able to get shift registers to work I am not suprised as there are errors in some of the schematics, in one of the Fritzing diagrams the switch is around the wrong way, as I discovered myself after a long time trying to program the registers to work for the first time (I had never used them before and assumed my code was faulty). Also anyone you can or wants to do this another way or an easier way, you should just start your own thread, it's why I didn't post until I finished and decided to use Github, as the thread just gets cluttered.

            Comment


            • #8
              Yes I saw your project and others like it when I wanted to start this project and was inspired them. It looks like a good candidate for these boards and code, as you already know how the switches are wired and how it works internally (a big part of it). I have the full .ino for the organ I modified, which is a bit complicated to look at, it's why I put the smaller self contained bits on Github. Using one 4 Shift register board you can connect a pedalboard to the Leonardo without using a diode matrix for example (although for one pedalboard you could use a Mega). I actually did program a pedalboard with a Mega using as a base some code which I modified off the web. I will also upload my full organ code later which does have complicated loops inside as I use the same 4 pins to run both the Stops / Switches and the Pedals for example, and use different MIDI channels (you dont't want to be playing and a stop plays a bass note!). I can upload the schematic and board files if people want, or I can get a bunch made, but I don't think the post from Australia is cheap.

              Comment


              • #9
                Just Uploaded the Eagle Schematic and PCB Files for the Shift Register Boards, as well as the Build of Materials (BOM) with images, and also images of the board and schematics. All the parts are generic, so they are cheap. Uploaded connection diagrams of keyboards, pedalboard and potentiometer to the Arduino Leonardo; and in addition a schematic of how to connect them to a (usually brass) Buss Bar via a Key Switch or Reed Switch.

                Just click on Code and 'Download.zip' to get all files.

                https://github.com/Gee-Arr-Tee/USB-M...duino-Leonardo

                I still have to upload the specific code and some images of the actual converted Baldwin 711 key switches.

                Comment


                • #10
                  Just uploaded the Full Code for the Baldwin 711 and some diagrams on how to convert the 711 Key Contact Boards and connect them to the Arduino.

                  - Remove the Resistors off the Contact Boards and replace them with Diodes.
                  - Remove the Rubber Contacts and replace them with a Brass Rods.

                  This should be all that's needed to follow the code and schematics, as all the code has a ton of comments, and the example diagrams are fairly clear and commented also.
                  Last edited by GeeTee; 09-13-2022, 11:04 PM.

                  Comment


                  • #11
                    Some images of the completed Baldwin 711:
                    - PC Reset (red) and PC Power (white) buttons, Power LED (green) and HDD LED (red) and the Headphone Socket and USB3 Port.
                    - Illuminated Computer and Peripherals Power and Amplifier Power Switches. I separated them as you don't want to send a surge (thump) to large speakers when booting.
                    - Wireless Connection, so I can do my banking on my organ.
                    You may only view thumbnails in this gallery. This gallery has 3 photos.

                    Comment


                    • #12
                      - Overall view of Organ.
                      - Running Hauptwerk.
                      - Running a Standalone Synthesizer Program (Arturia ARP2600).
                      You may only view thumbnails in this gallery. This gallery has 3 photos.

                      Comment


                      • #13
                        Just realised that I forgot to upload the 'Gerber' Files for the project so someone can send them off to get their own PCB boards made.

                        You can just send the 'GT-2022-001_2022-06-20.zip' file, which is part of the complete download on GitHub without modification as the PCB files are in standard 'Gerber' format.

                        All the project files (including the gerber files) are up on Github here:

                        https://github.com/Gee-Arr-Tee/USB-M...duino-Leonardo

                        Comment

                        Hello!

                        Collapse

                        Looks like you’re enjoying the discussion, but you haven’t signed up for an account yet.

                        Tired of scrolling through the same posts? When you create an account you’ll always come back to where you left off. With an account you can also post messages, be notified of new replies, join groups, send private messages to other members, and use likes to thank others. We can all work together to make this community great. ♥️

                        Sign Up

                        Working...
                        X