Skip to content

Commit

Permalink
Add job per platform in CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellmattryan committed Oct 19, 2024
1 parent 1cc9967 commit cdb1784
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 20 deletions.
35 changes: 28 additions & 7 deletions .github/workflows/ci.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ on:
branches: ['main', 'develop']

jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]

Seed:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
Expand All @@ -28,5 +24,30 @@ jobs:
run: ./scripts/build.sh

- name: "Build Example"
working-directory: ${{runner.workspace}}/flora/patches/seed/blink
working-directory: ${{runner.workspace}}/flora/patches/seed/daisy
run: make

Init:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ ubuntu-latest ]

steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
submodules: recursive

- name: "Install ARM Toolchain"
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '10-2020-q4'

- name: "Build Dependencies"
working-directory: ${{runner.workspace}}/flora
run: ./scripts/build.sh

- name: "Build Example"
working-directory: ${{runner.workspace}}/flora/patches/init/daisy
run: make
2 changes: 1 addition & 1 deletion lib/cortex
14 changes: 7 additions & 7 deletions patches/init/daisy/daisy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ void AudioCallback(AudioHandle::InterleavingInputBuffer in,
{
hardware.ProcessAllControls();

float coarse_knob = hardware.GetAdcValue(CV_1);
float coarse = cortex::map(coarse_knob, 24.0f, 96.0f);
float coarseKnob = hardware.GetAdcValue(CV_1);
float coarseTuning = cortex::map(coarseKnob, 24.0f, 96.0f);

float voct_cv = hardware.GetAdcValue(CV_5);
float voct = cortex::map(voct_cv, 0.0f, 60.0f);
float vOctCv = hardware.GetAdcValue(CV_5);
float vOct = cortex::map(vOctCv, 0.0f, 60.0f);

float midi_nn = cortex::clamp(coarse + voct, 0.0f, 127.0f);
float freq = cortex::midi_to_frequency(midi_nn);
float midiNote = cortex::clamp(coarseTuning + vOct, 0.0f, 127.0f);
float frequency = cortex::midi_to_frequency(midiNote);

oscillator.SetFrequency(freq);
oscillator.SetFrequency(frequency);

for (size_t idx = 0; idx < size; idx += 2) {
auto sample = (float)oscillator.Generate();
Expand Down
9 changes: 4 additions & 5 deletions patches/seed/blink/blink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ DaisySeed hardware;

int main(void)
{
bool led_state;
led_state = true;
bool ledState;
ledState = true;

hardware.Configure();
hardware.Init();

while (1) {
hardware.SetLed(led_state);

led_state = !led_state;
hardware.SetLed(ledState);
ledState = !ledState;

System::Delay(250.0f);
}
Expand Down

0 comments on commit cdb1784

Please sign in to comment.