Showing posts with label digital manipulation. Show all posts
Showing posts with label digital manipulation. Show all posts
Sunday, August 24, 2014
How To: Map MIDI Notes to Key Presses in OS X
Labels:
ableton live,
digital manipulation,
max for live,
osculator
'Mountain' Game Controlled via Ableton Live MIDI Data
I really like the game 'Mountain' (grab it here: http://mountain-game.com/) and I wanted to be able to control the synth within 'Mountain' using MIDI data from a DAW such as Ableton Live.
The 'Mountain' game synth is controlled via the computer keyboard, using the row from Z to less than, and from A to K.
An example is shown below:
The output of a MIDI clip is routed through a 'Max for Live Notes to CC with Note Off' device, which converts the pitch of each note to a MIDI CC number and the velocity of each note (including note-off events) to MIDI CC values.
The output of the MIDI track in Ableton Live is sent to the software Osculator - in the image below, the MIDI track output is set to 'Osculator In (Port 8000)'.
This conversion from note / velocity to MIDI CC number / value takes place, so that Osculator is able to map a different keycode value to each and every MIDI pitch individually, rather than dealing with MIDI note data on a channel-by-channel basis.
Each MIDI pitch shows up as its own event in Osculator, which can then be mapped to a keycode value. Osculator has a handy 'Keycode Helper' window for mapping purposes. Z corresponds to keycode 6, X to 7, C to 8 and so on. Using this information, each MIDI CC number can be mapped to a corresponding keycode in Osculator.
Labels:
ableton live,
digital manipulation,
max for live,
max/msp,
osculator,
videogames
Saturday, December 28, 2013
Friday, December 20, 2013
"staggeringbeauty.com" and Ableton Live
Labels:
ableton live,
digital manipulation,
max for live,
osculator,
web layer
Sunday, August 04, 2013
Friday, May 24, 2013
How To: Interface with an MCP4241 Dual Digital Pot
Overview
The aim of this post is to present a basic practical understanding of interfacing with an MCP4241 dual digital pot. A digital pot is a digitally-controlled potentiometer, which is a very useful device. It allows a microcontroller to change a potential or a resistance using data values instead of having to turn a physical pot with a human hand. Many instances where a physical pot is used can be substituted with a digital pot.
Examples include: dimming LEDs, controlling the resistance of circuit bent toys, conditioning audio signals, setting the volume of audio signals, creating auto stereo panning devices, controlling an oscillator, creating a digital to analogue converter and so on.
The MCP4241
The MCP4241-104E is a chip with 100k digitally controlled pots that are accessed via an SPI bus. Additionally, the chip features both volatile and non-volatile memory and a number of other useful functions. The pots have 7-bits of resolution (i.e. 128 steps of resistance). It can be powered from 2.7V to 5.5V.
The MCP4241 comes from a larger family of chips, the MCP414X/416X/424X/426X family. More information can be found here.
The SPI Bus
The MCP4241 connects and communicates with a microcontroller (such as an Arduino or a Teensy) via the SPI Bus. SPI is a protocol that allows microcontrollers to interface easily with a large number of external chips and sensors.
SPI is a host / slave type bus. A single host microcontroller can interface with one or more slave chips or sensors.
SPI uses up to four pins for communication:
- CS (may also be called SS): chip select:
Used by the microcontroller to select each device. The host microcontroller has a CS output pin for every slave device that is to be used.
- SCK: serial clock:
Used by the host microcontroller to time the data that is moved to and from the slave device. There is one SCK connection that is shared amongst all SPI devices.
- SDI: slave data in:
Used by the host microcontroller to send data to a slave device. There is one SDI connection that is shared amongst all SPI devices.
- SDO: slave data out:
Used by the host microcontroller to receive data from a slave device. There is one SDO connection that is shared amongst all SPI devices.
All SPI slave devices require the CS and SCK pins. However, many device may not require both the SDI and SDO connections, as they might only either send or receive data.
With the MCP4241 chip, we want to set the resistance of a digital potentiometer using data from a host microntroller. As a result, we only need CS, SCK and SDI, because the information needs to travel only from the host to the slave device.
If you are using a Teensy, the following table shows the CS, SCK, SDI and SDO pins to use:
If you are using an Arduino, the following table shows the CS, SCK, SDI and SDO pins to use:
MCP4241 Physical Layout
The above diagram shows the layout of the 14-pin MCP4241 chip. Pin 1 is to the left of the half-circle indent. Pin 14 is to the right of the half-circle indent.
Pin 1 - CS - SPI Bus Chip Select
Pin 2 - SCK - SPI Bus Serial Clock
Pin 3 - SDI - SPI Bus Slave Digital In
Pin 4 - Vss - Connect to Ground
Pin 5 - P1B - Potentiometer Number 1, Terminal B
Pin 6 - P1W - Potentiometer Number 1, Wiper
Pin 7 - P1B - Potentiometer Number 1, Terminal A
Pin 8 - P0B - Potentiometer Number 0, Terminal A
Pin 9 - P0W - Potentiometer Number 0, Wiper
Pin 10 - P0B - Potentiometer Number 0, Terminal B
Pin 11 - WP - Write Protection - Connect to 5V for normal operation
Pin 12 - SHDN - Shutdown - Connect to 5V for normal operation
Pin 13 - SDO - SPI Bus Slave Digital Out
Pin 14 - Vdd - Connect to 5V
MCP4241 Breadboard Layout - Basic Functions - With Teensy
Set up the power for the MCP4241:
• Connect ground from the Teensy to the ground bus on the breadboard.
• Connect 5V from the Teensy to the 5V bus on the breadboard.
• Connect 5V to Vdd (pin 14) of the MCP4241.
• Connect ground to Vss (pin 4) of the MCP4241.
Initialise the additional function pins of the MCP4241:
• Connect 5V to SHDN (pin 12) of the MCP4241
• Connect 5V to WP (pin 11) of the MCP4241
Connect the SPI Bus to the MCP4241:
• Connect Teensy digital pin 0 to CS (pin 1) of the MCP4241
• Connect Teensy digital pin 1 to SCK (pin 2) of the MCP4241
• Connect Teensy digital pin 2 to SDI (pin 3) of the MCP4241
Connect to MCP4241 potentiometer 0 for testing:
• Connect P0W (pin 9 of the MCP4241 to a probe of a multimeter
• Connect P0A (pin 9 of the MCP4241) to the other probe of a multimeter
The example simply moves through all 128 possible values for both pots. Measuring the resistance between P0A and P0W should change over time as all 128 values are cycled through.
The aim of this post is to present a basic practical understanding of interfacing with an MCP4241 dual digital pot. A digital pot is a digitally-controlled potentiometer, which is a very useful device. It allows a microcontroller to change a potential or a resistance using data values instead of having to turn a physical pot with a human hand. Many instances where a physical pot is used can be substituted with a digital pot.
Examples include: dimming LEDs, controlling the resistance of circuit bent toys, conditioning audio signals, setting the volume of audio signals, creating auto stereo panning devices, controlling an oscillator, creating a digital to analogue converter and so on.
The MCP4241
The MCP4241-104E is a chip with 100k digitally controlled pots that are accessed via an SPI bus. Additionally, the chip features both volatile and non-volatile memory and a number of other useful functions. The pots have 7-bits of resolution (i.e. 128 steps of resistance). It can be powered from 2.7V to 5.5V.
The MCP4241 comes from a larger family of chips, the MCP414X/416X/424X/426X family. More information can be found here.
The SPI Bus
The MCP4241 connects and communicates with a microcontroller (such as an Arduino or a Teensy) via the SPI Bus. SPI is a protocol that allows microcontrollers to interface easily with a large number of external chips and sensors.
SPI is a host / slave type bus. A single host microcontroller can interface with one or more slave chips or sensors.
SPI uses up to four pins for communication:
- CS (may also be called SS): chip select:
Used by the microcontroller to select each device. The host microcontroller has a CS output pin for every slave device that is to be used.
- SCK: serial clock:
Used by the host microcontroller to time the data that is moved to and from the slave device. There is one SCK connection that is shared amongst all SPI devices.
- SDI: slave data in:
Used by the host microcontroller to send data to a slave device. There is one SDI connection that is shared amongst all SPI devices.
- SDO: slave data out:
Used by the host microcontroller to receive data from a slave device. There is one SDO connection that is shared amongst all SPI devices.
All SPI slave devices require the CS and SCK pins. However, many device may not require both the SDI and SDO connections, as they might only either send or receive data.
With the MCP4241 chip, we want to set the resistance of a digital potentiometer using data from a host microntroller. As a result, we only need CS, SCK and SDI, because the information needs to travel only from the host to the slave device.
If you are using a Teensy, the following table shows the CS, SCK, SDI and SDO pins to use:
If you are using an Arduino, the following table shows the CS, SCK, SDI and SDO pins to use:
MCP4241 Physical Layout
The above diagram shows the layout of the 14-pin MCP4241 chip. Pin 1 is to the left of the half-circle indent. Pin 14 is to the right of the half-circle indent.
Pin 1 - CS - SPI Bus Chip Select
Pin 2 - SCK - SPI Bus Serial Clock
Pin 3 - SDI - SPI Bus Slave Digital In
Pin 4 - Vss - Connect to Ground
Pin 5 - P1B - Potentiometer Number 1, Terminal B
Pin 6 - P1W - Potentiometer Number 1, Wiper
Pin 7 - P1B - Potentiometer Number 1, Terminal A
Pin 8 - P0B - Potentiometer Number 0, Terminal A
Pin 9 - P0W - Potentiometer Number 0, Wiper
Pin 10 - P0B - Potentiometer Number 0, Terminal B
Pin 11 - WP - Write Protection - Connect to 5V for normal operation
Pin 12 - SHDN - Shutdown - Connect to 5V for normal operation
Pin 13 - SDO - SPI Bus Slave Digital Out
Pin 14 - Vdd - Connect to 5V
MCP4241 Breadboard Layout - Basic Functions - With Teensy
Set up the power for the MCP4241:
• Connect ground from the Teensy to the ground bus on the breadboard.
• Connect 5V from the Teensy to the 5V bus on the breadboard.
• Connect 5V to Vdd (pin 14) of the MCP4241.
• Connect ground to Vss (pin 4) of the MCP4241.
Initialise the additional function pins of the MCP4241:
• Connect 5V to SHDN (pin 12) of the MCP4241
• Connect 5V to WP (pin 11) of the MCP4241
Connect the SPI Bus to the MCP4241:
• Connect Teensy digital pin 0 to CS (pin 1) of the MCP4241
• Connect Teensy digital pin 1 to SCK (pin 2) of the MCP4241
• Connect Teensy digital pin 2 to SDI (pin 3) of the MCP4241
Connect to MCP4241 potentiometer 0 for testing:
• Connect P0W (pin 9 of the MCP4241 to a probe of a multimeter
• Connect P0A (pin 9 of the MCP4241) to the other probe of a multimeter
Set up the multimeter:
• Set the multimeter to the 2000Ω range of resistance.
Programming the Digital Pot
In general, the digital pot is easy to program using the Arduino SPI library, which is included in the Arduino distribution. This library is compatible with Teensy.
The library is very easy to use, but requires a little setting up as follows:
• the CS / SS pin needs to be set up manually in the Arduino code
• the SCK, SDI and SDO do not need to be manually set up, as the library does this
A basic test program is shown below.
Note
that this includes a function called writeMCP4241. This function takes
two arguments - address and value. The address sets which pot to control
(either 0 or 1) and the value sets the value to write to the pot (0 -
127).
Download here: http://milkcrate.com.au/_other/downloads/projects/MCP4241_104EP_Example/MCP4241_104EP_Example.ino
Demonstration Video
Labels:
arduino,
digital manipulation,
teensy
Sunday, March 31, 2013
Shortest Sample Possible
Just the value 1.0 written once in a sound file, nothing more.
Download here: http://milkcrate.com.au/_other/shortest_sample_possible.wav
Wednesday, March 13, 2013
Thursday, February 07, 2013
Friday, January 11, 2013
Convert Pixel Points to MIDI CC: Suckahd Update
Some people have asked me how I made this video:
The answer is with this patch.

Suckad lets do grab colour data from pixels and map it to MIDI CC.
// FEATURES //
- 8 pixels
- 4 colour channels per pixels (R, G, B, Grayscale)
- MIDI CC data output for all 4 colour channels
- Custom, quick placement of pixel positions
- Parameter fading with grain control
Download here: http://milkcrate.com.au/_other/downloads/max_patches/suckad.zip
// USAGE //
PART A: SET UP PIXEL POSITIONS
- Make sure this window is active
- Move the mouse to wherever the first pixel point is that should be converted to MIDI CC
- Press the keyboard number 1
- Repeat for keyboard numbers 2 - 8
PART B: SET UP COLOUR CHANNEL MIDI MAPPINGS
- For each pixel, the R, G, B and Grayscale values are sent as MDI CC values
- For each colour channel, the raw value of 0. - 1. is scaled in full from 0 - 127 for MIDI CC
- For pixel #1, MIDI CC 1 is used for Red,
- For pixel #1, MIDI CC 2 is used for Green
- For pixel #1, MIDI CC 3 is used for Blue
- For pixel #1, MIDI CC 4 is used for Grayscale
- For pixel #2, MIDI CCs 5 - 8 are used
- For pixel #3, MIDI CCs 9 - 12 are used and so on
- Each colour channel / MIDI CC can be muted so as to make setting up MIDI mappings easy!
- To mute a colour channel, simply move the appropriate slider from the ON position to the OFF position
PART C: PARAMETERS
- Parameter fades: set the fade length to move from one parameter value to the next
- Parameter fade grain size: set the increment size in ms of the fades
- Pixel polling rate: set how often the eight pixels are polled for their colour data
- MIDI output device: set the output device
The answer is with this patch.

Suckad lets do grab colour data from pixels and map it to MIDI CC.
// FEATURES //
- 8 pixels
- 4 colour channels per pixels (R, G, B, Grayscale)
- MIDI CC data output for all 4 colour channels
- Custom, quick placement of pixel positions
- Parameter fading with grain control
Download here: http://milkcrate.com.au/_other/downloads/max_patches/suckad.zip
// USAGE //
PART A: SET UP PIXEL POSITIONS
- Make sure this window is active
- Move the mouse to wherever the first pixel point is that should be converted to MIDI CC
- Press the keyboard number 1
- Repeat for keyboard numbers 2 - 8
PART B: SET UP COLOUR CHANNEL MIDI MAPPINGS
- For each pixel, the R, G, B and Grayscale values are sent as MDI CC values
- For each colour channel, the raw value of 0. - 1. is scaled in full from 0 - 127 for MIDI CC
- For pixel #1, MIDI CC 1 is used for Red,
- For pixel #1, MIDI CC 2 is used for Green
- For pixel #1, MIDI CC 3 is used for Blue
- For pixel #1, MIDI CC 4 is used for Grayscale
- For pixel #2, MIDI CCs 5 - 8 are used
- For pixel #3, MIDI CCs 9 - 12 are used and so on
- Each colour channel / MIDI CC can be muted so as to make setting up MIDI mappings easy!
- To mute a colour channel, simply move the appropriate slider from the ON position to the OFF position
PART C: PARAMETERS
- Parameter fades: set the fade length to move from one parameter value to the next
- Parameter fade grain size: set the increment size in ms of the fades
- Pixel polling rate: set how often the eight pixels are polled for their colour data
- MIDI output device: set the output device
Labels:
ableton live,
digital manipulation,
max/msp,
pixel point
Monday, December 17, 2012
Monday, August 20, 2012
WeeklyBeats 2012 Track #33: Blass Gowls (with Dot.AY)
Labels:
ableton live,
collabs,
digital manipulation,
footdrag,
weeklybeats
Friday, August 17, 2012
Anti Laptop Music Event #1 Wrap Up
Monday, July 30, 2012
Persona Cluster: Single Snare Drum / Single Playback Music
A snare sample is played back once - at the correct speed - and has had reverbs, delays, filters, distortions etc placed on it. The residual mass of sound is then manipulated through automation.
Download the track here: http://weeklybeats.com/#/little-scale/music/persona-cluster
Labels:
ableton live,
digital manipulation
Thursday, July 12, 2012
Flash / EEPROM Music: Generating VGA Visuals
An Arduino generates H and V sync timing for a VGA signal, whilst the most significant three bits of an Flash chip's DAC audio output is being jammed down the throat of the red, green and blue inputs of the monitor.
More info on how the audio is generated here: http://little-scale.blogspot.com.au/2012/07/flash-eeprom-music-29f010-sample.html
Labels:
digital manipulation,
eprom music,
flash music,
visual arts
Friday, July 06, 2012
On White Noise Manipulation: Simple Techniques in Ableton Live, Demonstrated in Real-Time
A number of people have asked me to demonstrate or speak about how I made Kill Your Apathy, which is a release that is made of only manipulated white noise.
I have made a real-time screencast / screengrab (don't worry, I don't actually say anything) that goes through my process from creating the white noise to ending up with a basic sort of loop. Much of the time is dedicated to sound design in Ableton Live using the Simpler device.
Although I don't say anything, I thought it might be of use to people starting out with Ableton Live, and wanting to get into the Simpler. No rocket science, just good, clean sound fun.
Namaste.
I have made a real-time screencast / screengrab (don't worry, I don't actually say anything) that goes through my process from creating the white noise to ending up with a basic sort of loop. Much of the time is dedicated to sound design in Ableton Live using the Simpler device.
Although I don't say anything, I thought it might be of use to people starting out with Ableton Live, and wanting to get into the Simpler. No rocket science, just good, clean sound fun.
Namaste.
Labels:
ableton live,
digital manipulation
Wednesday, May 02, 2012
Lossy Compression Until All Is Lost: Iterative MP3 Compression
A noise file is compressed to a low bitrate MP3. This process is repeated 80 times. Here is the result.
Labels:
digital feedback,
digital manipulation,
glitch
Max for Live Audio Effect: Amplitude2BPM
This Max for Live audio effect simply takes the continuous peak values from an incoming signal and converts this to tempo / BPM.
Download it here.
Labels:
ableton live,
digital manipulation,
max for live
Saturday, April 28, 2012
Max for Live Instrument: SampleRider
SampleRider is a Max for Live instrument that uses a user-defined sample as a table for an oscillator. Basically, a sinewave that is modulated by another sinewave sets the sample index for reading back sample points from the loaded sample. Frequency is set by incoming MIDI notes.
Velocity controls the volume of each note. The user can define other parameters (e.g. modulating oscillator amount and frequency). There are two main oscillators and two modulating oscillators. All timbral changes are created simply by reading back from the loaded sample at different points / in a different way.
Download here: http://milkcrate.com.au/_other/downloads/M4L/SampleRider/little-scale.SampleRider_20120428.zip
Velocity controls the volume of each note. The user can define other parameters (e.g. modulating oscillator amount and frequency). There are two main oscillators and two modulating oscillators. All timbral changes are created simply by reading back from the loaded sample at different points / in a different way.
Download here: http://milkcrate.com.au/_other/downloads/M4L/SampleRider/little-scale.SampleRider_20120428.zip
Labels:
ableton live,
digital manipulation,
max for live,
max/msp
Thursday, April 26, 2012
A Precise Diagram Of A Sheep (One Second of White Noise Manipulation)
One second of noise. Forty minutes of manipulation. 2:37 of music.
Using these standard devices that come with Ableton Live:
• Simpler
• Drum Rack
• Compressor
• Multiband Compressor
• Simple Delay
• EQ Three
• Saturator
Download the Live set here. Download the MP3 here.
Using these standard devices that come with Ableton Live:
• Simpler
• Drum Rack
• Compressor
• Multiband Compressor
• Simple Delay
• EQ Three
• Saturator
Download the Live set here. Download the MP3 here.
Labels:
ableton live,
digital manipulation
Subscribe to:
Posts (Atom)




















.jpg)
.jpg)
.jpg)








