evilxsystems Posted February 21, 2008 Report Share Posted February 21, 2008 So I want to make a thing to stick on top of my head that is covered with LEDs that I can control via MIDI...the obvious choice for this seems to be the MIDIO128. Do I need any DIN boards or just 1 DOUT board for every 24 LEDs I want on my head? Can the DOUTs be configured easily so I can turn on the LEDs with note events? I'd like to sequence the lights with midi note on/offs, it seems like this would be easiest to implement and debug. ;D Quote Link to comment Share on other sites More sharing options...
sineSurfer Posted February 21, 2008 Report Share Posted February 21, 2008 I hear daft Punk helmet? :D: http://www.engadget.com/2007/06/20/get-your-own-daft-punk-helmet-maybe/... MIDIO128...I should explore that hehe Quote Link to comment Share on other sites More sharing options...
julienvoirin Posted February 22, 2008 Report Share Posted February 22, 2008 yes you can do it with 1 core and 1 dout (up to 32 leds). U can use midio128. midi note on 0 (C-2 i guess) will light on led0, note off will light off, note on 1 (C#-2) light up led1 and so on ....the hardest will be to do the helmet.have fun Daft Punk ! Quote Link to comment Share on other sites More sharing options...
levon Posted February 22, 2008 Report Share Posted February 22, 2008 if you use MIOS.. there is a simple example for doing exactly what you want..Controlling 128 LEDs via MIDIWe want to set/clear LEDs, which are connected to one or more DOUTX4 modules, with Note Events over MIDI Channel #1Copy the SDCC skeleton into a new directory, open the main.c file and enhance the hooks like described below. Thereafter type "make" in the command shell, and upload the new project.hex file to the core.Within the Init() function, you have to specify, how many shift registers are connected to the core://///////////////////////////////////////////////////////////////////////////// This function is called by MIOS after startup to initialize the // application/////////////////////////////////////////////////////////////////////////////void Init(void) __wparam{ // set shift register update frequency MIOS_SRIO_UpdateFrqSet(1); // ms // Up to 4 DOUTX4 modules (=16 shift registers = 128 digital outputs) can be connected // set the maximum number here - it doesn't really hurt! MIOS_SRIO_NumberSet(16);}/////////////////////////////////////////////////////////////////////////////// This function is called by MIOS when a complete MIDI event has been received/////////////////////////////////////////////////////////////////////////////void MPROC_NotifyReceivedEvnt( unsigned char evnt0, unsigned char evnt1, unsigned char evnt2) __wparam{ // a note event provides 128 different note values (0..127) // in this simple example, each note sets an individual pin // for DOUT pin numbers, see also this documentation: // http://www.ucapps.de/mios/mios_pin_list.txt if( evnt0 == 0x80 || evnt0 == 0x90 ) { // 90 xx 00 is the same like a note off event! // (-> http://www.borg.com/~jglatt/tech/midispec.htm) if( evnt0 == 0x80 || evnt2 == 0x00 ) { // Note Off MIOS_DOUT_PinSet(pin, 0); } else { // Note On MIOS_DOUT_PinSet(pin, 1); } }} Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.