Skip to content

Commit 09689aa

Browse files
committed
[Docs] update Getting Started guide
1 parent 4ec830c commit 09689aa

File tree

2 files changed

+31
-30
lines changed

2 files changed

+31
-30
lines changed

doxygen/pages/FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ implementing a custom MIDI element as shown in
237237
If that's not enough, you could try disabling some of the features of the
238238
library that you don't need. For example, if you don't need to be able to
239239
receive MIDI System Exclusive messages, you can turn on the @ref IGNORE_SYSEX
240-
and @ref NO_SYSEX_OUTPUT settings in @ref src/Settings/Settings.hpp.
240+
and @ref NO_SYSEX_OUTPUT settings in @ref Settings/Settings.hpp.
241241
If you do need SysEx support but still want to save some memory, you can try
242242
decreasing the @ref SYSEX_BUFFER_SIZE.
243243

doxygen/pages/Getting-Started.md

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ one MIDI interface. If you don't do that, you'll get an error when calling
2727
There are many different MIDI interfaces to choose from:
2828

2929
- `USBMIDI_Interface`: On boards that support MIDI over USB natively, this will
30-
do exactly what you'd expect. You just have to plug it into your computer, and
31-
it shows up as a MIDI device.
30+
do exactly what you'd expect: You just have to plug it into your computer, and
31+
it shows up as a MIDI device.
3232
On Arduinos without native USB capabilities (e.g. UNO or MEGA), you have to
3333
use custom firmware for the ATmega16U2.
34+
See @ref md_pages_MIDI-over-USB for details.
3435
- `HardwareSerialMIDI_Interface`: This interface will send and receive MIDI
3536
messages over a hardware UART. You can use it for MIDI over a 5-pin DIN
3637
connector, for example.
@@ -39,15 +40,14 @@ There are many different MIDI interfaces to choose from:
3940
the [Hairless MIDI<->Serial Bridge](https://projectgus.github.io/hairless-midiserial/).
4041
In that case, you can use this MIDI interface. The default baud rate is 115200
4142
symbols per second.
42-
- `BluetoothMIDI_Interface`: If you have an ESP32, you can send and receive MIDI
43-
messages over Bluetooth Low Energy. This interface is still very much
44-
experimental, but it's pretty cool. If you know more about the MIDI BLE
45-
protocol, feel free to suggest some improvements.
46-
- `USBDebugMIDI_Interface`: Debugging MIDI Controllers can be very cumbersome.
43+
- `BluetoothMIDI_Interface`: If you have a board that supports Bluetooth Low Energy (BLE),
44+
such as an ESP32 or a Raspberry Pi Pico W, you can send and receive MIDI
45+
messages over Bluetooth. See @ref md_pages_MIDI-over-BLE for details.
46+
- `USBDebugMIDI_Interface`: Debugging MIDI Controllers can be very cumbersome.
4747
There are MIDI monitors available, but you have to reconnect every time you
4848
upload a new sketch, and sending MIDI to the Arduino is not always easy.
49-
This interface is designed to help you with that. It prints outgoing MIDI
50-
messages to the Serial port in a readable format, and it allows you to enter
49+
This interface is designed to help with that: It prints outgoing MIDI
50+
messages to the Serial port in a readable format, and it allows you to enter
5151
hexadecimal MIDI messages (as text) in the Serial monitor
5252
(e.g. `90 3C 7F` to turn on middle C).
5353

@@ -58,9 +58,9 @@ For now, we'll use the `USBMIDI_Interface` because it's probably the one you'll
5858
use in your final program. Do keep in mind that not all boards support MIDI over
5959
USB natively, for more details, see the @ref md_pages_MIDI-over-USB page.
6060

61-
You can give the interface any name you want. I'll be very original and
62-
choose `midi`. It doesn't matter, and you don't need to use it afterwards,
63-
just defining the interface is enough, the Control Surface library will
61+
You can give the interface any name you want. Lacking originality, I'll choose
62+
`midi`. The name doesn't matter, and you don't need to use it afterwards,
63+
just defining the interface is enough, the Control Surface library will
6464
automatically detect and use it.
6565

6666
```cpp
@@ -72,14 +72,15 @@ USBMIDI_Interface midi;
7272
> In that case, you can instantiate it as follows:
7373
> `USBDebugMIDI_Interface midi {115200};`
7474
75-
For a more detailed overview of MIDI interfaces and using them to send and
76-
receive MIDI message, have a look at the @ref midi-tutorial.
75+
For a more detailed discussion of MIDI interfaces and how to use them to send
76+
and receive MIDI message, have a look at the @ref midi-tutorial.
7777

7878
### 3. Add Extended Input/Output elements (optional) {#first-output-extio}
7979

8080
If your MIDI Controller requires many in- or outputs, you'll run out of IO pins
81-
really quickly. A solution is to use multiplexers or shift registers.
82-
The Control Surface Library supports both of these options, and makes it easy
81+
quite quickly. A solution is to use multiplexers or shift registers to expand
82+
the number of usable in- and outputs.
83+
The Control Surface library supports both of these options, and makes it easy
8384
to support other types of IO expanders in the future.
8485

8586
An overview of Extended Input/Output elements can be found in the @ref AH_ExtIO
@@ -105,9 +106,10 @@ CD74HC4051 mux { A0, {3, 4, 5} };
105106
Now, we can specify the objects that read the input of the potentiometers and
106107
send out MIDI events accordingly.
107108
108-
Again, I'll refer to the overview of @ref MIDIOutputElements.
109+
I'll again refer to the documentation for an overview of all supported
110+
@ref MIDIOutputElements (including potentiometers, switches, rotary encoders, etc.).
109111
110-
Let's define a single potentiometer on pin `A1` that sends out MIDI Control
112+
Let's define a single potentiometer on pin `A1` that sends out MIDI Control
111113
Change events.
112114
In the @ref CCPotentiometer::CCPotentiometer "documentation",
113115
you'll find that the first argument for the `CCPotentiometer` constructor is the
@@ -132,7 +134,7 @@ CCPotentiometer potentiometer { A1, {7, Channel_1} };
132134
```
133135
134136
In our case, we don't want a single potentiometer, we want eight. It's much
135-
easier to define them in an array.
137+
easier to define them in an [array](https://www.learncpp.com/cpp-tutorial/introduction-to-c-style-arrays/).
136138
Also note how we declare that the potentiometers are connected to the the pins
137139
of the multiplexer we defined in the previous step.
138140
@@ -190,12 +192,11 @@ void setup() {
190192
> **Note**: If you forget to define a MIDI interface, `Control_Surface.begin()`
191193
> will raise an error and the on-board LED will start blinking.
192194
> Other errors will also be indicated this way.
193-
> If you don't know why this happens, you should enable debug information in
194-
> the `Control_Surface/src/AH/Settings/Settings.h` file, and inspect the output
195-
> in the Serial Monitor.
196-
> Someday, I will add a "Troubleshooting" page. For now, if you have any
197-
> problems, just [open an issue on GitHub](https://github.com/tttapa/Control-Surface/issues/new)
198-
> to remind me.
195+
> If you don't know why this happens, you should enable debug information as
196+
> described in the @ref getting-started_md-troubleshooting section below,
197+
> and inspect the output in the Serial Monitor.
198+
> If you cannot fix the issue based on the documentation, source code and
199+
> @ref FAQ alone, feel free to [start a discussion on GitHub](https://github.com/tttapa/Control-Surface/discussions)
199200
200201
### 6. Continuously Update the Control Surface {#first-output-loop}
201202
@@ -302,10 +303,10 @@ requiring any more pins.
302303
Each of the eight outputs of the shift register can be connected to the anode of
303304
an LED. Connect the cathodes to ground through a current-limiting resistor.
304305
305-
Connect the clock input (SH_CP or SRCLK) of the shift register to the Arduino's
306-
SCK pin, the serial data input (DS or SER) of the shift register to the
307-
Arduino's MOSI pin, and the latch pin (ST_CP or RCLK) of the shift register to
308-
digital pin 10 of the Arduino. Connect the Output Enable pin (OE) of the shift
306+
Connect the clock input (`SH_CP` or `SRCLK`) of the shift register to the Arduino's
307+
SCK pin, the serial data input (`DS` or `SER`) of the shift register to the
308+
Arduino's MOSI pin, and the latch pin (`ST_CP` or `RCLK`) of the shift register to
309+
digital pin 10 of the Arduino. Connect the Output Enable pin (`OE`) of the shift
309310
register to ground, and the Master Reset (MR) pin of the shift register to Vcc
310311
to enable it.
311312

0 commit comments

Comments
 (0)