Skip to content

Commit f14bae4

Browse files
2.0.4 (#1715)
* 2.0.4-alpha-1 * 2.0.4-alpha-2 * 2.0.4-alpha-3 * 2.0.4-alpha-4 * added anchors to product families * 2.0.4-alpha-5 * moved hacking to retired * 2.0.4-alpha-6 * 2.0.4-alpha-7 * 2.0.4-alpha-8 * 2.0.4-alpha-9 * 2.0.4 --------- Co-authored-by: Josefine Hansson <j.hansson@arduino.cc> Co-authored-by: Josefine Hansson <66409231+jhansson-ard@users.noreply.github.com>
1 parent 402bdf3 commit f14bae4

File tree

101 files changed

+302
-294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+302
-294
lines changed

content/hardware/01.mkr/family.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
title: MKR Family
33
description: Easily shift between wireless communication protocols with minimal software changes, while being cost efficient
44
businessUnit: maker
5+
anchor: mkr-family
56
---

content/hardware/02.hero/family.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
title: Classic
33
description: The range of classic Arduino boards and shields we all love
44
businessUnit: maker
5+
anchor: classic
56
---

content/hardware/03.nano/family.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
title: Nano Family
33
description: A tiny footprint with powerful processors and reliability
44
businessUnit: maker
5+
anchor: nano-family
56
---

content/hardware/04.pro/family.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
title: Portenta Family
33
description: Industrial-grade, reliable and secure modules with outstanding computational power.
44
businessUnit: pro
5+
anchor: portenta-family
56
---

content/hardware/05.pro-solutions/family.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
title: Pro Solutions and Kits
33
description: Ready-to-use professional devices to boost your productivity.
44
businessUnit: pro
5+
anchor: pro-solutions
56
---

content/hardware/06.nicla/family.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
title: Nicla Family
33
description: Our smallest footprint packed with advanced features.
44
businessUnit: pro
5+
anchor: nicla-family
56
---

content/hardware/07.opta/family.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
title: Opta
33
description: A secure, easy-to-use micro PLC with Industrial IoT capabilities.
44
businessUnit: pro
5+
anchor: opta-family
56
---

content/hardware/10.mega/family.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
title: Mega
33
description: The largest Arduino form factor with a lot of GPIOs.
44
businessUnit: maker
5+
anchor: mega-family
56
---
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,87 @@
1-
---
2-
title: 'MIDI Note Player using the MIDI firmware for the 8U2 (Uno and Mega2560 only)'
3-
description: 'This tutorial shows how to play MIDI notes from an Arduino programmed to appear as a general MIDI device.'
4-
tags:
5-
- MIDI
6-
---
7-
This tutorial shows how to play MIDI notes from an Arduino programmed to appear as a general MIDI device. This tutorial is only applicable to Arduinos with the 8U2 chip, the UNO and Mega2560 boards. This will not work with earlier models that use the FTDI chip (Duemilanove and previous).
8-
9-
Following the instructions on the [Programming 8U2 instructions](/hacking/software/DFUProgramming8U2) using the [MocoLUFA](http://web.mac.com/kuwatay/morecat_lab./MocoLUFA.html) firmware, your Arduino will appear to the computer as a native MIDI device without any additional hardware.
10-
11-
You can read the Wikipedia [MIDI](http://en.wikipedia.org/wiki/MIDI) entry for complete information on the specification, but in a nutshell, MIDI is a useful protocol for controlling synthesizers, sequencers, and other musical devices. MIDI devices are generally grouped in two broad classes: controllers (i.e. devices that generate MIDI signals based on human actions) and synthesizers (including samplers, sequencers, and so forth).
12-
13-
For more information, see this [introduction to MIDI](https://www.tigoe.com/pcomp/code/communication/midi/) or this [example](http://itp.nyu.edu/physcomp/Labs/MIDIOutput).
14-
15-
The Serial.print() function will send a MIDI command to the software synthesizer of your choice (in this example we will use Cycling74's Max/MSP, but any application that accepts MIDI will do).
16-
17-
Before programming the 8U2 firmware, you will need to program the Atmega 328 on your Arduino, the same way you usually do with the IDE. We will be using the MIDI communication example that comes with the Arduino software. It can be found in File>Examples>Communication>MIDI.
18-
19-
## Code
20-
```
21-
/*
22-
MIDI note player
23-
24-
This sketch shows how to use the serial transmit pin (pin 1) to send MIDI note data.
25-
If this circuit is connected to a MIDI synth, it will play
26-
the notes F#-0 (0x1E) to F#-5 (0x5A) in sequence.
27-
28-
29-
The circuit:
30-
* digital in 1 connected to MIDI jack pin 5
31-
* MIDI jack pin 2 connected to ground
32-
* MIDI jack pin 4 connected to +5V through 220-ohm resistor
33-
Attach a MIDI cable to the jack, then to a MIDI synth, and play music.
34-
35-
created 13 Jun 2006
36-
modified 13 Aug 2012
37-
by Tom Igoe
38-
39-
This example code is in the public domain.
40-
41-
http://www.arduino.cc/en/Tutorial/Midi
42-
43-
*/
44-
45-
void setup() {
46-
// Set MIDI baud rate:
47-
Serial.begin(31250);
48-
}
49-
50-
void loop() {
51-
// play notes from F#-0 (0x1E) to F#-5 (0x5A):
52-
for (int note = 0x1E; note < 0x5A; note ++) {
53-
//Note on channel 1 (0x90), some note value (note), middle velocity (0x45):
54-
noteOn(0x90, note, 0x45);
55-
delay(100);
56-
//Note on channel 1 (0x90), some note value (note), silent velocity (0x00):
57-
noteOn(0x90, note, 0x00);
58-
delay(100);
59-
}
60-
}
61-
62-
// plays a MIDI note. Doesn't check to see that
63-
// cmd is greater than 127, or that data values are less than 127:
64-
void noteOn(int cmd, int pitch, int velocity) {
65-
Serial.write(cmd);
66-
Serial.write(pitch);
67-
Serial.write(velocity);
68-
}
69-
```
70-
Program your Arduino, and prepare to program the 8U2 chip. Follow the instructions on the [Programming 8U2](/hacking/software/DFUProgramming8U2/) page, replacing the Arduino firmware with the [MocoLUFA](http://web.mac.com/kuwatay/morecat_lab./MocoLUFA.html) firmware.
71-
72-
After the 8U2 has been updated with the MIDI firmware, disconnect and reconnect the USB cable.
73-
74-
Open your MIDI application of choice and look for connected devices. You should see the Arduino appear as an input and output device named "MIDI/MOCO for LUFA".
75-
76-
![MIDI device list](./assets/MIDI_device_list.png)
77-
78-
79-
A simple Max patch that will allow you to hear the notes generated by the MIDI commands looks like this :
80-
![Max patch](./assets/MIDI_MaxPatch.png)
81-
82-
83-
To change the program on the Arduino, you must first reset the firmware on the 8U2 to the Arduino's default.
84-
85-
See Also:
86-
1+
---
2+
title: 'MIDI Note Player using the MIDI firmware for the 8U2 (Uno and Mega2560 only)'
3+
description: 'This tutorial shows how to play MIDI notes from an Arduino programmed to appear as a general MIDI device.'
4+
tags:
5+
- MIDI
6+
---
7+
This tutorial shows how to play MIDI notes from an Arduino programmed to appear as a general MIDI device. This tutorial is only applicable to Arduinos with the 8U2 chip, the UNO and Mega2560 boards. This will not work with earlier models that use the FTDI chip (Duemilanove and previous).
8+
9+
Following the instructions on the [Programming 8U2 instructions](/hacking/software/DFUProgramming8U2) using the [MocoLUFA](http://web.mac.com/kuwatay/morecat_lab./MocoLUFA.html) firmware, your Arduino will appear to the computer as a native MIDI device without any additional hardware.
10+
11+
You can read the Wikipedia [MIDI](http://en.wikipedia.org/wiki/MIDI) entry for complete information on the specification, but in a nutshell, MIDI is a useful protocol for controlling synthesizers, sequencers, and other musical devices. MIDI devices are generally grouped in two broad classes: controllers (i.e. devices that generate MIDI signals based on human actions) and synthesizers (including samplers, sequencers, and so forth).
12+
13+
For more information, see this [introduction to MIDI](https://www.tigoe.com/pcomp/code/communication/midi/) or this [example](http://itp.nyu.edu/physcomp/Labs/MIDIOutput).
14+
15+
The Serial.print() function will send a MIDI command to the software synthesizer of your choice (in this example we will use Cycling74's Max/MSP, but any application that accepts MIDI will do).
16+
17+
Before programming the 8U2 firmware, you will need to program the Atmega 328 on your Arduino, the same way you usually do with the IDE. We will be using the MIDI communication example that comes with the Arduino software. It can be found in File>Examples>Communication>MIDI.
18+
19+
## Code
20+
```
21+
/*
22+
MIDI note player
23+
24+
This sketch shows how to use the serial transmit pin (pin 1) to send MIDI note data.
25+
If this circuit is connected to a MIDI synth, it will play
26+
the notes F#-0 (0x1E) to F#-5 (0x5A) in sequence.
27+
28+
29+
The circuit:
30+
* digital in 1 connected to MIDI jack pin 5
31+
* MIDI jack pin 2 connected to ground
32+
* MIDI jack pin 4 connected to +5V through 220-ohm resistor
33+
Attach a MIDI cable to the jack, then to a MIDI synth, and play music.
34+
35+
created 13 Jun 2006
36+
modified 13 Aug 2012
37+
by Tom Igoe
38+
39+
This example code is in the public domain.
40+
41+
http://www.arduino.cc/en/Tutorial/Midi
42+
43+
*/
44+
45+
void setup() {
46+
// Set MIDI baud rate:
47+
Serial.begin(31250);
48+
}
49+
50+
void loop() {
51+
// play notes from F#-0 (0x1E) to F#-5 (0x5A):
52+
for (int note = 0x1E; note < 0x5A; note ++) {
53+
//Note on channel 1 (0x90), some note value (note), middle velocity (0x45):
54+
noteOn(0x90, note, 0x45);
55+
delay(100);
56+
//Note on channel 1 (0x90), some note value (note), silent velocity (0x00):
57+
noteOn(0x90, note, 0x00);
58+
delay(100);
59+
}
60+
}
61+
62+
// plays a MIDI note. Doesn't check to see that
63+
// cmd is greater than 127, or that data values are less than 127:
64+
void noteOn(int cmd, int pitch, int velocity) {
65+
Serial.write(cmd);
66+
Serial.write(pitch);
67+
Serial.write(velocity);
68+
}
69+
```
70+
Program your Arduino, and prepare to program the 8U2 chip. Follow the instructions on the [Programming 8U2](/hacking/software/DFUProgramming8U2/) page, replacing the Arduino firmware with the [MocoLUFA](http://web.mac.com/kuwatay/morecat_lab./MocoLUFA.html) firmware.
71+
72+
After the 8U2 has been updated with the MIDI firmware, disconnect and reconnect the USB cable.
73+
74+
Open your MIDI application of choice and look for connected devices. You should see the Arduino appear as an input and output device named "MIDI/MOCO for LUFA".
75+
76+
![MIDI device list](./assets/MIDI_device_list.png)
77+
78+
79+
A simple Max patch that will allow you to hear the notes generated by the MIDI commands looks like this :
80+
![Max patch](./assets/MIDI_MaxPatch.png)
81+
82+
83+
To change the program on the Arduino, you must first reset the firmware on the 8U2 to the Arduino's default.
84+
85+
See Also:
86+
8787
- [MIDI](https://www.arduino.cc/en/Tutorial/Midi)

0 commit comments

Comments
 (0)