Friday, May 30, 2008

Thank you, Wulfden at Hawke's Mountain

I want to thank Brian for his excellent service and pricing over at Wulfden. I recently ordered an Arduino programmer, an FTDI USB cable and some really barebones freeduino kits. Not only did Brian undercharge me for the shipping to Australia, but he also added some very nice freebies -- two serial eeprom boards, an additional Arduino chip and some red LEDs that have inbuilt current-limiting resistors. Additionally, he has always been very helpful and friendly when answering any of my questions.





Tuesday, May 27, 2008

The Australian Chipmusic "Scene"

Over at Game Boy Australia, there is quite a nice list of Australasian chipmusic groups and individuals. So if anyone is interested in the "local scene", this might be a good starting point.

How to Deal with MIDI Clock Signals in Arduino

It is often desirable to synchronise something like a homemade sequencing circuit or a Commodore 64 to MIDI clock signals.

I thought I might share some generic Arduino skeleton code that could be used to synchronise
many different types of things to MIDI clock (and therefore ProTools, Ableton Live etc -- any type of host sequencer).

So, what exactly is MIDI clock? Well, it is a set of specific bytes that form part of the MIDI protocol. The great thing is that MIDI clock messages are only one byte long (instead of two or three bytes like other MIDI messages), so the code is very simple.

Here are the main, useful MIDI clock bytes:

start = 0xfa
stop = 0xfc
clock tick = 0xf8
continue = 0xfb

Twenty-four clock tick bytes are sent per quarter note when the host sequencer is running. Every time the sequencer is stopped, the stop byte is sent. Every time the sequencer is started after being stopped, the start byte is sent. Every time the sequencer is started after being paused, the continue byte is sent.

Using this information, it is possible to write a simple Arduino sketch to handle MIDI clock bytes and "do something" for every clock tick. The trick is to work out what you want to do with every clock tick, and then simply adjust the code below to add this desired functionality.

byte midi_start = 0xfa;
byte midi_stop = 0xfc;
byte midi_clock = 0xf8;
byte midi_continue = 0xfb;
int play_flag = 0;
byte data;

void setup() {
Serial.begin(31250);
}

void loop() {
if(Serial.available() > 0) {
data = Serial.read();
if(data == midi_start) {
play_flag = 1;
}
else if(data == midi_continue) {
play_flag = 1;
}
else if(data == midi_stop) {
play_flag = 0;
}
else if((data == midi_clock) && (play_flag == 1)) {
Sync();
}
}
}

void Sync() {
// do something for every MIDI Clock pulse when the sequencer is running
}

Monday, May 26, 2008

MIDI Interface for Music Making on a Sega Master System


I have made a prototype of a MIDI interface for the Sega Master System. Although it is not complete, it is functional and working, as you can see in this video: http://www.youtube.com/watch?v=-CXMVAGHwNI.

I want to point out that this was not possible without the resources of Maxim and the SMSPower.org website. Thanks!

More details as I update and develop this interface.


Burnside Symphony Orchestra Concert

There is a Burnside Symphony Orchestra concert this Wednesday evening from 8pm onwards. The venue is the Burnside Town Hall.

Game Boy Plushies!


Lauren has been making some very nice Game Boy Plushies lately. They are so very cute. If you are interested in obtaining one, please send an email to info at laurensutter dot net.

Sunday, May 25, 2008

arduino.milkcrate.com.au

A page that contains all of my Arduino projects on it. I will be updating this page quite often.

http://arduino.milkcrate.com.au/

SN76489: The CMH Timing Mechanism (2)

This is an extension of a previous post. That is to say, it is involves modulation the clock line of an SN76489. Once again, the overall concept presented in this post are mostly someone else's (Mr. Christian Haines [1]), but I have taken care of the details and the practical realisation.

The setup I have been working with currently consists of two Arduino chips, a MIDI interface, a MCP42100 digital potentiometer IC, a 4093 quad, 2-input NAND gate and some resistors and capacitors. A simplification of the setup can be seen below.

The advantage of this setup in contrast with the earlier setup is that the modulation process is much more controllable in that the frequency of the modulation can be sequenced from a MIDI-based sequencer.

Additionally, the second modulation oscillator adds another dimension of control and variety over the output of the sound.

Here are some audio examples:
[01] Something with melody;
the modulation sequencing is subtle and is used as an effect

