Skip to content

Instantly share code, notes, and snippets.

This has been replaced by a gem

Use gem install bunchcli to install, then run bunch -h for a list of commands.

@rwb27
rwb27 / set_picamera_gain.py
Last active April 27, 2023 15:09
Manually setting gain of raspberry pi camera from within python
from __future__ import print_function
import picamera
from picamera import mmal, mmalobj, exc
from picamera.mmalobj import to_rational
import time
MMAL_PARAMETER_ANALOG_GAIN = mmal.MMAL_PARAMETER_GROUP_CAMERA + 0x59
MMAL_PARAMETER_DIGITAL_GAIN = mmal.MMAL_PARAMETER_GROUP_CAMERA + 0x5A
@LFSaw
LFSaw / SmartSetter-tests.scd
Last active June 29, 2017 11:20
towards SmartSetter
// relative set, useful for increment/decrement knobs,
// as they appear e.g. in cerain midi controllers
// different modes depending on get/set methods for the inner object.
///// _____
p = Point(1, 2);
r = SmartSetter(p, \x, [-100, 100]);
///// getSet
@LFSaw
LFSaw / mozzi fixed point arithmetics.md
Last active August 29, 2015 14:00
Fixed-point arithmetics in mozzi

Fixed-point arithmetics in mozzi

(Mozzi is a sound synthesis toolkit for the Arduino)

General remarks

Naming

The naming of the fixed-point types is based on the Qm.f-notation ("the unambiguous form") as described in the notation section of the wikipedia article on fixed-point arithmetic, replacing . with n.[^ Since `.` does not work in C.]