From 7764a0db8787296ab7c42094bf5e68b344cbabfc Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Fri, 11 Mar 2022 17:54:56 -0500 Subject: Add methods to manage chamber bass externally --- include/xas/drone.h | 10 ++++++++++ src/drone.c | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/include/xas/drone.h b/include/xas/drone.h index 338d53d..b508e6d 100644 --- a/include/xas/drone.h +++ b/include/xas/drone.h @@ -66,6 +66,16 @@ void xas_drone_chamber_insert_drone(xas_drone_chamber *chamber, xas_drone *drone, size_t index); +void xas_drone_chamber_bass_start(xas_drone_chamber *chamber); + +void xas_drone_chamber_bass_stop(xas_drone_chamber *chamber); + +void xas_drone_chamber_bass_set_type(xas_drone_chamber *chamber, + enum xas_synth_type type); + +void xas_drone_chamber_bass_set_frequency(xas_drone_chamber *chamber, + size_t freq); + int xas_drone_chamber_seq_intervals(xas_drone_chamber *chamber, xas_drone_chamber_interval *intervals, xas_seq *seq, diff --git a/src/drone.c b/src/drone.c index 2a130fd..da3c3ae 100644 --- a/src/drone.c +++ b/src/drone.c @@ -181,6 +181,24 @@ void xas_drone_chamber_insert_drone(xas_drone_chamber *chamber, chamber->drones[index] = drone; } +void xas_drone_chamber_bass_start(xas_drone_chamber *chamber) { + xas_synth_start(chamber->synth_bass->ctx); +} + +void xas_drone_chamber_bass_stop(xas_drone_chamber *chamber) { + xas_synth_stop(chamber->synth_bass->ctx); +} + +void xas_drone_chamber_bass_set_type(xas_drone_chamber *chamber, + enum xas_synth_type type) { + xas_synth_set_type(chamber->synth_bass->ctx, type); +} + +void xas_drone_chamber_bass_set_frequency(xas_drone_chamber *chamber, + size_t freq) { + xas_synth_set_frequency(chamber->synth_bass->ctx, freq); +} + int xas_drone_chamber_seq_intervals(xas_drone_chamber *chamber, xas_drone_chamber_interval *intervals, xas_seq *seq, -- cgit v1.2.3