[02] Something with chords;
the modulation sequencing is more pronounced and is used as a more 'directly musical' elements.



----------
[1] Haines, Christian. Conversation (in person). 14 May 2008.

Four MIDI Controlled Digital Pots via Arduino

Background:
This project allows one to control up to four 100K digital potentiometers using MIDI control data. The IC that has been used for this purpose is the MCP42100, a dual 100KΩ potentiometer. Two MCP42100's are required to have the four pots.

The MCP42100 uses the SPI protocol. I have implemented this link between the Arduino and the digital pot ICs using a manual bit-banging technique (see the code for more information).

In terms of how the MIDI CC is mapped to the pots, CC1 (modulation) on channels 1 and 2 are mapped to MCP42100 IC1 and CC1 (modulation) on channels 3 and 4 are mapped to MCP42100 IC2.

A potentially useful project for a wide range of applications.


Arduino Code:
Download here: http://milkcrate.com.au/_other/downloads/projects/midi_4_pots/


MCP42100 Pinout:
Schematic:
Some notes regarding the schematic:
• JP1 (PORTD) pins 1 - 8 refers to Arduino digital pins 0 - 7
• The two 5 pin DIN pins are the MIDI in points
• In reference to the MCP42100:
-- Pin 10 is Pot 1, Terminal B
-- Pin 9 is Pot 1, Wiper
-- Pin 8 is Pot 1, Terminal A
-- Pin 5 is Pot 2, Terminal B
-- Pin 6 is Pot 2, Wiper
-- Pin 7 is Pot 2, Terminal A


Breadboard:

Saturday, May 24, 2008

Sync Nanoloop and LSDJ to MIDI (At the Same Time)

This setup lets one sync up to 6 copies of Nanoloop and 6 copies of LSDJ to MIDI clock signals. The circuit will respond to CLOCK TIMING, START, STOP and CONTINUE messages.

Schematic
Notes about the schematic:
• PORTD = digital pins 0 - 7
• PORTB = digital pins 7 - 13
• PORTC = analog pins 0 - 5
• PORTB = nanoloop sync
• PORTC = lsdj sync
• For each Nanoloop connection, the sync signal goes to the SERIN pin on the GB. The GND pin on the GB connects to Arduino ground.
• For each LSDJ connection, the sync signal goes to the CLK pin on the GB. The GND, SERIN and SEROUT pins on the GB all connect to Arduino ground. There is also a pull down resistor from the CLK line to ground. The value of this resistor is 22k up to around 100k or so.

Breadboard
Here is a breadboarded version with one Nanoloop sync out and one LSDJ sync out.


Code
You can get the code here:
http://milkcrate.com.au/_other/downloads/projects/nanolsdjsync/

Friday, May 23, 2008

8bitcollective.com Compilation "Hello World!" Out Now!


It's great to see a strong Australian contingent on this one. There's three of us; Derrris-Kharlan, Raptorface and myself.


Track listing:
01. MM - 8BC Is Cool
02. Swampyboy - Glacial Floe
03. ChipHydra - Anything with Heart
04. Digital Cait Sith - Krazoa
05. Little-Scale - Hello
06. Raptorface - Cherryblossom
07. Sparkyboy - Gloom
08. Nintenboys - Be Alone
09. Constipation Man - Space Race
10. Failotron - Hello Világ
11. Pandotrix! - Fire Flower Hilltops
12. Amiga Agia - Mustache
13. Mikrochip No32 - On the Move!
14. Derris-Kharlan - Prism Stars
15. Sybi0t - Lazarou
16. Videovalvontaa - Easter Dicks

Front/Back Cover Done by Minusbaby.

Wednesday, May 21, 2008

Emily Tulloch Speaks at Forum

Emily Tulloch spoke at postgraduate forum last week. I was really impressed with her topic and her delivery, it was highly engaging. I know that it wasn't a main point of her presentation, but the highlight for me was the effect that recording technology of the early twentieth century had on the violin's upper register vibrato style at the time (something that came to my mind not three days prior, would you believe).

Tuesday, May 20, 2008

Fixing Dogmeat's Drummachine

before



after


So the user Dogmeat sent me a max patch he was having some troubles with. Actually, the patch is almost there. I only had to add maybe one or two objects.

