Laser Cut Halftones

So, I’ve spent a lot of time on this project, which I started in February. I’ll make this post a short one, however. I wrote a processing program that converts images into .svg files suitable for our hackspace laser cutter, using various halftoning methods to render the image.

Here’s an example – The donor image for this cut is reproduced by kind permission of photographer & artist Tara Tulenchik – you should check out her work here and here.

Laser cut high contrast portrait, just after cutting

Laser cut high contrast portrait, just after cutting

 

Laser cut high contrast portrait, projecting an image

Laser cut high contrast portrait, projecting an image

The above and below images were taken by Jack Lewis, a talented photographer friend of mine.

And one of the joker, rendered in hexagons

And one of the joker, rendered in hexagons

Below are some examples of the program in use – I’ve used Processing with the controlP5 library to put this together. You can load an input image and then select various rendering options.

HEXCIR HEXPOL SQUCIR SQUPOL TRICIR TRIPOL

If you want the Processing sketch, get in touch – I’ll put it up on Github if you find it easy enough to use.

I’ve also used this method to try and create coffee & spray paint stencils:

laser cut half tone coffee stencil

laser cut half tone coffee stencil

Although, I’ll admit, results are mixed at this point, as they rely mostly on your ability to perfectly distribute spray paint/chocolate powder – shouldn’t be a problem for pro graffers/baristas.

I’ll be starting a shop on etsy to sell these as personalised portraits (hopefully), but if you’re already interested and want to commission an image/stencil/flyer/etc., get in touch.

Since starting, I’ve found other people are working on this type of thing – you can already find an existing (and more powerful) program here: http://www.students.tut.fi/~syvajar3/ under “DXF Halftone 2.1″. This program has many things I haven’t had time to implement, such as arbitrary grid rotation and line halftones. Of course, it should also be possible to produce these in photoshop individually, or repeatedly using scripts.

Posted in Processing Projects | Tagged , , , | 1 Comment

2014, 2015, and Dub Sirens

Well, it’s been nearly a year since my last post – good grief. Rest assured, I was busy with projects throughout 2014 – I simply didn’t get the chance (or sometimes inclination) to blog about them. As I’ve said before, I’m very poor at keeping a good record of what I’ve been up to. For those interested, throughout 2014 I’ve worked on a Trombone Harmoniser (using the pedalShield project), A soundboard for a travelling theatre, programmed & wired lighting for a giant wave pendulum, and become increasingly involved with Code Clubs in Manchester.

One important thing I learned in 2014 – I’m much more productive when I’m working on an idea I like. One of the reasons I haven’t put myself out there as a general purpose hacker for hire is the risk of being given an idea to work on that I’m not passionate about, or interested in. Perhaps I’m not being realistic, but I’d rather focus on my own projects, and those others suggest that get me excited, than risk doing uninspiring work on something I’m not sure about.

So that’s 2014, but my plans for 2015? Much of the same! I’ll be helping with more Code Clubs in Salford, and working on whatever catches my interest. One of my main intents is to blog & document more, with the aim of others being able to reproduce my work if they wish.

Now, Dub Sirens. I was asked late last year if I could make a dub siren by someone at Drop Productions. I said “probably”, and after some research I had a reasonable idea of what a Dub Siren is: It’s a simple synthesiser, most often used with Dub music. They’re not especially well defined in terms of capabilities, as they are usually improvised; circuit bent; homemade – there are some commercial models, but these are very small scale. The main common ability is producing simple tones, alarm sounds, bleeps, bloops, wails – that kind of thing. These are usually combined with a tape echo or, more often these days, a digital version of the same, such as the Boss Space Echo.

After looking at 555 based oscillators, and similar analog methods (there is a great tutorial here, if you fancy this approach); I decided to go fully digital instead, and produce something using the Arduino Due, as I’d become very familiar with using it for audio processing in 2014. Using this post as a starting point, I implemented a simple lookup-based sine generator. From here, I’d planned to add a few more waveforms (saw, square, etc.) and an LFO, but decided that I could probably do a tape echo sim as well. I added this, some basic filtering, a choice of waveforms for the main synth and modulation, and a feedback value. Getting this up and running was a little harder than I thought, but I was able to do all the programming in a weekend.

