This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# synthio_midi_synth.py - pretty usable MIDI-controlled synth using synthio in CircuitPython | |
# 11 May 2023 - @todbot / Tod Kurt | |
# Uses cheapie PCM5102 DAC on QTPY RP2040 | |
# Video demo: https://www.youtube.com/watch?v=N-PbbWWDE6k | |
# Features: | |
# - midi velocity controls attack rate (gentle press = slow, hard press = fast) | |
# - notes have small random detune on all oscillators to reduce phase stacking | |
# - adjustable number of detuned oscillators per note 1-5 (midi controller 83) | |
# - five selectable waveforms: saw, squ, sin, noisy sin, noise (midi controller 82) | |
# - vibrato depth on mod wheel (midi controller 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://vsavkin.com/functional-typescript-316f0e003dc6 | |
class Employee { | |
constructor(public name: string, public salary: number) {} | |
} | |
class Department { | |
constructor(public employees: Employee[]) {} | |
works(employee: Employee): boolean { |