The main issues were:
• Added a way to choose which MIDI note should be triggered on an toggled beat (the i object stores the number and the sel object triggers the value for each '1' it receives from the coll).
• Changed the ints for the counter maximum count from 4, 8 and 16 to 3, 7 and 15 because the counter starts at 0.

Download the fixed version here.

Glitching at 2918.2434 BPM

An overclocked Game Boy crashes [audio]

SN76489: The CMH Timing Mechanism (1)

Yes, the title of this post sounds like a device out of Doctor Who.

Previously, I have controlled the SN76489 programmable sound generator (the same / very similar chip to the one found within the VDP of the Sega Master System) using MIDI as well as from Ableton Live. These chips were also found in the BBC Micro and the IBM PCjr.

The concept of this post is not my idea - it was suggested to me[1] by someone that it could be useful to modulate the master clock of a SN76489 to get a wider variety of sounds out of the chip. I have now started going down this road. Previously, I used a 74hc14 inverter as a master clock generator in order to time the SN76489.

No, the timing wasn't perfect, but after producing a data to pitch lookup table for the chip at the particular speed that the 74hc14 was running at, the tuning was actually pretty good. Good enough to use in sequences and other musical applications alongside other instruments which have been properly tuned.

The idea with modulating the master clock is that whatever way the signal is modulated, this will have an effect on the sonic output of the chip, because the frequency at which any of the voices are currently playing at is calculated by dividing this master clock signal.

Of course there are limitations and boundaries to this - for example, the master clock needs to be a pulse wave (or at least, the I assume that the clock input on the chip only recognises two states even if a waveform has more than just two states). Also, lower speeds on the clock line will influence the time it takes to perform a read cycle of data.

The SN76489 is currently sitting in a socket as part of a circuit to easily connect it to an Arduino board. In order to even have access to the clock line I had to de-socket the 74hc14 and solder an extra wire with a jumper connection to the clock pin of the Sn76489.


The relatively fat, white wire is connected to the master clock pin of the SN76489. This jumper can then be easily connected to a breadboard that generates the modulated clock signal (as in the picture below - note that this shows the other side of the SN76489 board).

In this first instance of exploring master clock modulation, the setup was pretty simple. A 4093 quad nand gate was used to generate two signals. The first signal (essentially 'the modulator') was fed into the control input of the second signal (essentially 'the carrier').

Only when the modulator is in a high state will the output of the carrier be active. One pot controls the speed of the modulator, whose frequency range is relatively low compared to the carrier. The other pot controls the speed of the carrier.

When the modulator is in its lowest frequency range, it seems that the SN76489 misses data which is sent to it. A possible solution to this would be to throttle the period of the write cycle
from the Arduino to the Sn76489.

Various interesting things happen when the modulator is swept up and down. Here are a number of audio examples. The noise sweeps use different noise shape settings from each other.

Chord Sweep (my favourite example).
Melody Sweep (featuring all four channels).
Noise Sweep 1 (loud and proud).
Noise Sweep 2 (interesting artefacts).
Noise Sweep 3 (the sweep is subtle).
Noise Sweep 4 (more obvious).
Noise Sweep 5 (more broadband than the previous few sweeps).

There are four main ways in which this idea can and will be extended. First of all, by selecting different types and methods of modulation etc with which to control the master clock.

Secondly, by being able to control the speed of the modulator and/or carrier wave using MIDI. This idea interests me, because it would greatly increase the musicality (whatever that means) by linking the manner of control (ie. host computer running a sequencer) between both the SN76489 and the master clock of the SN76489.

The third and fourth methods I will not go into because they might not be successful. I will try them first and see.

----------
[1] Haines, Christian. Conversation (in person). 14 May 2008.

Monday, May 19, 2008

MIDI Controlled Sega Master System Gameplay

Video URL: http://www.youtube.com/watch?v=-STfPfXQcps

A device that electronically manipulates the controller port pins of the Sega Master System so that the console detects presses and depresses of buttons based on MIDI note events. Both controller ports are supported.

When the device receives a MIDI note on message at a particular pitch, it switches that particular button on. When the device receives a MIDI note off message at a particular pitch, it switches that particular button off.

Gameplay sequences can be controlled and playedback from a PC to the Master System in this fashion.

I am sure we all realise what the next step is in this project.




Nice Contact

I had to take apart my multimeter in order to repair it. The contact for the selection dial on the front looks quite nice.