Over the following week I designed and laser cut a case (thanks Hac-Man), connected some potentiometers (pots) and switches for control, and put it all together:

Finished!

Finished!

For the benefit of anyone who might be interested, I’ll quickly run through the signal chain and controls: Firstly, the LFO phase accumulator is incremented based on the ‘mod freq’ pot; the oscillator (osc) value is then looked up from a table that is chosen by the waveform switch for the LFO; this is added to the main osc phase accumulator that is incremented from the ‘main freq’ pot; lookup from same tables as per waveform switch for the main osc; ASR envelope multiplier then used based on whether trigger is pressed, released, and how recently (A & R approx 12ms); the delay buffer lookup value is incremented using the value from the ‘delay’ pot; the ‘oldest’ sample in the delay buffer is moving-average filtered, multiplied by ‘feedback’ value, and added to the output; output value is put in the delay buffer (some extra stuff happens here to make it a tape echo); output value is written to the DACs.

Don’t worry if none of the above makes sense to you – this is what it sounds like, and how it is used:

The insides are pretty basic – the switches and pots are wired the usual way, albeit messily:

Wiring

Wiring

For my first real attempt at a digital synth, I’m pretty happy with it. The only things that I wish I could include: a better FIR-based low pass filter in the feedback loop, but couldn’t add one as it wouldn’t fit within the 44100kHz interrupt with everything else; perhaps a larger delay; and proper log pots for volume, main osc freq, mod osc freq – I’m using linear pots with a log lookup table.

If you’re interested in making your own, or analysing and improving my messy, messy code, you can find the files required on my Github – https://github.com/ChrisBall/Dub-Siren-Files.

Best wishes for 2015!

Posted in Arduino Projects, Gear | Tagged , , , , , , , , | Leave a comment

Laser Harps: A Quick Arduino Instructable

I frequently get emails asking for schematics and code for the laser harps I’ve made. For the record; I don’t mind this at all, but I always feel a little guilty when sending out the information I have – it’s patchy at best, the code is poorly commented and the schematics aren’t up to date. It would probably be a little difficult for a beginner to get a handle on things.

With that in mind, I’ve made a beginners instructable that covers the absolute basics of the code and electronics, and with the aim of using minimal parts and labour. I decided to leave the details of manufacturing a frame up to the reader, as it’s ultimately cosmetic; as long as each laser/photodiode pair is lined up correctly, the frame can be any shape you want.

You can view the instructable here.

Posted in Arduino Projects, Laser Harp, MIDI Projects | Tagged , , , , , , , | 1 Comment

Crogmatron Mk 1

Crogmatron Mk 1

Crogmatron Mk 1

So I’ve been working on a new instrument recently, currently nicknamed the “Crogmatron”. It’s an array of 5 range sensors with LEDs that provide visual feedback, and it sends MIDI notes and CC messages depending on how you use it. I’m using an Arduino to control it all via the usb interface code found here: http://hunt.net.nz/users/darran/weblog/52882/Arduino_UNO_MIDI_USB_version_02.html

I’ll skip to showing it in use:

The above video demonstrates it being used to control effects on an audio track (Music Provided by Eddie Palmer at Opsound.org).

The above video demonstrates it being used to trigger and control a VST synthesiser and audio effects.

And finally, a dubstep style synth, with oscillation frequency (the wab wab) being controlled by distance.

There’s a number of possibilities that are opened up by this – I’m just getting started, and I have plans to both improve this one and build a better version. If you think of any interesting applications, let me know!

Posted in Uncategorized | Tagged , , , , , , , , , , , , | Leave a comment

Spherical Range Detector

SAM_1725Hi all! It’s been a while – but I’ve been busy with a few more midi projects. With this year’s Manchester Mini Maker Faire approaching, I decided to begin making more devices that will be fun to use, visually as well as physically.

This project started when I saw these stainless steel spheres for sale in a local shop – they may not be something I’d put in the garden, but I was sure there was a way to make them into an interesting MIDI device.

After a little research into capacitive sensing (there’s excellent explanations here and here) I decided to make a device that would detect proximity and send MIDI CC messages accordingly. After a short struggle getting the CapSense library to work on the Arduino Due or Olimexino, I decided to write my own code for sensing the capacitance, which was surprisingly easy and I would recommend that you have a go as a learning exercise. Some schematics & pseudocode:

