Skip to content

Commit 90b8636

Browse files
committed
Arduino Support
1 parent e103cab commit 90b8636

File tree

13 files changed

+20
-14
lines changed

13 files changed

+20
-14
lines changed

INSTALL.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ By Perry R. Cook and Gary P. Scavone, 1995-2019.
33

44
The Synthesis ToolKit in C++ can be used in a variety of ways, depending on your particular needs. Some people simply choose the classes they need for a particular project and copy those to their project directory. Others like to compile and link to a library of object files. STK was not designed with one particular style of use in mind.
55

6+
## Arduino
7+
Download the project as zip and install the file in the Arduino IDE via -> Sketch -> Include Library -> Add ZIP Library or execute the following command in the Arduino Library Folder
8+
9+
```
10+
git clone https://github.com/pschatzmann/Arduino-STK.git
11+
```
12+
13+
614
## Unix systems and MinGW
715

816
1. If you downloaded the software from the git repository, first run autoconf,

README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,4 @@ git clone https://github.com/pschatzmann/Arduino-STK.git
3131

3232
You can consult the ArdConig.h file for the available functionality for your processor!
3333

34-
Standard Arduinos are not supported yet because the STK framwork is using the following (missing) classes which are not available
35-
in the Standard Arduino implementation:
36-
37-
- std::vector
38-
- std::string
39-
- std::ostringstream
40-
- std::cout
41-
- std::queue
42-
43-
I tried to compile the code with Mike Materas STL Library, but I unfortunatly there are some [open issues](https://github.com/arduino/ArduinoCore-avr/issues/287)
44-
45-
34+
If you to use the library on a Standard Arduino please check out [my related Blog](https://www.pschatzmann.ch/home/2020/09/29/the-synthesis-toolkit-stk-library-for-arduino-running-on-a-nano/)

examples/MemoryLoop/MemoryLoop.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ArdStreamOut output(Serial);
1212

1313
void setup() {
1414
Serial.begin(115200);
15+
1516
Stk::setSampleRate( 44100.0 );
1617
input.setFrequency( 440.0 );
1718
}

examples/MidiBLEClient/MidiBLEClient.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ ArdMidiBleEventHandler handler(&voicer);
1111
ArdMidiBleServer ble("MidiServer", &handler);
1212

1313
void setup() {
14+
Serial.begin(115200);
15+
1416
voicer.addInstrument(&clarinet, 0);
1517
ble.start(voicer);
1618
}

examples/MidiBLEServer/MidiBLEServer.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ StkFloat amplitude = 100; // 0 to 128
1919

2020
void setup() {
2121
Serial.begin(115200);
22+
2223
voicer.addInstrument(&clarinet, 0);
2324
ble.start(voicer);
2425
}

examples/MidiFromSerial/MidiFromSerial.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ArdMidiStreamIn in(Serial, handler);
1111

1212
void setup() {
1313
Serial.begin(115200);
14+
1415
voicer.addInstrument(&clarinet);
1516
}
1617

examples/MidiFromUDP/MidiFromUDP

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ int localPort = 9000;
1717

1818
void setup() {
1919
Serial.begin(115200);
20+
2021
WiFi.begin(SSID, PWD);
2122
while (WiFi.status() != WL_CONNECTED) {
2223
Serial.print('.');

examples/MidiToIP/MidiToIP.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ StkFloat amplitude = 100; // 0 to 128
1616

1717
void setup() {
1818
Serial.begin(115200);
19+
1920
WiFi.begin(SSID, PWD);
2021
while (WiFi.status() != WL_CONNECTED) {
2122
Serial.print('.');

examples/MidiToUDP/MidiToUDP.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ StkFloat amplitude = 100; // 0 to 128
1515

1616
void setup() {
1717
Serial.begin(115200);
18+
1819
WiFi.begin(SSID, PWD);
1920
while (WiFi.status() != WL_CONNECTED) {
2021
Serial.print('.');

examples/Noise/Noise.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using namespace stk;
33

44
void setup() {
5-
Serial.setup(115200);
5+
Serial.begin(115200);
66

77
StkFloat output;
88
Noise noise;

examples/OutToBluetooth/OutToBluetooth.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ StkFloat amplitude = 100; // 0 to 128
1313

1414
void setup() {
1515
Serial.begin(115200);
16+
1617
Stk::setSampleRate( 44100.0 );
1718
voicer.addInstrument(&clarinet);
1819

examples/UDP/UDP.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const char *PWD = "your password";
1515

1616
void setup() {
1717
Serial.begin(115200);
18+
1819
WiFi.begin(SSID, PWD);
1920
while (WiFi.status() != WL_CONNECTED) {
2021
Serial.print('.');

src/ArdStreamOutCommon.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ namespace stk {
1515
\brief Abstract class for Output to Arduiono HardwareArdStream
1616
1717
We are wrting the data to the indicated Ardino HardwareArdStream device.
18-
SoftArdStream is not supported because it is too slow.
1918
2019
by Phil Schatzmann
2120

0 commit comments

Comments
 (0)