Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
156 additions
and
11,990 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
cmake_minimum_required(VERSION 3.0.0) | ||
cmake_minimum_required(VERSION 3.19.0) | ||
project(bleepbloopmachine CXX) | ||
add_executable(bleepbloopmachine main.cc) | ||
add_executable(bleepbloopmachine src/main.cc) | ||
target_link_arduino_libraries(bleepbloopmachine AUTO_PUBLIC) | ||
target_enable_arduino_upload(bleepbloopmachine) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
This directory is intended for project specific (private) libraries. | ||
PlatformIO will compile them to static libraries and link into executable file. | ||
|
||
The source code of each library should be placed in a an own separate directory | ||
("lib/your_library_name/[here are source files]"). | ||
|
||
For example, see a structure of the following two libraries `Foo` and `Bar`: | ||
|
||
|--lib | ||
| | | ||
| |--Bar | ||
| | |--docs | ||
| | |--examples | ||
| | |--src | ||
| | |- Bar.c | ||
| | |- Bar.h | ||
| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html | ||
| | | ||
| |--Foo | ||
| | |- Foo.c | ||
| | |- Foo.h | ||
| | | ||
| |- README --> THIS FILE | ||
| | ||
|- platformio.ini | ||
|--src | ||
|- main.c | ||
|
||
and a contents of `src/main.c`: | ||
``` | ||
#include <Foo.h> | ||
#include <Bar.h> | ||
|
||
int main (void) | ||
{ | ||
... | ||
} | ||
|
||
``` | ||
|
||
PlatformIO Library Dependency Finder will find automatically dependent | ||
libraries scanning project source files. | ||
|
||
More information about PlatformIO Library Dependency Finder | ||
- https://docs.platformio.org/page/librarymanager/ldf.html |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#include "main.h" | ||
#include <Arduino.h> | ||
|
||
#include <Adafruit_GFX.h> | ||
#include <Adafruit_ST7735.h> | ||
#include <SPI.h> | ||
#define TFT_CS 44 | ||
#define TFT_RST 46 | ||
#define TFT_DC 45 | ||
#define TFT_BACKLIGHT 47 | ||
|
||
//#include "Adafruit_SPIFlash.h" | ||
#include "Adafruit_TinyUSB.h" | ||
#include "AudioStream.h" | ||
#include "output_dacs.h" | ||
|
||
#include <Adafruit_NeoPixel.h> | ||
#include <Audio.h> | ||
|
||
Adafruit_ST7735 display = Adafruit_ST7735(&SPI1, TFT_CS, TFT_DC, TFT_RST); | ||
|
||
class Wave {}; | ||
|
||
class BleepBloopMachine { | ||
menu_mode mode = menu_mode::live; | ||
float bpm = 120.0; | ||
int current_tick = 0; | ||
int bar_of_ticks = 255; | ||
int selected_sound_index = 0; | ||
int selected_menu1_control = 0; | ||
int selected_menu2_control = 0; | ||
int selected_wave_index = 0; | ||
// Wave[] & waves[4]; | ||
// TODO this needs to be whatever | ||
int last_keys; | ||
}; | ||
|
||
// pygamer specific | ||
Adafruit_NeoPixel neopixels(5, 8, NEO_GRB); | ||
|
||
/* there are only monophonic noises on this one so far :) | ||
* but this will need updated for: | ||
* - chords | ||
* - panning | ||
* - each instrument should perhaps have its own mixer? | ||
AudioMixer4 q_mixer; | ||
AudioMixer4 p_mixer; | ||
AudioMixer4 s_mixer; | ||
AudioMixer4 n_mixer; | ||
*/ | ||
AudioMixer4 mixer; | ||
AudioOutputAnalogStereo headphones; | ||
AudioConnection left_ear_patch(mixer, 0, headphones, 0); | ||
AudioConnection right_ear_patch(mixer, 0, headphones, 1); | ||
|
||
void setup() { | ||
display.initR(INITR_BLACKTAB); | ||
display.setRotation(1); | ||
pinMode(TFT_BACKLIGHT, OUTPUT); | ||
digitalWrite(TFT_BACKLIGHT, HIGH); | ||
display.fillScreen(ST77XX_BLACK); | ||
display.fillScreen(ST77XX_YELLOW); | ||
display.drawCircle(0, 10, 20, ST77XX_BLACK); | ||
// arcada.arcadaBegin(); | ||
// arcada.filesysBeginMSD(); | ||
// arcada.displayBegin(); | ||
// arcada.setBacklight(255); | ||
// arcada.drawBMP((char *)"icon.bmp", 0, 0); | ||
neopixels.begin(); | ||
neopixels.setBrightness(180); | ||
} | ||
|
||
void loop() { | ||
// arcada.readButtons(); | ||
// uint8_t buttons = arcada.pressed(); | ||
// int16_t joyX = arcada.readJoystickX(); | ||
// int16_t joyY = arcada.readJoystickY(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
enum class menu_mode { live, menu1, menu2 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
This directory is intended for PlatformIO Unit Testing and project tests. | ||
|
||
Unit Testing is a software testing method by which individual units of | ||
source code, sets of one or more MCU program modules together with associated | ||
control data, usage procedures, and operating procedures, are tested to | ||
determine whether they are fit for use. Unit testing finds problems early | ||
in the development cycle. | ||
|
||
More information about PlatformIO Unit Testing: | ||
- https://docs.platformio.org/page/plus/unit-testing.html |