That’s all it is! Most of the work is done by the code.

-Start a microsecond timer

-Set the Send Pin to HIGH

-While the Receive Pin is LOW, increment the timer

The timer will take longer and longer as capacitance increases. It’s a very narrow margin though, as the longest timer values I get are on the scale of 4 milliseconds or less. You should also be aware that there’s a lot of noise going on, especially at the threshold of detection. The little Olimexino is completely devoted to averaging out and rescaling the very messy signal we get, and the response is still far from predictable.

Capacitive sensors like these are also notoriously fussy about their surroundings; for example, the exact position of the sphere on my desk in the video is about the only place I’ve tried yet where I can get a useful range of 6-10 inches. Move it anywhere else nearby and it drops to 2 inches or less.

That’s enough introduction. Here’s some video!In this video, the detected range controls a resonant filter effect on an audio track – this is one of the simplest (but most fun) applications I’ve tried.

In the above video a threshold value has been set, above which a midi message will be triggered. This is combined with a delay effect controlled by the detected range.

As usual, get in touch at chrisballprojects@gmail.com if you want help with making your own. That said, there are many arduino tutorials devoted to this subject, so just google “Arduino Capacitive Sensor”.

Posted in MIDI Projects | Leave a comment

Weird CC Converter in Processing

I’ve been working with MIDI and processing recently, but this week I’ve been taking a look specifically at CC messages. These are used to send control information, usually for audio effects.

I came up with a little sketch in processing that converts CC messages that describe physical properties of a system to an output that describes positions of points when affected by those conditions. A video will explain all that a lot more clearly (perhaps):

So, to explain in a little more detail, you can send 7 different CC messages that control various aspects of the physics of the environment – they’re listed on the faders at the bottom of the video.

The output is simply the X and Y positions of the 4 points – 8 messages in total, that you can assign to whatever you like in your DAW software. It’s an interesting way to explore lots of different effects at once, although the output is (not surprisingly) fairly abstract and hard to predict. But I like that kind of thing.

Another video below.

Posted in MIDI Projects | Leave a comment

MIDI Visualisations in Processing

