├── .clang-format ├── .gitignore ├── .gitmodules ├── CHANGELOG ├── LICENSE.TXT ├── README.md ├── apps ├── LICENSE.TXT ├── aleph_avr32_config.mk ├── aleph_avr32_src.mk ├── bees │ ├── Makefile │ ├── README-OP-DOCUMENTATION.md │ ├── README-OP-GUIDE.txt │ ├── aleph-bees.lds │ ├── config.mk │ ├── docs │ │ ├── guide.txt │ │ ├── ops.md │ │ └── scalers.txt │ ├── host-serial-protocol.org │ ├── src │ │ ├── app_bees.c │ │ ├── app_bees.h │ │ ├── app_timers.c │ │ ├── app_timers.h │ │ ├── files.c │ │ ├── files.h │ │ ├── flash_bees.c │ │ ├── flash_bees.h │ │ ├── handler.c │ │ ├── handler.h │ │ ├── module_no.h │ │ ├── net.c │ │ ├── net.h │ │ ├── net_hid.c │ │ ├── net_hid.h │ │ ├── net_malloc_scratch.c │ │ ├── net_midi.c │ │ ├── net_midi.h │ │ ├── net_monome.c │ │ ├── net_monome.h │ │ ├── net_poll.c │ │ ├── net_poll.h │ │ ├── net_protected.h │ │ ├── op.c │ │ ├── op.h │ │ ├── op_derived.h │ │ ├── op_gfx.c │ │ ├── op_gfx.h │ │ ├── op_math.c │ │ ├── op_math.h │ │ ├── op_pool.c │ │ ├── op_pool.h │ │ ├── ops │ │ │ ├── op_accum.c │ │ │ ├── op_accum.h │ │ │ ├── op_adc.c │ │ │ ├── op_adc.h │ │ │ ├── op_add.c │ │ │ ├── op_add.h │ │ │ ├── op_bars.c │ │ │ ├── op_bars.h │ │ │ ├── op_bars8.c │ │ │ ├── op_bars8.h │ │ │ ├── op_bignum.c │ │ │ ├── op_bignum.h │ │ │ ├── op_bits.c │ │ │ ├── op_bits.h │ │ │ ├── op_cascades.c │ │ │ ├── op_cascades.h │ │ │ ├── op_change.c │ │ │ ├── op_change.h │ │ │ ├── op_ckdiv.c │ │ │ ├── op_ckdiv.h │ │ │ ├── op_cpu.c │ │ │ ├── op_cpu.h │ │ │ ├── op_delay.c │ │ │ ├── op_delay.h │ │ │ ├── op_div.c │ │ │ ├── op_div.h │ │ │ ├── op_divr.c │ │ │ ├── op_divr.h │ │ │ ├── op_enc.c │ │ │ ├── op_enc.h │ │ │ ├── op_fade.c │ │ │ ├── op_fade.h │ │ │ ├── op_gate.c │ │ │ ├── op_gate.h │ │ │ ├── op_harry.c │ │ │ ├── op_harry.h │ │ │ ├── op_harry.lisp │ │ │ ├── op_hid_word.c │ │ │ ├── op_hid_word.h │ │ │ ├── op_history.c │ │ │ ├── op_history.h │ │ │ ├── op_is.c │ │ │ ├── op_is.h │ │ │ ├── op_iter.c │ │ │ ├── op_iter.h │ │ │ ├── op_kria.c │ │ │ ├── op_kria.h │ │ │ ├── op_life_classic.c │ │ │ ├── op_life_classic.h │ │ │ ├── op_linlin.c │ │ │ ├── op_linlin.h │ │ │ ├── op_list16.c │ │ │ ├── op_list16.h │ │ │ ├── op_list2.c │ │ │ ├── op_list2.h │ │ │ ├── op_list4.c │ │ │ ├── op_list4.h │ │ │ ├── op_list8.c │ │ │ ├── op_list8.h │ │ │ ├── op_logic.c │ │ │ ├── op_logic.h │ │ │ ├── op_maginc.c │ │ │ ├── op_maginc.h │ │ │ ├── op_mem0d.c │ │ │ ├── op_mem0d.h │ │ │ ├── op_mem1d.c │ │ │ ├── op_mem1d.h │ │ │ ├── op_mem2d.c │ │ │ ├── op_mem2d.h │ │ │ ├── op_metro.c │ │ │ ├── op_metro.h │ │ │ ├── op_midi_cc.c │ │ │ ├── op_midi_cc.h │ │ │ ├── op_midi_clock.c │ │ │ ├── op_midi_clock.h │ │ │ ├── op_midi_note.c │ │ │ ├── op_midi_note.h │ │ │ ├── op_midi_out_cc.c │ │ │ ├── op_midi_out_cc.h │ │ │ ├── op_midi_out_clock.c │ │ │ ├── op_midi_out_clock.h │ │ │ ├── op_midi_out_note.c │ │ │ ├── op_midi_out_note.h │ │ │ ├── op_midi_prog.c │ │ │ ├── op_midi_prog.h │ │ │ ├── op_mod.c │ │ │ ├── op_mod.h │ │ │ ├── op_monome_arc.c │ │ │ ├── op_monome_arc.h │ │ │ ├── op_monome_grid_classic.c │ │ │ ├── op_monome_grid_classic.h │ │ │ ├── op_monome_grid_raw.c │ │ │ ├── op_monome_grid_raw.h │ │ │ ├── op_mul.c │ │ │ ├── op_mul.h │ │ │ ├── op_param.c │ │ │ ├── op_param.h │ │ │ ├── op_poly.c │ │ │ ├── op_poly.h │ │ │ ├── op_preset.c │ │ │ ├── op_preset.h │ │ │ ├── op_random.c │ │ │ ├── op_random.h │ │ │ ├── op_route.c │ │ │ ├── op_route.h │ │ │ ├── op_route16.c │ │ │ ├── op_route16.h │ │ │ ├── op_route8.c │ │ │ ├── op_route8.h │ │ │ ├── op_screen.c │ │ │ ├── op_screen.h │ │ │ ├── op_serial.c │ │ │ ├── op_serial.h │ │ │ ├── op_shl.c │ │ │ ├── op_shl.h │ │ │ ├── op_shr.c │ │ │ ├── op_shr.h │ │ │ ├── op_split.c │ │ │ ├── op_split.h │ │ │ ├── op_split4.c │ │ │ ├── op_split4.h │ │ │ ├── op_step.c │ │ │ ├── op_step.h │ │ │ ├── op_sub.c │ │ │ ├── op_sub.h │ │ │ ├── op_sw.c │ │ │ ├── op_sw.h │ │ │ ├── op_thresh.c │ │ │ ├── op_thresh.h │ │ │ ├── op_timer.c │ │ │ ├── op_timer.h │ │ │ ├── op_tog.c │ │ │ ├── op_tog.h │ │ │ ├── op_ww.c │ │ │ └── op_ww.h │ │ ├── pages.c │ │ ├── pages.h │ │ ├── pages │ │ │ ├── page_dsp.c │ │ │ ├── page_gathered.c │ │ │ ├── page_ins.c │ │ │ ├── page_ops.c │ │ │ ├── page_outs.c │ │ │ ├── page_play.c │ │ │ ├── page_presets.c │ │ │ └── page_scenes.c │ │ ├── param.c │ │ ├── param.h │ │ ├── param_scaler.c │ │ ├── param_scaler.h │ │ ├── pickle.c │ │ ├── pickle.h │ │ ├── play.c │ │ ├── play.h │ │ ├── preset.c │ │ ├── preset.h │ │ ├── render.c │ │ ├── render.h │ │ ├── scalers │ │ │ ├── scaler_amp.c │ │ │ ├── scaler_amp.h │ │ │ ├── scaler_bool.c │ │ │ ├── scaler_bool.h │ │ │ ├── scaler_fix.c │ │ │ ├── scaler_fix.h │ │ │ ├── scaler_fract.c │ │ │ ├── scaler_fract.h │ │ │ ├── scaler_integrator.c │ │ │ ├── scaler_integrator.h │ │ │ ├── scaler_integrator_short.c │ │ │ ├── scaler_integrator_short.h │ │ │ ├── scaler_label.c │ │ │ ├── scaler_label.h │ │ │ ├── scaler_note.c │ │ │ ├── scaler_note.h │ │ │ ├── scaler_short.c │ │ │ ├── scaler_short.h │ │ │ ├── scaler_svf_fc.c │ │ │ └── scaler_svf_fc.h │ │ ├── scene.c │ │ ├── scene.h │ │ ├── ser.c │ │ ├── ser.h │ │ ├── ui.h │ │ ├── util.c │ │ └── util.h │ └── version.mk ├── mix │ ├── Makefile │ ├── README │ ├── aleph-mix.lds │ ├── config.mk │ ├── src │ │ ├── aleph-mix.ldr.inc │ │ ├── aleph-mix.ldr_size.inc │ │ ├── amp_table_db.inc │ │ ├── amp_table_linear.inc │ │ ├── app_mix.c │ │ ├── app_timers.c │ │ ├── app_timers.h │ │ ├── ctl.c │ │ ├── ctl.h │ │ ├── handler.c │ │ ├── handler.h │ │ ├── render.c │ │ ├── render.h │ │ ├── scaler.c │ │ └── scaler.h │ └── version.mk ├── picolisp │ ├── Makefile │ ├── aleph-picolisp.lds │ ├── config.mk │ ├── src │ │ ├── app_picolisp.c │ │ ├── app_timers.c │ │ ├── app_timers.h │ │ ├── apply.c │ │ ├── ctl.c │ │ ├── ctl.h │ │ ├── files.c │ │ ├── files.h │ │ ├── flow.c │ │ ├── gc.c │ │ ├── handler.c │ │ ├── handler.h │ │ ├── io.c │ │ ├── math.c │ │ ├── pico.h │ │ ├── picolisp_mod.h │ │ ├── pil_main.c │ │ ├── platform_picolisp.h │ │ ├── render.c │ │ ├── render.h │ │ ├── ser.c │ │ ├── ser.h │ │ ├── subr.c │ │ ├── sym.c │ │ ├── tab.c │ │ ├── util.c │ │ └── util.h │ └── version.mk └── readme.txt ├── avr32 ├── src │ ├── adc_poll.c │ ├── adc_poll.h │ ├── app.c │ ├── app.h │ ├── bfin.c │ ├── bfin.h │ ├── control.c │ ├── control.h │ ├── debug.h │ ├── encoders.c │ ├── encoders.h │ ├── fat_io_lib │ │ ├── API.txt │ │ ├── COPYRIGHT.txt │ │ ├── Configuration.txt │ │ ├── History.txt │ │ ├── License.txt │ │ ├── Media Access API.txt │ │ ├── example.c │ │ ├── fat_access.c │ │ ├── fat_access.h │ │ ├── fat_cache.c │ │ ├── fat_cache.h │ │ ├── fat_defs.h │ │ ├── fat_filelib.c │ │ ├── fat_filelib.h │ │ ├── fat_format.c │ │ ├── fat_format.h │ │ ├── fat_list.h │ │ ├── fat_misc.c │ │ ├── fat_misc.h │ │ ├── fat_opts.h │ │ ├── fat_string.c │ │ ├── fat_string.h │ │ ├── fat_table.c │ │ ├── fat_table.h │ │ ├── fat_types.h │ │ ├── fat_write.c │ │ ├── fat_write.h │ │ └── version.txt │ ├── filesystem.c │ ├── filesystem.h │ ├── flash.c │ ├── flash.h │ ├── font_aa.c │ ├── font_aa.h │ ├── fonts │ │ ├── dejavu_numerals_24.c │ │ ├── dejavu_numerals_24.h │ │ ├── ume_tgo5_18.c │ │ └── ume_tgo5_18.h │ ├── global.h │ ├── init.c │ ├── init.h │ ├── interrupts.c │ ├── interrupts.h │ ├── link_aleph.lds │ ├── main.c │ ├── memory.c │ ├── memory.h │ ├── print_funcs.c │ ├── print_funcs.h │ ├── region_extra.c │ ├── region_extra.h │ ├── screen_startup.c │ ├── screen_startup.h │ ├── serial.c │ ├── serial.h │ ├── simple_string.c │ ├── simple_string.h │ ├── startup_glyph.c │ ├── switches.c │ └── switches.h └── startup │ ├── startup.S │ ├── trampoline.S │ └── trampoline.h ├── bfin_lib ├── UNLICENSE.TXT ├── bfin_lib.mk ├── obj │ └── dummy └── src │ ├── bfin_core.h │ ├── control.c │ ├── control.h │ ├── cv.c │ ├── cv.h │ ├── desc.c │ ├── fix.c │ ├── fix.h │ ├── fix16.c │ ├── gpio.h │ ├── init.c │ ├── init.h │ ├── isr.c │ ├── isr.h │ ├── libfixmath │ ├── Makefile │ ├── fix16.c │ ├── fix16.h │ ├── fix16.hpp │ ├── fix16_exp.c │ ├── fix16_fract.h │ ├── fix16_sqrt.c │ ├── fix16_trig.c │ ├── fix16_trig_sin_lut.h │ ├── fix32.c │ ├── fix32.h │ ├── fixmath.h │ ├── fract32.c │ ├── fract32.h │ ├── int64.h │ ├── libfixmath.cbp │ ├── uint32.c │ └── uint32.h │ ├── main.c │ ├── module.h │ ├── pickle.c │ ├── pickle.h │ ├── spi.c │ ├── spi.h │ ├── util.c │ └── util.h ├── bfin_lib_block ├── UNLICENSE.TXT ├── bfin_lib_block.mk ├── obj │ └── dummy └── src │ ├── audio.c │ ├── audio.h │ ├── clock_ebiu.c │ ├── clock_ebiu.h │ ├── control.c │ ├── control.h │ ├── cycle_count_aleph.h │ ├── desc.c │ ├── dma.c │ ├── dma.h │ ├── fix.h │ ├── gpio.c │ ├── gpio.h │ ├── isr.c │ ├── isr.h │ ├── libfixmath │ └── fix16.h │ ├── main.c │ ├── module.h │ ├── pickle.c │ ├── pickle.h │ ├── serial.c │ ├── serial.h │ ├── spi.c │ └── spi.h ├── common ├── buffer_common.h ├── fract32_emu.c ├── fract32_emu.h ├── module_common.h ├── param_common.h ├── protocol.h └── types.h ├── docs ├── modules │ ├── dsyn.txt │ ├── lines.txt │ └── waves.txt ├── operator-diagram.svg └── params.txt ├── dsp-block-test ├── Makefile ├── audio.c ├── audio.h ├── dma.c ├── dma.h ├── dsp-block-test ├── dsp-block-test.lds ├── dsp-block-test_hm.lds ├── gpio.h ├── isr.c ├── isr.h ├── main.c ├── module.c ├── module.h ├── osc.c ├── osc.h ├── process.h ├── serial.c ├── serial.h ├── sine_table_inc.c └── wavtab_data_inc.c ├── dsp ├── README.txt ├── UNLICENSE.TXT ├── biquad.c ├── biquad.h ├── bl_osc.c ├── bl_osc.h ├── bl_osc_table.scd ├── buffer.c ├── buffer.h ├── buffer16.c ├── buffer16.h ├── conversion.c ├── conversion.h ├── delay.c ├── delay.h ├── delayFade24_8.c ├── delayFade24_8.h ├── delayFadeN.c ├── delayFadeN.h ├── delayN.c ├── delayN.h ├── echoTap.c ├── echoTap.h ├── env.c ├── env.h ├── env_adsr.c ├── env_adsr.h ├── env_exp.c ├── env_exp.h ├── env_trig.c ├── env_trig.h ├── fade.c ├── fade.h ├── filter-crossover-coeffs.lisp ├── filter_1p.c ├── filter_1p.h ├── filter_2p.c ├── filter_2p.h ├── filter_crossover.c ├── filter_crossover.h ├── filter_ladder.c ├── filter_ladder.h ├── filter_ramp.c ├── filter_ramp.h ├── filter_svf.c ├── filter_svf.h ├── fm_voice.c ├── fm_voice.h ├── grain.c ├── grain.h ├── halfsine_1024.inc ├── interpolate.c ├── interpolate.h ├── noise.c ├── noise.h ├── null │ ├── Makefile │ ├── README.txt │ ├── audio.c │ ├── audio.h │ ├── fract.h │ ├── fract_math.h │ ├── main.c │ ├── makelog │ ├── mono.plt │ ├── mono_fm.c │ ├── num.scd │ ├── out.txt │ ├── tape.c │ ├── ui.c │ └── ui.h ├── osc.c ├── osc.h ├── osc_polyblep.c ├── osc_polyblep.h ├── pan.c ├── pan.h ├── pitch_shift.c ├── pitch_shift.h ├── ricks_tricks.c ├── ricks_tricks.h ├── scrubTap.c ├── scrubTap.h ├── shapers.scd ├── table.c └── table.h ├── install.sh ├── modules ├── README_params.txt ├── UNLICENSE.TXT ├── acid │ ├── Makefile │ ├── acid.c │ ├── acid.h │ ├── acid.lab │ ├── acid.lds │ ├── dsyn_voice.c │ ├── dsyn_voice.h │ ├── module_custom.h │ ├── monosynth_voice.c │ ├── monosynth_voice.h │ ├── noise_acid.c │ ├── noise_acid.h │ ├── param_desc.c │ ├── params.c │ ├── params.h │ └── version.mk ├── analyser │ ├── Makefile │ ├── analyser.c │ ├── analyser.lds │ ├── module_custom.h │ ├── params.c │ ├── params.h │ ├── soft_clip.c │ └── version.mk ├── dacs │ ├── Makefile │ ├── dacs.c │ ├── dacs.lds │ ├── module_custom.h │ ├── params.c │ ├── params.h │ └── version.mk ├── dsyn │ ├── Makefile │ ├── dsyn.c │ ├── dsyn.h │ ├── dsyn.lds │ ├── module_custom.h │ ├── noise_dsyn.c │ ├── noise_dsyn.h │ ├── param_desc.c │ ├── params.c │ ├── params.h │ └── version.mk ├── fmsynth │ ├── Makefile │ ├── fmsynth.c │ ├── fmsynth.lab │ ├── fmsynth.lds │ ├── module_custom.h │ ├── params.c │ ├── params.h │ └── version.mk ├── grains │ ├── Makefile │ ├── bfin_emu │ │ ├── example_server.c │ │ ├── fract32_jack.c │ │ ├── jack_pitch_tracker.c │ │ ├── main.c │ │ ├── osc-examples.lisp │ │ ├── simple_slew_params │ │ └── types.h │ ├── fract32_jack.h │ ├── grains.c │ ├── grains.lab │ ├── grains.lds │ ├── grains.org │ ├── module_custom.h │ ├── params.c │ ├── params.h │ ├── test-jack-client.sh │ └── version.mk ├── lines │ ├── Makefile │ ├── aleph-lines.lds │ ├── delayFadeN.c │ ├── delayFadeN.h │ ├── lines.c │ ├── lines.lds │ ├── module_custom.h │ ├── param_gen.scd │ ├── param_set.c │ ├── params.c │ ├── params.h │ └── version.mk ├── mix │ ├── Makefile │ ├── README │ ├── mix.c │ ├── mix.lds │ ├── module_custom.h │ ├── params.c │ ├── params.h │ └── version.mk ├── monosynth │ ├── Makefile │ ├── module_custom.h │ ├── monosynth.c │ ├── monosynth.lds │ ├── params.c │ ├── params.h │ └── version.mk ├── tape │ ├── Makefile │ ├── module_custom.h │ ├── params.c │ ├── params.h │ ├── tape.c │ ├── tape.lds │ └── version.mk ├── varilines │ ├── Makefile │ ├── lines.c │ ├── module_custom.h │ ├── param_gen.scd │ ├── param_set.c │ ├── params.c │ ├── params.h │ ├── varilines.lds │ └── version.mk ├── voder │ ├── Makefile │ ├── module_custom.h │ ├── params.c │ ├── params.h │ ├── polyblep-test.c │ ├── version.mk │ ├── voder.c │ ├── voder.lds │ └── voder.org └── waves │ ├── Makefile │ ├── module_custom.h │ ├── osc_waves.c │ ├── osc_waves.h │ ├── param_set.c │ ├── params.c │ ├── params.h │ ├── slew.h │ ├── version.mk │ ├── waves.c │ ├── waves.lds │ ├── wavtab.scd │ └── wavtab_data_inc.c ├── modules_block └── rawsc │ ├── Makefile │ ├── module.c │ ├── module_custom.h │ ├── osc.c │ ├── osc.h │ ├── params.c │ ├── params.h │ ├── rawsc.lds │ ├── sine_table_inc.c │ └── version.mk └── utils ├── aleph-com ├── README ├── a.sh ├── aleph-com-test.maxpat └── aleph-com.py ├── avr32_blank ├── Makefile ├── aleph-blank.lds ├── conf │ ├── conf_access.h │ ├── conf_board.h │ ├── conf_clock.h │ ├── conf_sd_mmc_spi.h │ ├── conf_tc_irq.h │ └── conf_twi.h ├── config.mk ├── core.mk └── src │ ├── global.h │ ├── i2c.c │ ├── i2c.h │ ├── init.c │ ├── init.h │ ├── interrupts.c │ ├── interrupts.h │ ├── main.c │ └── types.h ├── avr32_boot ├── LICENSE.TXT ├── Makefile ├── aleph-boot.lds ├── conf │ ├── #conf_usb_host.h# │ ├── conf_access.h │ ├── conf_aleph_no.h │ ├── conf_board.h │ ├── conf_clock.h │ ├── conf_ebi.h │ ├── conf_explorer.h │ ├── conf_sd_mmc_spi.h │ ├── conf_usb_host.h │ └── smc_peripheral.h ├── config.mk ├── flash.sh ├── src │ ├── app_timers.c │ ├── app_timers.h │ ├── bfin.c │ ├── bfin.h │ ├── dummy.h │ ├── encoders.c │ ├── encoders.h │ ├── event_types.h │ ├── events.c │ ├── events.h │ ├── fat_io_lib │ │ ├── API.txt │ │ ├── COPYRIGHT.txt │ │ ├── Configuration.txt │ │ ├── History.txt │ │ ├── License.txt │ │ ├── Media Access API.txt │ │ ├── example.c │ │ ├── fat_access.c │ │ ├── fat_access.h │ │ ├── fat_cache.c │ │ ├── fat_cache.h │ │ ├── fat_defs.h │ │ ├── fat_filelib.c │ │ ├── fat_filelib.h │ │ ├── fat_format.c │ │ ├── fat_format.h │ │ ├── fat_list.h │ │ ├── fat_misc.c │ │ ├── fat_misc.h │ │ ├── fat_opts.h │ │ ├── fat_string.c │ │ ├── fat_string.h │ │ ├── fat_table.c │ │ ├── fat_table.h │ │ ├── fat_types.h │ │ ├── fat_write.c │ │ ├── fat_write.h │ │ └── version.txt │ ├── files.c │ ├── files.h │ ├── filesystem.c │ ├── filesystem.h │ ├── fix.c │ ├── fix.h │ ├── flash.c │ ├── flash.h │ ├── font.c │ ├── font.h │ ├── global.h │ ├── init.c │ ├── init.h │ ├── interrupts.c │ ├── interrupts.h │ ├── key_handler.c │ ├── key_handler.h │ ├── libfixmath │ │ ├── fix16.c │ │ ├── fix16.h │ │ ├── fix16.hpp │ │ ├── fix16_exp.c │ │ ├── fix16_sqrt.c │ │ ├── fix16_trig.c │ │ ├── fix16_trig_sin_lut.h │ │ ├── fix32.c │ │ ├── fix32.h │ │ ├── fixmath.h │ │ ├── fract32.c │ │ ├── fract32.h │ │ ├── int64.h │ │ ├── uint32.c │ │ └── uint32.h │ ├── main.c │ ├── memory.c │ ├── memory.h │ ├── menu.c │ ├── menu.h │ ├── menu_protected.h │ ├── parse_hex.c │ ├── parse_hex.h │ ├── parsehex.txt │ ├── print_fix.c │ ├── print_fix.h │ ├── redraw.c │ ├── redraw.h │ ├── scene.c │ ├── screen.c │ ├── screen.h │ ├── simple_string.c │ ├── simple_string.h │ ├── startup.c │ ├── switches.c │ ├── switches.h │ ├── timers.c │ ├── timers.h │ ├── util.c │ ├── util.h │ ├── watchdog.c │ ├── watchdog.h │ ├── wdt.c │ └── wdt.h ├── startup │ ├── startup.S │ ├── trampoline.S │ └── trampoline.h └── version.mk ├── avr32_sim ├── adc_poll.h ├── avr32_sim.mk ├── avr32_sim.mk~ ├── region_extra.h └── src │ ├── adc.c │ ├── adc.h │ ├── app.c │ ├── app.h │ ├── bfin.c │ ├── bfin.h │ ├── control.c │ ├── control.h │ ├── delay.c │ ├── delay.h │ ├── dummy.h │ ├── encoders.c │ ├── encoders.h │ ├── event_types.h │ ├── events.c │ ├── events.h │ ├── filesystem.c │ ├── filesystem.h │ ├── fix.c │ ├── fix.h │ ├── flash.c │ ├── flash.h │ ├── font.c │ ├── font.h │ ├── fonts │ ├── dejavu_numerals_24.c │ ├── dejavu_numerals_24.h │ ├── ume_tgo5_18.c │ └── ume_tgo5_18.h │ ├── global.h │ ├── hid.c │ ├── hid.h │ ├── i2c.c │ ├── i2c.h │ ├── init.c │ ├── init.h │ ├── interrupts.c │ ├── interrupts.h │ ├── libfixmath │ ├── Makefile │ ├── fix16.c │ ├── fix16.h │ ├── fix16.hpp │ ├── fix16_exp.c │ ├── fix16_sqrt.c │ ├── fix16_trig.c │ ├── fix16_trig_sin_lut.h │ ├── fix32.c │ ├── fix32.h │ ├── fixmath.h │ ├── fract32.c │ ├── fract32.h │ ├── int64.h │ ├── libfixmath.cbp │ ├── license.txt │ ├── uint32.c │ └── uint32.h │ ├── main.c │ ├── memory.c │ ├── memory.h │ ├── midi_common.c │ ├── midi_common.h │ ├── monome.c │ ├── monome.h │ ├── mt48lc16m16a2tg75.h │ ├── mt48lc16m16a2tg7e.h │ ├── print_funcs.c │ ├── print_funcs.h │ ├── region.c │ ├── region.h │ ├── regions.h │ ├── screen.c │ ├── screen.h │ ├── serial.c │ ├── serial.h │ ├── simple_string.c │ ├── simple_string.h │ ├── startup_glyph.c │ ├── switches.c │ ├── switches.h │ ├── timers.c │ ├── timers.h │ ├── types.h │ ├── usb.c │ ├── usb.h │ └── usb │ ├── ftdi │ ├── ftdi.c │ ├── ftdi.h │ ├── uhi_ftdi.c │ ├── uhi_ftdi.h │ └── usb_protocol_ftdi.h │ ├── hid │ ├── hid.c │ ├── hid.h │ ├── uhi_hid.c │ └── uhi_hid.h │ └── midi │ ├── midi.c │ ├── midi.h │ ├── uhi_midi.c │ ├── uhi_midi.h │ └── usb_protocol_midi.h ├── avr8 ├── LUFA │ ├── Build │ │ ├── HID_EEPROM_Loader │ │ │ ├── HID_EEPROM_Loader.c │ │ │ └── makefile │ │ ├── lufa_atprogram.mk │ │ ├── lufa_avrdude.mk │ │ ├── lufa_build.mk │ │ ├── lufa_core.mk │ │ ├── lufa_cppcheck.mk │ │ ├── lufa_dfu.mk │ │ ├── lufa_doxygen.mk │ │ ├── lufa_hid.mk │ │ └── lufa_sources.mk │ ├── Common │ │ ├── ArchitectureSpecific.h │ │ ├── Architectures.h │ │ ├── Attributes.h │ │ ├── BoardTypes.h │ │ ├── Common.h │ │ ├── CompilerSpecific.h │ │ └── Endianness.h │ ├── Drivers │ │ ├── Misc │ │ │ ├── AT45DB321C.h │ │ │ ├── AT45DB642D.h │ │ │ ├── RingBuffer.h │ │ │ └── TerminalCodes.h │ │ ├── Peripheral │ │ │ ├── ADC.h │ │ │ ├── AVR8 │ │ │ │ ├── ADC_AVR8.h │ │ │ │ ├── SPI_AVR8.h │ │ │ │ ├── SerialSPI_AVR8.h │ │ │ │ ├── Serial_AVR8.c │ │ │ │ ├── Serial_AVR8.h │ │ │ │ ├── TWI_AVR8.c │ │ │ │ └── TWI_AVR8.h │ │ │ ├── SPI.h │ │ │ ├── Serial.h │ │ │ ├── SerialSPI.h │ │ │ └── TWI.h │ │ └── USB │ │ │ ├── Class │ │ │ ├── AndroidAccessoryClass.h │ │ │ ├── AudioClass.h │ │ │ ├── CDCClass.h │ │ │ ├── Common │ │ │ │ ├── AndroidAccessoryClassCommon.h │ │ │ │ ├── AudioClassCommon.h │ │ │ │ ├── CDCClassCommon.h │ │ │ │ ├── HIDClassCommon.h │ │ │ │ ├── HIDParser.c │ │ │ │ ├── HIDParser.h │ │ │ │ ├── HIDReportData.h │ │ │ │ ├── MIDIClassCommon.h │ │ │ │ ├── MassStorageClassCommon.h │ │ │ │ ├── PrinterClassCommon.h │ │ │ │ ├── RNDISClassCommon.h │ │ │ │ └── StillImageClassCommon.h │ │ │ ├── Device │ │ │ │ ├── AudioClassDevice.c │ │ │ │ ├── AudioClassDevice.h │ │ │ │ ├── CDCClassDevice.c │ │ │ │ ├── CDCClassDevice.h │ │ │ │ ├── HIDClassDevice.c │ │ │ │ ├── HIDClassDevice.h │ │ │ │ ├── MIDIClassDevice.c │ │ │ │ ├── MIDIClassDevice.h │ │ │ │ ├── MassStorageClassDevice.c │ │ │ │ ├── MassStorageClassDevice.h │ │ │ │ ├── PrinterClassDevice.c │ │ │ │ ├── PrinterClassDevice.h │ │ │ │ ├── RNDISClassDevice.c │ │ │ │ └── RNDISClassDevice.h │ │ │ ├── HIDClass.h │ │ │ ├── Host │ │ │ │ ├── AndroidAccessoryClassHost.c │ │ │ │ ├── AndroidAccessoryClassHost.h │ │ │ │ ├── AudioClassHost.c │ │ │ │ ├── AudioClassHost.h │ │ │ │ ├── CDCClassHost.c │ │ │ │ ├── CDCClassHost.h │ │ │ │ ├── HIDClassHost.c │ │ │ │ ├── HIDClassHost.h │ │ │ │ ├── MIDIClassHost.c │ │ │ │ ├── MIDIClassHost.h │ │ │ │ ├── MassStorageClassHost.c │ │ │ │ ├── MassStorageClassHost.h │ │ │ │ ├── PrinterClassHost.c │ │ │ │ ├── PrinterClassHost.h │ │ │ │ ├── RNDISClassHost.c │ │ │ │ ├── RNDISClassHost.h │ │ │ │ ├── StillImageClassHost.c │ │ │ │ └── StillImageClassHost.h │ │ │ ├── MIDIClass.h │ │ │ ├── MassStorageClass.h │ │ │ ├── PrinterClass.h │ │ │ ├── RNDISClass.h │ │ │ └── StillImageClass.h │ │ │ ├── Core │ │ │ ├── AVR8 │ │ │ │ ├── Device_AVR8.c │ │ │ │ ├── Device_AVR8.h │ │ │ │ ├── EndpointStream_AVR8.c │ │ │ │ ├── EndpointStream_AVR8.h │ │ │ │ ├── Endpoint_AVR8.c │ │ │ │ ├── Endpoint_AVR8.h │ │ │ │ ├── Host_AVR8.c │ │ │ │ ├── Host_AVR8.h │ │ │ │ ├── OTG_AVR8.h │ │ │ │ ├── PipeStream_AVR8.c │ │ │ │ ├── PipeStream_AVR8.h │ │ │ │ ├── Pipe_AVR8.c │ │ │ │ ├── Pipe_AVR8.h │ │ │ │ ├── Template │ │ │ │ │ ├── Template_Endpoint_Control_R.c │ │ │ │ │ ├── Template_Endpoint_Control_W.c │ │ │ │ │ ├── Template_Endpoint_RW.c │ │ │ │ │ └── Template_Pipe_RW.c │ │ │ │ ├── USBController_AVR8.c │ │ │ │ ├── USBController_AVR8.h │ │ │ │ ├── USBInterrupt_AVR8.c │ │ │ │ └── USBInterrupt_AVR8.h │ │ │ ├── ConfigDescriptors.c │ │ │ ├── ConfigDescriptors.h │ │ │ ├── Device.h │ │ │ ├── DeviceStandardReq.c │ │ │ ├── DeviceStandardReq.h │ │ │ ├── Endpoint.h │ │ │ ├── EndpointStream.h │ │ │ ├── Events.c │ │ │ ├── Events.h │ │ │ ├── Host.h │ │ │ ├── HostStandardReq.c │ │ │ ├── HostStandardReq.h │ │ │ ├── OTG.h │ │ │ ├── Pipe.h │ │ │ ├── PipeStream.h │ │ │ ├── StdDescriptors.h │ │ │ ├── StdRequestType.h │ │ │ ├── USBController.h │ │ │ ├── USBInterrupt.h │ │ │ ├── USBMode.h │ │ │ ├── USBTask.c │ │ │ └── USBTask.h │ │ │ └── USB.h │ ├── License.txt │ ├── Platform │ │ └── Platform.h │ ├── Version.h │ └── makefile └── USBtoSerial │ ├── Config │ └── LUFAConfig.h │ ├── Descriptors.c │ ├── Descriptors.h │ ├── Doxygen.conf │ ├── LUFA USBtoSerial.inf │ ├── USBtoSerial.c │ ├── USBtoSerial.eep │ ├── USBtoSerial.h │ ├── USBtoSerial.txt │ ├── asf.xml │ ├── flash.sh │ ├── fuses.sh │ └── makefile ├── beekeep ├── Makefile ├── README.md ├── TODO.md ├── bees_schema.json ├── build_linux.md ├── build_osx.md ├── dummy_patchlabel.lab ├── grains.lab ├── guide.md ├── icons.sh ├── osx_launcher.sh ├── py2aleph │ ├── Makefile │ ├── pyaleph.c │ └── pyaleph.py ├── py3aleph │ ├── Makefile │ ├── pyaleph.c │ └── pyaleph.py ├── python_version2.6.mk ├── python_version2.7.mk ├── python_version3.1.mk ├── python_version3.2.mk └── src │ ├── app_beekeep.c │ ├── dot.c │ ├── dot.h │ ├── files.c │ ├── flash_beekeep.c │ ├── handler.c │ ├── json.h │ ├── json_read_native.c │ ├── json_read_raw.c │ ├── json_write_native.c │ ├── main.c │ ├── net_hid.c │ ├── net_hid.h │ ├── net_py.c │ ├── param_scaler.c │ ├── scaler_amp_rep.dat_le.inc │ ├── scaler_amp_val.dat_le.inc │ ├── scaler_integrator_rep.dat_le.inc │ ├── scaler_integrator_short_rep.dat_le.inc │ ├── scaler_integrator_short_val.dat_le.inc │ ├── scaler_integrator_val.dat_le.inc │ ├── scaler_note_val.dat_le.inc │ ├── scaler_svf_fc_val.dat_le.inc │ ├── ui.c │ ├── ui.h │ ├── ui_files.c │ ├── ui_files.h │ ├── ui_handlers.c │ ├── ui_handlers.h │ ├── ui_lists.c │ ├── ui_lists.h │ ├── ui_op_menu.c │ └── ui_op_menu.h ├── beekeep_juce ├── Builds │ ├── CodeBlocksLinux │ │ └── beekeep.cbp │ ├── CodeBlocksWindows │ │ └── beekeep.cbp │ ├── LinuxMakefile │ │ └── Makefile │ ├── MacOSX │ │ ├── Info.plist │ │ └── RecentFilesMenuTemplate.nib │ └── VisualStudio2013 │ │ ├── beekeep.sln │ │ ├── beekeep.vcxproj │ │ ├── beekeep.vcxproj.filters │ │ └── resources.rc ├── JuceLibraryCode │ ├── AppConfig.h │ ├── BinaryData.cpp │ ├── BinaryData.h │ ├── JuceHeader.h │ ├── ReadMe.txt │ └── modules │ │ ├── juce_core │ │ ├── containers │ │ │ ├── juce_AbstractFifo.cpp │ │ │ ├── juce_AbstractFifo.h │ │ │ ├── juce_Array.h │ │ │ ├── juce_ArrayAllocationBase.h │ │ │ ├── juce_DynamicObject.cpp │ │ │ ├── juce_DynamicObject.h │ │ │ ├── juce_ElementComparator.h │ │ │ ├── juce_HashMap.h │ │ │ ├── juce_LinkedListPointer.h │ │ │ ├── juce_ListenerList.h │ │ │ ├── juce_NamedValueSet.cpp │ │ │ ├── juce_NamedValueSet.h │ │ │ ├── juce_OwnedArray.h │ │ │ ├── juce_PropertySet.cpp │ │ │ ├── juce_PropertySet.h │ │ │ ├── juce_ReferenceCountedArray.h │ │ │ ├── juce_ScopedValueSetter.h │ │ │ ├── juce_SortedSet.h │ │ │ ├── juce_SparseSet.h │ │ │ ├── juce_Variant.cpp │ │ │ └── juce_Variant.h │ │ ├── files │ │ │ ├── juce_DirectoryIterator.cpp │ │ │ ├── juce_DirectoryIterator.h │ │ │ ├── juce_File.cpp │ │ │ ├── juce_File.h │ │ │ ├── juce_FileFilter.cpp │ │ │ ├── juce_FileFilter.h │ │ │ ├── juce_FileInputStream.cpp │ │ │ ├── juce_FileInputStream.h │ │ │ ├── juce_FileOutputStream.cpp │ │ │ ├── juce_FileOutputStream.h │ │ │ ├── juce_FileSearchPath.cpp │ │ │ ├── juce_FileSearchPath.h │ │ │ ├── juce_MemoryMappedFile.h │ │ │ ├── juce_TemporaryFile.cpp │ │ │ ├── juce_TemporaryFile.h │ │ │ ├── juce_WildcardFileFilter.cpp │ │ │ └── juce_WildcardFileFilter.h │ │ ├── javascript │ │ │ ├── juce_JSON.cpp │ │ │ ├── juce_JSON.h │ │ │ ├── juce_Javascript.cpp │ │ │ └── juce_Javascript.h │ │ ├── juce_core.cpp │ │ ├── juce_core.h │ │ ├── juce_core.mm │ │ ├── juce_module_info │ │ ├── logging │ │ │ ├── juce_FileLogger.cpp │ │ │ ├── juce_FileLogger.h │ │ │ ├── juce_Logger.cpp │ │ │ └── juce_Logger.h │ │ ├── maths │ │ │ ├── juce_BigInteger.cpp │ │ │ ├── juce_BigInteger.h │ │ │ ├── juce_Expression.cpp │ │ │ ├── juce_Expression.h │ │ │ ├── juce_MathsFunctions.h │ │ │ ├── juce_NormalisableRange.h │ │ │ ├── juce_Random.cpp │ │ │ ├── juce_Random.h │ │ │ └── juce_Range.h │ │ ├── memory │ │ │ ├── juce_Atomic.h │ │ │ ├── juce_ByteOrder.h │ │ │ ├── juce_ContainerDeletePolicy.h │ │ │ ├── juce_HeapBlock.h │ │ │ ├── juce_LeakedObjectDetector.h │ │ │ ├── juce_Memory.h │ │ │ ├── juce_MemoryBlock.cpp │ │ │ ├── juce_MemoryBlock.h │ │ │ ├── juce_OptionalScopedPointer.h │ │ │ ├── juce_ReferenceCountedObject.h │ │ │ ├── juce_ScopedPointer.h │ │ │ ├── juce_SharedResourcePointer.h │ │ │ ├── juce_Singleton.h │ │ │ └── juce_WeakReference.h │ │ ├── misc │ │ │ ├── juce_Result.cpp │ │ │ ├── juce_Result.h │ │ │ ├── juce_Uuid.cpp │ │ │ ├── juce_Uuid.h │ │ │ └── juce_WindowsRegistry.h │ │ ├── native │ │ │ ├── java │ │ │ │ ├── AndroidMidi.java │ │ │ │ ├── AndroidMidiFallback.java │ │ │ │ └── JuceAppActivity.java │ │ │ ├── juce_BasicNativeHeaders.h │ │ │ ├── juce_android_Files.cpp │ │ │ ├── juce_android_JNIHelpers.h │ │ │ ├── juce_android_Misc.cpp │ │ │ ├── juce_android_Network.cpp │ │ │ ├── juce_android_SystemStats.cpp │ │ │ ├── juce_android_Threads.cpp │ │ │ ├── juce_curl_Network.cpp │ │ │ ├── juce_linux_CommonFile.cpp │ │ │ ├── juce_linux_Files.cpp │ │ │ ├── juce_linux_Network.cpp │ │ │ ├── juce_linux_SystemStats.cpp │ │ │ ├── juce_linux_Threads.cpp │ │ │ ├── juce_mac_ClangBugWorkaround.h │ │ │ ├── juce_mac_Files.mm │ │ │ ├── juce_mac_Network.mm │ │ │ ├── juce_mac_Strings.mm │ │ │ ├── juce_mac_SystemStats.mm │ │ │ ├── juce_mac_Threads.mm │ │ │ ├── juce_osx_ObjCHelpers.h │ │ │ ├── juce_posix_NamedPipe.cpp │ │ │ ├── juce_posix_SharedCode.h │ │ │ ├── juce_win32_ComSmartPtr.h │ │ │ ├── juce_win32_Files.cpp │ │ │ ├── juce_win32_Network.cpp │ │ │ ├── juce_win32_Registry.cpp │ │ │ ├── juce_win32_SystemStats.cpp │ │ │ └── juce_win32_Threads.cpp │ │ ├── network │ │ │ ├── juce_IPAddress.cpp │ │ │ ├── juce_IPAddress.h │ │ │ ├── juce_MACAddress.cpp │ │ │ ├── juce_MACAddress.h │ │ │ ├── juce_NamedPipe.cpp │ │ │ ├── juce_NamedPipe.h │ │ │ ├── juce_Socket.cpp │ │ │ ├── juce_Socket.h │ │ │ ├── juce_URL.cpp │ │ │ └── juce_URL.h │ │ ├── streams │ │ │ ├── juce_BufferedInputStream.cpp │ │ │ ├── juce_BufferedInputStream.h │ │ │ ├── juce_FileInputSource.cpp │ │ │ ├── juce_FileInputSource.h │ │ │ ├── juce_InputSource.h │ │ │ ├── juce_InputStream.cpp │ │ │ ├── juce_InputStream.h │ │ │ ├── juce_MemoryInputStream.cpp │ │ │ ├── juce_MemoryInputStream.h │ │ │ ├── juce_MemoryOutputStream.cpp │ │ │ ├── juce_MemoryOutputStream.h │ │ │ ├── juce_OutputStream.cpp │ │ │ ├── juce_OutputStream.h │ │ │ ├── juce_SubregionStream.cpp │ │ │ └── juce_SubregionStream.h │ │ ├── system │ │ │ ├── juce_CompilerSupport.h │ │ │ ├── juce_PlatformDefs.h │ │ │ ├── juce_StandardHeader.h │ │ │ ├── juce_SystemStats.cpp │ │ │ ├── juce_SystemStats.h │ │ │ └── juce_TargetPlatform.h │ │ ├── text │ │ │ ├── juce_Base64.cpp │ │ │ ├── juce_Base64.h │ │ │ ├── juce_CharPointer_ASCII.h │ │ │ ├── juce_CharPointer_UTF16.h │ │ │ ├── juce_CharPointer_UTF32.h │ │ │ ├── juce_CharPointer_UTF8.h │ │ │ ├── juce_CharacterFunctions.cpp │ │ │ ├── juce_CharacterFunctions.h │ │ │ ├── juce_Identifier.cpp │ │ │ ├── juce_Identifier.h │ │ │ ├── juce_LocalisedStrings.cpp │ │ │ ├── juce_LocalisedStrings.h │ │ │ ├── juce_NewLine.h │ │ │ ├── juce_String.cpp │ │ │ ├── juce_String.h │ │ │ ├── juce_StringArray.cpp │ │ │ ├── juce_StringArray.h │ │ │ ├── juce_StringPairArray.cpp │ │ │ ├── juce_StringPairArray.h │ │ │ ├── juce_StringPool.cpp │ │ │ ├── juce_StringPool.h │ │ │ ├── juce_StringRef.h │ │ │ ├── juce_TextDiff.cpp │ │ │ └── juce_TextDiff.h │ │ ├── threads │ │ │ ├── juce_ChildProcess.cpp │ │ │ ├── juce_ChildProcess.h │ │ │ ├── juce_CriticalSection.h │ │ │ ├── juce_DynamicLibrary.h │ │ │ ├── juce_HighResolutionTimer.cpp │ │ │ ├── juce_HighResolutionTimer.h │ │ │ ├── juce_InterProcessLock.h │ │ │ ├── juce_Process.h │ │ │ ├── juce_ReadWriteLock.cpp │ │ │ ├── juce_ReadWriteLock.h │ │ │ ├── juce_ScopedLock.h │ │ │ ├── juce_ScopedReadLock.h │ │ │ ├── juce_ScopedWriteLock.h │ │ │ ├── juce_SpinLock.h │ │ │ ├── juce_Thread.cpp │ │ │ ├── juce_Thread.h │ │ │ ├── juce_ThreadLocalValue.h │ │ │ ├── juce_ThreadPool.cpp │ │ │ ├── juce_ThreadPool.h │ │ │ ├── juce_TimeSliceThread.cpp │ │ │ ├── juce_TimeSliceThread.h │ │ │ └── juce_WaitableEvent.h │ │ ├── time │ │ │ ├── juce_PerformanceCounter.cpp │ │ │ ├── juce_PerformanceCounter.h │ │ │ ├── juce_RelativeTime.cpp │ │ │ ├── juce_RelativeTime.h │ │ │ ├── juce_Time.cpp │ │ │ └── juce_Time.h │ │ ├── unit_tests │ │ │ ├── juce_UnitTest.cpp │ │ │ └── juce_UnitTest.h │ │ ├── xml │ │ │ ├── juce_XmlDocument.cpp │ │ │ ├── juce_XmlDocument.h │ │ │ ├── juce_XmlElement.cpp │ │ │ └── juce_XmlElement.h │ │ └── zip │ │ │ ├── juce_GZIPCompressorOutputStream.cpp │ │ │ ├── juce_GZIPCompressorOutputStream.h │ │ │ ├── juce_GZIPDecompressorInputStream.cpp │ │ │ ├── juce_GZIPDecompressorInputStream.h │ │ │ ├── juce_ZipFile.cpp │ │ │ ├── juce_ZipFile.h │ │ │ └── zlib │ │ │ ├── README │ │ │ ├── adler32.c │ │ │ ├── compress.c │ │ │ ├── crc32.c │ │ │ ├── crc32.h │ │ │ ├── deflate.c │ │ │ ├── deflate.h │ │ │ ├── infback.c │ │ │ ├── inffast.c │ │ │ ├── inffast.h │ │ │ ├── inffixed.h │ │ │ ├── inflate.c │ │ │ ├── inflate.h │ │ │ ├── inftrees.c │ │ │ ├── inftrees.h │ │ │ ├── trees.c │ │ │ ├── trees.h │ │ │ ├── uncompr.c │ │ │ ├── zconf.h │ │ │ ├── zconf.in.h │ │ │ ├── zlib.h │ │ │ ├── zutil.c │ │ │ └── zutil.h │ │ ├── juce_data_structures │ │ ├── app_properties │ │ │ ├── juce_ApplicationProperties.cpp │ │ │ ├── juce_ApplicationProperties.h │ │ │ ├── juce_PropertiesFile.cpp │ │ │ └── juce_PropertiesFile.h │ │ ├── juce_data_structures.cpp │ │ ├── juce_data_structures.h │ │ ├── juce_data_structures.mm │ │ ├── juce_module_info │ │ ├── undomanager │ │ │ ├── juce_UndoManager.cpp │ │ │ ├── juce_UndoManager.h │ │ │ └── juce_UndoableAction.h │ │ └── values │ │ │ ├── juce_Value.cpp │ │ │ ├── juce_Value.h │ │ │ ├── juce_ValueTree.cpp │ │ │ ├── juce_ValueTree.h │ │ │ ├── juce_ValueTreeSynchroniser.cpp │ │ │ └── juce_ValueTreeSynchroniser.h │ │ ├── juce_events │ │ ├── broadcasters │ │ │ ├── juce_ActionBroadcaster.cpp │ │ │ ├── juce_ActionBroadcaster.h │ │ │ ├── juce_ActionListener.h │ │ │ ├── juce_AsyncUpdater.cpp │ │ │ ├── juce_AsyncUpdater.h │ │ │ ├── juce_ChangeBroadcaster.cpp │ │ │ ├── juce_ChangeBroadcaster.h │ │ │ └── juce_ChangeListener.h │ │ ├── interprocess │ │ │ ├── juce_ConnectedChildProcess.cpp │ │ │ ├── juce_ConnectedChildProcess.h │ │ │ ├── juce_InterprocessConnection.cpp │ │ │ ├── juce_InterprocessConnection.h │ │ │ ├── juce_InterprocessConnectionServer.cpp │ │ │ └── juce_InterprocessConnectionServer.h │ │ ├── juce_events.cpp │ │ ├── juce_events.h │ │ ├── juce_events.mm │ │ ├── juce_module_info │ │ ├── messages │ │ │ ├── juce_ApplicationBase.cpp │ │ │ ├── juce_ApplicationBase.h │ │ │ ├── juce_CallbackMessage.h │ │ │ ├── juce_DeletedAtShutdown.cpp │ │ │ ├── juce_DeletedAtShutdown.h │ │ │ ├── juce_Initialisation.h │ │ │ ├── juce_Message.h │ │ │ ├── juce_MessageListener.cpp │ │ │ ├── juce_MessageListener.h │ │ │ ├── juce_MessageManager.cpp │ │ │ ├── juce_MessageManager.h │ │ │ ├── juce_MountedVolumeListChangeDetector.h │ │ │ └── juce_NotificationType.h │ │ ├── native │ │ │ ├── juce_ScopedXLock.h │ │ │ ├── juce_android_Messaging.cpp │ │ │ ├── juce_ios_MessageManager.mm │ │ │ ├── juce_linux_Messaging.cpp │ │ │ ├── juce_mac_MessageManager.mm │ │ │ ├── juce_osx_MessageQueue.h │ │ │ ├── juce_win32_HiddenMessageWindow.h │ │ │ └── juce_win32_Messaging.cpp │ │ └── timers │ │ │ ├── juce_MultiTimer.cpp │ │ │ ├── juce_MultiTimer.h │ │ │ ├── juce_Timer.cpp │ │ │ └── juce_Timer.h │ │ ├── juce_graphics │ │ ├── colour │ │ │ ├── juce_Colour.cpp │ │ │ ├── juce_Colour.h │ │ │ ├── juce_ColourGradient.cpp │ │ │ ├── juce_ColourGradient.h │ │ │ ├── juce_Colours.cpp │ │ │ ├── juce_Colours.h │ │ │ ├── juce_FillType.cpp │ │ │ ├── juce_FillType.h │ │ │ └── juce_PixelFormats.h │ │ ├── contexts │ │ │ ├── juce_GraphicsContext.cpp │ │ │ ├── juce_GraphicsContext.h │ │ │ ├── juce_LowLevelGraphicsContext.h │ │ │ ├── juce_LowLevelGraphicsPostScriptRenderer.cpp │ │ │ ├── juce_LowLevelGraphicsPostScriptRenderer.h │ │ │ ├── juce_LowLevelGraphicsSoftwareRenderer.cpp │ │ │ └── juce_LowLevelGraphicsSoftwareRenderer.h │ │ ├── effects │ │ │ ├── juce_DropShadowEffect.cpp │ │ │ ├── juce_DropShadowEffect.h │ │ │ ├── juce_GlowEffect.cpp │ │ │ ├── juce_GlowEffect.h │ │ │ └── juce_ImageEffectFilter.h │ │ ├── fonts │ │ │ ├── juce_AttributedString.cpp │ │ │ ├── juce_AttributedString.h │ │ │ ├── juce_CustomTypeface.cpp │ │ │ ├── juce_CustomTypeface.h │ │ │ ├── juce_Font.cpp │ │ │ ├── juce_Font.h │ │ │ ├── juce_GlyphArrangement.cpp │ │ │ ├── juce_GlyphArrangement.h │ │ │ ├── juce_TextLayout.cpp │ │ │ ├── juce_TextLayout.h │ │ │ ├── juce_Typeface.cpp │ │ │ └── juce_Typeface.h │ │ ├── geometry │ │ │ ├── juce_AffineTransform.cpp │ │ │ ├── juce_AffineTransform.h │ │ │ ├── juce_BorderSize.h │ │ │ ├── juce_EdgeTable.cpp │ │ │ ├── juce_EdgeTable.h │ │ │ ├── juce_Line.h │ │ │ ├── juce_Path.cpp │ │ │ ├── juce_Path.h │ │ │ ├── juce_PathIterator.cpp │ │ │ ├── juce_PathIterator.h │ │ │ ├── juce_PathStrokeType.cpp │ │ │ ├── juce_PathStrokeType.h │ │ │ ├── juce_Point.h │ │ │ ├── juce_Rectangle.h │ │ │ └── juce_RectangleList.h │ │ ├── image_formats │ │ │ ├── jpglib │ │ │ │ ├── README │ │ │ │ ├── cderror.h │ │ │ │ ├── changes to libjpeg for JUCE.txt │ │ │ │ ├── jcapimin.c │ │ │ │ ├── jcapistd.c │ │ │ │ ├── jccoefct.c │ │ │ │ ├── jccolor.c │ │ │ │ ├── jcdctmgr.c │ │ │ │ ├── jchuff.c │ │ │ │ ├── jchuff.h │ │ │ │ ├── jcinit.c │ │ │ │ ├── jcmainct.c │ │ │ │ ├── jcmarker.c │ │ │ │ ├── jcmaster.c │ │ │ │ ├── jcomapi.c │ │ │ │ ├── jconfig.h │ │ │ │ ├── jcparam.c │ │ │ │ ├── jcphuff.c │ │ │ │ ├── jcprepct.c │ │ │ │ ├── jcsample.c │ │ │ │ ├── jctrans.c │ │ │ │ ├── jdapimin.c │ │ │ │ ├── jdapistd.c │ │ │ │ ├── jdatasrc.c │ │ │ │ ├── jdcoefct.c │ │ │ │ ├── jdcolor.c │ │ │ │ ├── jdct.h │ │ │ │ ├── jddctmgr.c │ │ │ │ ├── jdhuff.c │ │ │ │ ├── jdhuff.h │ │ │ │ ├── jdinput.c │ │ │ │ ├── jdmainct.c │ │ │ │ ├── jdmarker.c │ │ │ │ ├── jdmaster.c │ │ │ │ ├── jdmerge.c │ │ │ │ ├── jdphuff.c │ │ │ │ ├── jdpostct.c │ │ │ │ ├── jdsample.c │ │ │ │ ├── jdtrans.c │ │ │ │ ├── jerror.c │ │ │ │ ├── jerror.h │ │ │ │ ├── jfdctflt.c │ │ │ │ ├── jfdctfst.c │ │ │ │ ├── jfdctint.c │ │ │ │ ├── jidctflt.c │ │ │ │ ├── jidctfst.c │ │ │ │ ├── jidctint.c │ │ │ │ ├── jidctred.c │ │ │ │ ├── jinclude.h │ │ │ │ ├── jmemmgr.c │ │ │ │ ├── jmemnobs.c │ │ │ │ ├── jmemsys.h │ │ │ │ ├── jmorecfg.h │ │ │ │ ├── jpegint.h │ │ │ │ ├── jpeglib.h │ │ │ │ ├── jquant1.c │ │ │ │ ├── jquant2.c │ │ │ │ ├── jutils.c │ │ │ │ ├── jversion.h │ │ │ │ ├── transupp.c │ │ │ │ └── transupp.h │ │ │ ├── juce_GIFLoader.cpp │ │ │ ├── juce_JPEGLoader.cpp │ │ │ ├── juce_PNGLoader.cpp │ │ │ └── pnglib │ │ │ │ ├── LICENSE │ │ │ │ ├── libpng_readme.txt │ │ │ │ ├── png.c │ │ │ │ ├── png.h │ │ │ │ ├── pngconf.h │ │ │ │ ├── pngerror.c │ │ │ │ ├── pngget.c │ │ │ │ ├── pnginfo.h │ │ │ │ ├── pngmem.c │ │ │ │ ├── pngpread.c │ │ │ │ ├── pngpriv.h │ │ │ │ ├── pngread.c │ │ │ │ ├── pngrio.c │ │ │ │ ├── pngrtran.c │ │ │ │ ├── pngrutil.c │ │ │ │ ├── pngset.c │ │ │ │ ├── pngstruct.h │ │ │ │ ├── pngtrans.c │ │ │ │ ├── pngwio.c │ │ │ │ ├── pngwrite.c │ │ │ │ ├── pngwtran.c │ │ │ │ └── pngwutil.c │ │ ├── images │ │ │ ├── juce_Image.cpp │ │ │ ├── juce_Image.h │ │ │ ├── juce_ImageCache.cpp │ │ │ ├── juce_ImageCache.h │ │ │ ├── juce_ImageConvolutionKernel.cpp │ │ │ ├── juce_ImageConvolutionKernel.h │ │ │ ├── juce_ImageFileFormat.cpp │ │ │ └── juce_ImageFileFormat.h │ │ ├── juce_graphics.cpp │ │ ├── juce_graphics.h │ │ ├── juce_graphics.mm │ │ ├── juce_module_info │ │ ├── native │ │ │ ├── juce_RenderingHelpers.h │ │ │ ├── juce_android_Fonts.cpp │ │ │ ├── juce_android_GraphicsContext.cpp │ │ │ ├── juce_freetype_Fonts.cpp │ │ │ ├── juce_linux_Fonts.cpp │ │ │ ├── juce_mac_CoreGraphicsContext.h │ │ │ ├── juce_mac_CoreGraphicsContext.mm │ │ │ ├── juce_mac_CoreGraphicsHelpers.h │ │ │ ├── juce_mac_Fonts.mm │ │ │ ├── juce_win32_Direct2DGraphicsContext.cpp │ │ │ ├── juce_win32_DirectWriteTypeLayout.cpp │ │ │ ├── juce_win32_DirectWriteTypeface.cpp │ │ │ └── juce_win32_Fonts.cpp │ │ └── placement │ │ │ ├── juce_Justification.h │ │ │ ├── juce_RectanglePlacement.cpp │ │ │ └── juce_RectanglePlacement.h │ │ ├── juce_gui_basics │ │ ├── application │ │ │ ├── juce_Application.cpp │ │ │ └── juce_Application.h │ │ ├── buttons │ │ │ ├── juce_ArrowButton.cpp │ │ │ ├── juce_ArrowButton.h │ │ │ ├── juce_Button.cpp │ │ │ ├── juce_Button.h │ │ │ ├── juce_DrawableButton.cpp │ │ │ ├── juce_DrawableButton.h │ │ │ ├── juce_HyperlinkButton.cpp │ │ │ ├── juce_HyperlinkButton.h │ │ │ ├── juce_ImageButton.cpp │ │ │ ├── juce_ImageButton.h │ │ │ ├── juce_ShapeButton.cpp │ │ │ ├── juce_ShapeButton.h │ │ │ ├── juce_TextButton.cpp │ │ │ ├── juce_TextButton.h │ │ │ ├── juce_ToggleButton.cpp │ │ │ ├── juce_ToggleButton.h │ │ │ ├── juce_ToolbarButton.cpp │ │ │ └── juce_ToolbarButton.h │ │ ├── commands │ │ │ ├── juce_ApplicationCommandID.h │ │ │ ├── juce_ApplicationCommandInfo.cpp │ │ │ ├── juce_ApplicationCommandInfo.h │ │ │ ├── juce_ApplicationCommandManager.cpp │ │ │ ├── juce_ApplicationCommandManager.h │ │ │ ├── juce_ApplicationCommandTarget.cpp │ │ │ ├── juce_ApplicationCommandTarget.h │ │ │ ├── juce_KeyPressMappingSet.cpp │ │ │ └── juce_KeyPressMappingSet.h │ │ ├── components │ │ │ ├── juce_CachedComponentImage.h │ │ │ ├── juce_Component.cpp │ │ │ ├── juce_Component.h │ │ │ ├── juce_ComponentListener.cpp │ │ │ ├── juce_ComponentListener.h │ │ │ ├── juce_Desktop.cpp │ │ │ ├── juce_Desktop.h │ │ │ ├── juce_ModalComponentManager.cpp │ │ │ └── juce_ModalComponentManager.h │ │ ├── drawables │ │ │ ├── juce_Drawable.cpp │ │ │ ├── juce_Drawable.h │ │ │ ├── juce_DrawableComposite.cpp │ │ │ ├── juce_DrawableComposite.h │ │ │ ├── juce_DrawableImage.cpp │ │ │ ├── juce_DrawableImage.h │ │ │ ├── juce_DrawablePath.cpp │ │ │ ├── juce_DrawablePath.h │ │ │ ├── juce_DrawableRectangle.cpp │ │ │ ├── juce_DrawableRectangle.h │ │ │ ├── juce_DrawableShape.cpp │ │ │ ├── juce_DrawableShape.h │ │ │ ├── juce_DrawableText.cpp │ │ │ ├── juce_DrawableText.h │ │ │ └── juce_SVGParser.cpp │ │ ├── filebrowser │ │ │ ├── juce_DirectoryContentsDisplayComponent.cpp │ │ │ ├── juce_DirectoryContentsDisplayComponent.h │ │ │ ├── juce_DirectoryContentsList.cpp │ │ │ ├── juce_DirectoryContentsList.h │ │ │ ├── juce_FileBrowserComponent.cpp │ │ │ ├── juce_FileBrowserComponent.h │ │ │ ├── juce_FileBrowserListener.h │ │ │ ├── juce_FileChooser.cpp │ │ │ ├── juce_FileChooser.h │ │ │ ├── juce_FileChooserDialogBox.cpp │ │ │ ├── juce_FileChooserDialogBox.h │ │ │ ├── juce_FileListComponent.cpp │ │ │ ├── juce_FileListComponent.h │ │ │ ├── juce_FilePreviewComponent.h │ │ │ ├── juce_FileSearchPathListComponent.cpp │ │ │ ├── juce_FileSearchPathListComponent.h │ │ │ ├── juce_FileTreeComponent.cpp │ │ │ ├── juce_FileTreeComponent.h │ │ │ ├── juce_FilenameComponent.cpp │ │ │ ├── juce_FilenameComponent.h │ │ │ ├── juce_ImagePreviewComponent.cpp │ │ │ └── juce_ImagePreviewComponent.h │ │ ├── juce_gui_basics.cpp │ │ ├── juce_gui_basics.h │ │ ├── juce_gui_basics.mm │ │ ├── juce_module_info │ │ ├── keyboard │ │ │ ├── juce_CaretComponent.cpp │ │ │ ├── juce_CaretComponent.h │ │ │ ├── juce_KeyListener.cpp │ │ │ ├── juce_KeyListener.h │ │ │ ├── juce_KeyPress.cpp │ │ │ ├── juce_KeyPress.h │ │ │ ├── juce_KeyboardFocusTraverser.cpp │ │ │ ├── juce_KeyboardFocusTraverser.h │ │ │ ├── juce_ModifierKeys.cpp │ │ │ ├── juce_ModifierKeys.h │ │ │ ├── juce_SystemClipboard.h │ │ │ ├── juce_TextEditorKeyMapper.h │ │ │ └── juce_TextInputTarget.h │ │ ├── layout │ │ │ ├── juce_AnimatedPosition.h │ │ │ ├── juce_AnimatedPositionBehaviours.h │ │ │ ├── juce_ComponentAnimator.cpp │ │ │ ├── juce_ComponentAnimator.h │ │ │ ├── juce_ComponentBoundsConstrainer.cpp │ │ │ ├── juce_ComponentBoundsConstrainer.h │ │ │ ├── juce_ComponentBuilder.cpp │ │ │ ├── juce_ComponentBuilder.h │ │ │ ├── juce_ComponentMovementWatcher.cpp │ │ │ ├── juce_ComponentMovementWatcher.h │ │ │ ├── juce_ConcertinaPanel.cpp │ │ │ ├── juce_ConcertinaPanel.h │ │ │ ├── juce_GroupComponent.cpp │ │ │ ├── juce_GroupComponent.h │ │ │ ├── juce_MultiDocumentPanel.cpp │ │ │ ├── juce_MultiDocumentPanel.h │ │ │ ├── juce_ResizableBorderComponent.cpp │ │ │ ├── juce_ResizableBorderComponent.h │ │ │ ├── juce_ResizableCornerComponent.cpp │ │ │ ├── juce_ResizableCornerComponent.h │ │ │ ├── juce_ResizableEdgeComponent.cpp │ │ │ ├── juce_ResizableEdgeComponent.h │ │ │ ├── juce_ScrollBar.cpp │ │ │ ├── juce_ScrollBar.h │ │ │ ├── juce_StretchableLayoutManager.cpp │ │ │ ├── juce_StretchableLayoutManager.h │ │ │ ├── juce_StretchableLayoutResizerBar.cpp │ │ │ ├── juce_StretchableLayoutResizerBar.h │ │ │ ├── juce_StretchableObjectResizer.cpp │ │ │ ├── juce_StretchableObjectResizer.h │ │ │ ├── juce_TabbedButtonBar.cpp │ │ │ ├── juce_TabbedButtonBar.h │ │ │ ├── juce_TabbedComponent.cpp │ │ │ ├── juce_TabbedComponent.h │ │ │ ├── juce_Viewport.cpp │ │ │ └── juce_Viewport.h │ │ ├── lookandfeel │ │ │ ├── juce_LookAndFeel.cpp │ │ │ ├── juce_LookAndFeel.h │ │ │ ├── juce_LookAndFeel_V1.cpp │ │ │ ├── juce_LookAndFeel_V1.h │ │ │ ├── juce_LookAndFeel_V2.cpp │ │ │ ├── juce_LookAndFeel_V2.h │ │ │ ├── juce_LookAndFeel_V3.cpp │ │ │ └── juce_LookAndFeel_V3.h │ │ ├── menus │ │ │ ├── juce_MenuBarComponent.cpp │ │ │ ├── juce_MenuBarComponent.h │ │ │ ├── juce_MenuBarModel.cpp │ │ │ ├── juce_MenuBarModel.h │ │ │ ├── juce_PopupMenu.cpp │ │ │ └── juce_PopupMenu.h │ │ ├── misc │ │ │ ├── juce_BubbleComponent.cpp │ │ │ ├── juce_BubbleComponent.h │ │ │ ├── juce_DropShadower.cpp │ │ │ └── juce_DropShadower.h │ │ ├── mouse │ │ │ ├── juce_ComponentDragger.cpp │ │ │ ├── juce_ComponentDragger.h │ │ │ ├── juce_DragAndDropContainer.cpp │ │ │ ├── juce_DragAndDropContainer.h │ │ │ ├── juce_DragAndDropTarget.h │ │ │ ├── juce_FileDragAndDropTarget.h │ │ │ ├── juce_LassoComponent.h │ │ │ ├── juce_MouseCursor.cpp │ │ │ ├── juce_MouseCursor.h │ │ │ ├── juce_MouseEvent.cpp │ │ │ ├── juce_MouseEvent.h │ │ │ ├── juce_MouseInactivityDetector.cpp │ │ │ ├── juce_MouseInactivityDetector.h │ │ │ ├── juce_MouseInputSource.cpp │ │ │ ├── juce_MouseInputSource.h │ │ │ ├── juce_MouseListener.cpp │ │ │ ├── juce_MouseListener.h │ │ │ ├── juce_SelectedItemSet.h │ │ │ ├── juce_TextDragAndDropTarget.h │ │ │ └── juce_TooltipClient.h │ │ ├── native │ │ │ ├── juce_MultiTouchMapper.h │ │ │ ├── juce_android_FileChooser.cpp │ │ │ ├── juce_android_Windowing.cpp │ │ │ ├── juce_ios_UIViewComponentPeer.mm │ │ │ ├── juce_ios_Windowing.mm │ │ │ ├── juce_linux_Clipboard.cpp │ │ │ ├── juce_linux_FileChooser.cpp │ │ │ ├── juce_linux_Windowing.cpp │ │ │ ├── juce_mac_FileChooser.mm │ │ │ ├── juce_mac_MainMenu.mm │ │ │ ├── juce_mac_MouseCursor.mm │ │ │ ├── juce_mac_NSViewComponentPeer.mm │ │ │ ├── juce_mac_Windowing.mm │ │ │ ├── juce_win32_DragAndDrop.cpp │ │ │ ├── juce_win32_FileChooser.cpp │ │ │ └── juce_win32_Windowing.cpp │ │ ├── positioning │ │ │ ├── juce_MarkerList.cpp │ │ │ ├── juce_MarkerList.h │ │ │ ├── juce_RelativeCoordinate.cpp │ │ │ ├── juce_RelativeCoordinate.h │ │ │ ├── juce_RelativeCoordinatePositioner.cpp │ │ │ ├── juce_RelativeCoordinatePositioner.h │ │ │ ├── juce_RelativeParallelogram.cpp │ │ │ ├── juce_RelativeParallelogram.h │ │ │ ├── juce_RelativePoint.cpp │ │ │ ├── juce_RelativePoint.h │ │ │ ├── juce_RelativePointPath.cpp │ │ │ ├── juce_RelativePointPath.h │ │ │ ├── juce_RelativeRectangle.cpp │ │ │ └── juce_RelativeRectangle.h │ │ ├── properties │ │ │ ├── juce_BooleanPropertyComponent.cpp │ │ │ ├── juce_BooleanPropertyComponent.h │ │ │ ├── juce_ButtonPropertyComponent.cpp │ │ │ ├── juce_ButtonPropertyComponent.h │ │ │ ├── juce_ChoicePropertyComponent.cpp │ │ │ ├── juce_ChoicePropertyComponent.h │ │ │ ├── juce_PropertyComponent.cpp │ │ │ ├── juce_PropertyComponent.h │ │ │ ├── juce_PropertyPanel.cpp │ │ │ ├── juce_PropertyPanel.h │ │ │ ├── juce_SliderPropertyComponent.cpp │ │ │ ├── juce_SliderPropertyComponent.h │ │ │ ├── juce_TextPropertyComponent.cpp │ │ │ └── juce_TextPropertyComponent.h │ │ ├── widgets │ │ │ ├── juce_ComboBox.cpp │ │ │ ├── juce_ComboBox.h │ │ │ ├── juce_ImageComponent.cpp │ │ │ ├── juce_ImageComponent.h │ │ │ ├── juce_Label.cpp │ │ │ ├── juce_Label.h │ │ │ ├── juce_ListBox.cpp │ │ │ ├── juce_ListBox.h │ │ │ ├── juce_ProgressBar.cpp │ │ │ ├── juce_ProgressBar.h │ │ │ ├── juce_Slider.cpp │ │ │ ├── juce_Slider.h │ │ │ ├── juce_TableHeaderComponent.cpp │ │ │ ├── juce_TableHeaderComponent.h │ │ │ ├── juce_TableListBox.cpp │ │ │ ├── juce_TableListBox.h │ │ │ ├── juce_TextEditor.cpp │ │ │ ├── juce_TextEditor.h │ │ │ ├── juce_Toolbar.cpp │ │ │ ├── juce_Toolbar.h │ │ │ ├── juce_ToolbarItemComponent.cpp │ │ │ ├── juce_ToolbarItemComponent.h │ │ │ ├── juce_ToolbarItemFactory.h │ │ │ ├── juce_ToolbarItemPalette.cpp │ │ │ ├── juce_ToolbarItemPalette.h │ │ │ ├── juce_TreeView.cpp │ │ │ └── juce_TreeView.h │ │ └── windows │ │ │ ├── juce_AlertWindow.cpp │ │ │ ├── juce_AlertWindow.h │ │ │ ├── juce_CallOutBox.cpp │ │ │ ├── juce_CallOutBox.h │ │ │ ├── juce_ComponentPeer.cpp │ │ │ ├── juce_ComponentPeer.h │ │ │ ├── juce_DialogWindow.cpp │ │ │ ├── juce_DialogWindow.h │ │ │ ├── juce_DocumentWindow.cpp │ │ │ ├── juce_DocumentWindow.h │ │ │ ├── juce_NativeMessageBox.h │ │ │ ├── juce_ResizableWindow.cpp │ │ │ ├── juce_ResizableWindow.h │ │ │ ├── juce_ThreadWithProgressWindow.cpp │ │ │ ├── juce_ThreadWithProgressWindow.h │ │ │ ├── juce_TooltipWindow.cpp │ │ │ ├── juce_TooltipWindow.h │ │ │ ├── juce_TopLevelWindow.cpp │ │ │ └── juce_TopLevelWindow.h │ │ └── juce_gui_extra │ │ ├── code_editor │ │ ├── juce_CPlusPlusCodeTokeniser.cpp │ │ ├── juce_CPlusPlusCodeTokeniser.h │ │ ├── juce_CPlusPlusCodeTokeniserFunctions.h │ │ ├── juce_CodeDocument.cpp │ │ ├── juce_CodeDocument.h │ │ ├── juce_CodeEditorComponent.cpp │ │ ├── juce_CodeEditorComponent.h │ │ ├── juce_CodeTokeniser.h │ │ ├── juce_LuaCodeTokeniser.cpp │ │ ├── juce_LuaCodeTokeniser.h │ │ ├── juce_XMLCodeTokeniser.cpp │ │ └── juce_XMLCodeTokeniser.h │ │ ├── documents │ │ ├── juce_FileBasedDocument.cpp │ │ └── juce_FileBasedDocument.h │ │ ├── embedding │ │ ├── juce_ActiveXControlComponent.h │ │ ├── juce_NSViewComponent.h │ │ └── juce_UIViewComponent.h │ │ ├── juce_gui_extra.cpp │ │ ├── juce_gui_extra.h │ │ ├── juce_gui_extra.mm │ │ ├── juce_module_info │ │ ├── misc │ │ ├── juce_AnimatedAppComponent.cpp │ │ ├── juce_AnimatedAppComponent.h │ │ ├── juce_AppleRemote.h │ │ ├── juce_BubbleMessageComponent.cpp │ │ ├── juce_BubbleMessageComponent.h │ │ ├── juce_ColourSelector.cpp │ │ ├── juce_ColourSelector.h │ │ ├── juce_KeyMappingEditorComponent.cpp │ │ ├── juce_KeyMappingEditorComponent.h │ │ ├── juce_LiveConstantEditor.cpp │ │ ├── juce_LiveConstantEditor.h │ │ ├── juce_PreferencesPanel.cpp │ │ ├── juce_PreferencesPanel.h │ │ ├── juce_RecentlyOpenedFilesList.cpp │ │ ├── juce_RecentlyOpenedFilesList.h │ │ ├── juce_SplashScreen.cpp │ │ ├── juce_SplashScreen.h │ │ ├── juce_SystemTrayIconComponent.cpp │ │ ├── juce_SystemTrayIconComponent.h │ │ └── juce_WebBrowserComponent.h │ │ └── native │ │ ├── juce_android_WebBrowserComponent.cpp │ │ ├── juce_ios_UIViewComponent.mm │ │ ├── juce_linux_SystemTrayIcon.cpp │ │ ├── juce_linux_WebBrowserComponent.cpp │ │ ├── juce_mac_AppleRemote.mm │ │ ├── juce_mac_CarbonViewWrapperComponent.h │ │ ├── juce_mac_NSViewComponent.mm │ │ ├── juce_mac_SystemTrayIcon.cpp │ │ ├── juce_mac_WebBrowserComponent.mm │ │ ├── juce_win32_ActiveXComponent.cpp │ │ ├── juce_win32_SystemTrayIcon.cpp │ │ └── juce_win32_WebBrowserComponent.cpp ├── Makefile ├── Source │ ├── ConnectorComponent.cpp │ ├── ConnectorComponent.h │ ├── GfxUtil.cpp │ ├── GfxUtil.h │ ├── GraphEditorComponent.cpp │ ├── GraphEditorComponent.h │ ├── Main.cpp │ ├── OpComponent.cpp │ ├── OpComponent.h │ ├── OpGraph.cpp │ ├── OpGraph.h │ ├── app_beekeep.c │ ├── files.c │ ├── flash_beekeep.c │ └── handler.c ├── beekeep.jucer └── bees_schema.json ├── bfin_pd ├── Makefile.common ├── Makefile.fmsynth ├── Makefile.pdlibbuilder ├── bfin~.c ├── fix.c ├── fix.h ├── op_math.c ├── op_math.h ├── param_scaler.c ├── param_scaler.h ├── scalers │ ├── scaler_amp.c │ ├── scaler_amp.h │ ├── scaler_bool.c │ ├── scaler_bool.h │ ├── scaler_fix.c │ ├── scaler_fix.h │ ├── scaler_fract.c │ ├── scaler_fract.h │ ├── scaler_integrator.c │ ├── scaler_integrator.h │ ├── scaler_integrator_short.c │ ├── scaler_integrator_short.h │ ├── scaler_label.c │ ├── scaler_label.h │ ├── scaler_note.c │ ├── scaler_note.h │ ├── scaler_short.c │ ├── scaler_short.h │ ├── scaler_svf_fc.c │ └── scaler_svf_fc.h └── test.pd ├── bfin_sim ├── fract2float_conv.c ├── fract2float_conv.h ├── fract_math.c ├── fract_math.h ├── main.c ├── module.h ├── osc-test-harness.lisp └── src │ ├── bfin_core.h │ ├── control.c │ ├── control.h │ ├── cv.c │ ├── cv.h │ ├── desc.c │ ├── fix.c │ ├── fix.h │ ├── fix16.c │ ├── gpio.h │ ├── init.c │ ├── init.h │ ├── isr.c │ ├── isr.h │ ├── libfixmath │ ├── Makefile │ ├── fix16.c │ ├── fix16.h │ ├── fix16.hpp │ ├── fix16_exp.c │ ├── fix16_fract.c │ ├── fix16_fract.h │ ├── fix16_sqrt.c │ ├── fix16_trig.c │ ├── fix16_trig_sin_lut.h │ ├── fix32.c │ ├── fix32.h │ ├── fixmath.h │ ├── fract32.c │ ├── fract32.h │ ├── int64.h │ ├── libfixmath.cbp │ ├── uint32.c │ └── uint32.h │ ├── main.c │ ├── pickle.c │ ├── pickle.h │ ├── spi.c │ ├── spi.h │ ├── util.c │ └── util.h ├── bintool ├── README.md └── bintool.c ├── bmp ├── aleph_bmp_region.c ├── font_xpm_gen.scm ├── readme.txt ├── untitled.xpm ├── xpm-convert ├── xpm_convert.c └── xpm_read.c ├── i2c-repeater ├── Makefile ├── i2c-repeater ├── i2c-repeater.c ├── twi.c └── twi.h ├── param_scaling ├── scale_amp.scd ├── scale_integrator.scd ├── scale_note_12tet.scd ├── scaler_amp_rep.dat ├── scaler_amp_val.dat ├── scaler_integrator_rep.dat ├── scaler_integrator_short_rep.dat ├── scaler_integrator_short_val.dat ├── scaler_integrator_val.dat ├── scaler_note_12tet_val.dat ├── scaler_note_val.dat └── scaler_svf_fc_val.dat ├── pd ├── .gitignore ├── Makefile ├── Makefile.pdlibbuilder ├── README.md ├── aleph_op_mul.pd ├── app_beekeep.c ├── app_pd.c ├── bees_op.c ├── bees_op_basic.pd ├── bees_op_example.pd ├── bees_ops_grid.pd ├── counter.c ├── dot.c ├── dot.h ├── files.c ├── flash_beekeep.c ├── handler.c ├── json.h ├── json_read_native.c ├── json_read_raw.c ├── json_write_native.c ├── main.c ├── net_hid.c ├── net_hid.h ├── net_py.c ├── param_scaler.c ├── scaler_amp_rep.dat_le.inc ├── scaler_amp_val.dat_le.inc ├── scaler_integrator_rep.dat_le.inc ├── scaler_integrator_short_rep.dat_le.inc ├── scaler_integrator_short_val.dat_le.inc ├── scaler_integrator_val.dat_le.inc ├── scaler_note_val.dat_le.inc ├── scaler_svf_fc_val.dat_le.inc ├── ui.c ├── ui.h ├── ui_files.c ├── ui_files.h ├── ui_handlers.c ├── ui_handlers.h ├── ui_lists.c ├── ui_lists.h ├── ui_op_menu.c └── ui_op_menu.h ├── prototypes └── opPoolProto.c ├── release ├── copy.command └── scenes-0.7.1 │ ├── crickets.scn │ ├── cvtest.scn │ ├── default.scn │ ├── dsyn_test.scn │ ├── life.scn │ ├── mpdrumssss.scn │ ├── skitter.scn │ ├── space.scn │ ├── stepcvout.scn │ ├── stepwaves.scn │ ├── stepwavescv.scn │ └── this.scn ├── serial-com-proto ├── module-hotswap.c ├── prototype.c └── test-harness.lisp └── tabletool ├── Makefile ├── main.c ├── plot_deltas.plt ├── plot_interp.plt ├── plot_values.plt └── tables.c /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.d 3 | *.ldr 4 | *.hex 5 | *.elf 6 | *.bin 7 | *.lss 8 | *.map 9 | *.sym 10 | *.dsc 11 | *_desc_build 12 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libavr32"] 2 | path = libavr32 3 | url = https://github.com/monome/libavr32.git -------------------------------------------------------------------------------- /LICENSE.TXT: -------------------------------------------------------------------------------- 1 | Various licenses cover different parts of this source code. 2 | 3 | Please see: 4 | 5 | /apps/LICENSE.TXT 6 | /avr32_lib/LICENSE.TXT 7 | /avr32_lib/asf_license.txt 8 | /modules/UNLICENSE.TXT 9 | /dsp/UNLICENSE.TXT 10 | /bfin_lib/UNLICENSE.TXT 11 | /utils/avr32_boot/LICENSE.TXT 12 | /utils/avr8/LUFA/License.txt 13 | 14 | contact info@monome.org with questions. 15 | -------------------------------------------------------------------------------- /apps/bees/src/app_bees.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_APP_BEES_H_ 2 | #define _ALEPH_BEES_APP_BEES_H_ 3 | #include "util.h" 4 | EXTERN_C_BEGIN 5 | 6 | 7 | #ifndef MIN 8 | #define MIN 0 9 | #endif 10 | #ifndef MAJ 11 | #define MAJ 0 12 | #endif 13 | #ifndef REV 14 | #define REV 0 15 | #endif 16 | #ifndef VERSIONSTRING 17 | #define VERSIONSTRING "none" 18 | #endif 19 | 20 | 21 | typedef struct _AppVersion { 22 | u8 maj; 23 | u8 min; 24 | u16 rev; 25 | } AppVersion; 26 | 27 | extern const AppVersion beesVersion; 28 | 29 | EXTERN_C_END 30 | #endif 31 | -------------------------------------------------------------------------------- /apps/bees/src/handler.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_APP_BEES_HANDLER_H_ 2 | #define _ALEPH_APP_BEES_HANDLER_H_ 3 | 4 | 5 | #include "app.h" 6 | #include "op_math.h" 7 | #include "types.h" 8 | #include "util.h" 9 | 10 | EXTERN_C_BEGIN 11 | 12 | // assign ui handlers 13 | extern void assign_bees_event_handlers(void); 14 | 15 | extern io_t scale_knob_value(io_t val); 16 | extern io_t scale_knob_value_fast(io_t val); 17 | extern io_t scale_knob_value_small(io_t val); 18 | EXTERN_C_END 19 | #endif 20 | -------------------------------------------------------------------------------- /apps/bees/src/net_poll.c: -------------------------------------------------------------------------------- 1 | /* 2 | net_poll.c 3 | bees 4 | aleph 5 | 6 | abstract superclass for polled operators. 7 | 8 | */ 9 | 10 | #include "print_funcs.h" 11 | 12 | #include "net_poll.h" 13 | 14 | // timed event handler 15 | void net_poll_handler(s32 data) { 16 | // cast from data to pointer... scary, but seems ok so far 17 | op_poll_t* op_poll = (op_poll_t*)data; 18 | (*(op_poll->handler))(op_poll->op); 19 | } 20 | -------------------------------------------------------------------------------- /apps/bees/src/net_poll.h: -------------------------------------------------------------------------------- 1 | /* 2 | net_poll.h 3 | bees 4 | aleph 5 | 6 | abstract superclass and handling glue for polled operators. 7 | 8 | avr32_lib defines a generic event type for app-specific events. 9 | here we use it for operators that require a timer callback. 10 | 11 | */ 12 | 13 | #ifndef _ALEPH_BEES_NET_POLL_H_ 14 | #define _ALEPH_BEES_NET_POLL_H_ 15 | 16 | // aleph-common 17 | #include "types.h" 18 | 19 | //------------------- 20 | //---- types 21 | 22 | typedef void(*poll_handler_t)(void* op); 23 | 24 | // polled operator superclass 25 | typedef struct _op_poll { 26 | // pointer to operator subclass 27 | void* op; 28 | // pointer to handler function 29 | poll_handler_t handler; 30 | } op_poll_t; 31 | 32 | //-------------------- 33 | //--- extern functions 34 | 35 | // generic callback 36 | void net_poll_handler(s32 data); 37 | 38 | #endif // h guard 39 | -------------------------------------------------------------------------------- /apps/bees/src/op_gfx.c: -------------------------------------------------------------------------------- 1 | #include "print_funcs.h" 2 | 3 | #include "op_gfx.h" 4 | 5 | u8 opPlay = 0; 6 | 7 | static s32 opPlayCount = 0; 8 | 9 | // operator enabled 10 | void op_gfx_enable(void) { 11 | print_dbg("\r\n incrementing gfx op count, old value: "); 12 | print_dbg_ulong(opPlayCount); 13 | 14 | opPlayCount++; 15 | opPlay = 1; 16 | } 17 | 18 | // operator disabled 19 | extern void op_gfx_disable(void) { 20 | print_dbg("\r\n decrementing gfx op count, old value: "); 21 | print_dbg_ulong(opPlayCount); 22 | opPlayCount--; 23 | if(opPlayCount < 0) { 24 | opPlayCount = 0; 25 | } 26 | if(opPlayCount == 0) { 27 | opPlay = 0; 28 | print_dbg("\r\n , unset opPlay flag. "); 29 | } 30 | } 31 | 32 | void op_gfx_reset(void) { 33 | opPlay = 0; 34 | opPlayCount = 0; 35 | } 36 | -------------------------------------------------------------------------------- /apps/bees/src/op_gfx.h: -------------------------------------------------------------------------------- 1 | /* 2 | op_gfx.h 3 | 4 | graphics operator superclass and management. 5 | 6 | */ 7 | 8 | #ifndef _ALEPH_BEES_OP_GFX_H_ 9 | #define _ALEPH_BEES_OP_GFX_H_ 10 | 11 | #include "types.h" 12 | 13 | //! global flag, set if op is focused. 14 | extern u8 opPlay; 15 | 16 | //! operator enabled 17 | extern void op_gfx_enable(void); 18 | //! operator disabled 19 | extern void op_gfx_disable(void); 20 | //! clear the list of graphics ops 21 | extern void op_gfx_reset(void); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /apps/bees/src/op_pool.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_OP_POOL_H_ 2 | #define _ALEPH_BEES_OP_POOL_H_ 3 | 4 | #include 5 | #include 6 | #include "types.h" 7 | 8 | 9 | #define SMALL_OP_SIZE 128 10 | #define MAX_SMALL_OPS 256 11 | 12 | #define BIG_OP_SIZE (1024 * 16) 13 | #define MAX_BIG_OPS 8 14 | 15 | void initBigMemPool (void); 16 | u8* allocBigOp(void); 17 | 18 | void initSmallMemPool (void); 19 | u8* allocSmallOp(void); 20 | 21 | int freeBigOp(u8* region); 22 | int freeSmallOp(u8* region); 23 | int freeOp(u8* region); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_accum.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_ACCUM_H_ 2 | #define _OP_ACCUM_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_accum_t : accumulator 9 | typedef struct op_accum_struct { 10 | // superclass 11 | op_t super; 12 | // state variables 13 | // increment 14 | volatile io_t inc; 15 | // current value 16 | volatile io_t val; 17 | // min 18 | volatile io_t min; 19 | // max 20 | volatile io_t max; 21 | // toggle wrap/saturate 22 | volatile io_t wrap; 23 | // pointers for external access 24 | volatile io_t* in_val[5]; 25 | // outputs: value, wrap 26 | op_out_t outs[2]; 27 | } op_accum_t; 28 | 29 | extern void op_accum_init(void* accum); 30 | 31 | 32 | #endif // header guard 33 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_adc.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_OP_ADC_H_ 2 | #define _ALEPH_BEES_OP_ADC_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_adc_t : adc source 9 | 10 | // this really doesn't do much but it is a distinct operator type for usability. 11 | 12 | typedef struct op_adc_struct { 13 | op_t super; 14 | 15 | volatile u8 prev[4]; 16 | // in: 17 | // enable, update period, 4 values 18 | volatile io_t* in_val[3]; 19 | volatile io_t enable; 20 | volatile io_t period; 21 | volatile io_t mode; 22 | volatile io_t val[4]; 23 | /* volatile io_t val1; */ 24 | /* volatile io_t val2; */ 25 | /* volatile io_t val3; */ 26 | // out: 4 values 27 | op_out_t outs[4]; 28 | } op_adc_t; 29 | 30 | extern void op_adc_init(void* op); 31 | extern void op_adc_deinit(void* op); 32 | 33 | extern void op_adc_sys_input(op_adc_t* adc, u8 ch, u16 val); 34 | 35 | #endif // header guard 36 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_add.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_add_H_ 2 | #define _op_add_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | //--- op_add_t : addition 9 | typedef struct op_add_struct { 10 | op_t super; 11 | volatile io_t val; 12 | volatile io_t a; 13 | volatile io_t b; 14 | volatile io_t btrig; 15 | volatile io_t * in_val[3]; // a, b, btrig 16 | op_out_t outs[1]; 17 | } op_add_t; 18 | void op_add_init(void* mem); 19 | 20 | #endif // header guard 21 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_bits.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_bits_H_ 2 | #define _op_bits_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | //--- op_bits_h: bin to dec and back 9 | typedef struct op_bits_struct { 10 | op_t super; 11 | volatile io_t val; 12 | volatile io_t index; 13 | volatile io_t i0; 14 | volatile io_t i1; 15 | volatile io_t i2; 16 | volatile io_t i3; 17 | volatile io_t i4; 18 | volatile io_t i5; 19 | volatile io_t i6; 20 | volatile io_t i7; 21 | 22 | volatile io_t * in_val[9]; 23 | op_out_t outs[9]; 24 | } op_bits_t; 25 | void op_bits_init(void* mem); 26 | 27 | #endif // header guard 28 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_change.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_change_H_ 2 | #define _op_change_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_change_t : filter repetition 9 | typedef struct op_change_struct { 10 | op_t super; 11 | 12 | volatile io_t val; 13 | volatile io_t last; 14 | volatile io_t* in_val[2]; 15 | 16 | op_out_t outs[1]; 17 | } op_change_t; 18 | 19 | void op_change_init(void* mem); 20 | 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_cpu.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_CPU_H_ 2 | #define _OP_CPU_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_mod_t : modulus 9 | typedef struct op_cpu_struct { 10 | op_t super; 11 | io_t trig; 12 | volatile io_t* in_val[1]; 13 | op_out_t outs[2]; 14 | } op_cpu_t; 15 | 16 | void op_cpu_init(void* cpu); 17 | 18 | 19 | #endif // header guard 20 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_delay.h: -------------------------------------------------------------------------------- 1 | #ifndef _BEES_OP_DELAY_H_ 2 | #define _BEES_OP_DELAY_H_ 3 | 4 | // aleph-avr32 5 | #include "timers.h" 6 | 7 | // bees 8 | #include "net_poll.h" 9 | #include "op.h" 10 | #include "op_math.h" 11 | #include "types.h" 12 | 13 | //--- op_delay_t: delay 14 | typedef struct op_delay_struct { 15 | // superclass 16 | op_t super; 17 | // input pointers 18 | // value, time, clear 19 | volatile io_t* in_val[3]; 20 | // state variables 21 | volatile io_t val; 22 | volatile io_t ms; 23 | volatile io_t clear; 24 | // outputs 25 | op_out_t outs[1]; 26 | // timer data 27 | softTimer_t timer; 28 | // polled operator superclass 29 | op_poll_t op_poll; 30 | } op_delay_t; 31 | 32 | // init 33 | void op_delay_init(void* op); 34 | 35 | // de-init 36 | void op_delay_deinit(void* op); 37 | 38 | #endif // header guard 39 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_div.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_div_H_ 2 | #define _op_div_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_div_t : integer division 9 | typedef struct op_div_struct { 10 | op_t super; 11 | io_t val; 12 | volatile io_t a; 13 | volatile io_t b; 14 | volatile io_t btrig; 15 | volatile io_t* in_val[3]; // a, b, btrig 16 | op_out_t outs[1]; 17 | } op_div_t; 18 | 19 | void op_div_init(void* div); 20 | 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_divr.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_divr_H_ 2 | #define _op_divr_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_divr_t : integer division 9 | typedef struct op_divr_struct { 10 | op_t super; 11 | io_t val; 12 | io_t r; 13 | volatile io_t a; 14 | volatile io_t b; 15 | volatile io_t btrig; 16 | volatile io_t* in_val[3]; // a, b, btrig 17 | op_out_t outs[2]; 18 | } op_divr_t; 19 | 20 | void op_divr_init(void* div); 21 | 22 | 23 | #endif // header guard 24 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_enc.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_ENC_H_ 2 | #define _OP_ENC_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_enc_t : encoder 9 | typedef struct op_enc_struct { 10 | op_t super; 11 | io_t val; 12 | volatile io_t step; 13 | volatile io_t min; 14 | volatile io_t max; 15 | volatile io_t * in_val[4]; 16 | op_out_t outs[2]; 17 | /// non-exposed state: 18 | s32 val32; 19 | } op_enc_t; 20 | 21 | extern void op_enc_init(void* mem); 22 | 23 | extern void op_enc_sys_input(op_enc_t* enc, s8 dir); 24 | 25 | #endif // header guard 26 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_fade.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_fade_H_ 2 | #define _op_fade_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | //--- op_fade_t 9 | typedef struct op_fade_struct { 10 | op_t super; 11 | volatile io_t val; 12 | volatile io_t a; 13 | volatile io_t b; 14 | volatile io_t x; 15 | volatile io_t * in_val[3]; // a, b, x 16 | op_out_t outs[1]; 17 | } op_fade_t; 18 | void op_fade_init(void* mem); 19 | 20 | #endif // header guard 21 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_gate.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_GATE_H_ 2 | #define _OP_GATE_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_gate_t : gate 9 | typedef struct op_gate_struct { 10 | op_t super; 11 | volatile io_t val, gate, store; 12 | volatile io_t * in_val[3]; 13 | op_out_t outs[1]; 14 | } op_gate_t; 15 | void op_gate_init(void* gate); 16 | 17 | #endif // header guard 18 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_harry.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_harry_H_ 2 | #define _op_harry_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_harry_t : harrytiplication 9 | typedef struct op_harry_struct { 10 | op_t super; 11 | io_t val; 12 | volatile io_t x; 13 | volatile io_t y; 14 | volatile io_t bang; 15 | volatile io_t size; 16 | volatile io_t* in_val[4]; 17 | op_out_t outs[1]; 18 | } op_harry_t; 19 | 20 | void op_harry_init(void* harry); 21 | 22 | 23 | #endif // header guard 24 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_hid_word.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_OP_HID_WORD_H_ 2 | #define _ALEPH_BEES_OP_HID_WORD_H_ 3 | 4 | #include "net_hid.h" 5 | 6 | //--- op_hid_word_t : HID data, variable size 7 | typedef struct op_hid_word_struct { 8 | // operator base class 9 | op_t super; 10 | // hid operator abstract class 11 | op_hid_t hid; 12 | // inputs: byte index, word size 13 | volatile io_t* in_val[2]; 14 | // outputs: value 15 | op_out_t outs[1]; 16 | // index of first data byte in frame 17 | volatile io_t byte; 18 | // word size 19 | volatile io_t size; 20 | } op_hid_word_t; 21 | 22 | // init 23 | void op_hid_word_init(void* op); 24 | // de-init 25 | void op_hid_word_deinit(void* op); 26 | 27 | #endif // h guard 28 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_history.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_history_H_ 2 | #define _op_history_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_history_t 9 | typedef struct op_history_struct { 10 | op_t super; 11 | io_t val[8]; 12 | volatile io_t in; 13 | volatile io_t* in_val[1]; 14 | op_out_t outs[9]; 15 | } op_history_t; 16 | 17 | void op_history_init(void* history); 18 | 19 | 20 | #endif // header guard 21 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_is.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_is_H_ 2 | #define _op_is_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_is_t : comparisons 9 | typedef struct op_is_struct { 10 | op_t super; 11 | 12 | io_t eq; 13 | io_t ne; 14 | io_t gt; 15 | io_t lt; 16 | 17 | volatile io_t a; 18 | volatile io_t b; 19 | volatile io_t btrig; 20 | volatile io_t edge; 21 | volatile io_t* in_val[4]; 22 | 23 | op_out_t outs[4]; 24 | } op_is_t; 25 | 26 | void op_is_init(void* is); 27 | 28 | 29 | #endif // header guard -------------------------------------------------------------------------------- /apps/bees/src/ops/op_iter.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_iter_H_ 2 | #define _op_iter_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | //--- op_iter_t : iterition 9 | typedef struct op_iter_struct { 10 | op_t super; 11 | volatile io_t times; 12 | volatile io_t val; 13 | volatile io_t stop; 14 | volatile io_t * in_val[3]; // a, b, btrig 15 | op_out_t outs[3]; 16 | } op_iter_t; 17 | void op_iter_init(void* mem); 18 | 19 | #endif // header guard 20 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_linlin.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_linlin_H_ 2 | #define _op_linlin_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_linlin_t : linlintiplication 9 | typedef struct op_linlin_struct { 10 | op_t super; 11 | io_t val; 12 | volatile io_t in; 13 | volatile io_t imin; 14 | volatile io_t imax; 15 | volatile io_t omin; 16 | volatile io_t omax; 17 | volatile io_t* in_val[5]; 18 | s32 scale_factor; 19 | op_out_t outs[1]; 20 | } op_linlin_t; 21 | 22 | void op_linlin_init(void* linlin); 23 | 24 | 25 | #endif // header guard 26 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_list16.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_LIST16_H_ 2 | #define _OP_LIST16_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | //--- op_add_t : addition 9 | typedef struct op_list16_struct { 10 | op_t super; 11 | volatile io_t val; 12 | volatile io_t index; 13 | volatile io_t i0; 14 | volatile io_t i1; 15 | volatile io_t i2; 16 | volatile io_t i3; 17 | volatile io_t i4; 18 | volatile io_t i5; 19 | volatile io_t i6; 20 | volatile io_t i7; 21 | volatile io_t i8; 22 | volatile io_t i9; 23 | volatile io_t i10; 24 | volatile io_t i11; 25 | volatile io_t i12; 26 | volatile io_t i13; 27 | volatile io_t i14; 28 | volatile io_t i15; 29 | 30 | volatile io_t * in_val[17]; 31 | op_out_t outs[1]; 32 | } op_list16_t; 33 | void op_list16_init(void* mem); 34 | 35 | #endif // header guard 36 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_list2.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_list2_H_ 2 | #define _op_list2_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | //--- op_add_t : addition 9 | typedef struct op_list2_struct { 10 | op_t super; 11 | volatile io_t val; 12 | volatile io_t index; 13 | volatile io_t i0; 14 | volatile io_t i1; 15 | 16 | volatile io_t * in_val[3]; 17 | op_out_t outs[1]; 18 | } op_list2_t; 19 | void op_list2_init(void* mem); 20 | 21 | #endif // header guard 22 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_list4.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_list4_H_ 2 | #define _op_list4_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | //--- op_add_t : addition 9 | typedef struct op_list4_struct { 10 | op_t super; 11 | volatile io_t val; 12 | volatile io_t index; 13 | volatile io_t i0; 14 | volatile io_t i1; 15 | volatile io_t i2; 16 | volatile io_t i3; 17 | 18 | volatile io_t * in_val[5]; 19 | op_out_t outs[1]; 20 | } op_list4_t; 21 | void op_list4_init(void* mem); 22 | 23 | #endif // header guard 24 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_list8.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_list8_H_ 2 | #define _op_list8_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | //--- op_add_t : addition 9 | typedef struct op_list8_struct { 10 | op_t super; 11 | volatile io_t val; 12 | volatile io_t index; 13 | volatile io_t i0; 14 | volatile io_t i1; 15 | volatile io_t i2; 16 | volatile io_t i3; 17 | volatile io_t i4; 18 | volatile io_t i5; 19 | volatile io_t i6; 20 | volatile io_t i7; 21 | 22 | volatile io_t * in_val[9]; 23 | op_out_t outs[1]; 24 | } op_list8_t; 25 | void op_list8_init(void* mem); 26 | 27 | #endif // header guard 28 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_logic.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_logic_H_ 2 | #define _op_logic_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_logic_t : logic operations 9 | typedef struct op_logic_struct { 10 | op_t super; 11 | 12 | io_t v_and; 13 | io_t v_or; 14 | io_t v_xor; 15 | 16 | volatile io_t a; 17 | volatile io_t b; 18 | volatile io_t btrig; 19 | volatile io_t edge; 20 | volatile io_t invert; 21 | volatile io_t* in_val[5]; 22 | 23 | op_out_t outs[3]; 24 | } op_logic_t; 25 | 26 | void op_logic_init(void* is); 27 | 28 | 29 | #endif // header guard -------------------------------------------------------------------------------- /apps/bees/src/ops/op_maginc.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_MAGINC_H_ 2 | #define _OP_MAGINC_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_maginc_t : magincgle (software switch) 9 | typedef struct op_maginc_struct { 10 | // superclass 11 | op_t super; 12 | // state variables 13 | volatile io_t inc; 14 | // pointers for external access 15 | volatile io_t* in_val[1]; 16 | op_out_t outs[1]; 17 | } op_maginc_t; 18 | 19 | extern void op_maginc_init(void* maginc); 20 | 21 | #endif // header guard 22 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_mem0d.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_mem0d_H_ 2 | #define _op_mem0d_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | //--- op_mem0d_t : mem0dition 9 | typedef struct op_mem0d_struct { 10 | op_t super; 11 | volatile io_t write; 12 | volatile io_t read; 13 | volatile io_t tog; 14 | volatile io_t rowsel; 15 | volatile io_t colsel; 16 | 17 | volatile io_t * in_val[3]; 18 | op_out_t outs[1]; 19 | } op_mem0d_t; 20 | void op_mem0d_init(void* mem); 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_mem1d.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_mem1d_H_ 2 | #define _op_mem1d_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | #define MEM_1D_DATA_LENGTH 16 9 | 10 | //--- op_mem1d_t : mem1dition 11 | typedef struct op_mem1d_struct { 12 | op_t super; 13 | volatile io_t n; 14 | volatile io_t write; 15 | volatile io_t read; 16 | volatile io_t tog; 17 | volatile io_t rowsel; 18 | volatile io_t colsel; 19 | volatile io_t data[MEM_1D_DATA_LENGTH]; 20 | 21 | volatile io_t * in_val[4]; 22 | op_out_t outs[2]; 23 | } op_mem1d_t; 24 | void op_mem1d_init(void* mem); 25 | 26 | #endif // header guard 27 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_mem2d.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_mem2d_H_ 2 | #define _op_mem2d_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | #define MEM_2D_DATA_LENGTH 16 9 | 10 | //--- op_mem2d_t : mem2dition 11 | typedef struct op_mem2d_struct { 12 | op_t super; 13 | volatile io_t x; 14 | volatile io_t y; 15 | volatile io_t write; 16 | volatile io_t read; 17 | volatile io_t tog; 18 | volatile io_t rowsel; 19 | volatile io_t colsel; 20 | io_t data[MEM_2D_DATA_LENGTH][MEM_2D_DATA_LENGTH]; 21 | 22 | volatile io_t * in_val[5]; 23 | op_out_t outs[3]; 24 | } op_mem2d_t; 25 | void op_mem2d_init(void* mem); 26 | 27 | #endif // header guard 28 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_metro.h: -------------------------------------------------------------------------------- 1 | #ifndef _BEES_OP_METRO_H_ 2 | #define _BEES_OP_METRO_H_ 3 | 4 | // aleph-avr32 5 | #include "timers.h" 6 | 7 | // bees 8 | #include "net_poll.h" 9 | #include "op.h" 10 | #include "op_math.h" 11 | #include "types.h" 12 | 13 | //--- op_metro_t: metro 14 | typedef struct op_metro_struct { 15 | // superclass 16 | op_t super; 17 | // input pointers 18 | // enable, period, value 19 | volatile io_t* in_val[3]; 20 | // state variables 21 | volatile io_t enable; 22 | volatile io_t period; 23 | volatile io_t value; 24 | // outputs 25 | op_out_t outs[1]; 26 | // timer data 27 | softTimer_t timer; 28 | // polled operator superclass 29 | op_poll_t op_poll; 30 | } op_metro_t; 31 | 32 | // init 33 | void op_metro_init(void* op); 34 | 35 | // de-init 36 | void op_metro_deinit(void* op); 37 | 38 | #endif // header guard 39 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_midi_cc.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_OP_MIDI_CC_H_ 2 | #define _ALEPH_BEES_OP_MIDI_CC_H_ 3 | 4 | #include "net_midi.h" 5 | 6 | //--- op_midi_cc_t : it is a midi control change operator, yep 7 | 8 | 9 | typedef struct op_midi_cc_struct { 10 | // operator base class 11 | op_t super; 12 | // midi operator abstract class 13 | op_midi_t midi; 14 | // input: channel, control num 15 | volatile io_t* in_val[2]; 16 | // outputs: value 17 | op_out_t outs[1]; 18 | // target channel (-1 == all channels) 19 | volatile io_t chan; 20 | // target cc num 21 | volatile io_t num; 22 | } op_midi_cc_t; 23 | 24 | // init 25 | void op_midi_cc_init(void* op); 26 | // de-init 27 | void op_midi_cc_deinit(void* op); 28 | 29 | #endif // h guard 30 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_midi_clock.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_OP_MIDI_CLOCK_H_ 2 | #define _ALEPH_BEES_OP_MIDI_CLOCK_H_ 3 | 4 | #include "net_midi.h" 5 | 6 | //--- op_midi_clock_t : it is a midi control change operator, yep 7 | 8 | 9 | typedef struct op_midi_clock_struct { 10 | // operator base class 11 | op_t super; 12 | // midi operator abstract class 13 | op_midi_t midi; 14 | // input: dummy only! 15 | volatile io_t* in_val[1]; 16 | // outputs: value 17 | op_out_t outs[4]; 18 | volatile io_t dummy; 19 | } op_midi_clock_t; 20 | 21 | // init 22 | void op_midi_clock_init(void* op); 23 | // de-init 24 | void op_midi_clock_deinit(void* op); 25 | 26 | #endif // h guard 27 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_midi_note.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_OP_MIDI_NOTE_H_ 2 | #define _ALEPH_BEES_OP_MIDI_NOTE_H_ 3 | 4 | #include "net_midi.h" 5 | 6 | //--- op_midi_note_t : note and velocity. yep 7 | 8 | 9 | typedef struct op_midi_note_struct { 10 | // operator base class 11 | op_t super; 12 | // midi operator abstract class 13 | op_midi_t midi; 14 | // input: channel number 15 | volatile io_t* in_val[1]; 16 | // outputs: note number, noteon velocity, pitchbend 17 | op_out_t outs[3]; 18 | // channel, input value(negative == all channels) 19 | volatile io_t chanIo; 20 | /// actual channel number 21 | // this is stored separately as 8b value, 22 | // i don't think there's a good reason for this, but whatever 23 | s8 chan; 24 | } op_midi_note_t; 25 | 26 | // init 27 | void op_midi_note_init(void* op); 28 | // de-init 29 | void op_midi_note_deinit(void* op); 30 | 31 | #endif // h guard 32 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_midi_prog.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_OP_MIDI_PROG_H_ 2 | #define _ALEPH_BEES_OP_MIDI_PROG_H_ 3 | 4 | #include "net_midi.h" 5 | 6 | //--- op_midi_prog_t : it is a midi control change operator, yep 7 | 8 | 9 | typedef struct op_midi_prog_struct { 10 | // operator base class 11 | op_t super; 12 | // midi operator abstract class 13 | op_midi_t midi; 14 | // input: channel, control num 15 | volatile io_t* in_val[1]; 16 | // outputs: value 17 | op_out_t outs[1]; 18 | // target channel (-1 == all channels) 19 | volatile io_t chan; 20 | } op_midi_prog_t; 21 | 22 | // init 23 | void op_midi_prog_init(void* op); 24 | // de-init 25 | void op_midi_prog_deinit(void* op); 26 | 27 | #endif // h guard 28 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_mod.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_mod_H_ 2 | #define _op_mod_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_mod_t : modulus 9 | typedef struct op_mod_struct { 10 | op_t super; 11 | io_t val; 12 | volatile io_t a; 13 | volatile io_t b; 14 | volatile io_t btrig; 15 | volatile io_t* in_val[3]; // a, b, btrig 16 | op_out_t outs[1]; 17 | } op_mod_t; 18 | 19 | void op_mod_init(void* mod); 20 | 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_monome_arc.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_OP_MONOME_ARC_H_ 2 | #define _ALEPH_BEES_OP_MONOME_ARC_H_ 3 | 4 | #include "net_monome.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | #include "types.h" 8 | 9 | //--- op_monome_arc 10 | typedef struct op_marc_struct { 11 | op_t super; 12 | op_monome_t monome; 13 | // focus toggle 14 | volatile io_t focus; 15 | // loopback toggle 16 | volatile io_t loop; 17 | // set ring number 18 | volatile io_t ring; 19 | // set update position 20 | volatile io_t pos; 21 | // set update value 22 | volatile io_t val; 23 | // input pointer array 24 | volatile io_t* in_val[5]; 25 | op_out_t outs[3]; 26 | // internal 27 | u8 mRing; 28 | u8 vals[4]; 29 | } op_marc_t; 30 | 31 | // init 32 | void op_marc_init(void* op); 33 | // de-init 34 | void op_marc_deinit(void* op); 35 | 36 | #endif // header guard 37 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_monome_grid_classic.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_OP_MONOME_GRID_CLASSIC_H_ 2 | #define _ALEPH_BEES_OP_MONOME_GRID_CLASSIC_H_ 3 | 4 | #include "net_monome.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | #include "types.h" 8 | 9 | //--- op_monome_grid_classic : monome grid as a simple bank of switches 10 | typedef struct op_mgrid_classic_struct { 11 | op_t super; 12 | op_monome_t monome; 13 | // inputs: toggle mode, focus 14 | volatile io_t focus; 15 | volatile io_t tog; 16 | volatile io_t mono; 17 | volatile io_t* in_val[3]; 18 | // outputs: x , y, z 19 | op_out_t outs[3]; 20 | // internal: 21 | u32 lastPos; 22 | } op_mgrid_classic_t; 23 | 24 | // init 25 | void op_mgrid_classic_init(void* op); 26 | // de-init 27 | void op_mgrid_classic_deinit(void* op); 28 | 29 | #endif // header guard 30 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_monome_grid_raw.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_OP_MONOME_GRID_RAW_H_ 2 | #define _ALEPH_BEES_OP_MONOME_GRID_RAW_H_ 3 | 4 | #include "net_monome.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | #include "types.h" 8 | 9 | //--- op_monome_grid_raw : monome grid as a simple bank of switches 10 | typedef struct op_mgrid_raw_struct { 11 | op_t super; 12 | op_monome_t monome; 13 | volatile io_t focus; 14 | volatile io_t x; 15 | volatile io_t y; 16 | volatile io_t ledVal; 17 | volatile io_t ledOn; 18 | // inputs: toggle mode, focus 19 | volatile io_t* in_val[5]; 20 | // outputs: x , y, z 21 | op_out_t outs[3]; 22 | // internal: 23 | u32 lastPos; 24 | } op_mgrid_raw_t; 25 | 26 | // init 27 | void op_mgrid_raw_init(void* op); 28 | // de-init 29 | void op_mgrid_raw_deinit(void* op); 30 | 31 | #endif // header guard 32 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_mul.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_mul_H_ 2 | #define _op_mul_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_mul_t : multiplication 9 | typedef struct op_mul_struct { 10 | op_t super; 11 | io_t val; 12 | volatile io_t a; 13 | volatile io_t b; 14 | volatile io_t btrig; 15 | volatile io_t* in_val[3]; // a, b, btrig 16 | op_out_t outs[1]; 17 | } op_mul_t; 18 | 19 | void op_mul_init(void* mul); 20 | 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_param.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_PARAM_H_ 2 | #define _OP_PARAM_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_param_t : event param 9 | typedef struct op_param_struct { 10 | // superclass 11 | op_t super; 12 | // ---- input state 13 | // event to be timed 14 | volatile io_t event; 15 | // ---- input access pointers 16 | volatile io_t* in_val[1]; 17 | // output: time 18 | op_out_t outs[1]; 19 | /// additional state variables 20 | // interval since last event, in ticks 21 | } op_param_t; 22 | 23 | extern void op_param_init(void* param); 24 | 25 | // handle input from system 26 | extern void op_param_sys_input(op_param_t* param, u8 val); 27 | 28 | #endif // header guard 29 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_poly.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_poly_H_ 2 | #define _op_poly_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | typedef struct _poly_voice{ 9 | io_t pitch; 10 | u8 idx; 11 | struct _poly_voice *next; 12 | } poly_voice_t; 13 | 14 | #define POLY_N_VOICES 4 15 | 16 | //--- op_poly_t : polytiplication 17 | typedef struct op_poly_struct { 18 | op_t super; 19 | io_t val; 20 | volatile io_t pitch; 21 | volatile io_t amp; 22 | volatile io_t off; 23 | volatile io_t mono; 24 | volatile io_t* in_val[4]; 25 | op_out_t outs[3]; 26 | poly_voice_t voice_pool[POLY_N_VOICES]; 27 | poly_voice_t *used_voices; 28 | poly_voice_t *unused_voices; 29 | u8 active_voices; 30 | } op_poly_t; 31 | 32 | void op_poly_init(void* poly); 33 | 34 | 35 | #endif // header guard 36 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_preset.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_OP_PRESET_H_ 2 | #define _ALEPH_BEES_OP_PRESET_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_sw_t : switch 9 | typedef struct op_preset_struct { 10 | op_t super; 11 | // inputs: 12 | // - set and load index 13 | // - set and store index 14 | // - get current index 15 | volatile io_t read, write; 16 | volatile io_t* in_val[2]; 17 | // outputs: 18 | // - current index 19 | // op_out_t outs[1]; 20 | } op_preset_t; 21 | 22 | void op_preset_init(void* preset); 23 | 24 | 25 | #endif // header guard 26 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_random.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_random_H_ 2 | #define _op_random_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | //--- op_add_t : addition 9 | typedef struct op_random_struct { 10 | op_t super; 11 | volatile io_t val; 12 | volatile io_t min; 13 | volatile io_t max; 14 | volatile io_t trig; 15 | volatile io_t seed; 16 | volatile io_t * in_val[4]; // min, max, trig, seed 17 | op_out_t outs[1]; 18 | 19 | u32 a,c,x; 20 | u16 range; 21 | u8 bitShift; 22 | } op_random_t; 23 | void op_random_init(void* mem); 24 | 25 | #endif // header guard 26 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_route.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_ROUTE_H_ 2 | #define _OP_ROUTE_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_split_t : switch (non-system) 9 | typedef struct op_route_struct { 10 | // superclass 11 | op_t super; 12 | // state variables / inputs 13 | volatile io_t val; 14 | volatile io_t to; 15 | // pointers for external access 16 | volatile io_t* in_val[2]; 17 | op_out_t outs[4]; 18 | } op_route_t; 19 | 20 | extern void op_route_init(void* split4); 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_route16.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_ROUTE16_H_ 2 | #define _OP_ROUTE16_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_split_t : switch (non-system) 9 | typedef struct op_route16_struct { 10 | // superclass 11 | op_t super; 12 | // state variables / inputs 13 | volatile io_t val; 14 | volatile io_t to; 15 | // pointers for external access 16 | volatile io_t* in_val[2]; 17 | op_out_t outs[16]; 18 | } op_route16_t; 19 | 20 | extern void op_route16_init(void* split4); 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_route8.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_ROUTE8_H_ 2 | #define _OP_ROUTE8_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_split_t : switch (non-system) 9 | typedef struct op_route8_struct { 10 | // superclass 11 | op_t super; 12 | // state variables / inputs 13 | volatile io_t val; 14 | volatile io_t to; 15 | // pointers for external access 16 | volatile io_t* in_val[2]; 17 | op_out_t outs[8]; 18 | } op_route8_t; 19 | 20 | extern void op_route8_init(void* split4); 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_serial.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_SERIAL_H_ 2 | #define _OP_SERIAL_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | #include "ser.h" 8 | 9 | extern void op_serial_init(void* op); 10 | extern void op_serial_deinit(void* op); 11 | 12 | void op_serial_out (op_serial_t* op, const io_t v); 13 | 14 | #endif // header guard 15 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_shl.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_shl_H_ 2 | #define _op_shl_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_mul_t : multiplication 9 | typedef struct op_shl_struct { 10 | op_t super; 11 | io_t val; 12 | volatile io_t a; 13 | volatile io_t b; 14 | volatile io_t btrig; 15 | volatile io_t* in_val[3]; // a, b, btrig 16 | op_out_t outs[1]; 17 | } op_shl_t; 18 | 19 | void op_shl_init(void* shl); 20 | 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_shr.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_shr_H_ 2 | #define _op_shr_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_mul_t : multiplication 9 | typedef struct op_shr_struct { 10 | op_t super; 11 | io_t val; 12 | volatile io_t a; 13 | volatile io_t b; 14 | volatile io_t btrig; 15 | volatile io_t* in_val[3]; // a, b, btrig 16 | op_out_t outs[1]; 17 | } op_shr_t; 18 | 19 | void op_shr_init(void* shr); 20 | 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_split.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_SPLIT_H_ 2 | #define _OP_SPLIT_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_split_t : switch (non-system) 9 | typedef struct op_split_struct { 10 | // superclass 11 | op_t super; 12 | // state variables / inputs 13 | volatile io_t val; 14 | // pointers for external access 15 | volatile io_t* in_val[1]; 16 | op_out_t outs[2]; 17 | } op_split_t; 18 | 19 | extern void op_split_init(void* split); 20 | 21 | #endif // header guard 22 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_split4.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_SPLIT4_H_ 2 | #define _OP_SPLIT4_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_split_t : switch (non-system) 9 | typedef struct op_split4_struct { 10 | // superclass 11 | op_t super; 12 | // state variables / inputs 13 | volatile io_t val; 14 | // pointers for external access 15 | volatile io_t* in_val[1]; 16 | op_out_t outs[4]; 17 | } op_split4_t; 18 | 19 | extern void op_split4_init(void* split4); 20 | 21 | #endif // header guard 22 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_step.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEES_OP_STEP_H_ 2 | #define _ALEPH_BEES_OP_STEP_H_ 3 | 4 | #include "net_monome.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | #include "types.h" 8 | 9 | //--- op_step : monome grid as a step sequencer 10 | typedef struct op_step_struct { 11 | op_t super; 12 | op_monome_t monome; 13 | // inputs: mode, focus, step 14 | volatile io_t focus; 15 | volatile io_t size; 16 | volatile io_t* in_val[3]; 17 | // outputs: a,b,c,d 18 | op_out_t outs[8]; 19 | // internal: 20 | s8 s_start, s_end, s_length, s_now, s_cut; 21 | s8 s_start2, s_end2, s_length2, s_now2, s_cut2; 22 | u8 steps[4][16]; 23 | } op_step_t; 24 | 25 | // init 26 | void op_step_init(void* op); 27 | // de-init 28 | void op_step_deinit(void* op); 29 | 30 | #endif // header guard 31 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_sub.h: -------------------------------------------------------------------------------- 1 | #ifndef _op_sub_H_ 2 | #define _op_sub_H_ 3 | 4 | #include "types.h" 5 | #include "op.h" 6 | #include "op_math.h" 7 | 8 | //--- op_sub_t : subtraction 9 | typedef struct op_sub_struct { 10 | op_t super; 11 | // state 12 | volatile io_t val; 13 | //inputs: 14 | volatile io_t a; 15 | volatile io_t b; 16 | volatile io_t btrig; 17 | volatile io_t * in_val[3]; // a, b, btrig 18 | op_out_t outs[1]; 19 | } op_sub_t; 20 | void op_sub_init(void* mem); 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_sw.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_SW_H_ 2 | #define _OP_SW_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_sw_t : switch 9 | typedef struct op_sw_struct { 10 | // superclass 11 | op_t super; 12 | // state variables 13 | volatile io_t state; 14 | volatile io_t mul; 15 | volatile io_t tog; 16 | // pointers for external access 17 | volatile io_t* in_val[3]; 18 | op_out_t outs[1]; 19 | } op_sw_t; 20 | 21 | extern void op_sw_init(void* sw); 22 | 23 | // handle input from system 24 | extern void op_sw_sys_input(op_sw_t* sw, u8 val); 25 | 26 | #endif // header guard 27 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_thresh.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_THRESH_H_ 2 | #define _OP_THRESH_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_thresh_t : threshitch 9 | typedef struct op_thresh_struct { 10 | // superclass 11 | op_t super; 12 | // state variables 13 | volatile io_t state; 14 | volatile io_t lim; 15 | // pointers for external access 16 | volatile io_t* in_val[2]; 17 | // outs: hi, lo 18 | op_out_t outs[2]; 19 | } op_thresh_t; 20 | 21 | extern void op_thresh_init(void* thresh); 22 | 23 | // handle input from system 24 | extern void op_thresh_sys_input(op_thresh_t* thresh, u8 val); 25 | 26 | #endif // header guard 27 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_timer.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_TIMER_H_ 2 | #define _OP_TIMER_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_timer_t : event timer 9 | typedef struct op_timer_struct { 10 | // superclass 11 | op_t super; 12 | // ---- input state 13 | // event to be timed 14 | volatile io_t event; 15 | volatile io_t reset; 16 | // ---- input access pointers 17 | volatile io_t* in_val[2]; 18 | // output: time 19 | op_out_t outs[1]; 20 | // last event ticks 21 | u32 ticks; 22 | } op_timer_t; 23 | 24 | extern void op_timer_init(void* timer); 25 | 26 | // handle input from system 27 | extern void op_timer_sys_input(op_timer_t* timer, u8 val); 28 | 29 | #endif // header guard 30 | -------------------------------------------------------------------------------- /apps/bees/src/ops/op_tog.h: -------------------------------------------------------------------------------- 1 | #ifndef _OP_TOG_H_ 2 | #define _OP_TOG_H_ 3 | 4 | #include "op.h" 5 | #include "op_math.h" 6 | #include "types.h" 7 | 8 | //--- op_tog_t : toggle (software switch) 9 | typedef struct op_tog_struct { 10 | // superclass 11 | op_t super; 12 | // state variables 13 | volatile io_t state; 14 | volatile io_t mul; 15 | // pointers for external access 16 | volatile io_t* in_val[2]; 17 | op_out_t outs[1]; 18 | } op_tog_t; 19 | 20 | extern void op_tog_init(void* tog); 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /apps/bees/src/pickle.h: -------------------------------------------------------------------------------- 1 | /* 2 | pickle.h 3 | 4 | utilities for object serialization. 5 | (force endianness) 6 | 7 | */ 8 | 9 | #ifndef _ALEPH_BEES_PICKLE_H_ 10 | #define _ALEPH_BEES_PICKLE_H_ 11 | 12 | #include "types.h" 13 | 14 | // 32-bit 15 | extern u8* pickle_32(const u32 src, u8* dst); 16 | extern const u8* unpickle_32(const u8* src, u32* dst); 17 | 18 | // 16-bit 19 | // ... probably never a great idea; 20 | /// seems more convenient to maintain 4-byte alignment. 21 | extern u8* pickle_16(const u16 src, u8* dst); 22 | extern const u8* unpickle_16(const u8* src, u16* dst); 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /apps/bees/src/play.h: -------------------------------------------------------------------------------- 1 | /* play.h 2 | bees 3 | aleph 4 | 5 | interface for play mode UI 6 | */ 7 | 8 | #ifndef _ALEPH_BEES_PLAY_H_ 9 | #define _ALEPH_BEES_PLAY_H_ 10 | 11 | #include "op.h" 12 | #include "param_common.h" 13 | 14 | 15 | // number of entries in the scroll 16 | #define PLAY_SCROLL_NUM 7 // CHAR_ROWS_1 17 | //#define PLAY_SCROLL_NUM__2 7 // CHAR_ROWS_1 18 | // length of each entry 19 | #define PLAY_STR_LEN 28 20 | // size of buffer (product) 21 | #define PLAY_SCROLL_BUF_LEN 196 22 | 23 | // init 24 | extern void play_init(void); 25 | // process input node 26 | extern void play_input(u16 idx); 27 | // process output node 28 | extern void play_output(op_t* op, u16 opOutIdx, io_t bang_value); 29 | // enable rendering (play modal page was selected) 30 | extern void play_enable_render(void); 31 | 32 | // process preset change 33 | extern void play_preset(u16 idx); 34 | 35 | #endif // h guard 36 | -------------------------------------------------------------------------------- /apps/bees/src/scalers/scaler_amp.h: -------------------------------------------------------------------------------- 1 | /* scaler for amplitude (attentuation only) 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_AMP_H_ 6 | #define _ALEPH_BEES_SCALER_AMP_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | EXTERN_C_BEGIN 12 | 13 | #define PARAM_SCALER_AMP_DATA_SIZE (1024 * 4 * 2) 14 | 15 | extern void scaler_amp_init(void* scaler); 16 | extern s32 scaler_amp_val(void* scaler, io_t in); 17 | extern void scaler_amp_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_amp_in(void* scaler, s32 val); 19 | extern s32 scaler_amp_inc(void* sc, io_t *pin, io_t inc ); 20 | EXTERN_C_END 21 | #endif 22 | -------------------------------------------------------------------------------- /apps/bees/src/scalers/scaler_bool.c: -------------------------------------------------------------------------------- 1 | // boolean parameter 2 | 3 | #include "print_funcs.h" 4 | 5 | #include "op_math.h" 6 | #include "scaler_bool.h" 7 | 8 | void scaler_bool_init(void* scaler) { 9 | ParamScaler* sc = (ParamScaler*)scaler; 10 | 11 | sc->inMin = 0; 12 | sc->inMax = 1; 13 | 14 | } 15 | 16 | s32 scaler_bool_val(void* scaler, io_t in) { 17 | return (in > 0); 18 | } 19 | 20 | void scaler_bool_str(char* dst, void* scaler, io_t in) { 21 | print_fix16(dst, in > 0 ? fix16_one : 0); 22 | } 23 | 24 | io_t scaler_bool_in(void* scaler, s32 val) { 25 | return (val > 0); 26 | } 27 | 28 | // increment input by pointer, return value 29 | s32 scaler_bool_inc(void* sc, io_t* pin, io_t inc ) { 30 | /* *pin = op_sadd(*pin, inc); */ 31 | /* return (*pin > 0); */ 32 | *pin = (inc > 0); 33 | return *pin; 34 | } 35 | -------------------------------------------------------------------------------- /apps/bees/src/scalers/scaler_bool.h: -------------------------------------------------------------------------------- 1 | /* scaler for boolean 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_BOOL_H_ 6 | #define _ALEPH_BEES_SCALER_BOOL_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | EXTERN_C_BEGIN 12 | 13 | #define PARAM_SCALER_BOOL_DATA_SIZE 0 14 | 15 | extern void scaler_bool_init(void* scaler); 16 | extern s32 scaler_bool_val(void* scaler, io_t in); 17 | extern void scaler_bool_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_bool_in(void* scaler, s32 val); 19 | extern s32 scaler_bool_inc(void* sc, io_t *pin, io_t inc ); 20 | EXTERN_C_END 21 | #endif 22 | -------------------------------------------------------------------------------- /apps/bees/src/scalers/scaler_fix.h: -------------------------------------------------------------------------------- 1 | /* scaler for 16.16 linear 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_FIX_H_ 6 | #define _ALEPH_BEES_SCALER_FIX_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | EXTERN_C_BEGIN 12 | 13 | #define PARAM_SCALER_FIX_DATA_SIZE 0 14 | 15 | extern void scaler_fix_init(void* scaler); 16 | extern s32 scaler_fix_val(void* scaler, io_t in); 17 | extern void scaler_fix_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_fix_in(void* scaler, s32 val); 19 | extern s32 scaler_fix_inc(void* sc, io_t *pin, io_t inc ); 20 | EXTERN_C_END 21 | #endif 22 | -------------------------------------------------------------------------------- /apps/bees/src/scalers/scaler_fract.h: -------------------------------------------------------------------------------- 1 | /* scaler for 1.31 fract 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_FRACT_H_ 6 | #define _ALEPH_BEES_SCALER_FRACT_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | EXTERN_C_BEGIN 12 | 13 | #define PARAM_SCALER_FRACT_DATA_SIZE 0 14 | 15 | extern void scaler_fract_init(void* scaler); 16 | extern s32 scaler_fract_val(void* scaler, io_t in); 17 | extern void scaler_fract_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_fract_in(void* scaler, s32 val); 19 | extern s32 scaler_fract_inc(void* sc, io_t *pin, io_t inc ); 20 | EXTERN_C_END 21 | #endif 22 | -------------------------------------------------------------------------------- /apps/bees/src/scalers/scaler_integrator.h: -------------------------------------------------------------------------------- 1 | /* scaler for 1-pole integrator, decay time 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_INTEGRATOR_H_ 6 | #define _ALEPH_BEES_SCALER_INTEGRATOR_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | EXTERN_C_BEGIN 12 | 13 | //#define PARAM_SCALER_INTEGRATOR_DATA_SIZE (1024 * 4 * 2) 14 | #define PARAM_SCALER_INTEGRATOR_DATA_SIZE (1024 * 4) 15 | 16 | extern void scaler_integrator_init(void* scaler); 17 | extern s32 scaler_integrator_val(void* scaler, io_t in); 18 | extern void scaler_integrator_str(char* dst, void* scaler, io_t in); 19 | extern io_t scaler_integrator_in(void* scaler, s32 val); 20 | extern s32 scaler_integrator_inc(void* sc, io_t *pin, io_t inc ); 21 | EXTERN_C_END 22 | #endif 23 | -------------------------------------------------------------------------------- /apps/bees/src/scalers/scaler_integrator_short.h: -------------------------------------------------------------------------------- 1 | /* scaler for 1-pole 16b integrator, decay time 2 | 3 | */ 4 | #ifndef _ALEPH_BEES_SCALER_INTEGRATOR_SHORT_H_ 5 | #define _ALEPH_BEES_SCALER_INTEGRATOR_SHORT_H_ 6 | 7 | 8 | #include "param_scaler.h" 9 | #include "types.h" 10 | EXTERN_C_BEGIN 11 | 12 | //#define PARAM_SCALER_INTEGRATOR_SHORT_DATA_SIZE (1024 * 4 * 2) 13 | #define PARAM_SCALER_INTEGRATOR_SHORT_DATA_SIZE (1024 * 4) 14 | 15 | extern void scaler_integrator_short_init(void* scaler); 16 | extern s32 scaler_integrator_short_val(void* scaler, io_t in); 17 | extern void scaler_integrator_short_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_integrator_short_in(void* scaler, s32 val); 19 | extern s32 scaler_integrator_short_inc(void* sc, io_t *pin, io_t inc ); 20 | EXTERN_C_END 21 | #endif // h guard 22 | -------------------------------------------------------------------------------- /apps/bees/src/scalers/scaler_label.h: -------------------------------------------------------------------------------- 1 | /* scaler for patch matrix 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_PATCH_H_ 6 | #define _ALEPH_BEES_SCALER_PATCH_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | EXTERN_C_BEGIN 12 | 13 | #define PARAM_SCALER_PATCH_DATA_SIZE (1024 * 4 * 2) 14 | 15 | extern void scaler_start_parse_labels (void); 16 | extern void scaler_parse_labels_char (char c); 17 | extern void scaler_labels_init(void* scaler); 18 | extern s32 scaler_labels_val(void* scaler, io_t in); 19 | extern void scaler_labels_str(char* dst, void* scaler, io_t in); 20 | extern io_t scaler_labels_in(void* scaler, s32 val); 21 | extern s32 scaler_labels_inc(void* sc, io_t *pin, io_t inc ); 22 | 23 | #define MAX_LABELS 64 24 | #define LABEL_LENGTH 64 25 | 26 | extern char scaler_labels[MAX_LABELS][LABEL_LENGTH]; 27 | extern int scaler_n_labels; 28 | 29 | EXTERN_C_END 30 | #endif 31 | -------------------------------------------------------------------------------- /apps/bees/src/scalers/scaler_note.h: -------------------------------------------------------------------------------- 1 | /* scaler for midi note + 8-step micro 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_NOTE_H_ 6 | #define _ALEPH_BEES_SCALER_NOTE_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | EXTERN_C_BEGIN 12 | 13 | #define PARAM_SCALER_NOTE_DATA_SIZE (1024 * 4) 14 | 15 | extern void scaler_note_init(void* scaler); 16 | extern s32 scaler_note_val(void* scaler, io_t in); 17 | extern void scaler_note_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_note_in(void* scaler, s32 val); 19 | extern s32 scaler_note_inc(void* sc, io_t *pin, io_t inc ); 20 | EXTERN_C_END 21 | #endif 22 | -------------------------------------------------------------------------------- /apps/bees/src/scalers/scaler_short.h: -------------------------------------------------------------------------------- 1 | /* scaler for 16b signed integer 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_SHORT_H_ 6 | #define _ALEPH_BEES_SCALER_SHORT_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | EXTERN_C_BEGIN 12 | 13 | #define PARAM_SCALER_SHORT_DATA_SIZE 0 14 | 15 | extern void scaler_short_init(void* scaler); 16 | extern s32 scaler_short_val(void* scaler, io_t in); 17 | extern void scaler_short_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_short_in(void* scaler, s32 val); 19 | extern s32 scaler_short_inc(void* sc, io_t *pin, io_t inc ); 20 | EXTERN_C_END 21 | #endif 22 | -------------------------------------------------------------------------------- /apps/bees/src/scalers/scaler_svf_fc.h: -------------------------------------------------------------------------------- 1 | /* scaler for svf corner frequency (as midi note) 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_SVF_FC_H_ 6 | #define _ALEPH_BEES_SCALER_SVF_FC_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | EXTERN_C_BEGIN 12 | 13 | #define PARAM_SCALER_SVF_FC_DATA_SIZE (1024 * 4) 14 | 15 | extern void scaler_svf_fc_init(void* scaler); 16 | extern s32 scaler_svf_fc_val(void* scaler, io_t in); 17 | extern void scaler_svf_fc_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_svf_fc_in(void* scaler, s32 val); 19 | extern s32 scaler_svf_fc_inc(void* sc, io_t *pin, io_t inc ); 20 | EXTERN_C_END 21 | #endif 22 | -------------------------------------------------------------------------------- /apps/bees/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 8 3 | rev = 1 4 | -------------------------------------------------------------------------------- /apps/mix/config.mk: -------------------------------------------------------------------------------- 1 | # --- config.mk 2 | # 3 | # --- customized makefile for aleph-avr32 application. 4 | # --- this is included via the ASF utility makefile. 5 | 6 | # app name 7 | APP = mix 8 | 9 | # baudrate! can override in make invocation 10 | BAUD = 115200 11 | 12 | # avr32 configuration 13 | include ../aleph_avr32_config.mk 14 | # avr32 sources 15 | include ../aleph_avr32_src.mk 16 | 17 | # app sources 18 | CSRCS += \ 19 | $(APP_DIR)/src/app_mix.c \ 20 | $(APP_DIR)/src/app_timers.c \ 21 | $(APP_DIR)/src/ctl.c \ 22 | $(APP_DIR)/src/handler.c \ 23 | $(APP_DIR)/src/render.c \ 24 | $(APP_DIR)/src/scaler.c 25 | 26 | # List of assembler source files. 27 | ASSRCS += 28 | 29 | # List of include paths. 30 | INC_PATH += \ 31 | $(APP_DIR) \ 32 | $(APP_DIR)/src \ 33 | $(APP_DIR)/../../../avr32-toolchain-linux/include 34 | -------------------------------------------------------------------------------- /apps/mix/src/aleph-mix.ldr_size.inc: -------------------------------------------------------------------------------- 1 | 10858 -------------------------------------------------------------------------------- /apps/mix/src/app_timers.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_AVR32_APP_TIMERS_H_ 2 | #define _ALEPH_AVR32_APP_TIMERS_H_ 3 | 4 | #include "timers.h" 5 | #include "types.h" 6 | 7 | // create application timers 8 | extern void init_app_timers(void); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /apps/mix/src/handler.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_APP_BEES_HANDLER_H_ 2 | #define _ALEPH_APP_BEES_HANDLER_H_ 3 | 4 | #include "app.h" 5 | #include "types.h" 6 | 7 | // assign ui handlers 8 | extern void assign_event_handlers(void); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /apps/mix/src/render.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_APP_MIX_RENDER_H_ 2 | #define _ALEPH_APP_MIX_RENDER_H_ 3 | 4 | 5 | // init 6 | extern void render_init(void); 7 | 8 | // startup state 9 | extern void render_startup(void); 10 | 11 | // render a channel 12 | extern void render_chan(u8 ch); 13 | 14 | // update 15 | extern void render_update(void); 16 | 17 | #endif // h guard 18 | -------------------------------------------------------------------------------- /apps/mix/src/scaler.h: -------------------------------------------------------------------------------- 1 | /* 2 | scaler.h 3 | aleph/apps/mix 4 | 5 | input scaling functions. 6 | 7 | */ 8 | 9 | #ifndef _ALEPH_APP_MIX_SCALER_H_ 10 | #define _ALEPH_APP_MIX_SCALER_H_ 11 | 12 | #include "types.h" 13 | 14 | // define input ranges for our level control. 15 | extern const s32 minLevelInput; 16 | extern const s32 maxLevelInput; 17 | // lookup a level control value. 18 | // return both linear and decibel representations, by pointer 19 | extern void scale_level(s32 val, s32* resAmp, s32* resDb); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /apps/mix/version.mk: -------------------------------------------------------------------------------- 1 | maj=0 2 | min=0 3 | rev=0 -------------------------------------------------------------------------------- /apps/picolisp/src/app_timers.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_AVR32_APP_TIMERS_H_ 2 | #define _ALEPH_AVR32_APP_TIMERS_H_ 3 | 4 | #include "timers.h" 5 | #include "types.h" 6 | 7 | // create application timers 8 | extern void init_app_timers(void); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /apps/picolisp/src/handler.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_APP_BEES_HANDLER_H_ 2 | #define _ALEPH_APP_BEES_HANDLER_H_ 3 | 4 | #include "app.h" 5 | #include "types.h" 6 | 7 | // assign ui handlers 8 | extern void assign_event_handlers(void); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /apps/picolisp/src/platform_picolisp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __PLATFORM_PICOLISP_H__ 3 | #define __PLATFORM_PICOLISP_H__ 4 | 5 | #include "picolisp_mod.h" 6 | 7 | // Define all picoLisp specific platform 8 | // components here. 9 | 10 | #define PICOLISP_TARGET_SPECIFIC_PROTOS 11 | 12 | #define PICOLISP_PROTO(fname)\ 13 | any fname(any x); 14 | 15 | #define PICOLISP_TARGET_SPECIFIC_LIBS 16 | 17 | #endif // #ifndef __PLATFORM_PICOLISP_H__ 18 | -------------------------------------------------------------------------------- /apps/picolisp/src/render.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_APP_MIX_RENDER_H_ 2 | #define _ALEPH_APP_MIX_RENDER_H_ 3 | 4 | 5 | // init 6 | extern void render_init(void); 7 | 8 | // startup state 9 | extern void render_startup(void); 10 | 11 | // render a channel 12 | extern void render_chan(u8 ch); 13 | 14 | // update 15 | extern void render_update(void); 16 | 17 | #endif // h guard 18 | -------------------------------------------------------------------------------- /apps/picolisp/src/ser.h: -------------------------------------------------------------------------------- 1 | #ifndef _SER_H_ 2 | #define _SER_H_ 3 | #include "types.h" 4 | 5 | void recv_char (char c); 6 | 7 | char serialInputLineBuffer[1024]; 8 | char serialOutputLineBuffer[1024]; 9 | int serialInputLineBufferPos; 10 | void handle_Serial (s32 data); 11 | #endif // header guard 12 | -------------------------------------------------------------------------------- /apps/picolisp/version.mk: -------------------------------------------------------------------------------- 1 | maj=0 2 | min=0 3 | rev=0 -------------------------------------------------------------------------------- /apps/readme.txt: -------------------------------------------------------------------------------- 1 | this is the avr32 apps folder. 2 | 3 | each app can implement a specialized UI on the avr32. 4 | 5 | aleph/avr32_lib/src contains modules for handling most lower-level functions. 6 | 7 | include and/or copy at will. 8 | -------------------------------------------------------------------------------- /avr32/src/adc_poll.c: -------------------------------------------------------------------------------- 1 | // libavr32 2 | #include "adc.h" 3 | 4 | #include "adc_poll.h" 5 | #include "events.h" 6 | 7 | // adc events 8 | static const etype adctypes[4] = { 9 | kEventAdc0 , 10 | kEventAdc1 , 11 | kEventAdc2 , 12 | kEventAdc3 , 13 | }; 14 | 15 | // poll all ADC channels and store the data 16 | void adc_poll() { 17 | 18 | static u16 adcVal[4] = {0, 0, 0, 0}; 19 | static event_t e; 20 | u8 i; 21 | 22 | adc_convert(&adcVal); 23 | 24 | /// test with no filtering.. maybe this is fine 25 | for(i=0; i<4; i++) { 26 | e.type = adctypes[i]; 27 | e.data = (S16)(adcVal[i]); 28 | event_post(&e); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /avr32/src/adc_poll.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_AVR32_ADC_POLL_H_ 2 | #define _ALEPH_AVR32_ADC_POLL_H_ 3 | 4 | #include "types.h" 5 | 6 | // poll all ADC channels, spawn events 7 | extern void adc_poll(void); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /avr32/src/control.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "print_funcs.h" 4 | 5 | #include "bfin.h" 6 | #include "control.h" 7 | #include "delay.h" 8 | 9 | // request a parameter change. 10 | extern u8 ctl_param_change(u32 idx, u32 val) { 11 | bfin_wait_ready(); 12 | delay_us(50); 13 | bfin_set_param(idx, val); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /avr32/src/control.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | control.h 4 | avr32 5 | aleph 6 | 7 | FIXME: 8 | duplicating param change queue from the blackfin. 9 | this is decidedly sub-optimal but lets get things working. 10 | 11 | parameter changes are stored in a set structure. 12 | maximum one request per parameter enters the queue 13 | 14 | */ 15 | 16 | #ifndef _ALEPH_BFIN_CONTROL_H_ 17 | #define _ALEPH_BFIN_CONTROL_H_ 18 | 19 | //#include "module_custom.h" 20 | #include "param_common.h" 21 | #include "types.h" 22 | 23 | //--------------------------------------------- 24 | //---- definitions / types 25 | 26 | // add param change to buffer 27 | /// FIXME: uh will this work for params < 0 ? 28 | extern u8 ctl_param_change(u32 param, u32 value); 29 | 30 | #endif // h guard 31 | -------------------------------------------------------------------------------- /avr32/src/debug.h: -------------------------------------------------------------------------------- 1 | #if RELEASEBUILD==1 2 | 3 | #define print_dbg(blahblah) ;; 4 | #define print_dbg_char(blahblah) ;; 5 | #define print_dbg_ulong(blahblah) ;; 6 | #define print_dbg_char_hex(blahblah) ;; 7 | #define print_dbg_short_hex(blahblah) ;; 8 | #define print_dbg_hex(blahblah) ;; 9 | 10 | #else 11 | 12 | #include "print_funcs.h" 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /avr32/src/fat_io_lib/API.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/avr32/src/fat_io_lib/API.txt -------------------------------------------------------------------------------- /avr32/src/fat_io_lib/History.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/avr32/src/fat_io_lib/History.txt -------------------------------------------------------------------------------- /avr32/src/fat_io_lib/License.txt: -------------------------------------------------------------------------------- 1 | FAT File IO Library License 2 | -=-=-=-=-=-=-=-=-=-=-=-=-=- 3 | 4 | This versions license: GPL 5 | 6 | If you include GPL software in your project, you must release the source code of that project too. 7 | 8 | If you would like a version with a more permissive license for use in closed source commercial applications please contact me for details. 9 | 10 | Email: admin@ultra-embedded.com 11 | -------------------------------------------------------------------------------- /avr32/src/fat_io_lib/fat_cache.h: -------------------------------------------------------------------------------- 1 | #ifndef __FAT_CACHE_H__ 2 | #define __FAT_CACHE_H__ 3 | 4 | #include "fat_filelib.h" 5 | 6 | //----------------------------------------------------------------------------- 7 | // Prototypes 8 | //----------------------------------------------------------------------------- 9 | int fatfs_cache_init(struct fatfs *fs, FL_FILE *file); 10 | int fatfs_cache_get_next_cluster(struct fatfs *fs, FL_FILE *file, 11 | uint32 clusterIdx, uint32 *pNextCluster); 12 | int fatfs_cache_set_next_cluster(struct fatfs *fs, FL_FILE *file, 13 | uint32 clusterIdx, uint32 nextCluster); 14 | 15 | #endif -------------------------------------------------------------------------------- /avr32/src/fat_io_lib/fat_format.h: -------------------------------------------------------------------------------- 1 | #ifndef __FAT_FORMAT_H__ 2 | #define __FAT_FORMAT_H__ 3 | 4 | #include "fat_defs.h" 5 | #include "fat_opts.h" 6 | #include "fat_access.h" 7 | 8 | //----------------------------------------------------------------------------- 9 | // Prototypes 10 | //----------------------------------------------------------------------------- 11 | int fatfs_format_fat16(struct fatfs *fs, uint32 volume_sectors, 12 | const char *name); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /avr32/src/fat_io_lib/fat_string.h: -------------------------------------------------------------------------------- 1 | #ifndef __FILESTRING_H__ 2 | #define __FILESTRING_H__ 3 | 4 | //----------------------------------------------------------------------------- 5 | // Prototypes 6 | //----------------------------------------------------------------------------- 7 | int fatfs_total_path_levels(char* path); 8 | int fatfs_get_substring(char* Path, int levelreq, char* output, int max_len); 9 | int fatfs_split_path(char* FullPath, char* Path, int max_path, char* FileName, 10 | int max_filename); 11 | int fatfs_compare_names(char* strA, char* strB); 12 | int fatfs_string_ends_with_slash(char* path); 13 | int fatfs_get_sfn_display_name(char* out, char* in); 14 | int fatfs_get_extension(char* filename, char* out, int maxlen); 15 | int fatfs_create_path_string(char* path, char* filename, char* out, int maxlen); 16 | 17 | #ifndef NULL 18 | #define NULL 0 19 | #endif 20 | 21 | #endif -------------------------------------------------------------------------------- /avr32/src/fat_io_lib/fat_write.h: -------------------------------------------------------------------------------- 1 | #ifndef __FAT_WRITE_H__ 2 | #define __FAT_WRITE_H__ 3 | 4 | #include "fat_defs.h" 5 | #include "fat_opts.h" 6 | 7 | //----------------------------------------------------------------------------- 8 | // Prototypes 9 | //----------------------------------------------------------------------------- 10 | int fatfs_add_file_entry(struct fatfs *fs, uint32 dirCluster, char *filename, 11 | char *shortfilename, uint32 startCluster, uint32 size, 12 | int dir); 13 | int fatfs_add_free_space(struct fatfs *fs, uint32 *startCluster, 14 | uint32 clusters); 15 | int fatfs_allocate_free_space(struct fatfs *fs, int newFile, 16 | uint32 *startCluster, uint32 size); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /avr32/src/fat_io_lib/version.txt: -------------------------------------------------------------------------------- 1 | 2.6.8 2 | -------------------------------------------------------------------------------- /avr32/src/filesystem.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_AVR32_FILESYSTEM_H_ 2 | #define _ALEPH_AVR32_FILESYSTEM_H_ 3 | 4 | #include "types.h" 5 | #include "fat_filelib.h" 6 | 7 | #define FS_BUF_SIZE 512 8 | 9 | //===================================== 10 | //==== vars 11 | // transfer-done flag 12 | extern volatile u8 fsEndTransfer; 13 | // Local RAM buffer to store data to/from the SD/MMC card 14 | extern volatile U8 pdcaRxBuf[FS_BUF_SIZE]; 15 | extern volatile U8 pdcaTxBuf[FS_BUF_SIZE]; 16 | // PDCA rx and tx channels 17 | extern volatile avr32_pdca_channel_t* pdcaRxChan; 18 | extern volatile avr32_pdca_channel_t* pdcaTxChan; 19 | 20 | //==================================== 21 | //==== funcs 22 | extern int fat_init(void); 23 | 24 | #endif // h guard 25 | -------------------------------------------------------------------------------- /avr32/src/font_aa.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_AVR32_FONT_AA_H_ 2 | #define _ALEPH_AVR32_FONT_AA_H_ 3 | 4 | #include "types.h" 5 | 6 | 7 | // render an anti-aliased (4-bit) glyph to a buffer 8 | // arguments are character, buffer, target row size, invert flag 9 | extern u8* font_glyph_aa(char ch, u8* buf, u8 w, u8 invert); 10 | 11 | // render a string of ant-aliased glyphs to a buffer 12 | extern u8* font_string_aa(const char* str, u8* buf, u32 size, u8 w, u8 invert); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /avr32/src/fonts/dejavu_numerals_24.h: -------------------------------------------------------------------------------- 1 | /* font: 2 | deja vu monospave bold, 24px bounds, (30px font height i believe) 3 | 4 | */ 5 | 6 | // for sanity's sake, width and height are preserved from the .xpm file. 7 | // let's hardcode these rather than actually accessing them from memory though. 8 | 9 | #ifndef _FONT_DEJAVU_24_H_ 10 | #define _FONT_DEJAVU_24_H_ 11 | 12 | #define FONT_DEJAVU_W 18 13 | #define FONT_DEJAVU_H 24 14 | 15 | // datatype for font glyph. 16 | typedef union { 17 | struct { 18 | char w; 19 | char h; 20 | char data[432]; 21 | } glyph; 22 | char raw[434]; 23 | } dejavu_24_glyph; 24 | 25 | // table of glyphs in this font 26 | extern const dejavu_24_glyph font_dejavu_24_numerals[11]; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /avr32/src/fonts/ume_tgo5_18.h: -------------------------------------------------------------------------------- 1 | /* 2 | font: 3 | ume gothic monospace O 5 4 | 18px, 22x18 bounds 5 | */ 6 | 7 | #ifndef _FONT_UME_TGO5_18_H_ 8 | #define _FONT_UME_TGO5_18_H_ 9 | 10 | #define FONT_UME_TGO5_18_W 9 11 | #define FONT_UME_TGO5_18_H 19 12 | 13 | #define FONT_UME_TG05_18_NGLYPHS 93 14 | 15 | // datatype for font glyph. 16 | typedef union { 17 | struct { 18 | char w; 19 | char h; 20 | char data[171]; 21 | } glyph; 22 | char raw[173]; 23 | } ume_tgo5_18_glyph; 24 | 25 | // table of glyphs in this font 26 | extern const ume_tgo5_18_glyph font_ume_tgo5_18[FONT_UME_TG05_18_NGLYPHS]; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /avr32/src/global.h: -------------------------------------------------------------------------------- 1 | /* global.h 2 | aleph-avr32 3 | 4 | global application variables. 5 | mostly initialized in interrupts.c 6 | where first used. 7 | */ 8 | 9 | #ifndef _GLOBAL_H_ 10 | #define _GLOBAL_H_ 11 | 12 | #include "types.h" 13 | //#include "net_protected.h" 14 | // extern extlnet_t* ctlnet; 15 | 16 | //---- global buffers 17 | 18 | // RAM buffer for blackfin firmware 19 | extern volatile u8* bfinLdrData; 20 | // size of bfin firmware 21 | extern volatile u32 bfinLdrSize; 22 | 23 | // app timer tick counter 24 | extern volatile U64 tcTicks; 25 | // screen refresh flag 26 | extern volatile U8 refresh; 27 | // current encoder values 28 | extern S32 encVal[4]; 29 | 30 | // FTDI connection flag 31 | extern u8 ftdiPlug; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /avr32/src/init.h: -------------------------------------------------------------------------------- 1 | /* init.h 2 | aleph-avr32 3 | 4 | low-level peripheral initialization. 5 | */ 6 | 7 | #ifndef _INIT_H_ 8 | #define _INIT_H_ 9 | 10 | // initialize clocks 11 | // extern void init_clocks(void); 12 | 13 | // initialize blackfin SPI and GPIPO 14 | extern void init_bfin_resources(void); 15 | // initialize USART 16 | extern void init_ftdi_usart(void); 17 | // initialize other GPIO 18 | extern void init_gpio(void); 19 | // initialize PDCA for sdcard 20 | extern void init_local_pdca(void); 21 | // initialize spi1 (oled / adc / sdcard) 22 | extern void init_spi1(void); 23 | // initialize application timer 24 | extern void init_tc(void); 25 | // intialize two-wire interface 26 | extern void init_twi(void); 27 | // initialize SPI and GPIO for sdcard 28 | extern void init_sd_mmc_resources(void); 29 | // initialize USB host stack 30 | void init_usb_host(void); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /avr32/src/interrupts.h: -------------------------------------------------------------------------------- 1 | #ifndef _INTERRUPTS_H_ 2 | #define _INTERRUPTS_H_ 3 | 4 | // global count of uptime, and overflow flag. 5 | extern volatile u64 tcTicks; 6 | extern volatile u8 tcOverflow; 7 | 8 | extern void register_interrupts(void); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /avr32/src/memory.h: -------------------------------------------------------------------------------- 1 | /* memory.h 2 | avr32 3 | aleph 4 | 5 | a custom interface to allocate external SDRAM 6 | mapped to malloc/free now that the heap == SDRAM 7 | */ 8 | 9 | #ifndef _ALEPH_MEM_H_ 10 | #define _ALEPH_MEM_H_ 11 | 12 | #include "types.h" 13 | 14 | #define ALLOC_FAIL 0xffffffff 15 | 16 | // heap memory type 17 | typedef volatile u8* heap_t; 18 | 19 | // setup heap 20 | extern void init_mem(void); 21 | // allocate and return pointer 22 | extern heap_t alloc_mem(u32 bytes); 23 | // free pointer 24 | extern void free_mem(heap_t); 25 | // test sram 26 | extern void sram_test(u32 sizeDiv, u32 offset); 27 | extern void test_malloc(void); 28 | #endif 29 | -------------------------------------------------------------------------------- /avr32/src/region_extra.c: -------------------------------------------------------------------------------- 1 | #include "region_extra.h" 2 | #include "font.h" 3 | #include "font_aa.h" 4 | 5 | // render a string to a region using the default anti-aliased font. 6 | void region_string_aa( 7 | region* reg, // region 8 | const char* str,// string 9 | u8 x, u8 y, // offset 10 | u8 inv ) // inversion flag 11 | 12 | { 13 | font_string_aa(str, reg->data + (u32)reg->w * (u32)y + (u32)x, reg->len, reg->w, inv); 14 | reg->dirty = 1; 15 | } 16 | -------------------------------------------------------------------------------- /avr32/src/region_extra.h: -------------------------------------------------------------------------------- 1 | // additional region-drawing methods, missing from libavr32 2 | 3 | #ifndef _ALEPH_AVR32_REGION_EXTRA_H_ 4 | #define _ALEPH_AVR32_REGION_EXTRA_H_ 5 | 6 | #include "region.h" 7 | 8 | // render a string to a region using the default anti-aliased font. 9 | extern void region_string_aa( 10 | region* reg, // region 11 | const char* str,// string 12 | u8 x, u8 y, // offset 13 | u8 inv ); // inversion flag 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /avr32/src/screen_startup.c: -------------------------------------------------------------------------------- 1 | #include "screen_startup.h" 2 | 3 | void screen_startup(void) { 4 | u32 i; 5 | 6 | #include "startup_glyph.c" 7 | 8 | // fill screenbuffer with solid background 9 | for (i = 0; i < GRAM_BYTES; i++) { screenBuf[i] = 0; } 10 | 11 | spi_selectChip(OLED_SPI, OLED_SPI_NPCS); 12 | gpio_set_gpio_pin(OLED_REGISTER_PIN); 13 | for (i = 0; i < GRAM_BYTES; i++) { spi_write(OLED_SPI, screenBuf[i]); } 14 | 15 | spi_unselectChip(OLED_SPI, OLED_SPI_NPCS); 16 | 17 | /// draw the glyph 18 | screen_draw_region(128 - 24 - 1, 64 - 32 - 1, 24, 32, 19 | (u8*)aleph_hebrew_glyph); 20 | } 21 | -------------------------------------------------------------------------------- /avr32/src/screen_startup.h: -------------------------------------------------------------------------------- 1 | #ifndef ALEPH_SCREEN_STARTUP_H_ 2 | #define ALEPH_SCREEN_STARTUP_H_ 3 | 4 | #endif 5 | -------------------------------------------------------------------------------- /avr32/src/simple_string.c: -------------------------------------------------------------------------------- 1 | #include "simple_string.h" 2 | 3 | #define SMPSTR_MAX_LEN 256 4 | 5 | // copy with length arg (-1 == until null terminator, no bounds check) 6 | void str_copy(char* dst, const char* src, s8 len) { 7 | u8 i = 0; 8 | if (len < 0) { 9 | while (i < SMPSTR_MAX_LEN) { 10 | if (src[i] == 0) { break; } 11 | dst[i] = src[i]; 12 | i++; 13 | } 14 | } else { 15 | while (i < len) { 16 | dst[i] = src[i]; 17 | i++; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /avr32/src/simple_string.h: -------------------------------------------------------------------------------- 1 | #ifndef _SIMPLE_STRING_H_ 2 | #define _SIMPLE_STRING_H_ 3 | 4 | #include "types.h" 5 | 6 | // copy whole string 7 | // extern void str_copy(const char* src, char * dst); 8 | // copy with length arg (-1 == until null terminator) 9 | extern void str_copy(char* dst, const char* src, s8 len); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /avr32/src/switches.h: -------------------------------------------------------------------------------- 1 | /* switches.h 2 | * aleph 3 | */ 4 | 5 | #ifndef _SWITCHES_H_ 6 | #define _SWITCHES_H_ 7 | 8 | #include "compiler.h" 9 | #include "events.h" 10 | 11 | #define NUM_SW 8 12 | 13 | // generate events from switch interrupts 14 | extern void process_sw(const U8 swIdx); 15 | // initialize switch debouncing 16 | extern void init_switches(void); 17 | 18 | #endif // header guard 19 | -------------------------------------------------------------------------------- /bfin_lib/obj/dummy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/bfin_lib/obj/dummy -------------------------------------------------------------------------------- /bfin_lib/src/cv.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BFIN_DAC_H_ 2 | #define _ALEPH_BFIN_DAC_H_ 3 | 4 | #include "bfin_core.h" 5 | 6 | #define CV_DAC_VALUE_MASK 0xffff 7 | 8 | // initialize CV dac 9 | extern void init_cv(void); 10 | 11 | // update given CV channel. 12 | // input is assumed to be in [0, 0x7fffffff] 13 | extern void cv_update(u8 ch, fract32 val); 14 | 15 | #endif // h guard 16 | -------------------------------------------------------------------------------- /bfin_lib/src/isr.h: -------------------------------------------------------------------------------- 1 | /* isr.h* 2 | * aleph-blackfin audio core 3 | * 4 | * function prototypes for interrupt service routines 5 | */ 6 | 7 | #ifndef _ALEPH_BFIN_ISR_H_ 8 | #define _ALEPH_BFIN_ISR_H_ 9 | 10 | // sport0 receive interrupt (ad1836) 11 | void sport0_rx_isr() __attribute((interrupt_handler)); 12 | // sport1 transmit interrupt (ad5686R) 13 | void sport1_tx_isr() __attribute((interrupt_handler)); 14 | 15 | // spi data receive interrupt (avr32) 16 | void spi_rx_isr() __attribute__((interrupt_handler)); 17 | // programmable flag interrupt (buttons) 18 | void pf_isr() __attribute__((interrupt_handler)); 19 | 20 | #endif // header guard 21 | -------------------------------------------------------------------------------- /bfin_lib/src/libfixmath/fix16_fract.h: -------------------------------------------------------------------------------- 1 | #ifndef __fix16_fract_h__ 2 | #define __fix16_fract_h__ 3 | 4 | /* #include "types.h" */ 5 | #include "fix.h" 6 | #include "fract_math.h" 7 | 8 | 9 | static inline fix16 fix16_mul_fract(fix16 a, fix16 b) { 10 | u8 a_radix = norm_fr1x32(a); 11 | u8 b_radix = norm_fr1x32(b); 12 | return shl_fr1x32(mult_fr1x32x32(shl_fr1x32(a, a_radix), 13 | shl_fr1x32(b, b_radix)), 14 | 15 - a_radix - b_radix); 15 | } 16 | 17 | static inline fix16 fix16_mul_fract_radix(fix16 a, fix16 b, u8 r) { 18 | return shl_fr1x32(mult_fr1x32x32(shl_fr1x32(a, r), 19 | shl_fr1x32(b, r)), 20 | 15 - r - r); 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /bfin_lib/src/libfixmath/fix32.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_FIX32_H_ 2 | #define _ALEPH_FIX32_H_ 3 | 4 | 5 | #ifdef ARCH_BFIN // bfin 6 | #include "fract.h" 7 | #include "fract_math.h" 8 | #include 9 | #else // linux 10 | #include "fract32_emu.h" 11 | #endif 12 | 13 | #include "fix.h" 14 | #include "types.h" 15 | 16 | 17 | typedef struct _fix32 { 18 | u32 i; 19 | fract32 fr; 20 | } fix32; 21 | 22 | 23 | 24 | // add b to a with over/underflow protection 25 | //extern void add_fix32(fix32* a, fix32* b); 26 | 27 | // subtract 28 | //extern void sub_fix32(fix32* a, fix32* b); 29 | 30 | // convert fix16 to fix32 31 | //extern void fix16_to_fix32(fix16* in, fix32* out); 32 | 33 | // wrap a 32.32 value to a positive integer range 34 | //extern void fix32_wrap_range(fix32* a, u32 upperBound); 35 | 36 | #endif // h guard 37 | -------------------------------------------------------------------------------- /bfin_lib/src/libfixmath/fixmath.h: -------------------------------------------------------------------------------- 1 | #ifndef __libfixmath_fixmath_h__ 2 | #define __libfixmath_fixmath_h__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | /*! 10 | \file fixmath.h 11 | \brief Functions to perform fast accurate fixed-point math operations. 12 | */ 13 | 14 | #include "uint32.h" 15 | #include "int64.h" 16 | #include "fract32.h" 17 | #include "fix16.h" 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /bfin_lib/src/libfixmath/fract32.c: -------------------------------------------------------------------------------- 1 | #include "fract32.h" 2 | 3 | 4 | 5 | fract32_t fract32_create(uint32_t inNumerator, uint32_t inDenominator) { 6 | if(inDenominator <= inNumerator) 7 | return 0xFFFFFFFF; 8 | uint32_t tempMod = (inNumerator % inDenominator); 9 | uint32_t tempDiv = (0xFFFFFFFF / (inDenominator - 1)); 10 | return (tempMod * tempDiv); 11 | } 12 | 13 | fract32_t fract32_invert(fract32_t inFract) { 14 | return (0xFFFFFFFF - inFract); 15 | } 16 | 17 | #ifndef FIXMATH_NO_64BIT 18 | uint32_t fract32_usmul(uint32_t inVal, fract32_t inFract) { 19 | return (uint32_t)(((uint64_t)inVal * (uint64_t)inFract) >> 32); 20 | } 21 | 22 | int32_t fract32_smul(int32_t inVal, fract32_t inFract) { 23 | if(inVal < 0) 24 | return -fract32_usmul(-inVal, inFract); 25 | return fract32_usmul(inVal, inFract); 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /bfin_lib/src/libfixmath/uint32.c: -------------------------------------------------------------------------------- 1 | #include "uint32.h" 2 | 3 | 4 | 5 | uint32_t uint32_log2(uint32_t inVal) { 6 | if(inVal == 0) 7 | return 0; 8 | uint32_t tempOut = 0; 9 | if(inVal >= (1 << 16)) { inVal >>= 16; tempOut += 16; } 10 | if(inVal >= (1 << 8)) { inVal >>= 8; tempOut += 8; } 11 | if(inVal >= (1 << 4)) { inVal >>= 4; tempOut += 4; } 12 | if(inVal >= (1 << 2)) { inVal >>= 2; tempOut += 2; } 13 | if(inVal >= (1 << 1)) { tempOut += 1; } 14 | return tempOut; 15 | } 16 | -------------------------------------------------------------------------------- /bfin_lib/src/libfixmath/uint32.h: -------------------------------------------------------------------------------- 1 | #ifndef __libfixmath_uint32_h__ 2 | #define __libfixmath_uint32_h__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #include 10 | 11 | /*! Performs an unsigned log-base2 on the specified unsigned integer and returns the result. 12 | */ 13 | extern uint32_t uint32_log2(uint32_t inVal); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /bfin_lib/src/pickle.h: -------------------------------------------------------------------------------- 1 | /* 2 | pickle.h 3 | 4 | utilities for object serialization. 5 | (force endianness) 6 | 7 | */ 8 | 9 | #ifndef _ALEPH_BEES_PICKLE_H_ 10 | #define _ALEPH_BEES_PICKLE_H_ 11 | 12 | #include "types.h" 13 | 14 | // 32-bit 15 | extern u8* pickle_32(const u32 src, u8* dst); 16 | extern const u8* unpickle_32(const u8* src, u32* dst); 17 | 18 | // 16-bit 19 | // ... probably never a great idea; 20 | /// seems more convenient to maintain 4-byte alignment. 21 | extern u8* pickle_16(const u16 src, u8* dst); 22 | extern const u8* unpickle_16(const u8* src, u16* dst); 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /bfin_lib/src/util.c: -------------------------------------------------------------------------------- 1 | #include "types.h" 2 | #include "util.h" 3 | 4 | // swap the next N bytes starting from pointer 5 | void byte_swap(u8* pData, u8 nb) { 6 | u8 tmp[nb]; 7 | u8 i; 8 | for(i=0; i> 3) 8 | #define BITSET(a, b) ((a)[BITSLOT(b)] |= BITMASK(b)) 9 | #define BITCLEAR(a, b) ((a)[BITSLOT(b)] &= ~BITMASK(b)) 10 | #define BITFLIP(a, b) ((a)[BITSLOT(b)] ^= BIT(b)) 11 | #define BITTEST(a, b) (((a)[BITSLOT(b)] & BITMASK(b)) > 0) 12 | #define BITNSLOTS(nb) ((nb + BITS_PER_BYTE - 1) >> 3) 13 | 14 | // and some byte-swapping functions, unfortunately! 15 | void byte_swap(u8* pTarget, u8 bytes); 16 | 17 | #endif // header guard 18 | -------------------------------------------------------------------------------- /bfin_lib_block/obj/dummy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/bfin_lib_block/obj/dummy -------------------------------------------------------------------------------- /bfin_lib_block/src/audio.c: -------------------------------------------------------------------------------- 1 | #include "audio.h" 2 | 3 | // globally visible cycle count result 4 | // volatile u64 audioCycleCount; 5 | 6 | 7 | // I/O flags 8 | volatile u8 audioRxDone = 0; 9 | volatile u8 audioTxDone = 0; 10 | 11 | volatile u8 processAudio = 0; 12 | 13 | 14 | // I/O buffers 15 | buffer_t inputChannels0; 16 | buffer_t inputChannels1; 17 | buffer_t outputChannels0; 18 | buffer_t outputChannels1; 19 | -------------------------------------------------------------------------------- /bfin_lib_block/src/clock_ebiu.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BFIN_CLOCK_EBIU_H_ 2 | #define _ALEPH_BFIN_CLOCK_EBIU_H_ 3 | 4 | extern void init_clock(void); 5 | extern void init_ebiu(void); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /bfin_lib_block/src/control.h: -------------------------------------------------------------------------------- 1 | /** 2 | * control.h 3 | * 4 | * process parameter changes 5 | */ 6 | 7 | #ifndef _ALEPH_BFIN_CONTROL_H_ 8 | #define _ALEPH_BFIN_CONTROL_H_ 9 | 10 | #include "param_common.h" 11 | #include "types.h" 12 | 13 | 14 | //! keep track of cycles spent processing each param change block 15 | // extern volatile u64 controlCycleCount; 16 | 17 | //! add a parameter change to the queue 18 | //! should be called with interrupts disabled (e.g. from an ISR) 19 | extern void control_add(u32 idx, ParamValue val); 20 | 21 | //! process pending param changes. 22 | //! should be called with interrupts disabled (e.g. from an ISR) 23 | extern void control_process(void); 24 | 25 | //! reset the control change queue 26 | extern void control_reset(void); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /bfin_lib_block/src/dma.h: -------------------------------------------------------------------------------- 1 | #ifndef _BFIN_DMA_H_ 2 | #define _BFIN_DMA_H_ 3 | 4 | #include "types.h" 5 | 6 | extern void init_dma(void); 7 | extern void enable_dma_sport0(void); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /bfin_lib_block/src/gpio.c: -------------------------------------------------------------------------------- 1 | #include "types.h" 2 | #include "gpio.h" 3 | 4 | // initialize programmable flags 5 | void init_flags(void) { 6 | // outputs 7 | *pFIO_DIR = 0; 8 | *pFIO_DIR |= CODEC_RESET_UNMASK; 9 | *pFIO_DIR |= CODEC_RESET_UNMASK; 10 | *pFIO_DIR |= CV_DAC_RESET_UNMASK; 11 | *pFIO_DIR |= CV_DAC_LDAC_UNMASK; 12 | *pFIO_DIR |= READY_UNMASK; 13 | *pFIO_DIR |= LED3_UNMASK; 14 | *pFIO_DIR |= LED4_UNMASK; 15 | } 16 | 17 | // configure audio codec ( AD1939 ) 18 | void init_codec(void) { 19 | volatile u32 del; 20 | 21 | //// reset codec 22 | *pFIO_FLAG_D &= CODEC_RESET_MASK; 23 | del = 100; while(del--) { ;; } 24 | *pFIO_FLAG_D |= (0xffff ^ CODEC_RESET_MASK); 25 | del = 10000; while(del--) { ;; } 26 | return; 27 | 28 | } // init_codec 29 | 30 | -------------------------------------------------------------------------------- /bfin_lib_block/src/isr.h: -------------------------------------------------------------------------------- 1 | #ifndef _BFIN_ISR_H_ 2 | #define _BFIN_ISR_H_ 3 | 4 | extern void init_interrupts(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /bfin_lib_block/src/pickle.h: -------------------------------------------------------------------------------- 1 | /* 2 | pickle.h 3 | 4 | utilities for object serialization. 5 | (force endianness) 6 | 7 | */ 8 | 9 | #ifndef _ALEPH_BEES_PICKLE_H_ 10 | #define _ALEPH_BEES_PICKLE_H_ 11 | 12 | #include "types.h" 13 | 14 | // 32-bit 15 | extern u8* pickle_32(const u32 src, u8* dst); 16 | extern const u8* unpickle_32(const u8* src, u32* dst); 17 | 18 | // 16-bit 19 | // ... probably never a great idea; 20 | /// seems more convenient to maintain 4-byte alignment. 21 | extern u8* pickle_16(const u16 src, u8* dst); 22 | extern const u8* unpickle_16(const u8* src, u16* dst); 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /bfin_lib_block/src/serial.h: -------------------------------------------------------------------------------- 1 | #ifndef _BFIN_SERIAL_H_ 2 | #define _BFIN_SERIAL_H_ 3 | 4 | extern void init_spi_slave(void); 5 | extern void init_sport0(void); 6 | extern void init_sport1(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /bfin_lib_block/src/spi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * spi.h 3 | * 4 | * handle data from SPI peripheral 5 | */ 6 | 7 | #ifndef _ALEPH_BFIN_SPI_H_ 8 | #define _ALEPH_BFIN_SPI_H_ 9 | 10 | #include "types.h" 11 | 12 | //! handle a received byte, return next byte for transmission 13 | extern u8 spi_handle_byte(u8 rx); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /common/buffer_common.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | buffer_common.h 4 | aleph-common 5 | 6 | declare common buffer data types. 7 | basically, simple descriptors. 8 | 9 | */ 10 | 11 | #ifndef _ALEPH_COMMON_BUFFER_H_ 12 | #define _ALEPH_COMMON_BUFFER_H_ 13 | 14 | #include "fix.h" 15 | #include "types.h" 16 | 17 | 18 | // descriptor 19 | typedef struct __attribute__((__packed__)) BufferDescStruct { 20 | // count of channels 21 | u32 channels; 22 | // count of frames 23 | u32 frames; 24 | //...??? 25 | } BufferDesc; 26 | 27 | 28 | #endif // header guard 29 | -------------------------------------------------------------------------------- /common/module_common.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _ALEPH_MODULE_COMMON_H_ 3 | #define _ALEPH_MODULE_COMMON_H_ 4 | 5 | #include "types.h" 6 | 7 | // synchronize with protocol 8 | #define MODULE_NAME_LEN 24 9 | 10 | // module version 11 | typedef struct _ModuleVersion { 12 | u8 maj; // major version (fundamentally different) 13 | u8 min; // minor version (may not be i/o compatibeble) 14 | u16 rev; // revision no. (compatible) 15 | } ModuleVersion; 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /dsp-block-test/dma.h: -------------------------------------------------------------------------------- 1 | #ifndef _BFIN_DMA_H_ 2 | #define _BFIN_DMA_H_ 3 | 4 | #include "types.h" 5 | 6 | extern void init_dma(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /dsp-block-test/dsp-block-test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/dsp-block-test/dsp-block-test -------------------------------------------------------------------------------- /dsp-block-test/isr.h: -------------------------------------------------------------------------------- 1 | #ifndef _BFIN_ISR_H_ 2 | #define _BFIN_ISR_H_ 3 | 4 | extern void init_interrupts(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /dsp-block-test/module.c: -------------------------------------------------------------------------------- 1 | #include "module.h" 2 | #include "osc.h" 3 | 4 | void module_init(void) { 5 | osc_set_phi(0x00962fc9); // ~220 hz or something 6 | osc_set_amp(0x3fffffff); 7 | } 8 | 9 | void module_process_block(buffer_t *inChannels, buffer_t *outChannels, 10 | const u8 numChannels, const u8 numFrames) { 11 | u16 i, j; 12 | 13 | /* fract32* src = inC; */ 14 | /* fract32* dst = audioProcessOutBuf; */ 15 | 16 | /* for(i=0; ixs[~a]),~{~f~^,~});~%" (- i 10) (make-biquad-lpf-coefficients freq 0.7071)) 6 | (format t "set_crossover_hpf_coeffs_from_floats(&(xo->xs[~a]),~{~f~^,~});~%" (- i 10) (make-biquad-hpf-coefficients freq 0.7071)) 7 | collect freq) 8 | -------------------------------------------------------------------------------- /dsp/filter_crossover.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_DSP_FILTER_CROSSOVER_H_ 2 | #define _ALEPH_DSP_FILTER_CROSSOVER_H_ 3 | 4 | #include "biquad.h" 5 | typedef struct { 6 | biquad hpf1; 7 | biquad hpf2; 8 | biquad lpf1; 9 | biquad lpf2; 10 | fract32 out_hpf; 11 | fract32 out_lpf; 12 | } crossover; 13 | void crossover_init (crossover *xo); 14 | void set_crossover_hpf_coeffs_from_floats(crossover *xo, float a1, float a2, float b0, float b1, float b2); 15 | void set_crossover_lpf_coeffs_from_floats(crossover *xo, float a1, float a2, float b0, float b1, float b2); 16 | void crossover_next(crossover *xo, fract32 x); 17 | 18 | typedef struct { 19 | fract32 bands[8]; 20 | crossover xs[7]; 21 | } crossover_8_band; 22 | void crossover_8_band_init(crossover_8_band *xo); 23 | 24 | void crossover_8_band_next(crossover_8_band *xo, fract32 x); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /dsp/filter_ramp.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "fix.h" 4 | #include "types.h" 5 | 6 | #include "filter_ramp.h" 7 | 8 | //-------------------------------- 9 | //-------- fr32 ramp 10 | void filter_ramp_init(filter_ramp* f) { 11 | f->y = 0; 12 | f->inc = 1 << 16; 13 | } 14 | 15 | void filter_ramp_set_inc(filter_ramp* f, fract32 inc) { 16 | f->inc = abs_fr1x32( inc ); 17 | } 18 | 19 | void filter_ramp_start(filter_ramp* f) { 20 | f->y = 0; 21 | f->sync = 0; 22 | } 23 | 24 | // get next filtered value 25 | fract32 filter_ramp_next(filter_ramp* f) { 26 | // gcc intrinsics are saturating 27 | if(f->sync) { 28 | return FR32_MAX; 29 | } 30 | /* printf("not synced %d, %d\n", f->y, f->inc); */ 31 | f->y = add_fr1x32(f->y, f->inc); 32 | if(f->y >= FR32_MAX) { 33 | f->sync = 1; 34 | f->y = FR32_MAX; 35 | } 36 | return f->y; 37 | } 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /dsp/filter_ramp.h: -------------------------------------------------------------------------------- 1 | /* ramp.h 2 | 3 | dumb linear ramp utilities 4 | 5 | */ 6 | 7 | 8 | #ifndef _ALEPH_DSP_RAMP_H_ 9 | #define _ALEPH_DSP_RAMP_H_ 10 | 11 | 12 | #include "types.h" 13 | 14 | typedef struct _filter_ramp { 15 | fract32 inc; // increment ( [0-1] 16 | fract32 y; // filtered value 17 | u8 sync; // flag if done ramping 18 | } filter_ramp; 19 | 20 | 21 | // initialize 22 | extern void filter_ramp_init(filter_ramp* f); 23 | // set increment directly 24 | void filter_ramp_set_inc(filter_ramp* f, fract32 inc); 25 | // set input value 26 | extern void filter_ramp_start(filter_ramp* f); 27 | // get next filtered value 28 | extern fract32 filter_ramp_next(filter_ramp* f); 29 | 30 | 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /dsp/interpolate.c: -------------------------------------------------------------------------------- 1 | #include "fract_math.h" 2 | #include "interpolate.h" 3 | 4 | fract32 dsp_lerp32(fract32 a, fract32 b, fract32 c) { 5 | return add_fr1x32( a, 6 | mult_fr1x32x32( c, sub_fr1x32(b, a)) 7 | ); 8 | } 9 | -------------------------------------------------------------------------------- /dsp/interpolate.h: -------------------------------------------------------------------------------- 1 | /* 2 | interpolate.h 3 | dsp 4 | aleph 5 | 6 | interpolation routines. 7 | */ 8 | 9 | #include "fract_math.h" 10 | 11 | #ifndef _ALEPH_DSP_INTERPOLATE_ 12 | #define _ALEPH_DSP_INTERPOLATE_ 13 | 14 | extern fract32 dsp_lerp32(fract32 a, fract32 b, fract32 c); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /dsp/noise.c: -------------------------------------------------------------------------------- 1 | #include "noise.h" 2 | 3 | //------------------------- 4 | //--- linear congruential 5 | 6 | // initialize to reasonable values 7 | extern void lcprng_reset(lcprng* o, u32 seed) { 8 | // from "numerical recipes" 9 | // o->a = 0x19660d; 10 | // o->c = 0x3c6ef35f; 11 | // try these... 12 | o->c = 1664525 ; 13 | o->a = 1013904223 ; 14 | o->x = seed; 15 | } 16 | 17 | // set params 18 | extern void lcprng_set_a(lcprng* o, s32 v) { 19 | o->a = v; 20 | } 21 | 22 | extern void lcprng_set_c(lcprng* o, s32 v) { 23 | o->c = v; 24 | } 25 | 26 | extern void lcprng_set_x(lcprng* o, s32 v) { 27 | o->x = v; 28 | } 29 | 30 | // compute next 31 | extern s32 lcprng_next(lcprng* o) { 32 | // allow overflow 33 | o->x = o->x * o->c + o->a; 34 | return (s32) o->x; 35 | } 36 | -------------------------------------------------------------------------------- /dsp/null/README.txt: -------------------------------------------------------------------------------- 1 | ALEPH: (null) 2 | 3 | linux testing layer for audio modules 4 | 5 | 6 | currently supported: 7 | 8 | - monophonic synth module (make mono) 9 | -------------------------------------------------------------------------------- /dsp/null/audio.h: -------------------------------------------------------------------------------- 1 | #ifndef _NULLP_AUDIO_H_ 2 | #define _NULLP_AUDIO_H_ 3 | 4 | #include 5 | #include "fract32_emu.h" 6 | 7 | #define BLOCKSIZE (512) 8 | #ifndef SAMPLERATE 9 | #define SAMPLERATE (44100) 10 | #endif 11 | #define NUMCHANNELS (2) 12 | 13 | #define FORMAT (paFloat32) 14 | 15 | // to look like bfin 16 | extern fract32 in[4]; 17 | 18 | extern fract32 out[4]; 19 | 20 | extern void init_audio(void); 21 | extern void deinit_audio(void); 22 | 23 | #endif // header guard 24 | -------------------------------------------------------------------------------- /dsp/null/fract.h: -------------------------------------------------------------------------------- 1 | /* fake fract.h for simulating blackfin on linux 2 | 3 | */ 4 | #ifndef _ALEPH_FAKE_FRACT_H_ 5 | #define _ALEPH_FAKE_FRACT_H_ 6 | 7 | #include "fract32_emu.h" 8 | 9 | #endif // guard 10 | -------------------------------------------------------------------------------- /dsp/null/fract_math.h: -------------------------------------------------------------------------------- 1 | /* fake fract_math.h for simulating blackfin on linux 2 | 3 | */ 4 | #ifndef _ALEPH_FAKE_FRACT_MATH_H_ 5 | #define _ALEPH_FAKE_FRACT_MATH_H_ 6 | 7 | #include "fract32_emu.h" 8 | 9 | #endif // guard 10 | -------------------------------------------------------------------------------- /dsp/null/makelog: -------------------------------------------------------------------------------- 1 | gcc -g -std=gnu99 -v -c -I../common -o main.o main.c 2 | gcc -g -std=gnu99 -v -c -I../common -o audio.o audio.c 3 | gcc -g -std=gnu99 -v -c -I../common -o ui.o ui.c 4 | gcc -g -std=gnu99 -v -c -I../common -o wire.o wire.c 5 | gcc -g -std=gnu99 -v -I../common -lm -lportaudio -lncurses -o nullp main.o audio.o ui.o wire.o 6 | -------------------------------------------------------------------------------- /dsp/null/mono.plt: -------------------------------------------------------------------------------- 1 | # 2 | set style line 1 lt rgb "#ff0000" lw 2 ps 1 pt 0 3 | set style line 2 lt rgb "#0000ff" lw 2 ps 1 pt 0 4 | set style line 3 lt rgb "#00ffff" lw 2 ps 1 pt 0 5 | # 6 | plot "mono_dbg.txt" using 1:2 ls 1 w lines, \ 7 | "mono_dbg.txt" using 1:3 ls 2 w lines, \ 8 | "mono_dbg.txt" using 1:4 ls 3 w lines 9 | # 10 | pause -1 -------------------------------------------------------------------------------- /dsp/null/ui.h: -------------------------------------------------------------------------------- 1 | #ifndef _NULLP_UI_H_ 2 | #define _NULLP_UI_H_ 3 | 4 | //#include 5 | #include "types.h" 6 | 7 | //============== defines 8 | // define key commands 9 | //#define CMD_KEY_QUIT 'q' 10 | #define CMD_KEY_PARAM 'p' 11 | #define CMD_KEY_DEBUG 'd' 12 | 13 | typedef enum { 14 | eUiTop, 15 | eUiParam, 16 | } uiMode; 17 | 18 | extern void init_ui(void); 19 | extern void deinit_ui(void); 20 | extern void handle_key(u16 ch); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /dsp/osc_polyblep.h: -------------------------------------------------------------------------------- 1 | #ifndef OSC_POLYBLEP_H 2 | #define OSC_POLYBLEP_H 3 | #include "types.h" 4 | 5 | fract16 saw_polyblep (fract32 p, fract32 dp); 6 | fract16 square_polyblep (fract32 p, fract32 dp); 7 | fract16 sine_polyblep (fract32 phase); 8 | fract16 triangle_polyblep (fract32 phase); 9 | #endif 10 | -------------------------------------------------------------------------------- /modules/acid/acid.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_ACID_H_ 2 | #define _ALEPH_ACID_H_ 3 | 4 | #include "dsyn_voice.h" 5 | #include "monosynth_voice.h" 6 | #include "params.h" 7 | /// testing 8 | // #define DRUMSYN_NOENV 1 9 | 10 | 11 | extern drumsynVoice* voices[DRUMSYN_NVOICES]; 12 | extern monosynthVoice mVoices[MONOSYNTH_NVOICES]; 13 | 14 | extern fract32 dsynLevels[DRUMSYN_NVOICES]; 15 | extern fract32 monosynthLevels[MONOSYNTH_NVOICES]; 16 | 17 | ////// 18 | /// 19 | /// TESTing 20 | // envelope is nuts? trying just a raw integrator 21 | //extern filter_1p_fr32 ampLp; 22 | // 23 | ///// 24 | 25 | 26 | #endif // h guard 27 | -------------------------------------------------------------------------------- /modules/acid/acid.lab: -------------------------------------------------------------------------------- 1 | saw 2 | square 3 | triangle 4 | sine 5 | crunchy 6 | smoky 7 | creamy 8 | highpass 9 | bandpass 10 | lowpass 11 | notch 12 | -------------------------------------------------------------------------------- /modules/acid/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom modiule directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define eParamNumParams ACID_NPARAMS 19 | #endif // h guard 20 | -------------------------------------------------------------------------------- /modules/acid/monosynth_voice.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_MONOSYNTH_VOICE_H_ 2 | #define _ALEPH_MONOSYNTH_VOICE_H_ 3 | #include "env_adsr.h" 4 | #include "ricks_tricks.h" 5 | #include "filter_svf.h" 6 | 7 | typedef struct _monosynth_voice { 8 | env_adsr filterEnv; 9 | filter_svf svf; 10 | 11 | u8 filtType; 12 | u8 clipFlavour; 13 | 14 | hpf dcBlocker; 15 | 16 | env_adsr ampEnv; 17 | 18 | fix16 noteHz; 19 | fix16 noteTune; 20 | phasor noteOsc; 21 | u8 oscFlavour; 22 | 23 | fract32 freqOn; 24 | fract32 freqOff; 25 | 26 | } monosynthVoice; 27 | 28 | 29 | extern void monosynthVoice_init(monosynthVoice* voice); 30 | extern void monosynthVoice_noteon(monosynthVoice* voice); 31 | extern void monosynthVoice_noteoff(monosynthVoice* voice); 32 | extern fract32 monosynthVoice_next(monosynthVoice* voice); 33 | 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /modules/acid/noise_acid.c: -------------------------------------------------------------------------------- 1 | /* higher-quality 32b audio noise 2 | 3 | start with farily uniform distribution 4 | from XOR-shift method followed by 32b MLCG 5 | (see numerical recipes, 3rd ed, p.355) 6 | 7 | */ 8 | 9 | #include 10 | 11 | #include "acid.h" 12 | #include "noise_acid.h" 13 | 14 | extern void acid_noise_init(fract32 *x) { 15 | *x = 1; 16 | } 17 | 18 | extern fract32 acid_noise_next(fract32 *x) { 19 | u32 y = (u32) *x; 20 | y ^= (y >> 13); 21 | y ^= (y << 17); 22 | y ^= (y >> 5); 23 | y *= 1597334677; 24 | *x = y; 25 | return y; 26 | } 27 | -------------------------------------------------------------------------------- /modules/acid/noise_acid.h: -------------------------------------------------------------------------------- 1 | #ifndef _NOISE_DSYN_H_ 2 | #define _NOISE_DSYN_H_ 3 | 4 | #include "types.h" 5 | 6 | extern void acid_noise_init(fract32 *x); 7 | extern fract32 acid_noise_next(fract32 *x); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /modules/acid/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 1 3 | rev = 1 4 | -------------------------------------------------------------------------------- /modules/analyser/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom modiule directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define NUM_PARAMS eParamNumParams 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /modules/analyser/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 1 3 | rev = 0 4 | -------------------------------------------------------------------------------- /modules/dacs/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom modiule directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define NUM_PARAMS eParamNumParams 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /modules/dacs/params.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_DACS_PARAMS_H_ 2 | #define _ALEPH_DACS_PARAMS_H_ 3 | 4 | #include "param_common.h" 5 | 6 | #define PARAM_DAC_MIN 0 7 | #define PARAM_DAC_MAX FR32_MAX 8 | #define PARAM_DAC_RADIX 16 9 | 10 | #define PARAM_AMP_0 (FRACT32_MAX) 11 | #define PARAM_AMP_6 (FRACT32_MAX >> 1) 12 | #define PARAM_AMP_12 (FRACT32_MAX >> 2) 13 | 14 | #define PARAM_CV_SLEW_DEFAULT 0x77000000 15 | 16 | // cv output 17 | #define PARAM_CV_VAL_DEFAULT PARAM_AMP_6 18 | 19 | // enumerate parameters 20 | enum params { 21 | eParam_cvVal0, 22 | eParam_cvVal1, 23 | eParam_cvVal2, 24 | eParam_cvVal3, 25 | eParam_cvSlew0, 26 | eParam_cvSlew1, 27 | eParam_cvSlew2, 28 | eParam_cvSlew3, 29 | 30 | eParamNumParams 31 | }; 32 | 33 | extern void fill_param_desc(ParamDesc* desc); 34 | 35 | #endif // header guard 36 | // EOF 37 | -------------------------------------------------------------------------------- /modules/dacs/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 1 3 | rev = 0 4 | -------------------------------------------------------------------------------- /modules/dsyn/noise_dsyn.h: -------------------------------------------------------------------------------- 1 | #ifndef _NOISE_DSYN_H_ 2 | #define _NOISE_DSYN_H_ 3 | 4 | #include "types.h" 5 | 6 | extern void dsyn_noise_init(void); 7 | extern void dsyn_noise_reset(int voice); 8 | extern fract32 dsyn_noise_next(int voice); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /modules/dsyn/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 1 3 | rev = 0 4 | -------------------------------------------------------------------------------- /modules/fmsynth/fmsynth.lab: -------------------------------------------------------------------------------- 1 | op1 2 | op2 3 | op3 4 | op4 5 | adc1 6 | adc2 7 | adc3 8 | adc4 -------------------------------------------------------------------------------- /modules/fmsynth/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom modiule directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define NUM_PARAMS eParamNumParams 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /modules/fmsynth/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 1 3 | rev = 1 4 | -------------------------------------------------------------------------------- /modules/grains/bfin_emu/types.h: -------------------------------------------------------------------------------- 1 | #ifndef RICKS_BFIN_EMU 2 | #define RICKS_BFIN_EMU 3 | 4 | typedef int fract32; 5 | typedef int s32; 6 | typedef unsigned int u32; 7 | /* #define FR32_MAX 0x7FFFFFFF */ 8 | /* #define FR32_MIN 0x80000000 */ 9 | fract32 mult_fr1x32x32(fract32 x, fract32 y); 10 | fract32 mult_fr1x32x32_cheat(fract32 x, fract32 y); 11 | fract32 sub_fr1x32(fract32 x, fract32 y); 12 | fract32 add_fr1x32(fract32 x, fract32 y); 13 | fract32 abs_fr1x32(fract32 x); 14 | fract32 min_fr1x32(fract32 x, fract32 y); 15 | fract32 max_fr1x32(fract32 x, fract32 y); 16 | fract32 negate_fr1x32(fract32 x); 17 | int norm_fr1x32(fract32 x); 18 | fract32 shl_fr1x32 (fract32 x, int shft); 19 | void* __builtin_bfin_circptr(void* ptr, long unsigned int wordLength, void* buf, long unsigned int bufLength); 20 | #endif 21 | -------------------------------------------------------------------------------- /modules/grains/fract32_jack.h: -------------------------------------------------------------------------------- 1 | fract32 clip_to_fr32(long x); 2 | -------------------------------------------------------------------------------- /modules/grains/grains.lab: -------------------------------------------------------------------------------- 1 | EFFECT 2 | ADC1 3 | ADC2 4 | ADC3 5 | ADC4 6 | GRAIN1 7 | GRAIN2 8 | PTOSC1 9 | PTOSC2 10 | ENV1 11 | ENV2 12 | LFO 13 | PING 14 | CV1 15 | CV2 -------------------------------------------------------------------------------- /modules/grains/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom modiule directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define NUM_PARAMS eParamNumParams 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /modules/grains/test-jack-client.sh: -------------------------------------------------------------------------------- 1 | # ../../common/fract32_emu.c 2 | gcc -ljack -lm -Wall\ 3 | bfin_emu/fract32_jack.c \ 4 | bfin_emu/jack_pitch_tracker.c \ 5 | ../../dsp/grain.c \ 6 | ../../dsp/echoTap.c \ 7 | ../../dsp/scrubTap.c \ 8 | ../../dsp/ricks_tricks.c \ 9 | ../../dsp/pan.c \ 10 | ../../dsp/buffer.c \ 11 | -I ../../dsp -I ./bfin_emu -I ./ -I ../../bfin_lib/src/ -I ../../bfin_lib/src/libfixmath -I ../../common\ 12 | -o jack_pitch_tracker -g; 13 | # ./jack_pitch_tracker 14 | -------------------------------------------------------------------------------- /modules/grains/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 0 3 | rev = 2 4 | -------------------------------------------------------------------------------- /modules/lines/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom modiule directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define NUM_PARAMS eParamNumParams 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /modules/lines/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 2 3 | rev = 5 4 | -------------------------------------------------------------------------------- /modules/mix/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom modiule directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define NUM_PARAMS eParamNumParams 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /modules/mix/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 0 3 | rev = 0 4 | -------------------------------------------------------------------------------- /modules/monosynth/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom modiule directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define NUM_PARAMS eParamNumParams 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /modules/monosynth/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 0 3 | rev = 0 4 | -------------------------------------------------------------------------------- /modules/tape/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom modiule directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define NUM_PARAMS eParamNumParams 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /modules/tape/params.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_DACS_PARAMS_H_ 2 | #define _ALEPH_DACS_PARAMS_H_ 3 | 4 | #include "param_common.h" 5 | 6 | #define PARAM_DAC_MIN 0 7 | #define PARAM_DAC_MAX FR32_MAX 8 | #define PARAM_DAC_RADIX 16 9 | 10 | #define PARAM_AMP_0 (FRACT32_MAX) 11 | #define PARAM_AMP_6 (FRACT32_MAX >> 1) 12 | #define PARAM_AMP_12 (FRACT32_MAX >> 2) 13 | 14 | #define PARAM_CV_SLEW_DEFAULT 0x77000000 15 | 16 | // cv output 17 | #define PARAM_CV_VAL_DEFAULT PARAM_AMP_6 18 | 19 | // enumerate parameters 20 | enum params { 21 | eParam_cvVal0, 22 | eParam_cvVal1, 23 | eParam_cvVal2, 24 | eParam_cvVal3, 25 | eParam_cvSlew0, 26 | eParam_cvSlew1, 27 | eParam_cvSlew2, 28 | eParam_cvSlew3, 29 | 30 | eParamNumParams 31 | }; 32 | 33 | extern void fill_param_desc(ParamDesc* desc); 34 | 35 | #endif // header guard 36 | // EOF 37 | -------------------------------------------------------------------------------- /modules/tape/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 1 3 | rev = 0 4 | -------------------------------------------------------------------------------- /modules/varilines/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom modiule directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define NUM_PARAMS eParamNumParams 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /modules/varilines/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 0 3 | rev = 0 4 | -------------------------------------------------------------------------------- /modules/voder/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom modiule directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define NUM_PARAMS eParamNumParams 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /modules/voder/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 0 3 | rev = 0 4 | -------------------------------------------------------------------------------- /modules/voder/voder.org: -------------------------------------------------------------------------------- 1 | * Params 2 | - Spectrum keys 0-9 3 | - pitch bias 4 | - wrist bar 5 | -------------------------------------------------------------------------------- /modules/waves/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom module directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define NUM_PARAMS eParamNumParams 19 | 20 | #endif // h guard 21 | -------------------------------------------------------------------------------- /modules/waves/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 4 3 | rev = 5 4 | -------------------------------------------------------------------------------- /modules_block/rawsc/module_custom.h: -------------------------------------------------------------------------------- 1 | /* module_custom.h 2 | 3 | some consants should be both customized for each module, 4 | and preprocessed for efficiency. 5 | here is where such things live. 6 | 7 | most likely, this is just a count of parameters. 8 | 9 | a copy of this header should exist in your custom module directory 10 | (e.g. aleph/bfin/modules/mymodule/ 11 | */ 12 | 13 | #ifndef _ALEPH_MODULE_CUSTOM_H_ 14 | #define _ALEPH_MODULE_CUSTOM_H_ 15 | 16 | #include "params.h" 17 | 18 | #define MODULE_BLOCKSIZE 16 19 | 20 | #define NUM_PARAMS eParamNumParams 21 | 22 | #endif // h guard 23 | -------------------------------------------------------------------------------- /modules_block/rawsc/version.mk: -------------------------------------------------------------------------------- 1 | maj = 0 2 | min = 0 3 | rev = 0 4 | -------------------------------------------------------------------------------- /utils/aleph-com/README: -------------------------------------------------------------------------------- 1 | for python 2 2 | 3 | you need: 4 | 5 | pyOSC: https://pypi.python.org/pypi/pyOSC 6 | pySerial: https://pypi.python.org/pypi/pyserial 7 | 8 | change line 6 of aleph-com.py to match your serial device (ie /dev/ttyACM0 on linux) 9 | 10 | also on linux you need to be root 11 | 12 | a.sh provided for less typing 13 | 14 | listens for OSC on port 12001 15 | 16 | default sends to port 12010 17 | 18 | failed to test OSC on linux, get this to try: http://fukuchi.org/works/oscsend/index.html.en -------------------------------------------------------------------------------- /utils/aleph-com/a.sh: -------------------------------------------------------------------------------- 1 | python aleph-com.py /dev/tty.usbmodemfd111 2 | -------------------------------------------------------------------------------- /utils/avr32_blank/conf/conf_tc_irq.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_CONF_TC_IRQ_H_ 2 | #define _ALEPH_CONF_TC_IRQ_H_ 3 | 4 | //============================================ 5 | //====== IRQ priorities 6 | #define SYS_IRQ_PRIORITY 1 7 | #define APP_TC_IRQ_PRIORITY 3 8 | #define UI_IRQ_PRIORITY 2 9 | 10 | //============================================== 11 | //==== timers 12 | 13 | // application timer 14 | #define APP_TC (&AVR32_TC) 15 | #define APP_TC_CHANNEL 0 16 | #define APP_TC_IRQ AVR32_TC_IRQ0 17 | #define APP_TC_IRQ_GROUP AVR32_TC_IRQ_GROUP 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /utils/avr32_blank/src/global.h: -------------------------------------------------------------------------------- 1 | /* global.h 2 | aleph-avr32 3 | 4 | global application variables. 5 | mostly initialized in interrupts.c 6 | where first used. 7 | */ 8 | 9 | #ifndef _GLOBAL_H_ 10 | #define _GLOBAL_H_ 11 | 12 | #include "types.h" 13 | //#include "net_protected.h" 14 | // extern extlnet_t* ctlnet; 15 | 16 | //---- global buffers 17 | 18 | // RAM buffer for blackfin firmware 19 | extern volatile u8* bfinLdrData; 20 | // size of bfin firmware 21 | extern volatile u32 bfinLdrSize; 22 | 23 | // app timer tick counter 24 | extern volatile U64 tcTicks; 25 | // screen refresh flag 26 | extern volatile U8 refresh; 27 | // current encoder values 28 | extern S32 encVal[4]; 29 | 30 | // FTDI connection flag 31 | extern u8 ftdiPlug; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /utils/avr32_blank/src/i2c.h: -------------------------------------------------------------------------------- 1 | #ifndef _I2C_H_ 2 | #define _I2C_H_ 3 | 4 | #include "compiler.h" 5 | #include "types.h" 6 | 7 | // transmit data in slave mode 8 | extern u8 i2c_slave_tx(void); 9 | // handler for slave rx events 10 | extern void i2c_slave_rx(u8 value); 11 | 12 | // slave stop function 13 | extern void i2c_slave_stop(void); 14 | 15 | // master send 16 | extern void i2c_master_tx(u8* tx); 17 | // master receive 18 | extern void i2c_master_rx(u8* rx); 19 | 20 | 21 | #endif // header guard 22 | -------------------------------------------------------------------------------- /utils/avr32_blank/src/interrupts.h: -------------------------------------------------------------------------------- 1 | #ifndef _INTERRUPTS_H_ 2 | #define _INTERRUPTS_H_ 3 | 4 | // global count of uptime, and overflow flag. 5 | volatile u64 tcTicks; 6 | volatile u8 tcOverflow; 7 | 8 | extern void register_interrupts(void); 9 | 10 | #endif 11 | 12 | -------------------------------------------------------------------------------- /utils/avr32_boot/flash.sh: -------------------------------------------------------------------------------- 1 | make chiperase 2 | make program 3 | avr32program writefuses -f internal@80000000 gp=0xfff3ffff 4 | avr32program secureflash 5 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/app_timers.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_AVR32_APP_TIMERS_H_ 2 | #define _ALEPH_AVR32_APP_TIMERS_H_ 3 | 4 | 5 | // ---- timer tags 6 | enum { 7 | eScreenTimerTag = 0, 8 | eEncTimerTag = 1, 9 | eSwTimerTag = 2, 10 | eAdcTimerTag = 3, 11 | eHeartbeatTimerTag = 4, 12 | }; 13 | 14 | // create application timers 15 | extern void init_app_timers(void); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/dummy.h: -------------------------------------------------------------------------------- 1 | // this is 512 bytes 2 | "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 3 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/events.h: -------------------------------------------------------------------------------- 1 | /* events.h 2 | * aleph 3 | */ 4 | 5 | #ifndef _EVENTS_H_ 6 | #define _EVENTS_H_ 7 | 8 | #include 9 | 10 | typedef struct { 11 | U32 eventType; 12 | S32 eventData; 13 | } event_t; 14 | 15 | 16 | /* Initializes (or re-initializes) the system event queue. 17 | */ 18 | void init_events( void ); 19 | 20 | 21 | /* Returns true if there's an event available, otherwise returns 22 | * false if there's nothing to do. The event record provided is filled 23 | * in with a copy of the event data. 24 | */ 25 | bool get_next_event( event_t *e ); 26 | 27 | 28 | /* Add an event to the system event queue. Values in the provided 29 | * event record are copied into the system event queue. Returns 30 | * true if the supplied event was successfully posted, else false. 31 | */ 32 | bool post_event( event_t *e ); 33 | 34 | 35 | #endif // header guard 36 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/fat_io_lib/API.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/avr32_boot/src/fat_io_lib/API.txt -------------------------------------------------------------------------------- /utils/avr32_boot/src/fat_io_lib/History.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/avr32_boot/src/fat_io_lib/History.txt -------------------------------------------------------------------------------- /utils/avr32_boot/src/fat_io_lib/License.txt: -------------------------------------------------------------------------------- 1 | FAT File IO Library License 2 | -=-=-=-=-=-=-=-=-=-=-=-=-=- 3 | 4 | This versions license: GPL 5 | 6 | If you include GPL software in your project, you must release the source code of that project too. 7 | 8 | If you would like a version with a more permissive license for use in closed source commercial applications please contact me for details. 9 | 10 | Email: admin@ultra-embedded.com 11 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/fat_io_lib/fat_cache.h: -------------------------------------------------------------------------------- 1 | #ifndef __FAT_CACHE_H__ 2 | #define __FAT_CACHE_H__ 3 | 4 | #include "fat_filelib.h" 5 | 6 | //----------------------------------------------------------------------------- 7 | // Prototypes 8 | //----------------------------------------------------------------------------- 9 | int fatfs_cache_init(struct fatfs *fs, FL_FILE *file); 10 | int fatfs_cache_get_next_cluster(struct fatfs *fs, FL_FILE *file, uint32 clusterIdx, uint32 *pNextCluster); 11 | int fatfs_cache_set_next_cluster(struct fatfs *fs, FL_FILE *file, uint32 clusterIdx, uint32 nextCluster); 12 | 13 | #endif -------------------------------------------------------------------------------- /utils/avr32_boot/src/fat_io_lib/fat_format.h: -------------------------------------------------------------------------------- 1 | #ifndef __FAT_FORMAT_H__ 2 | #define __FAT_FORMAT_H__ 3 | 4 | #include "fat_defs.h" 5 | #include "fat_opts.h" 6 | #include "fat_access.h" 7 | 8 | //----------------------------------------------------------------------------- 9 | // Prototypes 10 | //----------------------------------------------------------------------------- 11 | int fatfs_format_fat16(struct fatfs *fs, uint32 volume_sectors, const char *name); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/fat_io_lib/fat_string.h: -------------------------------------------------------------------------------- 1 | #ifndef __FILESTRING_H__ 2 | #define __FILESTRING_H__ 3 | 4 | //----------------------------------------------------------------------------- 5 | // Prototypes 6 | //----------------------------------------------------------------------------- 7 | int fatfs_total_path_levels(char *path); 8 | int fatfs_get_substring(char *Path, int levelreq, char *output, int max_len); 9 | int fatfs_split_path(char *FullPath, char *Path, int max_path, char *FileName, int max_filename); 10 | int fatfs_compare_names(char* strA, char* strB); 11 | int fatfs_string_ends_with_slash(char *path); 12 | int fatfs_get_sfn_display_name(char* out, char* in); 13 | int fatfs_get_extension(char* filename, char* out, int maxlen); 14 | int fatfs_create_path_string(char* path, char *filename, char* out, int maxlen); 15 | 16 | #ifndef NULL 17 | #define NULL 0 18 | #endif 19 | 20 | #endif -------------------------------------------------------------------------------- /utils/avr32_boot/src/fat_io_lib/fat_write.h: -------------------------------------------------------------------------------- 1 | #ifndef __FAT_WRITE_H__ 2 | #define __FAT_WRITE_H__ 3 | 4 | #include "fat_defs.h" 5 | #include "fat_opts.h" 6 | 7 | //----------------------------------------------------------------------------- 8 | // Prototypes 9 | //----------------------------------------------------------------------------- 10 | int fatfs_add_file_entry(struct fatfs *fs, uint32 dirCluster, char *filename, char *shortfilename, uint32 startCluster, uint32 size, int dir); 11 | int fatfs_add_free_space(struct fatfs *fs, uint32 *startCluster, uint32 clusters); 12 | int fatfs_allocate_free_space(struct fatfs *fs, int newFile, uint32 *startCluster, uint32 size); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/fat_io_lib/version.txt: -------------------------------------------------------------------------------- 1 | 2.6.8 2 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/filesystem.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_AVR32_FILESYSTEM_H_ 2 | #define _ALEPH_AVR32_FILESYSTEM_H_ 3 | 4 | #include "types.h" 5 | #include "fat_filelib.h" 6 | 7 | #define FS_BUF_SIZE 512 8 | 9 | //===================================== 10 | //==== vars 11 | // transfer-done flag 12 | extern volatile u8 fsEndTransfer; 13 | // Local RAM buffer to store data to/from the SD/MMC card 14 | extern volatile U8 pdcaRxBuf[FS_BUF_SIZE]; 15 | extern volatile U8 pdcaTxBuf[FS_BUF_SIZE]; 16 | // PDCA rx and tx channels 17 | extern volatile avr32_pdca_channel_t* pdcaRxChan ; 18 | extern volatile avr32_pdca_channel_t* pdcaTxChan ; 19 | 20 | //==================================== 21 | //==== funcs 22 | extern int fat_init(void); 23 | 24 | #endif // h guard 25 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/font.h: -------------------------------------------------------------------------------- 1 | #ifndef _FONT_H_ 2 | #define _FONT_H_ 3 | 4 | //#include "compiler.h" 5 | #include "types.h" 6 | 7 | #define FONT_CHARW 6 8 | #define FONT_CHARH 8 9 | #define FONT_CHARH_1 7 10 | // glyph table doesn't include the initial non-ascii chars 11 | #define FONT_ASCII_OFFSET 0x20 12 | 13 | typedef struct _glyph { 14 | U8 first ; // column inset from left side in proportional mode 15 | U8 last ; // column inset from left side in proportional mode 16 | U8 data[FONT_CHARW]; // column data 17 | } glyph_t; 18 | 19 | extern const glyph_t font_data[]; 20 | 21 | extern const U32 font_nglyphs; 22 | 23 | #endif // header guard 24 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/global.h: -------------------------------------------------------------------------------- 1 | /* global.h 2 | aleph-avr32 3 | 4 | global application variables. 5 | mostly initialized in interrupts.c 6 | where first used. 7 | */ 8 | 9 | #ifndef _GLOBAL_H_ 10 | #define _GLOBAL_H_ 11 | 12 | 13 | // app timer tick counter 14 | extern volatile U64 tcTicks; 15 | // screen refresh flag 16 | extern volatile U8 refresh; 17 | // current encoder values 18 | extern S32 encVal[4]; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/init.h: -------------------------------------------------------------------------------- 1 | /* init.h 2 | aleph-avr32 3 | 4 | low-level peripheral initialization. 5 | */ 6 | 7 | #ifndef _INIT_H_ 8 | #define _INIT_H_ 9 | 10 | 11 | // initialize clocks 12 | //extern void init_clocks(void); 13 | 14 | // initialize blackfin SPI and GPIPO 15 | extern void init_bfin_resources(void); 16 | // initialize USART 17 | extern void init_ftdi_usart (void); 18 | // initialize other GPIO 19 | extern void init_gpio(void); 20 | // initialize PDCA for sdcard 21 | extern void init_local_pdca(void); 22 | // initialize spi1 (oled / adc / sdcard) 23 | extern void init_spi1 (void); 24 | // initialize application timer 25 | extern void init_tc (volatile avr32_tc_t *tc); 26 | // intialize two-wire interface 27 | extern void init_twi(void); 28 | // initialize SPI and GPIO for sdcard 29 | extern void init_sd_mmc_resources(void); 30 | // initialize USB host stack 31 | void init_usb_host (void); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/interrupts.h: -------------------------------------------------------------------------------- 1 | #ifndef _INTERRUPTS_H_ 2 | #define _INTERRUPTS_H_ 3 | 4 | extern void register_interrupts(void); 5 | 6 | #endif 7 | 8 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/key_handler.h: -------------------------------------------------------------------------------- 1 | #ifndef _KEY_HANDLER_H_ 2 | #define _KEY_HANDLER_H_ 3 | 4 | //#include "compiler.h" 5 | #include "menu.h" 6 | #include "menu_protected.h" 7 | 8 | //// page-specific key handlers 9 | // dsp 10 | extern void key_handler_dsp(uiKey_t key, s16 val); 11 | // firmware 12 | extern void key_handler_fw(uiKey_t key, s16 val); 13 | 14 | #endif // _KEY_HANDLER_H_ 15 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/libfixmath/fix32.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_FIX32_H_ 2 | #define _ALEPH_FIX32_H_ 3 | 4 | 5 | #ifdef ARCH_BFIN // bfin 6 | #include "fract.h" 7 | #include "fract_math.h" 8 | #include 9 | #else // linux 10 | #include "fract32_emu.h" 11 | #endif 12 | 13 | #include "fix.h" 14 | #include "types.h" 15 | 16 | 17 | typedef struct _fix32 { 18 | s32 i; 19 | fract32 fr; 20 | } fix32; 21 | 22 | 23 | 24 | // add b to a with over/underflow protection 25 | extern void add_fix32(fix32* a, fix32* b); 26 | 27 | // subtract 28 | extern void sub_fix32(fix32* a, fix32* b); 29 | 30 | // convert fix16 to fix32 31 | extern void fix16_to_fix32(fix16* in, fix32* out); 32 | 33 | // wrap a 32.32 value to a positive integer range 34 | extern void fix32_wrap_range(fix32* a, u32 upperBound); 35 | 36 | #endif // h guard 37 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/libfixmath/fixmath.h: -------------------------------------------------------------------------------- 1 | #ifndef __libfixmath_fixmath_h__ 2 | #define __libfixmath_fixmath_h__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | /*! 10 | \file fixmath.h 11 | \brief Functions to perform fast accurate fixed-point math operations. 12 | */ 13 | 14 | #include "uint32.h" 15 | #include "int64.h" 16 | #include "fract32.h" 17 | #include "fix16.h" 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/libfixmath/fract32.c: -------------------------------------------------------------------------------- 1 | #include "fract32.h" 2 | 3 | 4 | 5 | fract32_t fract32_create(uint32_t inNumerator, uint32_t inDenominator) { 6 | if(inDenominator <= inNumerator) 7 | return 0xFFFFFFFF; 8 | uint32_t tempMod = (inNumerator % inDenominator); 9 | uint32_t tempDiv = (0xFFFFFFFF / (inDenominator - 1)); 10 | return (tempMod * tempDiv); 11 | } 12 | 13 | fract32_t fract32_invert(fract32_t inFract) { 14 | return (0xFFFFFFFF - inFract); 15 | } 16 | 17 | #ifndef FIXMATH_NO_64BIT 18 | uint32_t fract32_usmul(uint32_t inVal, fract32_t inFract) { 19 | return (uint32_t)(((uint64_t)inVal * (uint64_t)inFract) >> 32); 20 | } 21 | 22 | int32_t fract32_smul(int32_t inVal, fract32_t inFract) { 23 | if(inVal < 0) 24 | return -fract32_usmul(-inVal, inFract); 25 | return fract32_usmul(inVal, inFract); 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/libfixmath/uint32.c: -------------------------------------------------------------------------------- 1 | #include "uint32.h" 2 | 3 | 4 | 5 | uint32_t uint32_log2(uint32_t inVal) { 6 | if(inVal == 0) 7 | return 0; 8 | uint32_t tempOut = 0; 9 | if(inVal >= (1 << 16)) { inVal >>= 16; tempOut += 16; } 10 | if(inVal >= (1 << 8)) { inVal >>= 8; tempOut += 8; } 11 | if(inVal >= (1 << 4)) { inVal >>= 4; tempOut += 4; } 12 | if(inVal >= (1 << 2)) { inVal >>= 2; tempOut += 2; } 13 | if(inVal >= (1 << 1)) { tempOut += 1; } 14 | return tempOut; 15 | } 16 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/libfixmath/uint32.h: -------------------------------------------------------------------------------- 1 | #ifndef __libfixmath_uint32_h__ 2 | #define __libfixmath_uint32_h__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #include 10 | 11 | /*! Performs an unsigned log-base2 on the specified unsigned integer and returns the result. 12 | */ 13 | extern uint32_t uint32_log2(uint32_t inVal); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/memory.h: -------------------------------------------------------------------------------- 1 | /* memory.h 2 | avr32 3 | aleph 4 | 5 | a hacky sort of interface to explicitly allocate consecutive regions of SDRAM 6 | */ 7 | 8 | #ifndef _ALEPH_MEM_H_ 9 | #define _ALEPH_MEM_H_ 10 | 11 | #include "types.h" 12 | 13 | #define ALLOC_FAIL 0 14 | 15 | // heap memory type 16 | typedef volatile u8 * heap_t; 17 | 18 | // setup heap 19 | extern void init_mem(void); 20 | // allocate and return pointer 21 | extern heap_t alloc_mem(u32 bytes); 22 | // test sram 23 | extern void sram_test(u32 sizeDiv, u32 offset); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/print_fix.h: -------------------------------------------------------------------------------- 1 | /* fix.h 2 | * aleph/common 3 | * 4 | * some extra utilities for fixed point string formatting 5 | */ 6 | 7 | #ifndef _ALEPH_FIX_H_ 8 | #define _ALEPH_FIX_H_ 9 | 10 | #include "fix16.h" 11 | 12 | #define FIX_DIG_LO 4 // digits after decimal 13 | #define FIX_DIG_HI 5 // digits before decimal 14 | #define FIX_DIG_ALL 11 // lo + hi + '.' + '-' 15 | 16 | // print to a buffer (assumed length is FIX_DIG_ALL) 17 | void print_fix16(char* buf , fix16_t x); 18 | // print integer to buffer, return num digits 19 | int itoa_int(int val, char* buf); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/redraw.h: -------------------------------------------------------------------------------- 1 | #ifndef _REDRAW_H_ 2 | #define _REDRAW_H_ 3 | 4 | //#include "compiler.h" 5 | #include "menu.h" 6 | #include "menu_protected.h" 7 | 8 | //// page-specific redraws 9 | 10 | // dsp 11 | extern void redraw_dsp(void); 12 | // firmware 13 | extern void redraw_fw(void); 14 | 15 | #endif // header guard 16 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/simple_string.c: -------------------------------------------------------------------------------- 1 | #include "simple_string.h" 2 | 3 | #define SMPSTR_MAX_LEN 256 4 | 5 | // copy with length arg (-1 == until null terminator, no bounds check) 6 | void str_copy(const char* src, char * dst, s8 len) { 7 | u8 i=0; 8 | if(len < 0) { 9 | while(i < SMPSTR_MAX_LEN) { 10 | if(src[i] == 0) { 11 | break; 12 | } 13 | dst[i] = src[i]; 14 | i++; 15 | } 16 | } else { 17 | while(i < len) { 18 | dst[i] = src[i]; 19 | i++; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/simple_string.h: -------------------------------------------------------------------------------- 1 | #ifndef _SIMPLE_STRING_H_ 2 | #define _SIMPLE_STRING_H_ 3 | 4 | #include "types.h" 5 | 6 | // copy whole string 7 | //extern void str_copy(const char* src, char * dst); 8 | // copy with length arg (-1 == until null terminator) 9 | extern void str_copy(const char* src, char * dst, s8 len); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/switches.h: -------------------------------------------------------------------------------- 1 | /* switches.h 2 | * aleph 3 | */ 4 | 5 | #ifndef _SWITCHES_H_ 6 | #define _SWITCHES_H_ 7 | 8 | #include "compiler.h" 9 | #include "event_types.h" 10 | 11 | /// debouncing constants 12 | /* #define SW_POLL_MS 5 */ 13 | /* #define SW_PRESS_MS 10 */ 14 | /* #define SW_RELEASE_MS 100 */ 15 | /* #define SW_PRESS_TICKS 2 */ 16 | /* #define SW_RELEASE_TICKS 20 */ 17 | 18 | #define NUM_SW 6 19 | 20 | // generate events from switch interrupts 21 | extern void process_sw( const U8 swIdx ); 22 | // initialize switch debouncing 23 | extern void init_switches(void); 24 | 25 | /* // poll switch at given index */ 26 | /* extern void poll_sw(const u8 idx); */ 27 | 28 | #endif // header guard 29 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/watchdog.c: -------------------------------------------------------------------------------- 1 | #include "compiler.h" 2 | #include "wdt.h" 3 | #include "watchdog.h" 4 | 5 | void watchdog_reset(void) { 6 | wdt_opt_t opt; 7 | opt.us_timeout_period = 1000000; 8 | wdt_enable(&opt); 9 | while (1); 10 | } 11 | -------------------------------------------------------------------------------- /utils/avr32_boot/src/watchdog.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_AVR32_BOOT_WATCHDOG_H_ 2 | #define _ALEPH_AVR32_BOOT_WATCHDOG_H_ 3 | 4 | extern void watchdog_reset(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /utils/avr32_boot/version.mk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/avr32_boot/version.mk -------------------------------------------------------------------------------- /utils/avr32_sim/adc_poll.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/avr32_sim/adc_poll.h -------------------------------------------------------------------------------- /utils/avr32_sim/avr32_sim.mk: -------------------------------------------------------------------------------- 1 | 2 | src += \ 3 | $(sim)/src/adc.c \ 4 | $(sim)/src/app.c \ 5 | $(sim)/src/bfin.c \ 6 | $(sim)/src/control.c \ 7 | $(sim)/src/delay.c \ 8 | $(sim)/src/events.c \ 9 | $(sim)/src/encoders.c \ 10 | $(sim)/src/filesystem.c \ 11 | $(sim)/src/flash.c \ 12 | $(sim)/src/font.c \ 13 | $(sim)/src/i2c.c \ 14 | $(sim)/src/init.c \ 15 | $(sim)/src/interrupts.c \ 16 | $(sim)/src/main.c \ 17 | $(sim)/src/memory.c \ 18 | $(sim)/src/monome.c\ 19 | $(sim)/src/print_funcs.c \ 20 | $(sim)/src/region.c \ 21 | $(sim)/src/screen.c \ 22 | $(sim)/src/serial.c \ 23 | $(sim)/src/simple_string.c \ 24 | $(sim)/src/switches.c \ 25 | $(sim)/src/timers.c \ 26 | $(sim)/src/usb.c \ 27 | $(sim)/src/usb/midi/midi.c \ 28 | $(sim)/src/usb/ftdi/ftdi.c \ 29 | $(sim)/src/fonts/ume_tgo5_18.c \ 30 | $(sim)/src/fix.c \ 31 | $(sim)/src/libfixmath/fix16.c -------------------------------------------------------------------------------- /utils/avr32_sim/region_extra.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/avr32_sim/region_extra.h -------------------------------------------------------------------------------- /utils/avr32_sim/src/adc.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_AVR32_ADC_H_ 2 | #define _ALEPH_AVR32_ADC_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | //#include "compiler.h" 9 | 10 | // setup ad7923 11 | extern void init_adc(void); 12 | 13 | // perform conversion, check for changes, and post events 14 | extern void adc_poll(void); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/control.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "print_funcs.h" 4 | 5 | #include "bfin.h" 6 | #include "control.h" 7 | 8 | // request a parameter change. 9 | extern u8 ctl_param_change(u32 idx, u32 val) { 10 | #if 1 11 | #else 12 | bfin_wait_ready(); 13 | bfin_set_param(idx, val); 14 | return 0; 15 | #endif 16 | return 0; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/control.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | control.h 4 | avr32 5 | aleph 6 | 7 | FIXME: 8 | duplicating param change queue from the blackfin. 9 | this is decidedly sub-optimal but lets get things working. 10 | 11 | parameter changes are stored in a set structure. 12 | maximum one request per parameter enters the queue 13 | 14 | */ 15 | 16 | #ifndef _ALEPH_BFIN_CONTROL_H_ 17 | #define _ALEPH_BFIN_CONTROL_H_ 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | #include "param_common.h" 24 | #include "types.h" 25 | 26 | //--------------------------------------------- 27 | //---- definitions / types 28 | 29 | // add param change to buffer 30 | /// FIXME: uh will this work for params < 0 ? 31 | extern u8 ctl_param_change(u32 param, u32 value); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif // h guard 38 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/delay.c: -------------------------------------------------------------------------------- 1 | #include "delay.h" 2 | 3 | void delay_ms(u32 ticks) { 4 | ;; 5 | } 6 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_AVR32_SIM_DELAY_H_ 2 | #define _ALEPH_AVR32_SIM_DELAY_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "types.h" 9 | 10 | extern void delay_ms(u32 ticks); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/dummy.h: -------------------------------------------------------------------------------- 1 | // this is 512 bytes 2 | "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 3 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/events.h: -------------------------------------------------------------------------------- 1 | /* events.h 2 | * aleph 3 | */ 4 | 5 | #ifndef _EVENTS_H_ 6 | #define _EVENTS_H_ 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | #include "event_types.h" 13 | #include "types.h" 14 | 15 | typedef struct { 16 | etype type; 17 | s32 data; 18 | } event_t; 19 | 20 | 21 | // init event queue 22 | void init_events( void ); 23 | 24 | 25 | // check the queue for pending events 26 | // return 1 if found 27 | u8 event_next( event_t *e ); 28 | 29 | 30 | // add event to tail of queue 31 | // return 1 if success 32 | u8 event_post( event_t *e ); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif // header guard 39 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/filesystem.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_AVR32_FILESYSTEM_H_ 2 | #define _ALEPH_AVR32_FILESYSTEM_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "types.h" 9 | //#include "fat_filelib.h" 10 | 11 | #define FS_BUF_SIZE 512 12 | 13 | //===================================== 14 | //==== vars 15 | // transfer-done flag 16 | extern volatile u8 fsEndTransfer; 17 | // Local RAM buffer to store data to/from the SD/MMC card 18 | extern volatile u8 pdcaRxBuf[FS_BUF_SIZE]; 19 | extern volatile u8 pdcaTxBuf[FS_BUF_SIZE]; 20 | // PDCA rx and tx channels 21 | /* extern volatile avr32_pdca_channel_t* pdcaRxChan ; */ 22 | /* extern volatile avr32_pdca_channel_t* pdcaTxChan ; */ 23 | 24 | //==================================== 25 | //==== funcs 26 | extern int fat_init(void); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif // h guard 33 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/fonts/dejavu_numerals_24.h: -------------------------------------------------------------------------------- 1 | /* font: 2 | deja vu monospave bold, 24px bounds, (30px font height i believe) 3 | 4 | */ 5 | 6 | // for sanity's sake, width and height are preserved from the .xpm file. 7 | // let's hardcode these rather than actually accessing them from memory though. 8 | 9 | #ifndef _FONT_DEJAVU_24_H_ 10 | #define _FONT_DEJAVU_24_H_ 11 | 12 | #define FONT_DEJAVU_W 18 13 | #define FONT_DEJAVU_H 24 14 | 15 | 16 | // datatype for font glyph. 17 | typedef union { 18 | struct { 19 | char w; 20 | char h; 21 | char data[432]; 22 | } glyph; 23 | char raw[434]; 24 | } dejavu_24_glyph; 25 | 26 | // table of glyphs in this font 27 | extern const dejavu_24_glyph font_dejavu_24_numerals[11]; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/fonts/ume_tgo5_18.h: -------------------------------------------------------------------------------- 1 | /* 2 | font: 3 | ume gothic monospace O 5 4 | 18px, 22x18 bounds 5 | */ 6 | 7 | #ifndef _FONT_UME_TGO5_18_H_ 8 | #define _FONT_UME_TGO5_18_H_ 9 | 10 | #define FONT_UME_TGO5_18_W 9 11 | #define FONT_UME_TGO5_18_H 19 12 | 13 | 14 | #define FONT_UME_TG05_18_NGLYPHS 93 15 | 16 | // datatype for font glyph. 17 | typedef union { 18 | struct { 19 | char w; 20 | char h; 21 | char data[171]; 22 | } glyph; 23 | char raw[173]; 24 | } ume_tgo5_18_glyph; 25 | 26 | // table of glyphs in this font 27 | extern const ume_tgo5_18_glyph font_ume_tgo5_18[FONT_UME_TG05_18_NGLYPHS]; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/global.h: -------------------------------------------------------------------------------- 1 | /* global.h 2 | aleph-avr32 3 | 4 | global application variables. 5 | mostly initialized in interrupts.c 6 | where first used. 7 | */ 8 | 9 | #ifndef _GLOBAL_H_ 10 | #define _GLOBAL_H_ 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | #include "types.h" 17 | //#include "net_protected.h" 18 | // extern extlnet_t* ctlnet; 19 | 20 | //---- global buffers 21 | 22 | // RAM buffer for blackfin firmware 23 | extern volatile u8* bfinLdrData; 24 | // size of bfin firmware 25 | extern volatile u32 bfinLdrSize; 26 | 27 | // app timer tick counter 28 | extern volatile u64 tcTicks; 29 | // screen refresh flag 30 | extern volatile u8 refresh; 31 | // current encoder values 32 | extern s32 encVal[4]; 33 | 34 | // FTDI connection flag 35 | extern u8 ftdiPlug; 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/i2c.h: -------------------------------------------------------------------------------- 1 | #ifndef _I2C_H_ 2 | #define _I2C_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | //#include "compiler.h" 9 | #include "types.h" 10 | 11 | // start up i2c (set address and enter slave mode) 12 | extern void i2c_init(u8 address); 13 | // set this unit's chip address 14 | extern void i2c_set_address(u8 address); 15 | // switch to master mode and send something, return to slave mode when done. 16 | extern void i2c_tx(u8 chip, u32 addr, u8 addr_len, u32 data_len, void* data); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // header guard 23 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/interrupts.h: -------------------------------------------------------------------------------- 1 | #ifndef _INTERRUPTS_H_ 2 | #define _INTERRUPTS_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern void register_interrupts(void); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/libfixmath/fix32.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_FIX32_H_ 2 | #define _ALEPH_FIX32_H_ 3 | 4 | 5 | #ifdef ARCH_BFIN // bfin 6 | #include "fract.h" 7 | #include "fract_math.h" 8 | #include 9 | #else // linux 10 | #include "fract32_emu.h" 11 | #endif 12 | 13 | #include "fix.h" 14 | #include "types.h" 15 | 16 | 17 | typedef struct _fix32 { 18 | s32 i; 19 | fract32 fr; 20 | } fix32; 21 | 22 | 23 | 24 | // add b to a with over/underflow protection 25 | extern void add_fix32(fix32* a, fix32* b); 26 | 27 | // subtract 28 | extern void sub_fix32(fix32* a, fix32* b); 29 | 30 | // convert fix16 to fix32 31 | extern void fix16_to_fix32(fix16* in, fix32* out); 32 | 33 | // wrap a 32.32 value to a positive integer range 34 | extern void fix32_wrap_range(fix32* a, u32 upperBound); 35 | 36 | #endif // h guard 37 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/libfixmath/fixmath.h: -------------------------------------------------------------------------------- 1 | #ifndef __libfixmath_fixmath_h__ 2 | #define __libfixmath_fixmath_h__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | /*! 10 | \file fixmath.h 11 | \brief Functions to perform fast accurate fixed-point math operations. 12 | */ 13 | 14 | #include "uint32.h" 15 | #include "int64.h" 16 | #include "fract32.h" 17 | #include "fix16.h" 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/libfixmath/fract32.c: -------------------------------------------------------------------------------- 1 | #include "fract32.h" 2 | 3 | 4 | 5 | fract32_t fract32_create(uint32_t inNumerator, uint32_t inDenominator) { 6 | if(inDenominator <= inNumerator) 7 | return 0xFFFFFFFF; 8 | uint32_t tempMod = (inNumerator % inDenominator); 9 | uint32_t tempDiv = (0xFFFFFFFF / (inDenominator - 1)); 10 | return (tempMod * tempDiv); 11 | } 12 | 13 | fract32_t fract32_invert(fract32_t inFract) { 14 | return (0xFFFFFFFF - inFract); 15 | } 16 | 17 | #ifndef FIXMATH_NO_64BIT 18 | uint32_t fract32_usmul(uint32_t inVal, fract32_t inFract) { 19 | return (uint32_t)(((uint64_t)inVal * (uint64_t)inFract) >> 32); 20 | } 21 | 22 | int32_t fract32_smul(int32_t inVal, fract32_t inFract) { 23 | if(inVal < 0) 24 | return -fract32_usmul(-inVal, inFract); 25 | return fract32_usmul(inVal, inFract); 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/libfixmath/uint32.c: -------------------------------------------------------------------------------- 1 | #include "uint32.h" 2 | 3 | 4 | 5 | uint32_t uint32_log2(uint32_t inVal) { 6 | if(inVal == 0) 7 | return 0; 8 | uint32_t tempOut = 0; 9 | if(inVal >= (1 << 16)) { inVal >>= 16; tempOut += 16; } 10 | if(inVal >= (1 << 8)) { inVal >>= 8; tempOut += 8; } 11 | if(inVal >= (1 << 4)) { inVal >>= 4; tempOut += 4; } 12 | if(inVal >= (1 << 2)) { inVal >>= 2; tempOut += 2; } 13 | if(inVal >= (1 << 1)) { tempOut += 1; } 14 | return tempOut; 15 | } 16 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/libfixmath/uint32.h: -------------------------------------------------------------------------------- 1 | #ifndef __libfixmath_uint32_h__ 2 | #define __libfixmath_uint32_h__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #include 10 | 11 | /*! Performs an unsigned log-base2 on the specified unsigned integer and returns the result. 12 | */ 13 | extern uint32_t uint32_log2(uint32_t inVal); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/memory.h: -------------------------------------------------------------------------------- 1 | /* memory.h 2 | avr32 3 | aleph 4 | 5 | a hacky sort of interface to explicitly allocate consecutive regions of SDRAM 6 | */ 7 | 8 | #ifndef _ALEPH_MEM_H_ 9 | #define _ALEPH_MEM_H_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | #include "types.h" 16 | 17 | #define ALLOC_FAIL 0xffffffff 18 | 19 | // heap memory type 20 | typedef volatile u8 * heap_t; 21 | 22 | // setup heap 23 | extern void init_mem(void); 24 | // allocate and return pointer 25 | extern heap_t alloc_mem(u32 bytes); 26 | extern void free_mem(heap_t mem_ptr); 27 | // test sram 28 | extern void sram_test(u32 sizeDiv, u32 offset); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/regions.h: -------------------------------------------------------------------------------- 1 | /* regions.h 2 | 3 | draw and otherwise manipulate arbitrary grids of pixels. 4 | 5 | */ 6 | 7 | // data type for screen regions 8 | typedef struct _region { 9 | // width 10 | u8 w; 11 | // height 12 | u8 h; 13 | // size (store for speed) 14 | u32 len; 15 | // x offset 16 | u8 x; 17 | // y offset 18 | u8 y; 19 | // dirty flag 20 | u8 dirty; 21 | // data 22 | u8 * data; 23 | } region; 24 | 25 | 26 | // allocate and initialize region 27 | extern void region_init(region* reg); 28 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/serial.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_SERIAL_H_ 2 | #define _ALEPH_SERIAL_H_ 3 | 4 | #include "types.h" 5 | 6 | #define SERIAL_BUFFER_SIZE 1024 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | typedef void(*process_serial_t)(u16); 13 | 14 | extern volatile u8 serial_buffer[SERIAL_BUFFER_SIZE]; 15 | 16 | extern void serial_process(void); 17 | 18 | extern void serial_send_start(u8); 19 | extern void serial_send_byte(u8); 20 | extern void serial_send_long(u32); 21 | extern void serial_send_separator(void); 22 | extern void serial_send_end(void); 23 | 24 | extern void serial_param_num(s32 data); 25 | extern void serial_param_info(s32 data); 26 | extern void serial_param_get(s32 data); 27 | extern void serial_param_set(s32 data); 28 | 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif // h guard 35 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/simple_string.c: -------------------------------------------------------------------------------- 1 | #include "simple_string.h" 2 | 3 | #define SMPSTR_MAX_LEN 256 4 | 5 | // copy with length arg (-1 == until null terminator, no bounds check) 6 | void str_copy(char* dst, const char * src, s8 len) { 7 | u8 i=0; 8 | if(len < 0) { 9 | while(1) { // (i < SMPSTR_MAX_LEN) { 10 | if(src[i] == 0) { 11 | break; 12 | } 13 | dst[i] = src[i]; 14 | i++; 15 | } 16 | } else { 17 | while(i < len) { 18 | dst[i] = src[i]; 19 | i++; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/simple_string.h: -------------------------------------------------------------------------------- 1 | #ifndef _SIMPLE_STRING_H_ 2 | #define _SIMPLE_STRING_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "types.h" 9 | 10 | // copy whole string 11 | //extern void str_copy(const char* src, char * dst); 12 | // copy with length arg (-1 == until null terminator) 13 | extern void str_copy(char* dst, const char * src, s8 len); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/switches.h: -------------------------------------------------------------------------------- 1 | /* switches.h 2 | * aleph 3 | */ 4 | 5 | #ifndef _SWITCHES_H_ 6 | #define _SWITCHES_H_ 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | //#include "compiler.h" 13 | #include "event_types.h" 14 | 15 | #define NUM_SW 8 16 | 17 | // generate events from switch interrupts 18 | extern void process_sw( const U8 swIdx ); 19 | // initialize switch debouncing 20 | extern void init_switches(void); 21 | 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // header guard 28 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/usb.h: -------------------------------------------------------------------------------- 1 | /* usb.h 2 | aleph-avr32 3 | 4 | USB declarations 5 | */ 6 | #ifndef _ALEPH_USB_H_ 7 | #define _ALEPH_USB_H_ 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | //#include "compiler.h" 14 | //#include "uhc.h" 15 | 16 | // usb mode change callback 17 | //void usb_mode_change(bool b_host_mode); 18 | 19 | // usb Vbus change callback 20 | //void usb_vbus_change(bool b_vbus_present); 21 | 22 | // usb vbus error callback 23 | void usb_vbus_error(void); 24 | 25 | // usb connection callback 26 | //void usb_connection(uhc_device_t *dev, bool b_present); 27 | 28 | // usb wakeup callback 29 | void usb_wakeup(void); 30 | 31 | // usb start-of-frame callback 32 | void usb_sof(void); 33 | 34 | // usb end-of-enumeration callback 35 | //void usb_enum(uhc_device_t *dev, uhc_enum_status_t status); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif // header guard 42 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/usb/ftdi/usb_protocol_ftdi.h: -------------------------------------------------------------------------------- 1 | #ifndef _USB_FTDI_PROTOCOL_H_ 2 | #define _USB_FTDI_PROTOCOL_H_ 3 | 4 | /* FTDI data taken from descriptors */ 5 | #define FTDI_ADDR 1 6 | #define FTDI_VID 0x0403 // FTDI VID 7 | #define FTDI_PID 0x6001 // FTDI PID 8 | #define FTDI_CONFIGURATION 1_ 9 | #define FTDI_INTERFACE 0 // Only use interface 0 10 | #define FTDI_NUM_EP 3 11 | #define FTDI_CLASS 0xFF 12 | #define FTDI_SUBCLASS 0xFF 13 | #define FTDI_PROTOCOL 0xFF 14 | 15 | #endif // h guard 16 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/usb/hid/uhi_hid.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_AVR32_USB_UHI_HID_H_ 2 | #define _ALEPH_AVR32_USB_UHI_HID_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "conf_usb_host.h" 9 | #include "usb_protocol.h" 10 | #include "usb_protocol_hid.h" 11 | #include "uhi.h" 12 | 13 | //! Global define which contains standard UHI API for UHC 14 | //! It must be added in USB_HOST_UHI define from conf_usb_host.h file. 15 | #define UHI_HID { \ 16 | .install = uhi_hid_install, \ 17 | .enable = uhi_hid_enable, \ 18 | .uninstall = uhi_hid_uninstall, \ 19 | .sof_notify = NULL, \ 20 | } 21 | extern uhc_enum_status_t uhi_hid_install(uhc_device_t* dev); 22 | extern void uhi_hid_enable(uhc_device_t* dev); 23 | extern void uhi_hid_uninstall(uhc_device_t* dev); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/usb/midi/midi.h: -------------------------------------------------------------------------------- 1 | #ifndef _USB_MIDI_H_ 2 | #define _USB_MIDI_H_ 3 | 4 | #include "types.h" 5 | //#include "uhc.h" 6 | 7 | extern u8 midiConnect; 8 | 9 | // read and spawn events (non-blocking) 10 | extern void midi_read(void); 11 | 12 | // write to MIDI device 13 | extern void midi_write(u8* data, u32 bytes); 14 | 15 | // MIDI device was plugged or unplugged 16 | // extern void midi_change(uhc_device_t* dev, u8 plug); 17 | 18 | // main-loop setup routine for new device connection. 19 | // this is the place to perform any queries which require interrupts, 20 | // and whose completion is necessary before polling. 21 | // extern void midi_setup(void); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /utils/avr32_sim/src/usb/midi/usb_protocol_midi.h: -------------------------------------------------------------------------------- 1 | #ifndef _USB_MIDI_PROTOCOL_H_ 2 | #define _USB_MIDI_PROTOCOL_H_ 3 | 4 | /* FTDI data taken from descriptors */ 5 | 6 | 7 | //#define FTDI_INTERFACE 0 // Only use interface 0 8 | //#define FTDI_NUM_EP 3 9 | #define USB_AUDIO_IFACE_CLASS 0x01 10 | #define USB_MIDI_IFACE_SUBCLASS 0x03 11 | 12 | 13 | 14 | //#define FTDI_SUBCLASS 0xFF 15 | //#define FTDI_PROTOCOL 0xFF 16 | 17 | #endif // h guard 18 | -------------------------------------------------------------------------------- /utils/avr8/USBtoSerial/USBtoSerial.eep: -------------------------------------------------------------------------------- 1 | :00000001FF 2 | -------------------------------------------------------------------------------- /utils/avr8/USBtoSerial/flash.sh: -------------------------------------------------------------------------------- 1 | clear; make avrdude; ./fuses.sh 2 | -------------------------------------------------------------------------------- /utils/avr8/USBtoSerial/fuses.sh: -------------------------------------------------------------------------------- 1 | avrdude -p atmega32u4 -P usb -c avrispmkII -U lfuse:w:0x6e:m -U hfuse:w:0xdf:m -U efuse:w:0xcf:m 2 | -------------------------------------------------------------------------------- /utils/beekeep/README.md: -------------------------------------------------------------------------------- 1 | 'beekeep' is an editor and conversion tool for BEES patches, for use with the monome aleph device. 2 | 3 | it can read and write both the native .scn binary filetype, and a more portable .json representation. 4 | 5 | basic usage: 6 | 7 | ``` 8 | ./beekeep-x.x.x [filename] 9 | ``` 10 | 11 | where [filename] can be .scn or .json. if an input file is ommitted, the editor starts with a blank scene. 12 | 13 | 14 | 15 | 16 | caveats: 17 | 18 | just like BEES, beekeep relies on descriptor files for DSP module parameters. when you enter a module name (e.g. 'aleph-waves') in the editor, it will search the working directory for the corresponding .dsc file, and use it to load parameter scaling routines. the module .dsc files are distributed with aleph firmware releases, and can be built from source in `aleph/modules/foo` 19 | 20 | for instructions on building beekeep from source, see build_osx.md and build_linux.md -------------------------------------------------------------------------------- /utils/beekeep/TODO.md: -------------------------------------------------------------------------------- 1 | ## beekeep editor TODO 2 | 3 | ### major: 4 | 5 | - add scene selection dialog (i guess) 6 | 7 | ### minor: 8 | 9 | - cleaner arguments to the program: 10 | - option to start with empty scene 11 | - options for conversion without GUI 12 | 13 | - add window destroy handler so you don't get core dump on closure 14 | 15 | - finish graphviz output? 16 | 17 | - random display cleanup (margins, etc) -------------------------------------------------------------------------------- /utils/beekeep/build_linux.md: -------------------------------------------------------------------------------- 1 | ### beekeep linux build 2 | 3 | building on linux should be pretty easy. 4 | 5 | the main dependencies are pkg-config, gtk+ 3, and jansson (a jason parsing library.) 6 | 7 | here are the complete steps for installing from a fresh install of vanilla xubuntu: 8 | 9 | ``` 10 | # get packages 11 | sudo apt-get install git curl pkg-config libgtk-3-dev 12 | 13 | # get and install jansson 14 | curl http://www.digip.org/jansson/releases/jansson-2.7.tar.gz > jansson-2.7.tar.gz 15 | tar -xcvf jansson-2.7.tar.gz 16 | cd jansson-2.7 17 | ./configure 18 | make 19 | sudo make install 20 | 21 | # get aleph repository and build beekeep 22 | git clone https://github.com/tehn/aleph.git 23 | cd aleph/utils/beekeep 24 | make 25 | 26 | ``` 27 | 28 | that should do it. -------------------------------------------------------------------------------- /utils/beekeep/dummy_patchlabel.lab: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | baz 4 | -------------------------------------------------------------------------------- /utils/beekeep/grains.lab: -------------------------------------------------------------------------------- 1 | ADC0 2 | ADC1 3 | ADC2 4 | ADC3 5 | ADC4 6 | GRAIN1 7 | GRAIN2 8 | PTOSC1 9 | PTOSC2 10 | ENV1 11 | ENV2 12 | LFO 13 | PING 14 | CV1 15 | CV2 -------------------------------------------------------------------------------- /utils/beekeep/icons.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir MyIcon.iconset 4 | sips -z 16 16 Icon1024.png --out MyIcon.iconset/icon_16x16.png 5 | sips -z 32 32 Icon1024.png --out MyIcon.iconset/icon_16x16@2x.png 6 | sips -z 32 32 Icon1024.png --out MyIcon.iconset/icon_32x32.png 7 | sips -z 64 64 Icon1024.png --out MyIcon.iconset/icon_32x32@2x.png 8 | sips -z 128 128 Icon1024.png --out MyIcon.iconset/icon_128x128.png 9 | sips -z 256 256 Icon1024.png --out MyIcon.iconset/icon_128x128@2x.png 10 | sips -z 256 256 Icon1024.png --out MyIcon.iconset/icon_256x256.png 11 | sips -z 512 512 Icon1024.png --out MyIcon.iconset/icon_256x256@2x.png 12 | sips -z 512 512 Icon1024.png --out MyIcon.iconset/icon_512x512.png 13 | cp Icon1024.png MyIcon.iconset/icon_512x512@2x.png 14 | iconutil -c icns MyIcon.iconset 15 | rm -R MyIcon.iconset -------------------------------------------------------------------------------- /utils/beekeep/py2aleph/Makefile: -------------------------------------------------------------------------------- 1 | all: pyaleph.so 2 | 3 | src += pyaleph.c 4 | 5 | #obj = $(addprefix $(build-dir), $(addsuffix .o,$(basename $(src)))) 6 | 7 | cflags += $(shell /usr/local/bin/python-config --cflags) 8 | 9 | #%.o: %.c 10 | # echo $(cflags) 11 | # $(Q)test -d $(dir $@) || mkdir -p $(dir $@) 12 | # gcc $(cflags) -g -c $< -o $@ 13 | 14 | clean: 15 | rm pyaleph.so pyaleph.pyc 16 | 17 | pyaleph.so: pyaleph.c 18 | gcc $(cflags) -shared -Wl,-soname,pyaleph -o pyaleph.so -fPIC pyaleph.c 19 | -------------------------------------------------------------------------------- /utils/beekeep/py3aleph/Makefile: -------------------------------------------------------------------------------- 1 | all: pyaleph.so 2 | 3 | src += pyaleph.c 4 | 5 | #obj = $(addprefix $(build-dir), $(addsuffix .o,$(basename $(src)))) 6 | 7 | cflags += $(shell /usr/local/bin/python-config --cflags) 8 | 9 | #%.o: %.c 10 | # echo $(cflags) 11 | # $(Q)test -d $(dir $@) || mkdir -p $(dir $@) 12 | # gcc $(cflags) -g -c $< -o $@ 13 | 14 | clean: 15 | rm pyaleph.so pyaleph.pyc 16 | 17 | pyaleph.so: pyaleph.c 18 | gcc $(cflags) -shared -Wl,-soname,pyaleph -o pyaleph.so -fPIC pyaleph.c 19 | -------------------------------------------------------------------------------- /utils/beekeep/python_version2.6.mk: -------------------------------------------------------------------------------- 1 | pyaleph = py2aleph 2 | cflags += $(shell /usr/bin/python2.6-config --cflags) 3 | lflags += $(shell /usr/bin/python2.6-config --ldflags) 4 | -------------------------------------------------------------------------------- /utils/beekeep/python_version2.7.mk: -------------------------------------------------------------------------------- 1 | pyaleph = py2aleph 2 | cflags += $(shell /usr/bin/python2.7-config --cflags) 3 | lflags += $(shell /usr/bin/python2.7-config --ldflags|sed -e s/"-Xlinker -export-dynamic"//) 4 | -------------------------------------------------------------------------------- /utils/beekeep/python_version3.1.mk: -------------------------------------------------------------------------------- 1 | pyaleph = py3aleph 2 | cflags += $(shell /usr/bin/python3.1-config --cflags) 3 | lflags += $(shell /usr/bin/python3.1-config --ldflags) 4 | -------------------------------------------------------------------------------- /utils/beekeep/python_version3.2.mk: -------------------------------------------------------------------------------- 1 | pyaleph = py3aleph 2 | cflags += $(shell /usr/bin/python3.2-config --cflags) 3 | lflags += $(shell /usr/bin/python3.2-config --ldflags|sed -e s/"-Xlinker -export-dynamic"//) 4 | -------------------------------------------------------------------------------- /utils/beekeep/src/dot.h: -------------------------------------------------------------------------------- 1 | /* 2 | output graphviz format 3 | */ 4 | 5 | #ifndef _BEEKEEP_DOT_H_ 6 | #define _BEEKEEP_DOT_H_ 7 | 8 | // export graphviz code to open filepointer 9 | extern void net_write_dot(void* fp); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /utils/beekeep/src/json.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEEKEEP_JSON_H_ 2 | #define _ALEPH_BEEKEEP_JSON_H_ 3 | 4 | #include "jansson.h" 5 | 6 | /* 7 | network <-> json conversion. 8 | */ 9 | 10 | 11 | #include "net_protected.h" 12 | 13 | 14 | // huge-ass string buffer (4MB) 15 | #define STRBUF_LEN 0x400000 16 | char strbuf[STRBUF_LEN]; 17 | 18 | // "raw" format - basically a full dump of network RAM 19 | extern void net_write_json_raw(const char* name); 20 | extern void net_read_json_raw(const char* name); 21 | 22 | // "max" format - scene as max patcher 23 | /* extern void net_write_json_max(const char* name); */ 24 | /* extern void net_read_json_max(const char* name); */ 25 | 26 | // "native" format - condensed, hierarchal representation 27 | extern void net_write_json_native(const char* name); 28 | extern void net_read_json_native(const char* name); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /utils/beekeep/src/ui_files.h: -------------------------------------------------------------------------------- 1 | #ifndef _BEEKEEP_UI_FILES_H_ 2 | #define _BEEKEEP_UI_FILES_H_ 3 | 4 | // working directory 5 | extern char workingDir[]; 6 | 7 | // strip filename from the end of a string 8 | void strip_filename(char* str, u8 len); 9 | 10 | // scan extension 11 | extern void scan_ext(char* filename, char* ext); 12 | 13 | // export .scn file 14 | extern void write_scn(void); 15 | 16 | // export .json file 17 | extern void write_json(void); 18 | 19 | // export graphviz file 20 | extern void write_gv(void); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /utils/beekeep/src/ui_op_menu.h: -------------------------------------------------------------------------------- 1 | #ifndef _BEEKEEP_UI_OP_MENU_ 2 | #define _BEEKEEP_UI_OP_MENU_ 3 | 4 | #include "ui.h" 5 | 6 | //extern GtkWidget* create_op_menu(GtkContainer* parent); 7 | extern GtkWidget* create_op_menu(void); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /utils/beekeep_juce/Builds/MacOSX/RecentFilesMenuTemplate.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/beekeep_juce/Builds/MacOSX/RecentFilesMenuTemplate.nib -------------------------------------------------------------------------------- /utils/beekeep_juce/Builds/VisualStudio2013/resources.rc: -------------------------------------------------------------------------------- 1 | #ifdef JUCE_USER_DEFINED_RC_FILE 2 | #include JUCE_USER_DEFINED_RC_FILE 3 | #else 4 | 5 | #undef WIN32_LEAN_AND_MEAN 6 | #define WIN32_LEAN_AND_MEAN 7 | #include 8 | 9 | VS_VERSION_INFO VERSIONINFO 10 | FILEVERSION 1,0,0,0 11 | BEGIN 12 | BLOCK "StringFileInfo" 13 | BEGIN 14 | BLOCK "040904E4" 15 | BEGIN 16 | VALUE "FileDescription", "beekeep\0" 17 | VALUE "FileVersion", "1.0.0\0" 18 | VALUE "ProductName", "beekeep\0" 19 | VALUE "ProductVersion", "1.0.0\0" 20 | END 21 | END 22 | 23 | BLOCK "VarFileInfo" 24 | BEGIN 25 | VALUE "Translation", 0x409, 1252 26 | END 27 | END 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /utils/beekeep_juce/JuceLibraryCode/ReadMe.txt: -------------------------------------------------------------------------------- 1 | 2 | Important Note!! 3 | ================ 4 | 5 | The purpose of this folder is to contain files that are auto-generated by the Introjucer, 6 | and ALL files in this folder will be mercilessly DELETED and completely re-written whenever 7 | the Introjucer saves your project. 8 | 9 | Therefore, it's a bad idea to make any manual changes to the files in here, or to 10 | put any of your own files in here if you don't want to lose them. (Of course you may choose 11 | to add the folder's contents to your version-control system so that you can re-merge your own 12 | modifications after the Introjucer has saved its changes). 13 | -------------------------------------------------------------------------------- /utils/beekeep_juce/JuceLibraryCode/modules/juce_core/zip/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /utils/beekeep_juce/JuceLibraryCode/modules/juce_data_structures/juce_module_info: -------------------------------------------------------------------------------- 1 | { 2 | "id": "juce_data_structures", 3 | "name": "JUCE data model helper classes", 4 | "version": "4.1.0", 5 | "description": "Classes for undo/redo management, and smart data structures.", 6 | "website": "http://www.juce.com/juce", 7 | "license": "GPL/Commercial", 8 | 9 | "dependencies": [ { "id": "juce_core", "version": "matching" }, 10 | { "id": "juce_events", "version": "matching" } ], 11 | 12 | "include": "juce_data_structures.h", 13 | 14 | "compile": [ { "file": "juce_data_structures.cpp", "target": "! xcode" }, 15 | { "file": "juce_data_structures.mm", "target": "xcode" } ], 16 | 17 | "browse": [ "values/*", 18 | "undomanager/*", 19 | "app_properties/*" ] 20 | } 21 | -------------------------------------------------------------------------------- /utils/beekeep_juce/JuceLibraryCode/modules/juce_graphics/image_formats/jpglib/changes to libjpeg for JUCE.txt: -------------------------------------------------------------------------------- 1 | 2 | I've included libjpeg in the JUCE tree because loading jpegs is a pretty useful thing to 3 | be able to do, but I've left out as many files as possible to keep it lean-and-mean. 4 | 5 | If you want to get hold of the full version of libjpeg, it's freely available at: 6 | 7 | http://www.ijg.org/ 8 | 9 | 10 | Please note that part of the IJG's license for libjpeg states that: 11 | 12 | "If you use it in a program, you must acknowledge somewhere in 13 | your documentation that you've used the IJG code". 14 | 15 | ..so if you release a JUCE program that reads JPEGs, you should probably give them a mention. 16 | 17 | -------------------------------------------------------------------------------- /utils/beekeep_juce/JuceLibraryCode/modules/juce_graphics/image_formats/jpglib/jversion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jversion.h 3 | * 4 | * Copyright (C) 1991-1998, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains software version identification. 9 | */ 10 | 11 | 12 | #define JVERSION "6b 27-Mar-1998" 13 | 14 | #define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" 15 | -------------------------------------------------------------------------------- /utils/beekeep_juce/JuceLibraryCode/modules/juce_graphics/image_formats/pnglib/libpng_readme.txt: -------------------------------------------------------------------------------- 1 | 2 | These files are from the libpng library - http://www.libpng.org/ 3 | -------------------------------------------------------------------------------- /utils/bfin_pd/Makefile.fmsynth: -------------------------------------------------------------------------------- 1 | # Makefile for fmsynth bfin~ 2 | 3 | module_src = ../../modules/fmsynth/fmsynth.c \ 4 | ../../modules/fmsynth/params.c \ 5 | ../../dsp/filter_1p.c \ 6 | ../../dsp/filter_svf.c \ 7 | ../../dsp/ricks_tricks.c \ 8 | ../../dsp/biquad.c \ 9 | ../../dsp/env_adsr.c \ 10 | ../../dsp/osc_polyblep.c \ 11 | ../../dsp/fm_voice.c \ 12 | 13 | module_inc = ../../modules/fmsynth 14 | 15 | include Makefile.common 16 | -------------------------------------------------------------------------------- /utils/bfin_pd/scalers/scaler_amp.h: -------------------------------------------------------------------------------- 1 | /* scaler for amplitude (attentuation only) 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_AMP_H_ 6 | #define _ALEPH_BEES_SCALER_AMP_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | 12 | #define PARAM_SCALER_AMP_DATA_SIZE (1024 * 4 * 2) 13 | 14 | extern void scaler_amp_init(void* scaler); 15 | extern s32 scaler_amp_val(void* scaler, io_t in); 16 | extern void scaler_amp_str(char* dst, void* scaler, io_t in); 17 | extern io_t scaler_amp_in(void* scaler, s32 val); 18 | extern s32 scaler_amp_inc(void* sc, io_t *pin, io_t inc ); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /utils/bfin_pd/scalers/scaler_bool.c: -------------------------------------------------------------------------------- 1 | // boolean parameter 2 | 3 | 4 | #include "op_math.h" 5 | #include "scaler_bool.h" 6 | 7 | void scaler_bool_init(void* scaler) { 8 | ParamScaler* sc = (ParamScaler*)scaler; 9 | 10 | sc->inMin = 0; 11 | sc->inMax = 1; 12 | 13 | } 14 | 15 | s32 scaler_bool_val(void* scaler, io_t in) { 16 | return (in > 0); 17 | } 18 | 19 | void scaler_bool_str(char* dst, void* scaler, io_t in) { 20 | print_fix16(dst, in > 0 ? fix16_one : 0); 21 | } 22 | 23 | io_t scaler_bool_in(void* scaler, s32 val) { 24 | return (val > 0); 25 | } 26 | 27 | // increment input by pointer, return value 28 | s32 scaler_bool_inc(void* sc, io_t* pin, io_t inc ) { 29 | /* *pin = op_sadd(*pin, inc); */ 30 | /* return (*pin > 0); */ 31 | *pin = (inc > 0); 32 | return *pin; 33 | } 34 | -------------------------------------------------------------------------------- /utils/bfin_pd/scalers/scaler_bool.h: -------------------------------------------------------------------------------- 1 | /* scaler for boolean 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_BOOL_H_ 6 | #define _ALEPH_BEES_SCALER_BOOL_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | 12 | 13 | #define PARAM_SCALER_BOOL_DATA_SIZE 0 14 | 15 | extern void scaler_bool_init(void* scaler); 16 | extern s32 scaler_bool_val(void* scaler, io_t in); 17 | extern void scaler_bool_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_bool_in(void* scaler, s32 val); 19 | extern s32 scaler_bool_inc(void* sc, io_t *pin, io_t inc ); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /utils/bfin_pd/scalers/scaler_fix.h: -------------------------------------------------------------------------------- 1 | /* scaler for 16.16 linear 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_FIX_H_ 6 | #define _ALEPH_BEES_SCALER_FIX_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | 12 | 13 | #define PARAM_SCALER_FIX_DATA_SIZE 0 14 | 15 | extern void scaler_fix_init(void* scaler); 16 | extern s32 scaler_fix_val(void* scaler, io_t in); 17 | extern void scaler_fix_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_fix_in(void* scaler, s32 val); 19 | extern s32 scaler_fix_inc(void* sc, io_t *pin, io_t inc ); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /utils/bfin_pd/scalers/scaler_fract.h: -------------------------------------------------------------------------------- 1 | /* scaler for 1.31 fract 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_FRACT_H_ 6 | #define _ALEPH_BEES_SCALER_FRACT_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | 12 | 13 | #define PARAM_SCALER_FRACT_DATA_SIZE 0 14 | 15 | extern void scaler_fract_init(void* scaler); 16 | extern s32 scaler_fract_val(void* scaler, io_t in); 17 | extern void scaler_fract_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_fract_in(void* scaler, s32 val); 19 | extern s32 scaler_fract_inc(void* sc, io_t *pin, io_t inc ); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /utils/bfin_pd/scalers/scaler_integrator.h: -------------------------------------------------------------------------------- 1 | /* scaler for 1-pole integrator, decay time 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_INTEGRATOR_H_ 6 | #define _ALEPH_BEES_SCALER_INTEGRATOR_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | 12 | 13 | //#define PARAM_SCALER_INTEGRATOR_DATA_SIZE (1024 * 4 * 2) 14 | #define PARAM_SCALER_INTEGRATOR_DATA_SIZE (1024 * 4) 15 | 16 | extern void scaler_integrator_init(void* scaler); 17 | extern s32 scaler_integrator_val(void* scaler, io_t in); 18 | extern void scaler_integrator_str(char* dst, void* scaler, io_t in); 19 | extern io_t scaler_integrator_in(void* scaler, s32 val); 20 | extern s32 scaler_integrator_inc(void* sc, io_t *pin, io_t inc ); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /utils/bfin_pd/scalers/scaler_integrator_short.h: -------------------------------------------------------------------------------- 1 | /* scaler for 1-pole 16b integrator, decay time 2 | 3 | */ 4 | #ifndef _ALEPH_BEES_SCALER_INTEGRATOR_SHORT_H_ 5 | #define _ALEPH_BEES_SCALER_INTEGRATOR_SHORT_H_ 6 | 7 | 8 | #include "param_scaler.h" 9 | #include "types.h" 10 | 11 | 12 | //#define PARAM_SCALER_INTEGRATOR_SHORT_DATA_SIZE (1024 * 4 * 2) 13 | #define PARAM_SCALER_INTEGRATOR_SHORT_DATA_SIZE (1024 * 4) 14 | 15 | extern void scaler_integrator_short_init(void* scaler); 16 | extern s32 scaler_integrator_short_val(void* scaler, io_t in); 17 | extern void scaler_integrator_short_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_integrator_short_in(void* scaler, s32 val); 19 | extern s32 scaler_integrator_short_inc(void* sc, io_t *pin, io_t inc ); 20 | 21 | #endif // h guard 22 | -------------------------------------------------------------------------------- /utils/bfin_pd/scalers/scaler_label.h: -------------------------------------------------------------------------------- 1 | /* scaler for patch matrix 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_PATCH_H_ 6 | #define _ALEPH_BEES_SCALER_PATCH_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | 12 | 13 | #define PARAM_SCALER_PATCH_DATA_SIZE (1024 * 4 * 2) 14 | 15 | extern void scaler_start_parse_labels (void); 16 | extern void scaler_parse_labels_char (char c); 17 | extern void scaler_labels_init(void* scaler); 18 | extern s32 scaler_labels_val(void* scaler, io_t in); 19 | extern void scaler_labels_str(char* dst, void* scaler, io_t in); 20 | extern io_t scaler_labels_in(void* scaler, s32 val); 21 | extern s32 scaler_labels_inc(void* sc, io_t *pin, io_t inc ); 22 | 23 | #define MAX_LABELS 64 24 | #define LABEL_LENGTH 64 25 | 26 | extern char scaler_labels[MAX_LABELS][LABEL_LENGTH]; 27 | extern int scaler_n_labels; 28 | 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /utils/bfin_pd/scalers/scaler_note.h: -------------------------------------------------------------------------------- 1 | /* scaler for midi note + 8-step micro 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_NOTE_H_ 6 | #define _ALEPH_BEES_SCALER_NOTE_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | 12 | 13 | #define PARAM_SCALER_NOTE_DATA_SIZE (1024 * 4) 14 | 15 | extern void scaler_note_init(void* scaler); 16 | extern s32 scaler_note_val(void* scaler, io_t in); 17 | extern void scaler_note_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_note_in(void* scaler, s32 val); 19 | extern s32 scaler_note_inc(void* sc, io_t *pin, io_t inc ); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /utils/bfin_pd/scalers/scaler_short.h: -------------------------------------------------------------------------------- 1 | /* scaler for 16b signed integer 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_SHORT_H_ 6 | #define _ALEPH_BEES_SCALER_SHORT_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | 12 | 13 | #define PARAM_SCALER_SHORT_DATA_SIZE 0 14 | 15 | extern void scaler_short_init(void* scaler); 16 | extern s32 scaler_short_val(void* scaler, io_t in); 17 | extern void scaler_short_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_short_in(void* scaler, s32 val); 19 | extern s32 scaler_short_inc(void* sc, io_t *pin, io_t inc ); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /utils/bfin_pd/scalers/scaler_svf_fc.h: -------------------------------------------------------------------------------- 1 | /* scaler for svf corner frequency (as midi note) 2 | 3 | */ 4 | 5 | #ifndef _ALEPH_BEES_SCALER_SVF_FC_H_ 6 | #define _ALEPH_BEES_SCALER_SVF_FC_H_ 7 | 8 | 9 | #include "param_scaler.h" 10 | #include "types.h" 11 | 12 | 13 | #define PARAM_SCALER_SVF_FC_DATA_SIZE (1024 * 4) 14 | 15 | extern void scaler_svf_fc_init(void* scaler); 16 | extern s32 scaler_svf_fc_val(void* scaler, io_t in); 17 | extern void scaler_svf_fc_str(char* dst, void* scaler, io_t in); 18 | extern io_t scaler_svf_fc_in(void* scaler, s32 val); 19 | extern s32 scaler_svf_fc_inc(void* sc, io_t *pin, io_t inc ); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /utils/bfin_pd/test.pd: -------------------------------------------------------------------------------- 1 | #N canvas 0 46 749 720 10; 2 | #X obj 161 230 bfin~ 0 0 0; 3 | #X obj 208 200 adc~ 1 2 3 4; 4 | #X obj 160 277 dac~ 1 2 3 4; 5 | #X floatatom 234 76 5 0 0 0 - - -, f 5; 6 | #X msg 36 161 describe; 7 | #X obj 97 90 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 8 | ; 9 | #X obj 119 127 list prepend; 10 | #X msg 110 161 param \$1 \$2; 11 | #X floatatom 123 65 5 0 0 0 - - -, f 5; 12 | #X msg 216 161 describe \$1; 13 | #X obj 231 20 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 14 | -1; 15 | #X connect 0 0 2 0; 16 | #X connect 0 1 2 1; 17 | #X connect 0 2 2 2; 18 | #X connect 0 3 2 3; 19 | #X connect 1 0 0 0; 20 | #X connect 1 1 0 1; 21 | #X connect 1 2 0 2; 22 | #X connect 1 3 0 3; 23 | #X connect 3 0 6 1; 24 | #X connect 3 0 9 0; 25 | #X connect 4 0 0 0; 26 | #X connect 5 0 6 0; 27 | #X connect 6 0 7 0; 28 | #X connect 7 0 0 0; 29 | #X connect 8 0 6 0; 30 | #X connect 9 0 0 0; 31 | #X connect 10 0 3 0; 32 | -------------------------------------------------------------------------------- /utils/bfin_sim/fract2float_conv.h: -------------------------------------------------------------------------------- 1 | #ifndef _FRACT2FLOAT_CONV_H 2 | #define _FRACT2FLOAT_CONV_H 3 | 4 | #include "types.h" 5 | 6 | fract32 fr16_to_fr32(fract16 _x); 7 | 8 | 9 | fract16 fr32_to_fr16(fract32 _x); 10 | 11 | fract32 float_to_fr32 (float _x); 12 | fract16 float_to_fr16 (float _x); 13 | 14 | float fr32_to_float (fract32 _x); 15 | float fr16_to_float (fract16 _x); 16 | 17 | #endif /* _FRACT2FLOAT_CONV_H */ 18 | -------------------------------------------------------------------------------- /utils/bfin_sim/src/cv.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BFIN_DAC_H_ 2 | #define _ALEPH_BFIN_DAC_H_ 3 | 4 | #include "bfin_core.h" 5 | 6 | #define CV_DAC_VALUE_MASK 0xffff 7 | 8 | // initialize CV dac 9 | extern void init_cv(void); 10 | 11 | // update given CV channel. 12 | // input is assumed to be in [0, 0x7fffffff] 13 | extern void cv_update(u8 ch, fract32 val); 14 | 15 | #endif // h guard 16 | -------------------------------------------------------------------------------- /utils/bfin_sim/src/isr.h: -------------------------------------------------------------------------------- 1 | /* isr.h* 2 | * aleph-blackfin audio core 3 | * 4 | * function prototypes for interrupt service routines 5 | */ 6 | 7 | #ifndef _ALEPH_BFIN_ISR_H_ 8 | #define _ALEPH_BFIN_ISR_H_ 9 | 10 | // sport0 receive interrupt (ad1836) 11 | void sport0_rx_isr() __attribute((interrupt_handler)); 12 | // sport1 transmit interrupt (ad5686R) 13 | void sport1_tx_isr() __attribute((interrupt_handler)); 14 | 15 | // spi data receive interrupt (avr32) 16 | void spi_rx_isr() __attribute__((interrupt_handler)); 17 | // programmable flag interrupt (buttons) 18 | void pf_isr() __attribute__((interrupt_handler)); 19 | 20 | #endif // header guard 21 | -------------------------------------------------------------------------------- /utils/bfin_sim/src/libfixmath/fix16_fract.c: -------------------------------------------------------------------------------- 1 | #include "fix16_fract.h" 2 | // multiply 2 numbers in 16.16 base making use of blackfin fract 3 | // primitives 4 | fract32 fix16_mul_fract(fract32 a, fract32 b) { 5 | char a_radix = norm_fr1x32(a); 6 | char b_radix = norm_fr1x32(b); 7 | return shl_fr1x32(mult_fr1x32x32(shl_fr1x32(a, a_radix), shl_fr1x32(b, b_radix)), 8 | 15 - a_radix - b_radix); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /utils/bfin_sim/src/libfixmath/fix16_fract.h: -------------------------------------------------------------------------------- 1 | #ifndef __fix16_fract_h__ 2 | #define __fix16_fract_h__ 3 | 4 | /* #include "types.h" */ 5 | #include "fix.h" 6 | #include "fract_math.h" 7 | 8 | 9 | static inline fix16 fix16_mul_fract(fix16 a, fix16 b) { 10 | u8 a_radix = norm_fr1x32(a); 11 | u8 b_radix = norm_fr1x32(b); 12 | return shl_fr1x32(mult_fr1x32x32(shl_fr1x32(a, a_radix), 13 | shl_fr1x32(b, b_radix)), 14 | 15 - a_radix - b_radix); 15 | } 16 | 17 | static inline fix16 fix16_mul_fract_radix(fix16 a, fix16 b, u8 r) { 18 | return shl_fr1x32(mult_fr1x32x32(shl_fr1x32(a, r), 19 | shl_fr1x32(b, r)), 20 | 15 - r - r); 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /utils/bfin_sim/src/libfixmath/fix32.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_FIX32_H_ 2 | #define _ALEPH_FIX32_H_ 3 | 4 | 5 | #ifdef ARCH_BFIN // bfin 6 | #include "fract.h" 7 | #include "fract_math.h" 8 | #include 9 | #else // linux 10 | #include "fract32_emu.h" 11 | #endif 12 | 13 | #include "fix.h" 14 | #include "types.h" 15 | 16 | 17 | typedef struct _fix32 { 18 | u32 i; 19 | fract32 fr; 20 | } fix32; 21 | 22 | 23 | 24 | // add b to a with over/underflow protection 25 | //extern void add_fix32(fix32* a, fix32* b); 26 | 27 | // subtract 28 | //extern void sub_fix32(fix32* a, fix32* b); 29 | 30 | // convert fix16 to fix32 31 | //extern void fix16_to_fix32(fix16* in, fix32* out); 32 | 33 | // wrap a 32.32 value to a positive integer range 34 | //extern void fix32_wrap_range(fix32* a, u32 upperBound); 35 | 36 | #endif // h guard 37 | -------------------------------------------------------------------------------- /utils/bfin_sim/src/libfixmath/fixmath.h: -------------------------------------------------------------------------------- 1 | #ifndef __libfixmath_fixmath_h__ 2 | #define __libfixmath_fixmath_h__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | /*! 10 | \file fixmath.h 11 | \brief Functions to perform fast accurate fixed-point math operations. 12 | */ 13 | 14 | #include "uint32.h" 15 | #include "int64.h" 16 | #include "fract32.h" 17 | #include "fix16.h" 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /utils/bfin_sim/src/libfixmath/fract32.c: -------------------------------------------------------------------------------- 1 | #include "fract32.h" 2 | 3 | 4 | 5 | fract32_t fract32_create(uint32_t inNumerator, uint32_t inDenominator) { 6 | if(inDenominator <= inNumerator) 7 | return 0xFFFFFFFF; 8 | uint32_t tempMod = (inNumerator % inDenominator); 9 | uint32_t tempDiv = (0xFFFFFFFF / (inDenominator - 1)); 10 | return (tempMod * tempDiv); 11 | } 12 | 13 | fract32_t fract32_invert(fract32_t inFract) { 14 | return (0xFFFFFFFF - inFract); 15 | } 16 | 17 | #ifndef FIXMATH_NO_64BIT 18 | uint32_t fract32_usmul(uint32_t inVal, fract32_t inFract) { 19 | return (uint32_t)(((uint64_t)inVal * (uint64_t)inFract) >> 32); 20 | } 21 | 22 | int32_t fract32_smul(int32_t inVal, fract32_t inFract) { 23 | if(inVal < 0) 24 | return -fract32_usmul(-inVal, inFract); 25 | return fract32_usmul(inVal, inFract); 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /utils/bfin_sim/src/libfixmath/uint32.c: -------------------------------------------------------------------------------- 1 | #include "uint32.h" 2 | 3 | 4 | 5 | uint32_t uint32_log2(uint32_t inVal) { 6 | if(inVal == 0) 7 | return 0; 8 | uint32_t tempOut = 0; 9 | if(inVal >= (1 << 16)) { inVal >>= 16; tempOut += 16; } 10 | if(inVal >= (1 << 8)) { inVal >>= 8; tempOut += 8; } 11 | if(inVal >= (1 << 4)) { inVal >>= 4; tempOut += 4; } 12 | if(inVal >= (1 << 2)) { inVal >>= 2; tempOut += 2; } 13 | if(inVal >= (1 << 1)) { tempOut += 1; } 14 | return tempOut; 15 | } 16 | -------------------------------------------------------------------------------- /utils/bfin_sim/src/libfixmath/uint32.h: -------------------------------------------------------------------------------- 1 | #ifndef __libfixmath_uint32_h__ 2 | #define __libfixmath_uint32_h__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #include 10 | 11 | /*! Performs an unsigned log-base2 on the specified unsigned integer and returns the result. 12 | */ 13 | extern uint32_t uint32_log2(uint32_t inVal); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /utils/bfin_sim/src/pickle.h: -------------------------------------------------------------------------------- 1 | /* 2 | pickle.h 3 | 4 | utilities for object serialization. 5 | (force endianness) 6 | 7 | */ 8 | 9 | #ifndef _ALEPH_BEES_PICKLE_H_ 10 | #define _ALEPH_BEES_PICKLE_H_ 11 | 12 | #include "types.h" 13 | 14 | // 32-bit 15 | extern u8* pickle_32(const u32 src, u8* dst); 16 | extern const u8* unpickle_32(const u8* src, u32* dst); 17 | 18 | // 16-bit 19 | // ... probably never a great idea; 20 | /// seems more convenient to maintain 4-byte alignment. 21 | extern u8* pickle_16(const u16 src, u8* dst); 22 | extern const u8* unpickle_16(const u8* src, u16* dst); 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /utils/bfin_sim/src/util.c: -------------------------------------------------------------------------------- 1 | #include "types.h" 2 | #include "util.h" 3 | 4 | // swap the next N bytes starting from pointer 5 | void byte_swap(u8* pData, u8 nb) { 6 | u8 tmp[nb]; 7 | u8 i; 8 | for(i=0; i> 3) 10 | #define BITSET(a, b) ((a)[BITSLOT(b)] |= BITMASK(b)) 11 | #define BITCLEAR(a, b) ((a)[BITSLOT(b)] &= ~BITMASK(b)) 12 | #define BITFLIP(a, b) ((a)[BITSLOT(b)] ^= BIT(b)) 13 | #define BITTEST(a, b) (((a)[BITSLOT(b)] & BITMASK(b)) > 0) 14 | #define BITNSLOTS(nb) ((nb + BITS_PER_BYTE - 1) >> 3) 15 | 16 | // and some byte-swapping functions, unfortunately! 17 | void byte_swap(u8* pTarget, u8 bytes); 18 | 19 | #endif // header guard 20 | -------------------------------------------------------------------------------- /utils/bintool/README.md: -------------------------------------------------------------------------------- 1 | bintool 2 | 3 | a very basic utility for including arbitrary binary data as a static array in a C program. 4 | 5 | compile it: 6 | gcc bintool.c -o bintool 7 | 8 | run it: 9 | ./bintool ~/aleph/modules/mix/aleph-mix.ldr 10 | 11 | this should result in two files: 12 | 13 | ~/aleph/modules/mix/aleph-mix.ldr.inc 14 | - a comma-separated list of byte values, suitable for inclusion in a C array. 15 | 16 | ~/aleph/modules/mix/aleph-mix.ldr_size.inc 17 | - a single value, the number of bytes in the data. 18 | 19 | 20 | use the results in a C program something like this: 21 | 22 | ``` 23 | static const unsigned long int ldrSize = 24 | #include "aleph-mix.ldr_size.inc" 25 | ; 26 | 27 | static const unsigned char ldrData[] = { 28 | #include "aleph-mix.ldr.inc" 29 | }; 30 | ``` 31 | -------------------------------------------------------------------------------- /utils/bmp/untitled.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *untitled[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "11 24 16 1", 5 | " c #010101", 6 | ". c #353535", 7 | "X c #464646", 8 | "o c #5A5A5A", 9 | "O c #686868", 10 | "+ c #767676", 11 | "@ c #888888", 12 | "# c #979797", 13 | "$ c #B7B7B7", 14 | "% c #C6C6C6", 15 | "& c gray91", 16 | "* c gray100", 17 | "= c gray100", 18 | "- c gray100", 19 | "; c gray100", 20 | ": c gray100", 21 | /* pixels */ 22 | "***********", 23 | "***********", 24 | "***********", 25 | "***********", 26 | "***********", 27 | "&$#+. #****", 28 | "O X****", 29 | "@ . X****", 30 | "*&**o X****", 31 | "****o X****", 32 | "****o X****", 33 | "****o X****", 34 | "****o X****", 35 | "****o X****", 36 | "****o X****", 37 | "****o X****", 38 | "**&*X .&&**", 39 | "$ %", 40 | "# %", 41 | "*%%%%%%%%%*", 42 | "***********", 43 | "***********", 44 | "***********", 45 | "***********" 46 | }; 47 | -------------------------------------------------------------------------------- /utils/bmp/xpm-convert: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/bmp/xpm-convert -------------------------------------------------------------------------------- /utils/i2c-repeater/i2c-repeater: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/i2c-repeater/i2c-repeater -------------------------------------------------------------------------------- /utils/param_scaling/scaler_amp_rep.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/param_scaling/scaler_amp_rep.dat -------------------------------------------------------------------------------- /utils/param_scaling/scaler_amp_val.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/param_scaling/scaler_amp_val.dat -------------------------------------------------------------------------------- /utils/param_scaling/scaler_integrator_rep.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/param_scaling/scaler_integrator_rep.dat -------------------------------------------------------------------------------- /utils/param_scaling/scaler_integrator_short_rep.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/param_scaling/scaler_integrator_short_rep.dat -------------------------------------------------------------------------------- /utils/param_scaling/scaler_integrator_short_val.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/param_scaling/scaler_integrator_short_val.dat -------------------------------------------------------------------------------- /utils/param_scaling/scaler_integrator_val.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/param_scaling/scaler_integrator_val.dat -------------------------------------------------------------------------------- /utils/param_scaling/scaler_note_12tet_val.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/param_scaling/scaler_note_12tet_val.dat -------------------------------------------------------------------------------- /utils/param_scaling/scaler_note_val.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/param_scaling/scaler_note_val.dat -------------------------------------------------------------------------------- /utils/param_scaling/scaler_svf_fc_val.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/param_scaling/scaler_svf_fc_val.dat -------------------------------------------------------------------------------- /utils/pd/.gitignore: -------------------------------------------------------------------------------- 1 | *.pd_linux -------------------------------------------------------------------------------- /utils/pd/README.md: -------------------------------------------------------------------------------- 1 | # PD external for Bees 2 | 3 | ## Building 4 | 5 | 1. Find m_pd.h (`locate m_pd.h` if your platform supports) 6 | 1. Install liblo (`brew install liblo` on the macOS platform) 7 | 1. Install jansson (`brew install jansson` on the macOS platform) 8 | 1. Build with `make PDINCLUDEDIR=/path/to/include` 9 | 1. Copy `bees_op.pd_darwin` (on the macOS platform) to ~/Library/Pd/bees_op/ 10 | 1. open one of the example patches like `bees_op_example.pd` 11 | 12 | ## Use 13 | 14 | All operators are mapped to objects named [BEES_$OPNAME] where $OPPNAME is the name of the operator. For example, [BEES_MUL] is a multiplication operator. 15 | 16 | ## Importing scene graph from Aleph 17 | 18 | 1. Plug SD card into computer 19 | 1. Convert scene file into JSON 20 | 1. ??? 21 | 22 | ## Exporting PD patch to Aleph 23 | 24 | TBD 25 | -------------------------------------------------------------------------------- /utils/pd/aleph_op_mul.pd: -------------------------------------------------------------------------------- 1 | #N canvas 0 29 1918 369 10; 2 | #X msg 854 279 trig 1; 3 | #X obj 858 469 aleph_op_mul; 4 | #X floatatom 880 567 5 0 0 0 - - -, f 5; 5 | #X msg 795 272 a 16; 6 | #X msg 750 274 b 65; 7 | #X connect 0 0 1 0; 8 | #X connect 1 0 2 0; 9 | #X connect 3 0 1 0; 10 | #X connect 4 0 1 0; 11 | -------------------------------------------------------------------------------- /utils/pd/bees_op_basic.pd: -------------------------------------------------------------------------------- 1 | #N canvas 0 46 1364 720 10; 2 | #X obj 37 37 bees_op; 3 | -------------------------------------------------------------------------------- /utils/pd/bees_op_example.pd: -------------------------------------------------------------------------------- 1 | #N canvas 0 46 1364 720 10; 2 | #X obj 37 37 bees_op; 3 | #X obj 306 184 BEES_Y; 4 | #X floatatom 307 108 5 0 0 0 - - -, f 5; 5 | #X floatatom 293 245 5 0 0 0 - - -, f 5; 6 | #X floatatom 355 257 5 0 0 0 - - -, f 5; 7 | #X obj 387 311 BEES_Y; 8 | #X floatatom 387 363 5 0 0 0 - - -, f 5; 9 | #X floatatom 467 391 5 0 0 0 - - -, f 5; 10 | #X floatatom 455 204 5 0 0 0 - - -, f 5; 11 | #X obj 279 362 BEES_MUL; 12 | #X floatatom 282 421 5 0 0 0 - - -, f 5; 13 | #X connect 1 0 3 0; 14 | #X connect 1 1 4 0; 15 | #X connect 2 0 1 1; 16 | #X connect 3 0 9 1; 17 | #X connect 4 0 5 1; 18 | #X connect 5 0 6 0; 19 | #X connect 5 1 7 0; 20 | #X connect 8 0 5 1; 21 | #X connect 8 0 9 2; 22 | #X connect 9 0 10 0; 23 | -------------------------------------------------------------------------------- /utils/pd/dot.h: -------------------------------------------------------------------------------- 1 | /* 2 | output graphviz format 3 | */ 4 | 5 | #ifndef _BEEKEEP_DOT_H_ 6 | #define _BEEKEEP_DOT_H_ 7 | 8 | // export graphviz code to open filepointer 9 | extern void net_write_dot(void* fp); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /utils/pd/json.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALEPH_BEEKEEP_JSON_H_ 2 | #define _ALEPH_BEEKEEP_JSON_H_ 3 | 4 | #include "jansson.h" 5 | 6 | /* 7 | network <-> json conversion. 8 | */ 9 | 10 | 11 | #include "net_protected.h" 12 | 13 | 14 | // huge-ass string buffer (4MB) 15 | #define STRBUF_LEN 0x400000 16 | char strbuf[STRBUF_LEN]; 17 | 18 | // "raw" format - basically a full dump of network RAM 19 | extern void net_write_json_raw(const char* name); 20 | extern void net_read_json_raw(const char* name); 21 | 22 | // "max" format - scene as max patcher 23 | /* extern void net_write_json_max(const char* name); */ 24 | /* extern void net_read_json_max(const char* name); */ 25 | 26 | // "native" format - condensed, hierarchal representation 27 | extern void net_write_json_native(const char* name); 28 | extern void net_read_json_native(const char* name); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /utils/pd/ui_files.h: -------------------------------------------------------------------------------- 1 | #ifndef _BEEKEEP_UI_FILES_H_ 2 | #define _BEEKEEP_UI_FILES_H_ 3 | 4 | // working directory 5 | extern char workingDir[]; 6 | 7 | // strip filename from the end of a string 8 | void strip_filename(char* str, u8 len); 9 | 10 | // scan extension 11 | extern void scan_ext(char* filename, char* ext); 12 | 13 | // export .scn file 14 | extern void write_scn(void); 15 | 16 | // export .json file 17 | extern void write_json(void); 18 | 19 | // export graphviz file 20 | extern void write_gv(void); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /utils/pd/ui_op_menu.h: -------------------------------------------------------------------------------- 1 | #ifndef _BEEKEEP_UI_OP_MENU_ 2 | #define _BEEKEEP_UI_OP_MENU_ 3 | 4 | #include "ui.h" 5 | 6 | //extern GtkWidget* create_op_menu(GtkContainer* parent); 7 | extern GtkWidget* create_op_menu(void); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /utils/release/copy.command: -------------------------------------------------------------------------------- 1 | cd $(dirname "$0") 2 | cp -v -R ./* /Volumes/ALEPH/ 3 | echo "ejecting..." 4 | diskutil unmount ALEPH 5 | -------------------------------------------------------------------------------- /utils/release/scenes-0.7.1/crickets.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/release/scenes-0.7.1/crickets.scn -------------------------------------------------------------------------------- /utils/release/scenes-0.7.1/cvtest.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/release/scenes-0.7.1/cvtest.scn -------------------------------------------------------------------------------- /utils/release/scenes-0.7.1/default.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/release/scenes-0.7.1/default.scn -------------------------------------------------------------------------------- /utils/release/scenes-0.7.1/dsyn_test.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/release/scenes-0.7.1/dsyn_test.scn -------------------------------------------------------------------------------- /utils/release/scenes-0.7.1/life.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/release/scenes-0.7.1/life.scn -------------------------------------------------------------------------------- /utils/release/scenes-0.7.1/mpdrumssss.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/release/scenes-0.7.1/mpdrumssss.scn -------------------------------------------------------------------------------- /utils/release/scenes-0.7.1/skitter.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/release/scenes-0.7.1/skitter.scn -------------------------------------------------------------------------------- /utils/release/scenes-0.7.1/space.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/release/scenes-0.7.1/space.scn -------------------------------------------------------------------------------- /utils/release/scenes-0.7.1/stepcvout.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/release/scenes-0.7.1/stepcvout.scn -------------------------------------------------------------------------------- /utils/release/scenes-0.7.1/stepwaves.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/release/scenes-0.7.1/stepwaves.scn -------------------------------------------------------------------------------- /utils/release/scenes-0.7.1/stepwavescv.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/release/scenes-0.7.1/stepwavescv.scn -------------------------------------------------------------------------------- /utils/release/scenes-0.7.1/this.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monome/aleph/2275cd49e6da26a3a11f7bd4a81e7cf52e400026/utils/release/scenes-0.7.1/this.scn -------------------------------------------------------------------------------- /utils/tabletool/Makefile: -------------------------------------------------------------------------------- 1 | # compiler flags 2 | CC = gcc 3 | CFLAGS += -std=gnu99 4 | CFLAGS += -g3 5 | # CFLAGS += --verbose 6 | 7 | #linker flags 8 | LDFLAGS = -lm 9 | 10 | # source directories 11 | COMMON = ../../common 12 | LIBFIXMATH = $(COMMON)/libfixmath 13 | 14 | #include paths 15 | INC := -I$(COMMON) -I$(LIBFIXMATH) 16 | 17 | # common object list for all modules 18 | APP_OBJ = tables.o \ 19 | $(LIBFIXMATH)/fix16.o \ 20 | $(COMMON)/fix.o 21 | 22 | $(APP_OBJ): %.o : %.c 23 | $(CC) $(CFLAGS) $(INC) -c -o $@ $< $(LDFLAGS) 24 | 25 | # mono module 26 | 27 | tabletool : $(APP_OBJ) 28 | $(CC) $(CFLAGS) $(INC) -o $@ $^ $(LDFLAGS) 29 | 30 | clean: 31 | rm $(APP_OBJ) -------------------------------------------------------------------------------- /utils/tabletool/plot_deltas.plt: -------------------------------------------------------------------------------- 1 | # unset xtics 2 | # unset ytics 3 | 4 | set style line 1 lt rgb "#ff0000" lw 1 ps 1 pt 1 5 | set style line 2 lt rgb "#00ff00" lw 1 ps 1 pt 2 6 | 7 | plot "floatDeltaOut.txt" using 1:2 ls 1 title "float dy" w linespoints, \ 8 | "fixDeltaOut.txt" using 1:2 ls 2 title "fix dy" w linespoints 9 | 10 | pause -1 -------------------------------------------------------------------------------- /utils/tabletool/plot_interp.plt: -------------------------------------------------------------------------------- 1 | # unset xtics 2 | # unset ytics 3 | 4 | set style line 1 lt rgb "#ff0000" lw 1 ps 1 pt 1 5 | set style line 2 lt rgb "#00ff00" lw 1 ps 1 pt 2 6 | 7 | plot "floatInterpOut.txt" using 1:2 ls 1 title "float z" w linespoints, \ 8 | "fixInterpOut.txt" using 1:2 ls 2 title "fix z" w linespoints 9 | 10 | pause -1 -------------------------------------------------------------------------------- /utils/tabletool/plot_values.plt: -------------------------------------------------------------------------------- 1 | # unset xtics 2 | # unset ytics 3 | 4 | set style line 1 lt rgb "#ff0000" lw 2 ps 1 pt 0 5 | set style line 2 lt rgb "#00ff00" lw 2 ps 1 pt 0 6 | set style line 3 lt rgb "#0000ff" lw 2 ps 1 pt 0 7 | set style line 4 lt rgb "#cccc00" lw 2 ps 1 pt 0 8 | set style line 5 lt rgb "#cc00cc" lw 2 ps 1 pt 0 9 | set style line 6 lt rgb "#00cc00" lw 2 ps 1 pt 0 10 | set style line 7 lt rgb "#ff8800" lw 2 ps 1 pt 0 11 | set style line 8 lt rgb "#8800ff" lw 2 ps 1 pt 0 12 | set style line 9 lt rgb "#00ff88" lw 2 ps 1 pt 0 13 | 14 | plot "floatValueOut.txt" using 1:2 ls 1 title "float y" w linespoints, \ 15 | "fixValueOut.txt" using 1:2 ls 2 title "fix y" w linespoints 16 | 17 | pause -1 --------------------------------------------------------------------------------