Nanoloop 2.x Compilation

A Nanoloop 2.x compilation has been released on which I have a track. Thanks to Catchy Name for putting it all together.

Grab it here: http://8bitcollective.com/forums/viewtopic.php?id=4793



Sunday, May 18, 2008

Fundraising Dinner

Last night my parents held a very nice fundraising dinner in their home. The cause was to help our family friend Sayed Mubarek to bring his wife and children to Australia from Pakistan. The three course meal was fantastic, wine was drunk and monies were raised. A successful event. Additionally, I won the raffle and took home a bottle of red as well as a painting.



Friday, May 16, 2008

Tomczak Speaks at MusTech Forum

I spoke at music technology forum today.
Let's see what the critics say.


Here are some things I blahed on about:

AUTOMATON
bitwise drum machine:
http://youtube.com/watch?v=gggsFPRLAXU
http://little-scale.blogspot.com/2008/01/bitwiserhythm-generator-update.html
http://little-scale.blogspot.com/2007/12/bitwiserhythm-generator-update.html
http://little-scale.blogspot.com/2007/12/bitwiserhythm-generator.html

11.6ms:
http://little-scale.blogspot.com/2008/01/116-ms-excerpt.html


MILKCRATE

milkcrate.com.au:
http://milkcrate.com.au/

deli style:
http://www.youtube.com/watch?v=kHUvIzHjE9E

sea monster:
http://www.youtube.com/watch?v=cdGLkEZo90s

of daedalus :
http://www.youtube.com/watch?v=1H3EUrJOImA


CHIPMUSIC
chiptech page:
http://chiptech.milkcrate.com.au/

vectrex standalone sequencer:
http://youtube.com/watch?v=doIByhjRKdw

sega master system chip:
http://www.youtube.com/watch?v=7fSzmGcPtGQ

atari pokey chip:
http://www.youtube.com/watch?v=Gc3HexrFpsQ

sp0256-al17 speech chip:
http://www.youtube.com/watch?v=Uu-KR1b9jII

c64 filter control:
http://www.youtube.com/watch?v=kKADOmFqRMs

hidden village 'starmaker':
http://hiddenvillage.milkcrate.com.au/

more info:
http://little-scale.blogspot.com/search/label/chiptune


MOLECULAR CODE
information:
http://little-scale.blogspot.com/search/label/molecular%20code

drosphilia:
http://www.youtube.com/watch?v=RgxhTP96c7o

myspace:
http://www.myspace.com/molecularcode


PHYSICAL COMPUTING
tape-o-tron:
http://www.youtube.com/watch?v=d2DL9WoIGtM

first prototype:
http://www.youtube.com/watch?v=A4JwQxfPnLE

toriton plus prototype:
http://www.youtube.com/watch?v=bJ9LQHazTRg

toriton plus at acmc06:
http://www.youtube.com/watch?v=WjdaHB6Q7oI

Thursday, May 15, 2008

Chiptech page

A collection of links to some chippy stuff i have been working on in the last while:
http://chiptech.milkcrate.com.au/

Wednesday, May 14, 2008

MIDI With Two 4021s and Arduino

Here is an example of how to read two 4021s and send the state out as MIDI data.
A transition from a low to a high state on the 4021s will result in a note on message.
A transition from a high to a low state on the 4021s will result in a note off message.

Arduino Code:

The Arduino code can be downloaded here:
http://milkcrate.com.au/_other/downloads/projects/MIDI_With_Two_4021s/

Here are some important parts of the code.

byte switchVar1 = 0;
byte switchVar2 = 0;
These are the bytes that contain the information for the 4021 states. Each 4021 has a byte. If more 4021s are to be added, make some extra variable bytes such as switchVar3, switchVar4 and so on.

byte MIDI_channel = 0;
This sets the channel minus one. So for example, setting this to 15 results in sending data on channel 16.

byte MIDI_pitches_offset = 60;
This sets the lowest pitch (so, the note that corresponds to button 0 from the first 4021). The each subsequent button will be one semitone higher.

byte MIDI_on_velocity = 127;
This sets the note on velocity. A high on any of the inputs of a 4021 will trigger a note on event. A low will trigger a note off event.

