Skip to content

Commit

Permalink
Sequencer (#304)
Browse files Browse the repository at this point in the history
Add Sequencer
  • Loading branch information
AEFeinstein authored Oct 19, 2024
1 parent de3ff3f commit caaa967
Show file tree
Hide file tree
Showing 22 changed files with 1,439 additions and 8 deletions.
Binary file added assets/sequencer/instruments/seq_drums.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sequencer/instruments/seq_guitar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sequencer/instruments/seq_piano.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sequencer/notes/eighth_note.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sequencer/notes/half_note.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sequencer/notes/quarter_note.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sequencer/notes/sixteenth_note.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sequencer/notes/whole_note.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions components/hdw-btn/hdw-btn.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,5 +552,9 @@ int getTouchJoystick(int32_t* phi, int32_t* r, int32_t* intensity)
*intensity = totalIntensity;
}

#if defined(CONFIG_HARDWARE_HOTDOG)
*phi = (*phi + 225) % 360;
#endif

return 1;
}
6 changes: 3 additions & 3 deletions dependencies.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
espressif/esp_tinyusb:
component_hash: f151d680d6847bfcfd5d8eb6d1c3ff926c208e6b963b2e83643a141bc70baa15
component_hash: 2be80f1c9fcdc1ccf945e001856b88fee5a82c321187c3f4351519928e5de168
dependencies:
- name: idf
require: private
Expand All @@ -12,7 +12,7 @@ dependencies:
source:
registry_url: https://components.espressif.com/
type: service
version: 1.4.4
version: 1.4.5
espressif/tinyusb:
component_hash: 214989d502fc168241a4a4f83b097d8ac44a93cd6f1787b4ac10069a8b3bebd3
dependencies:
Expand All @@ -35,6 +35,6 @@ direct_dependencies:
- espressif/esp_tinyusb
- espressif/tinyusb
- idf
manifest_hash: 1b9ecb1f9724a383ecc7f074814ba961b42b325c6e089a6c1e12c5d123417dcb
manifest_hash: e1591afebb66f886a9698923c8ef6570553eacae4e485e615af131120a68f109
target: esp32s2
version: 2.0.0
2 changes: 2 additions & 0 deletions emulator/src/extensions/modes/ext_modes.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "mode_synth.h"
#include "modeTimer.h"
#include "pango.h"
#include "sequencerMode.h"
#include "soko.h"
#include "touchTest.h"
#include "tunernome.h"
Expand Down Expand Up @@ -74,6 +75,7 @@ static swadgeMode_t* allSwadgeModes[] = {
&mainMenuMode,
&modeCredits,
&pangoMode,
&sequencerMode,
&sokoMode,
&swadgeHeroMode,
&synthMode,
Expand Down
3 changes: 3 additions & 0 deletions main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ idf_component_register(SRCS "asset_loaders/common/heatshrink_encoder.c"
"modes/games/ultimateTTT/ultimateTTTresult.c"
"modes/music/colorchord/colorchord.c"
"modes/music/jukebox/jukebox.c"
"modes/music/sequencer/sequencerMode.c"
"modes/music/sequencer/sequencerGrid.c"
"modes/music/tunernome/tunernome.c"
"modes/music/usbsynth/mode_synth.c"
"modes/system/credits/credits_utils.c"
Expand Down Expand Up @@ -132,6 +134,7 @@ idf_component_register(SRCS "asset_loaders/common/heatshrink_encoder.c"
"./modes/music"
"./modes/music/colorchord"
"./modes/music/jukebox"
"./modes/music/sequencer"
"./modes/music/tunernome"
"./modes/music/usbsynth"
"./modes/system"
Expand Down
9 changes: 8 additions & 1 deletion main/display/fill.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,19 @@ void fillDisplayArea(int16_t x1, int16_t y1, int16_t x2, int16_t y2, paletteColo
// Only draw on the display
int xMin = CLAMP(x1, 0, TFT_WIDTH);
int xMax = CLAMP(x2, 0, TFT_WIDTH);

// Quick return if nothing would be drawn
int copyLen = xMax - xMin;
if (!copyLen)
{
return;
}

int yMin = CLAMP(y1, 0, TFT_HEIGHT);
int yMax = CLAMP(y2, 0, TFT_HEIGHT);

uint32_t dw = TFT_WIDTH;
paletteColor_t* pxs = getPxTftFramebuffer() + yMin * dw + xMin;
int copyLen = xMax - xMin;

// Set each pixel
for (int y = yMin; y < yMax; y++)
Expand Down
2 changes: 1 addition & 1 deletion main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## IDF Component Manager Manifest File
dependencies:
espressif/tinyusb: "^0.15.0~10"
espressif/esp_tinyusb: "^1.4.4"
espressif/esp_tinyusb: "^1.4.5"
## Required IDF version
idf:
version: ">=5.3.1"
Expand Down
Loading

0 comments on commit caaa967

Please sign in to comment.