mirror of
https://github.com/AquaMorph/Droplets.git
synced 2025-04-29 17:35:33 +00:00
Updated libs
This commit is contained in:
parent
39338325e6
commit
77893f3e1e
3
Makefile
3
Makefile
@ -15,3 +15,6 @@ daisysp:
|
||||
cd $(DAISYSP_DIR) && make
|
||||
lib: libdaisy daisysp
|
||||
deploy: lib all program
|
||||
updatelib:
|
||||
cd $(LIBDAISY_DIR) && make clean && git pull origin master
|
||||
cd $(DAISYSP_DIR) && make clean && git pull origin master
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 3ca6b0a73d835f568d9260e8110f7595f219f133
|
||||
Subproject commit bb80c4c10b87dfce3835f6dfb42e7c789f91eef6
|
@ -1 +1 @@
|
||||
Subproject commit 73213d45086bee6d88533752740acdf01e1a9dda
|
||||
Subproject commit 7a5ea84dbe0f64ac5dc9d93c40ad68bebaa9ec75
|
@ -34,7 +34,7 @@ size_t Droplet::GetChannelMax() {
|
||||
}
|
||||
|
||||
void Droplet::DrawName(std::string name) {
|
||||
WriteCenteredString(*patch, (screen_min + screen_max) / 2, 0,
|
||||
WriteCenteredString(patch, (screen_min + screen_max) / 2, 0,
|
||||
Font_6x8, name);
|
||||
}
|
||||
|
||||
|
@ -52,8 +52,8 @@ public:
|
||||
* @param out the audio outputs for the patch
|
||||
* @param size the number of inputs and outputs
|
||||
*/
|
||||
virtual void Process(float** in,
|
||||
float** out,
|
||||
virtual void Process(AudioHandle::InputBuffer in,
|
||||
AudioHandle::OutputBuffer out,
|
||||
size_t size)=0;
|
||||
|
||||
/*
|
||||
|
@ -9,7 +9,7 @@ NoiseDroplet::NoiseDroplet(DaisyPatch* m_patch,
|
||||
|
||||
void NoiseDroplet::Control() {}
|
||||
|
||||
void NoiseDroplet::Process(float** in, float** out, size_t size) {
|
||||
void NoiseDroplet::Process(AudioHandle::InputBuffer in, AudioHandle::OutputBuffer out, size_t size) {
|
||||
for (size_t i = 0; i < size; i += 2) {
|
||||
float sig = noise.Process();
|
||||
for (size_t chn = GetChannelMin(); chn < GetChannelMax(); chn++) {
|
||||
|
@ -33,8 +33,8 @@ public:
|
||||
* @param out the audio outputs for the patch
|
||||
* @param size the number of inputs and outputs
|
||||
*/
|
||||
void Process(float** in,
|
||||
float** out,
|
||||
void Process(AudioHandle::InputBuffer in,
|
||||
AudioHandle::OutputBuffer out,
|
||||
size_t size);
|
||||
|
||||
/*
|
||||
|
@ -48,7 +48,7 @@ void VCODroplet::Control() {
|
||||
AdjustWaveShape(Patch()->encoder.Increment());
|
||||
}
|
||||
|
||||
void VCODroplet::Process(float** in, float** out, size_t size) {
|
||||
void VCODroplet::Process(AudioHandle::InputBuffer in, AudioHandle::OutputBuffer out, size_t size) {
|
||||
float sig, freq, amp = 1.0;
|
||||
|
||||
Patch()->ProcessAnalogControls();
|
||||
@ -79,13 +79,13 @@ void VCODroplet::Process(float** in, float** out, size_t size) {
|
||||
void VCODroplet::Draw() {
|
||||
SetWaveState(wave);
|
||||
if (GetState() == DropletState::kFull) {
|
||||
WriteCenteredString(*Patch(),
|
||||
WriteCenteredString(Patch(),
|
||||
(GetScreenMax()-GetScreenMin())/2,
|
||||
54,
|
||||
Font_6x8,
|
||||
WaveToString(wave));
|
||||
} else {
|
||||
WriteDoubleCentered(*Patch(),
|
||||
WriteDoubleCentered(Patch(),
|
||||
GetScreenMin() +
|
||||
(GetScreenMax()-GetScreenMin())/2,
|
||||
54,
|
||||
|
@ -67,8 +67,8 @@ public:
|
||||
* @param out the audio outputs for the patch
|
||||
* @param size the number of inputs and outputs
|
||||
*/
|
||||
void Process(float** in,
|
||||
float** out,
|
||||
void Process(AudioHandle::InputBuffer in,
|
||||
AudioHandle::OutputBuffer out,
|
||||
size_t size);
|
||||
|
||||
/*
|
||||
|
@ -73,8 +73,8 @@ void ProcessOled() {
|
||||
patch.display.Update();
|
||||
}
|
||||
|
||||
static void AudioThrough(float **in,
|
||||
float **out,
|
||||
static void AudioThrough(AudioHandle::InputBuffer in,
|
||||
AudioHandle::OutputBuffer out,
|
||||
size_t size) {
|
||||
droplet_left->Process(in, out, size);
|
||||
if (manager->GetSplitMode()) {
|
||||
|
@ -46,8 +46,8 @@ void ProcessOutputs();
|
||||
* @param out the audio outputs for the patch
|
||||
* @param size the number of inputs and outputs
|
||||
*/
|
||||
static void AudioThrough(float** in,
|
||||
float** out,
|
||||
static void AudioThrough(AudioHandle::InputBuffer in,
|
||||
AudioHandle::OutputBuffer out,
|
||||
size_t size);
|
||||
|
||||
/*
|
||||
|
@ -56,12 +56,12 @@ void Menu::CreateMenuItem(std::string text,
|
||||
bool highlighted) {
|
||||
text.insert(text.end(), MAX_CHAR_LENGTH-text.size(), ' ');
|
||||
if (highlighted) {
|
||||
DrawSolidRect(*patch, 0, MENU_Y[2],
|
||||
DrawSolidRect(patch, 0, MENU_Y[2],
|
||||
SSD1309_WIDTH, MENU_Y[2]+17, true);
|
||||
WriteString(*patch, MENU_X[position-1], MENU_Y[position-1],
|
||||
WriteString(patch, MENU_X[position-1], MENU_Y[position-1],
|
||||
Font_11x18, text, !highlighted);
|
||||
} else {
|
||||
WriteString(*patch, MENU_X[position-1], MENU_Y[position-1],
|
||||
WriteString(patch, MENU_X[position-1], MENU_Y[position-1],
|
||||
Font_7x10, text, !highlighted);
|
||||
}
|
||||
}
|
||||
|
20
src/util.cpp
20
src/util.cpp
@ -1,27 +1,27 @@
|
||||
#include "util.h"
|
||||
|
||||
void DrawSolidRect(DaisyPatch patch,
|
||||
void DrawSolidRect(DaisyPatch* patch,
|
||||
uint8_t x1,
|
||||
uint8_t y1,
|
||||
uint8_t x2,
|
||||
uint8_t y2,
|
||||
bool on) {
|
||||
for (int i = std::min(y1, y2); i <= std::max(y1, y2); i++) {
|
||||
patch.display.DrawLine(x1, i, x2, i, on);
|
||||
patch->display.DrawLine(x1, i, x2, i, on);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteString(DaisyPatch patch,
|
||||
void WriteString(DaisyPatch* patch,
|
||||
int x,
|
||||
int y,
|
||||
FontDef font,
|
||||
std::string text,
|
||||
bool on) {
|
||||
patch.display.SetCursor(x, y);
|
||||
patch.display.WriteString(&text[0], font, on);
|
||||
patch->display.SetCursor(x, y);
|
||||
patch->display.WriteString(&text[0], font, on);
|
||||
}
|
||||
|
||||
void WriteString(DaisyPatch patch,
|
||||
void WriteString(DaisyPatch* patch,
|
||||
int x,
|
||||
int y,
|
||||
FontDef font,
|
||||
@ -29,7 +29,7 @@ void WriteString(DaisyPatch patch,
|
||||
WriteString(patch, x, y, font, text, true);
|
||||
}
|
||||
|
||||
void WriteCenteredString(DaisyPatch patch,
|
||||
void WriteCenteredString(DaisyPatch* patch,
|
||||
int x,
|
||||
int y,
|
||||
FontDef font,
|
||||
@ -40,7 +40,7 @@ void WriteCenteredString(DaisyPatch patch,
|
||||
WriteString(patch, x - (text_width / 2), y, font, text, on);
|
||||
}
|
||||
|
||||
void WriteCenteredString(DaisyPatch patch,
|
||||
void WriteCenteredString(DaisyPatch* patch,
|
||||
int x,
|
||||
int y,
|
||||
FontDef font,
|
||||
@ -48,7 +48,7 @@ void WriteCenteredString(DaisyPatch patch,
|
||||
WriteCenteredString(patch, x, y, font, text, true);
|
||||
}
|
||||
|
||||
void WriteDoubleCentered(DaisyPatch patch,
|
||||
void WriteDoubleCentered(DaisyPatch* patch,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
@ -85,7 +85,7 @@ void WriteDoubleCentered(DaisyPatch patch,
|
||||
}
|
||||
}
|
||||
|
||||
void WriteDoubleCentered(DaisyPatch patch,
|
||||
void WriteDoubleCentered(DaisyPatch* patch,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
|
16
src/util.h
16
src/util.h
@ -9,6 +9,8 @@
|
||||
|
||||
using namespace daisy;
|
||||
|
||||
#define SSD1309_WIDTH 128
|
||||
|
||||
/*
|
||||
* Draws a solid rectangle on screen.
|
||||
*
|
||||
@ -19,7 +21,7 @@ using namespace daisy;
|
||||
* @param y2 y coordinate of the second point
|
||||
* @param on draw screen on or off
|
||||
*/
|
||||
void DrawSolidRect(DaisyPatch patch,
|
||||
void DrawSolidRect(DaisyPatch* patch,
|
||||
uint8_t x1,
|
||||
uint8_t y1,
|
||||
uint8_t x2,
|
||||
@ -36,7 +38,7 @@ void DrawSolidRect(DaisyPatch patch,
|
||||
* @param text text to be written
|
||||
* @param on draw screen on or off
|
||||
*/
|
||||
void WriteString(DaisyPatch patch,
|
||||
void WriteString(DaisyPatch* patch,
|
||||
int x,
|
||||
int y,
|
||||
FontDef font,
|
||||
@ -52,7 +54,7 @@ void WriteString(DaisyPatch patch,
|
||||
* @param font text font
|
||||
* @param text text to be written
|
||||
*/
|
||||
void WriteString(DaisyPatch patch,
|
||||
void WriteString(DaisyPatch* patch,
|
||||
int x,
|
||||
int y,
|
||||
FontDef font,
|
||||
@ -68,7 +70,7 @@ void WriteString(DaisyPatch patch,
|
||||
* @param text text to be written
|
||||
* @param on draw screen on or off
|
||||
*/
|
||||
void WriteCenteredString(DaisyPatch patch,
|
||||
void WriteCenteredString(DaisyPatch* patch,
|
||||
int x,
|
||||
int y,
|
||||
FontDef font,
|
||||
@ -84,7 +86,7 @@ void WriteCenteredString(DaisyPatch patch,
|
||||
* @param font text font
|
||||
* @param text text to be written
|
||||
*/
|
||||
void WriteCenteredString(DaisyPatch patch,
|
||||
void WriteCenteredString(DaisyPatch* patch,
|
||||
int x,
|
||||
int y,
|
||||
FontDef font,
|
||||
@ -101,7 +103,7 @@ void WriteCenteredString(DaisyPatch patch,
|
||||
* @param text text to be written
|
||||
* @param on draw screen on or off
|
||||
*/
|
||||
void WriteDoubleCentered(DaisyPatch patch,
|
||||
void WriteDoubleCentered(DaisyPatch* patch,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
@ -119,7 +121,7 @@ void WriteDoubleCentered(DaisyPatch patch,
|
||||
* @param font text font
|
||||
* @param text text to be written
|
||||
*/
|
||||
void WriteDoubleCentered(DaisyPatch patch,
|
||||
void WriteDoubleCentered(DaisyPatch* patch,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
|
Loading…
x
Reference in New Issue
Block a user