Casey Anderson, 2022
Note OMXPlayer is being "phased out" in favor of VLC, this tutorial assumes usage of Raspbian Buster Lite (Legacy), under which OMXPlayer is still available via aptitude
| // SynthDefs | |
| ( | |
| SynthDef(\sin, { |amp = 0.0, end = 2, freq = 300, len = 2, max = 0.7, maxdelay = 1, min = 0.2, start = 1, trig = 1| | |
| var env, line, sig; | |
| env = EnvGen.kr(Env.perc(len * 0.25, len * 0.75), trig, doneAction: 2); | |
| line = Line.kr(start, end, len, doneAction: 2); | |
| sig = SinOsc.ar(freq * DelayN.kr(line, maxdelay, Rand(min, max)), 0.0, amp) * env; | |
| Out.ar(0, Pan2.ar(sig * 0.25)); | |
| }).add; |
| ''' | |
| analogDigital.py | |
| ''' | |
| from machine import ADC, Pin, PWM | |
| from time import sleep_ms | |
| led1Pin = Pin(27) | |
| led2Pin = Pin(33, Pin.OUT) | |
| adcPin = Pin(34) |
| s.options.inDevice_("MacBook Pro Microphone"); | |
| s.options.outDevice_("MacBook Pro Speakers"); | |
| s.boot; | |
| ~buf = Buffer.alloc( s, s.sampleRate * 60, 1); | |
| ~dur = Bus.control(s, 1); | |
| ( | |
| SynthDef(\record, {|amp = 0.9, buf, rate = 1, recManualBus, off = 0, trig = 0| |
Casey Anderson, 2022
Note OMXPlayer is being "phased out" in favor of VLC, this tutorial assumes usage of Raspbian Buster Lite (Legacy), under which OMXPlayer is still available via aptitude
| # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries | |
| # SPDX-License-Identifier: MIT | |
| """ | |
| This demo will fill the screen with white, draw a black box on top | |
| and then print Hello World! in the center of the display | |
| This example is for use on (Linux) computers that are using CPython with | |
| Adafruit Blinka to support CircuitPython libraries. CircuitPython does | |
| not support PIL/pillow (python imaging library)! |
p5.js is a JavaScript library created to establish computer literacy in visual arts applications. It abstracts the more complex components of JavaScript to provide a friendlier environment for experimentation.
An Integrated Development Environment, or IDE, is a workspace for prototyping and developing code. p5.js has a browser-based IDE which we will use today, but you may want to look into using p5.js with VSCode or another ID. You can the browser-based one here.
Miniconda 3 Installer for your operating systembash Downloads/Miniconda3-latest-MacOSX-x86_64.sh.exe fileMiniconda3:
conda update condaconda update condaPython is a general-purpose, interpreted, high-level programming language. The syntax of the language has been optimized to emphasize code readability, as well as brevity.
Note: though there are multiple versions of python we will exclusively use Python3
A variable is a container for data