Skip to content
Snippets Groups Projects
Commit ba3a2bc5 authored by moon2's avatar moon2 :speech_balloon: Committed by q3k
Browse files

fixed gc issue on tinysynth

parent f218b790
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ STATIC void tinysynth_print(const mp_print_t *print, mp_obj_t self_in, mp_print_
STATIC mp_obj_t tinysynth_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_arg_check_num(n_args, n_kw, 2, 2, true);
synth_tinysynth_obj_t *self = m_new_obj(synth_tinysynth_obj_t);
synth_tinysynth_obj_t *self = m_new_obj_with_finaliser(synth_tinysynth_obj_t);
self->base.type = &synth_tinysynth_type;
self->osc.decay_steps = 50;
self->osc.attack_steps = 3;
......
......@@ -3,8 +3,8 @@ from hardware import *
set_global_volume_dB(0)
synths = []
for i in range(10):
synths += [tinysynth(440+50*i,1)]
for i in range(5):
synths += [tinysynth(440,1)]
chords = [[0,3,7,10,12],[-2,2,5,8,10],[i-2,3,7,10,14],[-4,0,3,8,12],[-1,2,5,7,11]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment