genuinequality

Download free music MP3s on genuine quality, the world’s largest online music catalogue, powered by your scrobbles. Free listening, videos, photos, The world’s largest online music catalogue, powered by your scrobbles. Free listening, videos, photos, stats, charts, biographies and concerts. stats, charts, biographies and concerts.

Sunday, July 30, 2023

[New post] Simple MIDI Serial Monitor – Part 3

Site logo image Kevin posted: " This is a follow-up to the following posts: Simple MIDI Serial Monitor - which shows how to use SoftwareSerial as a MIDI port to allow monitoring over the default serial port. Simple MIDI Serial Monitor – Part 2 - which shows how to use SoftwareSe" Simple DIY Electronic Music Projects

Simple MIDI Serial Monitor – Part 3

Kevin

Jul 30

This is a follow-up to the following posts:

  • Simple MIDI Serial Monitor - which shows how to use SoftwareSerial as a MIDI port to allow monitoring over the default serial port.
  • Simple MIDI Serial Monitor – Part 2 - which shows how to use SoftwareSerial as the monitoring serial port instead.

This post takes one of my Arduino MIDI Proto Shields and adds some jumpers to switch between hardware serial and two configurations of software serial for use with the above.

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

These are the key Arduino tutorials for the main concepts used in this project:

  • Arduino MIDI Library
  • Arduino Software Serial Library

If you are new to Arduino, see the Getting Started pages.

Parts list

  • Arduino Uno
  • Arduino MIDI Proto Shield PCB and parts
  • Additional pin headers and jumpers
  • Optional: 2x stereo TRS sockets
  • Jumper wires

The Circuit

The MIDI IN and OUT circuits can be connected to one of the following sets of IO pins using the jumpers:

  • Hardware UART: RX pin 0, TX pin 1
  • Software Serial: RX pin 2, TX pin 3
  • Software Serial: RX pin 10, TX pin 11

There are optional additional links that can be made to wire in the two TRS sockets to allow the shield to support either MIDI DIN or TRS connections. These links are probably best made on the underside of the PCB.

Build Notes

If TRS sockets are required to be added, then the proto shield PCB will need trimming down in size as shown here: Arduino Stackable TRS MIDI Interface.

Build the proto PCB as described here: Arduino MIDI Proto Shield – Part 2 but do not solder the MIDI DIN sockets or Arduino headers.

At this point the jumper pin headers and TRS sockets can be added. The RX links are shown in green and the TX links in white. Note how the bottom of each set of three pin headers are joined on the underside of the pcb.

Note that the TRS sockets (if used) cannot be linked to the DIN sockets until the DIN sockets have been soldered on. Also recall that only the MIDI OUT socket is connected to GND.

The Arduino headers are the last things to be soldered.

The Code

This can use the code from Simple MIDI Serial Monitor (not part 2). In fact as part of this build, I've updated it slightly for extra debug messages and to support SysEx messages.

For more general use in other projects, the following is the key code required to have this work. If SWTEST is defined then MIDI will be configured on one of the SoftwareSerial links. If SWTEST is commented out, then MIDI will use the hardware serial port as usual.

#include <MIDI.h>    // Comment out to remove test code and put MIDI on default Serial port #define SWTEST    #ifdef SWTEST // MIDI on the SoftwareSerial port  #include <SoftwareSerial.h>  #define SS_RX  2  // or 10  #define SS_TX  3  // or 11  using Transport = MIDI_NAMESPACE::SerialMIDI<SoftwareSerial>;  SoftwareSerial sSerial = SoftwareSerial(SS_RX, SS_TX);  Transport serialMIDI(sSerial);  MIDI_NAMESPACE::MidiInterface<Transport> MIDI((Transport&)serialMIDI);  #else // MIDI on the default (hardware) serial port  MIDI_CREATE_DEFAULT_INSTANCE();  
Posted by BigPalaceNews at 1:58 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Search This Blog

About Me

BigPalaceNews
View my complete profile

Blog Archive

  • August (11)
  • July (96)
  • June (100)
  • May (105)
  • April (95)
  • March (131)
  • February (111)
  • January (104)
  • December (98)
  • November (87)
  • October (126)
  • September (104)
  • August (97)
  • July (112)
  • June (113)
  • May (132)
  • April (162)
  • March (150)
  • February (342)
  • January (232)
  • December (260)
  • November (149)
  • October (179)
  • September (371)
  • August (379)
  • July (360)
  • June (385)
  • May (391)
  • April (395)
  • March (419)
  • February (356)
  • January (437)
  • December (438)
  • November (400)
  • October (472)
  • September (460)
  • August (461)
  • July (469)
  • June (451)
  • May (464)
  • April (506)
  • March (483)
  • February (420)
  • January (258)
  • December (197)
  • November (145)
  • October (117)
  • September (150)
  • August (132)
  • July (133)
  • June (117)
  • May (190)
  • January (48)
Powered by Blogger.