switchVar1 = shiftIn(dataPin, clockPin);
switchVar2 = shiftIn(dataPin, clockPin);
midiShadows(switchVar1, 0);
midiShadows(switchVar2, 8);
This is where the 4021s are read in and the MIDI data is sent out. To add additional 4021s, simply add additional lines of code like this:

switchVar1 = shiftIn(dataPin, clockPin);
switchVar2 = shiftIn(dataPin, clockPin);
switchVar3 = shiftIn(dataPin, clockPin);
switchVar4 = shiftIn(dataPin, clockPin);
midiShadows(switchVar1, 0);
midiShadows(switchVar2, 8);
midiShadows(switchVar3, 16);
midiShadows(switchVar4, 24);

and so on.

And that's pretty much it. You can connect up to 128 buttons using 16 4021s using this method.

Breadboard

Max/MSP Patch

Tuesday, May 13, 2008

ICMC08

I have had a musical work accepted for the International Computer Music Conference 2008.

Monday, May 12, 2008

"Star Maker" YouTube Ad

http://www.youtube.com/watch?v=00QO97DuJjU

Yet another ProSound DMG...

Somewhat Frankensteinian - the back half is from a clear DMG, the front half is from a black DMG, the buttons are from a grey DMG.



ProSound GBC




Today I performed the ProSound modification on one of my Game Boy Colours. I also swapped the red LED with a green one.

You can hear an example of the headphone socket versus the prosound post-pot socket here. Both outputs are from the same machine. Both outputs were recorded with the same gain setting.

GBC Headphone Socket
Silence: -57.6 dBfs
Music: -15.9 dBfs

GBC ProSound Socket
Silence: -65.7 dBfs
Music: -2.2 dBfs

Saturday, May 10, 2008

NanoSync


This is a device that will synchronise Nanoloop 1.x to a MIDI clock signal. A custom job for 8BC member Paranym from Melbourne.


You can see a video of this particular interface in action here:
http://youtube.com/watch?v=OQpSCPxz-E8


Arduino Code:
The Arduino code for this project can be downloaded here.


Schematic:


Friday, May 09, 2008

ICMC08

I have had a peer-reviewed paper accepted for the International Computer Music Conference 2008.

Thursday, May 08, 2008

Kim's Birthday Party

I had a nice time at my good friend Kim Worley's birthday party the other night. Kim is someone I do not see very often, but I still have a strong bond with this individual.

The party was in the function room of a suburban pub. The thing that made this party stand out is that there were small musical acts playing throughout the night. Kim played the cello. I spoke to him briefly, and he didn't seem too happy with his playing. Whatever, it was the feeling of his playing that counted, it was very appropriate for the atmosphere.

I wish I had had the time to attend his concert this week, but unfortunately I was working.

Cacti and Ruins

Photos from a really beautiful area of country just outside of Meningie, SA. An inspirational place.




Playing Vinyls on a Gramophone

I am not sure if many people know or care, but my parents have a gramophone - you know, a mechanically-based musical playback device. So I was visiting them the other week and decided to try and see if I could play a vinyl on the gramophone. Yes, the speed is different of course. But the fact that the sound quality is okay surprised me somewhat.

I really love the idea of the analog mechanical recording and what it represents to us as music technologists (how clichéd does that sound? ¬_¬ ) - it comes from a time when humans were beginning to understand the full impact of sound outside of the context of realtime, local performance.

Wednesday, May 07, 2008

The Simplest Freeduino Setup

This is mainly for my own reference. I think this is the simplest setup one can have for a preflashed Arduino clone. I am using one of the RBFK's from Wulfden. I have to say, their technical support is second to none - I am very impressed. Thanks to Brian from Wulfden for his help.

Connections:
Pin 1: Pulled up to 5V via a 10K resistor
Pin 7: 5V
Pin 8: Gnd
Pin 9: Crystal 1, then going to ground via a 20pF capacitor
Pin 10: Crystal 2, then going to ground via a 20pF capacitor
Pin 20: 5V

Tuesday, May 06, 2008

Syncing Nanoloop to MIDI Clock

I have made something that takes MIDI clock signals and converts them into Nanoloop 12ppqn sync signals.

Video: http://youtube.com/watch?v=cD-e2iPeMjo

Monday, May 05, 2008

Hidden Village: Star Maker

New EP out now. Get it here: http://hiddenvillage.milkcrate.com.au/

Hidden Village is Lauren Sutter and Sebastian Tomczak.