You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.2 KiB
44 lines
1.2 KiB
#include <string>
|
|
#include <iostream>
|
|
#include <pybind11/pybind11.h>
|
|
#include <pybind11/detail/common.h>
|
|
#include "synth_shed.h"
|
|
|
|
using namespace std;
|
|
namespace py = pybind11;
|
|
|
|
PYBIND11_MODULE(synth_shed, m) {
|
|
|
|
m.def("init_synth_shed", &init_synth_shed, "");
|
|
m.def("synth_create", &synth_create, "");
|
|
m.def("synth_set_osc_count", &synth_set_osc_count, "");
|
|
m.def("tech_to_string", &tech_to_string, "");
|
|
m.def("filtertype_to_string", &filtertype_to_string, "");
|
|
m.def("play_synth", &play_synth, "");
|
|
|
|
py::class_<_synth>(m, "_synth")
|
|
.def_readwrite("model_name", &::_synth::model_name)
|
|
.def_readwrite("osc_count", &::_synth::osc_count)
|
|
.def_readwrite("technolgy", &::_synth::technolgy)
|
|
.def_readwrite("filter", &::_synth::filter)
|
|
;
|
|
|
|
py::class_<_filter>(m, "_filter")
|
|
.def_readwrite("technology", &::_filter::technology)
|
|
.def_readwrite("type", &::_filter::type)
|
|
;
|
|
|
|
|
|
py::enum_<::_tech>(m, "_tech")
|
|
.value("ANALOG", ::ANALOG, "")
|
|
.value("DIGITAL", ::DIGITAL, "")
|
|
;
|
|
|
|
py::enum_<::_filtertype>(m, "_filtertype")
|
|
.value("HPF", ::HPF, "")
|
|
.value("LPF", ::LPF, "")
|
|
.value("BPF", ::BPF, "")
|
|
;
|
|
|
|
|
|
}
|
|
|