I’ve been working on a few MIDI-based programs in Processing recently, a couple of which are MIDI visualisers. These are programs that create a visual display based on the output from a midi file (similar to those seen at: http://www.musanim.com/). The visualiser will use the pitch, velocity and duration of midi notes to create the display. I’ve uploaded a video to youtube, but due to some problems getting videos out of processing, the quality is rather low – I hope you can discern what’s going on (edit: I’ve invested in fraps and improved the video).

So what have I used the MIDI pitch and velocity for?

Firstly, I’ve used colour to highlight harmonic relationships between notes (those unfamiliar with music theory may want to skip this bit). I’ve worked on the principle that the perfect 5th is the most consonant interval, and assigned colours to notes being played based on the relationships in the diagram below.

Circle of Fifths, with RGB colour wheel

Circle of Fifths, with RGB colour wheel

So, we can see that the notes most consonant with C are F and G, which will have the most similar colours. Also, the least consonant interval (i.e. a tritone, or the “devil’s interval”) between C and F# also has the most jarring colour difference.

The velocity of each midi note was then assigned to the speed at which the arcs move, as well as the transparency of each arc (i.e. quiet notes are slow and barely visible, and loud notes are fast and bright) .The final length of each arc is decided by a mix of how loudly a note was played combined with how long it was held on for.

Practically, I used a piece of DAW software to play the midi file, and routed this through the excellent midi yoke (http://www.midiox.com/) to a processing sketch using the rwmidi library (http://ruinwesen.com/support-files/rwmidi/documentation/RWMidi.html). I’ve used the processing video library to capture frames, but as mentioned, there are some significant problems if you wish to sync this output with an audio file (especially if your processing sketch is even remotely complex). I’m looking into using some screen capture software instead, such as fraps.

If you’re interested in this sort of thing, feel free to contact me for the original processing sketch – the video doesn’t really do it justice.

Edit: I’ve included a new midi visualisation below.

Posted in MIDI Projects | Tagged , , , , , , , | 4 Comments

Laser Harp MkIII

Hi everyone! It’s been a while (as I promised). The third prototype Laser Harp is now complete!

Long exposure, with beams highlighted by a sheet of white paper

Long exposure, with beams highlighted by a sheet of white paper

The main changes are:

-It’s bigger (20% larger)

-More buttons! I’ve used one of these (https://www.sparkfun.com/products/8033). Mostly these are used to control key changes, but the bottom row send MIDI control change messages

-LCD display to show key & scale (http://www.coolcomponents.co.uk/catalog/16×2-display-p-944.html)

-Improved velocity detection

-Improved calibration function (badly calibrated triggers display on the lcd)

-Olimexino STM32 instead of Arduino Uno (https://www.olimex.com/Products/Duino/STM32/OLIMEXINO-STM32/)

MDF construction

MDF construction

The frame is an mdf construction (shown above), with a final finish of matte black paint, about 6 coats over as many days.

I’ve included a few more images of construction below:

LEDs installed on button board

LEDs installed on button board

Button board with translucent rubber cover

Button board with translucent rubber cover

All in one piece

All in one piece

The control panel

The control panel

There’s also a video on youtube, if you’d like to see it in action:

This one will shortly be given to Lostrites (http://www.myspace.com/lostrites), for a kind of beta evaluation – they will use it for a while and get back to me with any changes they’d like to make (added scales, functions, potentiometers etc.). I’d like to thank them for financing this project (and their patience).

As usual, if this is of particular interest to you, just get in touch and I’ll be happy to supply more information about how this was made (code, schematics, etc.).

I’ve yet to become any good at playing it, but hopefully we’ll get some video of it being used for musical performance before too long.

Posted in MIDI Projects | Tagged , , , , , , , , , , , , , , , , | 9 Comments

Arduino Meetup

Any recent visitors to my blog might have noticed that it is lacking in recent posts. I want to reassure you that I haven’t lost momentum – just in blogging. I’m not in the habit of recording everything that I do,  although it’s probably a habit I should adopt. In the last few months I’ve made a reubens tube (short-lived – don’t use plastic pipe) and a midi-controlled air siren. Both have unfortunately been demolished to make way for other projects, and I didn’t even think to keep any record of either.

However, I have been working on something that will be here to stay. Back in September a band called Lostrites got in touch with me and asked if I’d be interested in making them a laser harp, either to use on stage or to keep around their studio as a novelty. I was, so I’ve been putting a lot of my spare time recently into putting something a bit more special than my earlier attempts. It’s not finished – but it is (finally) shaping up well.

I’ll be at the Manchester Madlab tomorrow evening presenting the instruments I had at the maker faire earlier this year. You can find out more here. I’ll also be bringing along the newest laser harp, which will unfortunately be for display only. Plenty of little things to fix before it’s useable.

Thanks go to James Medd (www.jamesmedd.co.uk) and Mike Stephens (www.bitbytebit.co.uk) for inviting me along to speak – it’s not something I have a lot of experience of, but you can at least expect to have any questions you might have about my instruments answered, as well as having a go!

Posted in Events, Laser Harp | Tagged , , , , , , | Leave a comment

Magic 8 Box

So, among the items I purchased recently from Cool Components was this Red 16×2 LCD Display. I haven’t made anything for a couple of weeks, so I boshed out a Magic 8 Box (or a digital version of the Magic 8 Ball).

Magic 8 Box

Magic 8 Box

This thing contains all 20 original answers from the original Magic 8 Ball, and I’ve added 10 of my own. Its function is pretty straightforward – you just push the button for an answer to your yes/no question. I was pleased to be able to house it all inside the box that the LCD arrived in from cool components.

I’m using an Arduino powered by a 9V battery (although you might notice I’m using USB power above). This is a great beginner’s project, so if you want a copy of the code and a crudely drawn schematic, just contact me.

I’m going to be taking this apart soon, as I intend to use the LCD display in the next version of the laser harp, which will include (hopefully): slightly more responsive note detection (Although it’s already nearly perfect), a paint job, a MIDI reset, a display for showing scale and fundamental note, and maybe even a MIDI setup option, so you can add your own scales to the library via a MIDI in port.

Posted in Arduino Projects | Tagged , , , , , , | 1 Comment