Jump to content

Search the Community

Showing results for tags 'midi'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks


There are no results to display.

Found 8 results

  1. How to set up MIDI over USB

    Hi everyone, TLDNR: How do I set up MIDI descriptors for MIDI over USB so that I can get my PC to recognize my F5510 as a class-compliant MIDI device, either using the TI USB Dev package, api, and descriptor tool, or manually? I'm working on my first MSP430 project and hoping to get some help setting up the USB interface in CCS. I'm working with an MSP430F5510 on a custom board and trying to set it up so that it's recognized as a class-compliant midi device on the PC - then I will send midi messages to the PC to control music programs, etc. I'm stuck on where to start for configuring the USB on the MSP430 and setting up the MIDI descriptors. So far, I've managed to run the empty USB example from TI's USB Developers Package using HID settings from the TI Descriptor Tool - my PC recognized it as an HID device and installed it. It shows in device manager (yet has an error, which I suspect is just due to not running any code yet: "This device cannot start. (Code 10)"). Okay, this seems good - I imagine my hardware is working then. Now how do I set it up to be recognized as a MIDI device? The TI examples and descriptor tool don't support MIDI, but I was hoping I could possibly modify the code to make it work - to save re-inventing some of the wheel. Their code seems quite convoluted and abstracted which is making it difficult for me to figure out what I need to do. I've found some resources on MIDI over USB such as the ones below, but am looking for some direction on how to actually implement it. Resources I've found: MIDI descriptor from microchip: http://www.microchip.com/forums/m297214.aspx Forum question on basics of MIDI over USB: http://electronics.stackexchange.com/questions/87601/implementing-a-class-compliant-usb-midi-device All of TI's USB Dev stuff: http://www.ti.com/tool/msp430usbdevpack http://www.ti.com/lit/an/slaa457a/slaa457a.pdf MIDI over USB Spec for knowing what to put in descriptors: http://www.usb.org/developers/docs/devclass_docs/midi10.pdf Main questions on the topic: Should I be trying to use TI's examples? Also the API? Where do I put the descriptors and how? Are there other resources I should be following? Thanks heaps in advance for any insight you can give! Congrats if you read this far - you're the best =). Thanks, Josh
  2. Midi drum pads

    I decided to have a crack at building some drum pads, because the keyboard that I'd acquired for the kids to learn piano on had a midi input, and somewhat acceptable drum sounds to boot. After several months of sitting around half-completed under a cupboard, I decided to pull it out over the easter weekend and actually make it work. In words, here's what I did. Six drum pads, made of a square of hardboard with 5mm closed-cell foam glued to the top and standing on 15mm foam pads. Each pad has a piezo electric transducer underneath, attached using hot glue. These six piezos are each hooked up to a buffer and biasing and clamping circuit, like below. The op-amp I used was an LMC648, which is great for this application but isn't that cheap. These six analog channels are connected to six of an MSP430's analog inputs. This micro samples these six inputs continuously, and uses a simple filter and threshold algorithm to determine when they've been hit. Once it detects a hit, it outputs the pad ID (zero to five) and the 'velocity' of the hit over I2C to another MSP430. This second micro in turn outputs the MIDI command, through a completely un-necassary additional chip to drive the MIDI output completely to spec. I know it's possible to output midi using 3.3v, but I used a driver chip anyway to run it at 5v - a TC4428 FET driver that I happened to have left over from another project. The second micro also translated the pad ID to a MIDI note, and can be reprogrammed via a couple of buttons that are used to change the drum sound that's assigned to the most recently hit pad. The assignments are stored in the MSP430's "information memory" segment, so that it remembers how you set it up when you turn it off. I'd originally planned to put a 16x2 LCD on there, but I ended up using that for something else. In pictures, here's what it looks like. Overall: PCB closeup - I would normally have a full eagle schematic and layout for this, even if I'm building it on stripboard, because I just make fewer mistakes that way. In this case though the layout of the six clamping circuits turned out to be much easier if I stood those components up out of the board (look on the right side of the picture) and wired them up over the top, and you can't really do that so easily in Eagle. Piezo closeup (under the pads) And finally, in code, here's the two projects. The ADC sampling micro : main.c The MIDI outputting micro : main.c Probably the most interesting aspect of this for me at least, was that when I was designing the (admittedly still rather crude) algorithm to determine how hard the pad had been hit, I needed to get the ADC samples off the chip so that I could experiment with algorithms offline and tweak their performance. I happen to have one of the rather wonderful saleae USB logic analysers (https://www.saleae.com/logic/), and so if you compile the ADC sampling micro's code with OUTPUT_SAMPLES defined, it will run the I2C at 1Mhz (instead of a much more reasonable 125kHz) and output all the ADC data as it receives it. This is pretty borderline for I2C, but if you keep the track length for the I2C nice and short you should be ok. In my case it's the orange and yellow wires in the PCB photo above - and of course you'll need both micros there because the I2C won't work if nothing's there to ACK. Anyway, doing this I was able to get the samples back into my PC, and using python and pylot etc, plot handy graphs like this: Python file, and two text files recorded from the inputs using I2C and the USB logic analyser : Archive.zip The algorithm just detects when the input rises over some threshold, and while integrates the value before it crosses back over zero again (this is after the ADC samples have had 512 subtracted from them of course, making them signed). This is then considered the 'velocity', and the MIDI micro then divides that down to get a 7-bit velocity value for MIDI. This works 'ok', but very light hits aren't detected, and sometimes hits are quite a bit louder than you'd expect. It's still fun though.
  3. Hello, I tried out basic functionality with the arduino MIDI library 4.1 on TIVA Launchpad TM4C123G (all others should work also) Download Link: https://github.com/FortySevenEffects/arduino_midi_library/ The only thing to do is to setup the serial interface, you can simply do that with insert following line into midi_Settings.h: #define MIDI_DEFAULT_SERIAL_PORT Serial1 "Serial1" defines PC_4 = RX(1) input on tiva, PC_5 = TX(1) output on tiva, so you should choose every serial port you want (untested). my patched midi_Settings.h is included as attachement I´ve tested successfully it with my self build midi interface, sending some random notes from my computer. Here is a basic test code example - it reads midi input notes on channel1 and print it out on the serial monitor (+ led flashing) #include <MIDI.h> #define LED RED_LED // LED pin on Tiva Launchpad TM4C123G void HandleNoteOn(byte channel, byte pitch, byte velocity) { // Do whatever you want when you receive a Note On. if (velocity == 0) { digitalWrite(LED,LOW); // This acts like a NoteOff. } else { digitalWrite(LED,HIGH); } Serial.print("Note ON: Channel: "); Serial.print(channel); Serial.print(" Key: "); Serial.print(pitch); Serial.print(" Velocity: "); Serial.println (velocity); // Try to keep your callbacks short (no delays ect) // otherwise it would slow down the loop() and have a bad impact // on real-time performance. } void HandleNoteOff(byte channel, byte pitch, byte velocity) { digitalWrite(LED,LOW); Serial.print("Note OFF: Channel: "); Serial.print(channel); Serial.print(" Key: "); Serial.print(pitch); Serial.print(" Velocity: "); Serial.println (velocity); } void setup() { pinMode(LED, OUTPUT); MIDI.begin(1); // Launch MIDI and listen to channel 1 MIDI.setHandleNoteOn(HandleNoteOn); MIDI.setHandleNoteOff(HandleNoteOff); Serial.begin(9600); // Energia serial monitor to see events } void loop() { MIDI.read(); // nothing more to do here } Be carful! the "serial.print" lines are only for testing and not recommended within the setHandleNoteOn/Off handler! Hey admin: please let us attach *.ino files! (You aren't permitted to upload this kind of file) regards Matthias midi_Settings.h
  4. MIDI -> DMX bridge

    My first Tiva project, MIDI -> DMX bridge (this is the 3rd version, the other 2 were MSP430F5xxx based.) It has 6 universes, 512 channels each, and includes PoE. Initially, the software was written (with the exception of MIDI and mapping/sequencing part) entirely using TivaWare, and then most critical parts were optimized.
  5. Hi there. Probably some of you know already the existence of this MIDI boosterpack published on 43oh forums (check the original thread here). This board is a great tool for musicians and/or audio engineers, it features two DIN-5 MIDI connectors (MIDI IN and MIDI OUT) along with two switches and potentiometers. It allows to receive and send MIDI messages through the mcu's UART modules, and the incorporation of the potentiometers help for applications such as arpeggiators, sequencers, harmonizers and everything you can imagine. The original author provides some code examples for MSP430 but I's starting to arrange some code for Tiva/Stellaris. First of all I bring to you some basic code for receive and process the input MIDI messages. It would be great if we can use this thread for share more examples suited for Tiva/Stellaris. I attached mi example file to this post. If you use it on a project don't forget to modify the startup_ccs file. The pinout used is for a LM4F120XL launchpad, so check everything is right before compiling. For detailed explanations on this code check this article. Have a nice day! midi_bp.c
  6. Hi everyone, I'm trying to implement a midi output communication, but there seem to be a problem and I'm not sure if it's with my software or hardware. So here's what I'm getting... I'm trying to do it with a Launchpad rev 1.4 with the MSP430G2231 chip. I connected my launchpad to a midi connector like they told on the Teensy Midi Library page http://www.pjrc.com/teensy/td_libs_MIDI.html So translated to the launchpad: P1_1 (TX pin) to midi Pin 5 (tried with and without a 220 ohms resistor) GND to midi Pin 2 VCC to midi Pin 4 with a 220 ohms resistor For the VCC, I tried with the VCC pin for a +3.3v and with the TP1 connection (5v from the usb connector) for a +5v, but I get the same result with both. Since midi is a +5v protocol, I tried to amplify the TX signal with the circuit on this page but this didn't work. I found here and here that I could make it works with a +3.3v circuit by lowering the 220 ohms resistor to something about 50 ohms, but this give me the same results as with the 220 ohms. My results: I'm able to receive a midi value when I send it with no amplification to the TX pins (with 3.3v or 5v VCC). That's great, but I'm only getting a Midi Program change of ProgramChange 0 channel 1 when I try to send a midi note value (with note values of about half and up the midi scale). Over USB, I get the serial data and with this software I see that it sends a midi message that 1 or 2 byte is missing. With the MIDI connector, I plug it straight into my computer with a midi-to-usb cable (M-Audio Uno) For the code, mainly the midi example on the Energia IDE: /* MIDI note player This sketch shows how to use the serial transmit pin (pin 1) to send MIDI note data. If this circuit is connected to a MIDI synth, it will play the notes F#-0 (0x1E) to F#-5 (0x5A) in sequence. The circuit: * digital in 1 connected to MIDI jack pin 5 * MIDI jack pin 2 connected to ground * MIDI jack pin 4 connected to +5V through 220-ohm resistor Attach a MIDI cable to the jack, then to a MIDI synth, and play music. created 13 Jun 2006 modified 30 Aug 2011 by Tom Igoe This example code is in the public domain. http://www.arduino.cc/en/Tutorial/MIDI */ void setup() { // Set MIDI baud rate: Serial.begin(31250); } void loop() { // play notes from F#-0 (0x1E) to F#-5 (0x5A): for (int note = 0x1E; note < 0x5A; note ++) { //Note on channel 1 (0x90), some note value (note), middle velocity (0x45): noteOn(0x90, note, 0x45); delay(100); //Note on channel 1 (0x90), some note value (note), silent velocity (0x00): noteOn(0x90, note, 0x00); delay(100); } } // plays a MIDI note. Doesn't check to see that // cmd is greater than 127, or that data values are less than 127: void noteOn(byte cmd, byte pitch, byte velocity) { Serial.write(cmd); Serial.write(pitch); Serial.write(velocity); } Thanks a lot for any help ! G
  7. Hey forum! I always wanted to make a synthesizer , so i chose the msp430 launchpad, because it's one of the most inappropriate chip i can use for it :grin: When i started to make it i didn't have real goal, i just wanted to make a sound, so this project is kind if all over the place but i have learned a lot doing it so it was totally worth it. The DAC used is a TI TLC5615, it's not the best choice, but i only had this in my parts bin. Probably any other SPI DAC could be used with minimal modification, or even PWM. (I don't sound good with PWM IMO.) The TLC5615 needs 5 volts, but it seem to run good with 3.6 volt from the launchpad,or you could use TP3 (the USB 5V) but that can be noisy, I used a separate 5V supply. The crystal is required, because it tunes the DCO on every start up to a pre-defined value ( i ran it at 19Mhz without any problems) If you change the frequency , you only need to change the bit rate divider for the USCI UART. There are a lot to optimize/rewrite but i kind of grew tired of playing with variables to get a few more bytes of free ram. Maybe i'll rewrite it on an F5510 as it would be a much better choice because it has 8 x Ram as much ram and a hardware multiplier. This is a synth with 16 voice of polyphony. It accepts midi massages from 1-8 and 10 (for the drum sounds). Each midi channel has it's own different settings for: -MIDI program -LFO width and speed (CC01 for combined mod wheel control, CC02 for width,CC03 for speed -Oscillator type (simple with any waveform or with ADSR square or sine wave) -Pitch bend -Portamento on/of (CC65) -Portamento speed (CC05) -Channel volume (CC07) It plays 8 sine/square with ADSR, 4 with any waveform (now only Saw and triangle), and 4 drum sounds simultaneously. Here are two songs i recorded with it: Soundcloud. I have attached the CCS Project with the source codes in a ZIP, the schematics, and a picture of how it look on my breadboard. mSpYNTH.zip mysy
  8. Found a french blog with a launchpad (and Energia) flavor to it. A couple of different write ups, from simple button tutorials to adc and lcd, as well as motor control. Google Translate works well enough for english. French: http://electroniquea...label/Launchpad Translated: http://translate.goo...-KjLMthQ65c63Vw Most interesting one I saw was a simple little midi project. Plays F