Sunday, December 11, 2016

Simple Data Visualisation and Recording

I find it useful to be able to visualise data - especially when dealing with sensor data. This includes things like a current-state graphical representation, scrolling graphs and the ability to import sensor data into Excel for further analyses or record keeping.


Download here: http://milkcrate.com.au/_other/downloads/max_patches/simple_data_vis_rec.maxpat

This Max patch is simply a visualisation tool that takes up to sixteen channels of data via MIDI pitch bend messages and displays this as a set of sliders, a scrolling point graph and the ability to export to a text file that can be imported into Excel (tab-deliminated with carriage returns).

Peak values can be shown as orange markers on the sliders. The peak data can be cleared. Data that is fed into the scrolling point display as well as the text file has an interval / sampling rate. This is between 0 - 10000 milliseconds as defined by the user. This interval / sampling rate is independent of the rate and which data arrives, which is handy of asynchronous data across multiple channels.

Data per channel can be toggled on or off for the text file recording. The text file can be viewed, cleared and saved to disk. To import the text file into Excel, simply select open from Excel, choose tab-deliminated CSV file, choose tab as the separator. This will present the data via columns as channels, rows as sample periods and cells as data points. From here, the data can be manipulated as per usual in Excel.

To send data in the correct format, simply send a 14-bit MIDI value from software or hardware to the Max patch. Make sure that the correct MIDI device is selected in the patch. The pitch bend from each MIDI channel is a separate data channel in the patch, from 1 - 16.

Data can be sent from Live, Logic, ProTools etc. Data can also be sent from hardware such as MIDI controllers and keyboards.

Data can also be sent from Arduino / Teensy etc. Here is the Teensy code as an example - the important thing to realise is that each sensor's data is sent on a MIDI channel via pitch bend, and that the data is constrained to a 0 - 16383 value range.


Bali: Snail, Jatiluwih, Turtles, Kecak, Bugs

Thursday, December 01, 2016

MIDI to 1V Per 8ve CV and Gate Max for Live Device

A basic Max for Live device that can be combined with a Teensy and one or more MCP4922 DAC chips. MIDI notes are converted to 12-bit data that represents a voltage range of 0 - 5V, at a rate of 1V per octave. Pitchbend is mapped, too, with a user defined range. Note-ons and offs trigger gate events. The note length can be left 'as-is' or set as a predefined length.


Very rough demo shown below, using a Teensy 2.0, one MCP4922, gate output and pitch CV output controlling a Moog Mother-32.

Download this device here: http://milkcrate.com.au/_other/downloads/M4L/little-scale.midi.notes.to.pitch.cv.gate.amxd


MIDI to MCP4922 DAC CV and Gate / Trigger

I've added CV as well as Gate / Trigger output to the Octo DAC setup. Note-on events will trigger a gate on, while note-off events will trigger a gate-off. The eight DAC outputs remain the same. Each gate output has a dedicated digital pin on the Teensy 2.0.



Download the code here: http://milkcrate.com.au/_other/downloads/arduino/MCP4922_DAC_GATE/

Tuesday, November 29, 2016

MIDI-Controlled 12-Bit Octo DAC







Download the code here: http://milkcrate.com.au/_other/downloads/arduino/MCP4922_OCT_DAC_MIDI/