• Announcements

    • bluehash

      Forum Upgrade   03/11/2017

      Hello Everyone, Thanks for being patient while the forums were being fixed and upgraded. Please see details and report issues in this thread. Thanks!

Search the Community

Showing results for tags 'audio'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Calendars

  • Community Calendar

Found 14 results

  1. Hello chaps! What I'm basically trying to do is record as much audio as I can (about 30k samples from a line-in source) then dump it all over serial. I'd like to use the Audio Booster pack (http://www.ti.com/tool/cc3200audboost) which does all the codec magic for me. But - I can't get it to work with energia. (to be honest, the documentation for how to actually use the thing is pretty poor regardless of programming tool...) I did my best to duplicate the needed parts of the (also terrible) Wifi audio demo app from TI's official SDK but to no avail. Has anyone had success at getting audio off this thing? Thanks!
  2. I'm creating a kind of Yak Bak for a project I'm working on for my small son. The basic idea is that I'll start recording audio when one button is pressed, and start playing it back when another has been pressed. My initial plan was to just use something like an msp430g2553's onboard ADC to sample a microphone, and play it back using a PWM output. From what I can tell, I should sample my audio at 8 kHz to satisfy the Nyquist theorem. It looks like an msp430g2553 (and all comparable processors I've looked at) have a maximum sampling rate of at most, 500 samples/second -- taken from the minimum conversion time listed in the msp430g2553 datasheet. Those two numbers are obviously not the same, which leads me to believe I'm going to run into issues. How would you guys recommend handling this? I could beef up my processor, but that might require a bit more soldering ability than I currently have. Or I could go with a standalone ADC chip, but I'll have to read the data in sometime, and I'm not convinced my processor would be able to keep up. Thanks!
  3. Hi, I am currently working on a code in Energia that will allow me to upload and send a binary file wirelessly from a client site to the CC3200. So far, the code has successfully accomplished the following: -the board establishes a Wi-Fi network -commands from a laptop can interact with the board (the Energia Simple Wi-Fi Server example (LED ON/OFF) code was tested to ensure this was working) -a 9 byte binary file is sent through Wi-Fi to the board's volatile memory, saved from volatile memory into an on-baord flash memory file, and confirmed by sending it back to the laptop through a serial connection The code is eventually supposed to receive a larger binary file (we hope around 500 KB) that will represent points on a sinusoidal curve. This file will then be sent to the Audio Booster Pack board to play the audio file. I created a flash file which was opened, and written to through a buffer array containing the binary file contents. This method was successful for a 9 byte file, but I learned that a larger 500 KB file cannot be stored in a buffer array so easily. I think this is because of a lack of RAM space on the board. How can I implement a code in Energia in order save this larger binary file to the flash memory? Is the buffer array approach a good method? Latency isn't really an issue, as long as we can fit the whole file on the board, and then play it after. Thanks, any support is greatly appreciated!
  4. My (crazy) project is getting closer to completion so time to start a project topic. I have verified my Tiva C based controller design and are now waiting for PCBs - will arrive from China in a few days. My background is from Radio/TV servicing and medical electronics, but for the last 25 years I have mainly been working on a large database application written in OpenEdge. Two years ago my preamp that I made some 30 years ago started to fail due to the rubber based switches rotting (a bit like my brain these days...). Since I did not want to buy one I decided to make a new - again with no mechanical parts in the audio path. A lot has happened since back when I was involved in electronics, and I have spent some time doing research for what components are now available - to many one may argue. I decided to use a CPLD programmed in VHDL for the switching logic, high quality analog switches (my original design employed 40 series CMOS for these) and a VCA (voltage controlled amplifier) for volume control. I did not want to introduce a MCU because I believed I would get into trouble with the clock signal interfering with the audio... Anyway, my new design was successful and has now been in service for nearly two years. After doing this I took an interest in learning about microprocessors again, I started out with Atmel/Ardouino and Energia but I found that combination a bit lacking - no easy way to do debugging was a showstopper for me. I found the TI processors more appealing, CCS allows me to get my hands dirty on "bare metal" and a decent debugger makes life easier. So, here I am making another iteration of my preamp - this time involving no less than four TI processors. I have decided to post my project under the Tiva C header since it is the main workhorse, but the three other MCUs are 430s. Ok, enough rambling - here are the main components I have designed: Raspberry PI power switch - PC-style startup/shutdown, may be controlled over I2C or from a front panel switch. IR Remote Control - RC5 protocol. Main controller - Tiva C based, custom UI library and support for Keystone DAB radio. Preamp board, 5 line inputs with the option of switcing one to phono (magnetic cartridge - vinyl is getting popular again), DAB option, I2C control and still a VCA based volume control. I have recently switched to KiCad as my EDA, I did use Zenith PCB earlier but I am a bit scared to continue using that as it is licensed on a yearly basis (even if it is free) - who knows when it wil not be supported anymore. KiCad is open software and does not suffer from any limitations to number of pins or board size. Attached are the design files I have made for the Preamp board - the design is still to be verified, I will do that when I see how the controller board works out when arriving from the fabricator. 3D view from my KiCad design - I am too lazy to make my own 3D files so it is somewhat incomplete. There is a TI processor hidden on the bottom side, as is the KeyStone radio module. If everything goes to plan I will post about the bits and pieces that makes up the complete project. I even have mechanical design files (Vectric format) that may be used to make files in order fabricate the enclosures on a CNC-machine. Ok, enough for this time. Terje PreAmpBoard.zip
  5. Hello Can someone please walk me through a suitable MCU for AIC3254/AIC3253 audio codec? From the codec's eval kit, a controller with 32kB mem with I2C/SPI is enough. Is MSP430G2744 suitable? It has 1kB RAM, 32kB flash, 16MHz and 1 I2C, SPI each. The codec would not be used for digital audio. Preferring to keep it simple. One more thing. Since there isn't much of know-how on this from my end, I would prefer outsourcing the development. Generally speaking, what should I know before committing someone to take the task? Like 1) Would I also require a separate compiler/development board for the MCU, which would then get later soldered to the codec PCB? Or I can straight way use USB connection on the codec PCB to a PC and then initialize the MCU from their for the first time. And then obviously, download the codec code from Purepath. Please help before I start talking to a developer. Thanks.
  6. Hi everyone, a lot of time since my last post on this forum and noticed many things has changed, in better. I want to spread (spam) my boosterpack project, Aida DSP boosterpack It's a boosterpack dedicated for audio and for now available only for TivaC. With this boosterpack you can do 24bit/192kHz pristine audio elaboration, since it has a DSP on it, so while this DSP is occupied with audio elaboration you can do a lot of things with your mcu: read audio signal envelope, manage a user interface and -why not?- a complete keyboard or a rich display, ecc. http://www.aidadsp.com Libraries are available both for Energia and Arduino, please note that I hacked wire.cpp and wire.h a bit to get things done. You can buy the board, on our store to start focus on your audio application. Suggestions and collaborations welcomed!!! Max
  7. I've been looking for a while and can't find a good example showing how I can play any sort of music or speech files (mp3, au, wav, etc.). I've got a configuration setup that allows me to read files for things like LCD screens, I'm looking to read a music or speech file and play it through an amplified speaker. I'm not looking to make just tones, rather to play full music or speech files. I've found projects for Arduino such as (http://hlt.media.mit.edu/?p=1963), but nothing that works with MSP430 and Energia. Has anyone done something similar to this with Energia?
  8. Anton Veretenenko created a simple FM Radio with a TEA5767 compatible chip. The RDA5807P is an I2C (Or spi) controlled FM Radio Tuner. He used a generic AC Powered PC Speaker, added a 3.3v regulator, a rotary encoder, and stuffed it in. The post and code don't mention it, but from the pictures, the stated 2kb limit, and the use of USI, it's using the G2231 on a v1.4 Launchpad. Blog Post: http://blog.avrnoob.com/2013/10/ti-launchpad-rda5807p-tea5767-fm-radio.html Code Repo: http://code.avrnoob.com/ti-launchpad-fm-radio Similar to @@juani_c project: http://forum.43oh.com/topic/2359-fm-radio/
  9. VTL On the Hackaday Forums was able to use a 2kb Msp430 to trick a Audi Concert Stereo into thinking it has a CD-Changer connected, enabling Aux Inputs. The code is a Port of a Arduino Port of a AVR Port of the VWCDPIC project (PIC Based). Using a MSP430G2231, VTL was able to implement two different Uni-Direction Protocols, through Timer_A1 and the Watchdog Timer using extra software delays. The same protocol is used in B5, B6 and B7 Audi A4s i.e. Generation I, Generation II and Generation II+ Audi head units. Unfortunately, the code is no longer available, but the post is still a nice writeup on reverse engineering a stereo and porting of code found on the internet, with good pictures too. http://forums.hackaday.com/viewtopic.php?f=3&t=123
  10. 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
  11. I am sure everybody has seen the Auduino code (Grain synth for arduino). I don't really understand the way that the PWM is setup, so I have no idea how to make this work on the MSP430 (or if it even can). Could someone explain how the timers are setup in this code? and the interrupt vector as well? I am just curious how one would setup the timer on one of the MSP430's? // Auduino, the Lo-Fi granular synthesiser // // by Peter Knight, Tinker.it http://tinker.it // // Help: http://code.google.com/p/tinkerit/wiki/Auduino // More help: http://groups.google.com/group/auduino // // Analog in 0: Grain 1 pitch // Analog in 1: Grain 2 decay // Analog in 2: Grain 1 decay // Analog in 3: Grain 2 pitch // Analog in 4: Grain repetition frequency // // Digital 3: Audio out (Digital 11 on ATmega8) // // Changelog: // 19 Nov 2008: Added support for ATmega8 boards // 21 Mar 2009: Added support for ATmega328 boards // 7 Apr 2009: Fixed interrupt vector for ATmega328 boards // 8 Apr 2009: Added support for ATmega1280 boards (Arduino Mega) #include <avr/io.h> #include <avr/interrupt.h> uint16_t syncPhaseAcc; uint16_t syncPhaseInc; uint16_t grainPhaseAcc; uint16_t grainPhaseInc; uint16_t grainAmp; uint8_t grainDecay; uint16_t grain2PhaseAcc; uint16_t grain2PhaseInc; uint16_t grain2Amp; uint8_t grain2Decay; // Map Analogue channels #define SYNC_CONTROL (4) #define GRAIN_FREQ_CONTROL (0) #define GRAIN_DECAY_CONTROL (2) #define GRAIN2_FREQ_CONTROL (3) #define GRAIN2_DECAY_CONTROL (1) // Changing these will also requires rewriting audioOn() #if defined(__AVR_ATmega8__) // // On old ATmega8 boards. // Output is on pin 11 // #define LED_PIN 13 #define LED_PORT PORTB #define LED_BIT 5 #define PWM_PIN 11 #define PWM_VALUE OCR2 #define PWM_INTERRUPT TIMER2_OVF_vect #elif defined(__AVR_ATmega1280__) // // On the Arduino Mega // Output is on pin 3 // #define LED_PIN 13 #define LED_PORT PORTB #define LED_BIT 7 #define PWM_PIN 3 #define PWM_VALUE OCR3C #define PWM_INTERRUPT TIMER3_OVF_vect #else // // For modern ATmega168 and ATmega328 boards // Output is on pin 3 // #define PWM_PIN 3 #define PWM_VALUE OCR2B #define LED_PIN 13 #define LED_PORT PORTB #define LED_BIT 5 #define PWM_INTERRUPT TIMER2_OVF_vect #endif // Smooth logarithmic mapping // uint16_t antilogTable[] = { 64830,64132,63441,62757,62081,61413,60751,60097,59449,58809,58176,57549,56929,56316,55709,55109, 54515,53928,53347,52773,52204,51642,51085,50535,49991,49452,48920,48393,47871,47356,46846,46341, 45842,45348,44859,44376,43898,43425,42958,42495,42037,41584,41136,40693,40255,39821,39392,38968, 38548,38133,37722,37316,36914,36516,36123,35734,35349,34968,34591,34219,33850,33486,33125,32768 }; uint16_t mapPhaseInc(uint16_t input) { return (antilogTable[input & 0x3f]) >> (input >> 6); } // Stepped chromatic mapping // uint16_t midiTable[] = { 17,18,19,20,22,23,24,26,27,29,31,32,34,36,38,41,43,46,48,51,54,58,61,65,69,73, 77,82,86,92,97,103,109,115,122,129,137,145,154,163,173,183,194,206,218,231, 244,259,274,291,308,326,346,366,388,411,435,461,489,518,549,581,616,652,691, 732,776,822,871,923,978,1036,1097,1163,1232,1305,1383,1465,1552,1644,1742, 1845,1955,2071,2195,2325,2463,2610,2765,2930,3104,3288,3484,3691,3910,4143, 4389,4650,4927,5220,5530,5859,6207,6577,6968,7382,7821,8286,8779,9301,9854, 10440,11060,11718,12415,13153,13935,14764,15642,16572,17557,18601,19708,20879, 22121,23436,24830,26306 }; uint16_t mapMidi(uint16_t input) { return (midiTable[(1023-input) >> 3]); } // Stepped Pentatonic mapping // uint16_t pentatonicTable[54] = { 0,19,22,26,29,32,38,43,51,58,65,77,86,103,115,129,154,173,206,231,259,308,346, 411,461,518,616,691,822,923,1036,1232,1383,1644,1845,2071,2463,2765,3288, 3691,4143,4927,5530,6577,7382,8286,9854,11060,13153,14764,16572,19708,22121,26306 }; uint16_t mapPentatonic(uint16_t input) { uint8_t value = (1023-input) / (1024/53); return (pentatonicTable[value]); } void audioOn() { #if defined(__AVR_ATmega8__) // ATmega8 has different registers TCCR2 = _BV(WGM20) | _BV(COM21) | _BV(CS20); TIMSK = _BV(TOIE2); #elif defined(__AVR_ATmega1280__) TCCR3A = _BV(COM3C1) | _BV(WGM30); TCCR3B = _BV(CS30); TIMSK3 = _BV(TOIE3); #else // Set up PWM to 31.25kHz, phase accurate TCCR2A = _BV(COM2B1) | _BV(WGM20); TCCR2B = _BV(CS20); TIMSK2 = _BV(TOIE2); #endif } void setup() { pinMode(PWM_PIN,OUTPUT); audioOn(); pinMode(LED_PIN,OUTPUT); } void loop() { // The loop is pretty simple - it just updates the parameters for the oscillators. // // Avoid using any functions that make extensive use of interrupts, or turn interrupts off. // They will cause clicks and poops in the audio. // Smooth frequency mapping //syncPhaseInc = mapPhaseInc(analogRead(SYNC_CONTROL)) / 4; // Stepped mapping to MIDI notes: C, Db, D, Eb, E, F... //syncPhaseInc = mapMidi(analogRead(SYNC_CONTROL)); // Stepped pentatonic mapping: D, E, G, A, B syncPhaseInc = mapPentatonic(analogRead(SYNC_CONTROL)); grainPhaseInc = mapPhaseInc(analogRead(GRAIN_FREQ_CONTROL)) / 2; grainDecay = analogRead(GRAIN_DECAY_CONTROL) / 8; grain2PhaseInc = mapPhaseInc(analogRead(GRAIN2_FREQ_CONTROL)) / 2; grain2Decay = analogRead(GRAIN2_DECAY_CONTROL) / 4; } SIGNAL(PWM_INTERRUPT) { uint8_t value; uint16_t output; syncPhaseAcc += syncPhaseInc; if (syncPhaseAcc < syncPhaseInc) { // Time to start the next grain grainPhaseAcc = 0; grainAmp = 0x7fff; grain2PhaseAcc = 0; grain2Amp = 0x7fff; LED_PORT ^= 1 << LED_BIT; // Faster than using digitalWrite } // Increment the phase of the grain oscillators grainPhaseAcc += grainPhaseInc; grain2PhaseAcc += grain2PhaseInc; // Convert phase into a triangle wave value = (grainPhaseAcc >> 7) & 0xff; if (grainPhaseAcc & 0x8000) value = ~value; // Multiply by current grain amplitude to get sample output = value * (grainAmp >> 8); // Repeat for second grain value = (grain2PhaseAcc >> 7) & 0xff; if (grain2PhaseAcc & 0x8000) value = ~value; output += value * (grain2Amp >> 8); // Make the grain amplitudes decay by a factor every sample (exponential decay) grainAmp -= (grainAmp >> 8) * grainDecay; grain2Amp -= (grain2Amp >> 8) * grain2Decay; // Scale output to the available range, clipping if necessary output >>= 9; if (output > 255) output = 255; // Output to PWM (this is faster than using analogWrite) PWM_VALUE = output; } So really I would just like someone to explain: // Set up PWM to 31.25kHz, phase accurate TCCR2A = _BV(COM2B1) | _BV(WGM20); TCCR2B = _BV(CS20); TIMSK2 = _BV(TOIE2); and these defines: #define PWM_PIN 3 #define PWM_VALUE OCR2B #define PWM_INTERRUPT TIMER2_OVF_vect and if there is a way to setup one of the timers on the 2452 or 2553 to accomplish the same thing. As always, thanks very much. L293D
  12. This is a continuation of this project. While playing around with my WS2811 strips, I figured that it would be nice to have a board like this one. Could be used with one or two EQ chips and as a stand-alone board. The question is: with booster pack support or without?
  13. There's a few threads on MSP430 audio playback and they've prompted me to wonder what's the best way to actually play the audio (i.e. drive a speaker, piezo) for a simple battery-powered kid's toy? A lot of stuff I can find on audio generation stops at the output to an amplifier. I've seen a few examples of directly driving a speaker (via a low pass filter) from a microcontroller pin but that doesn't seem ideal. The background to this: My 1.5 year old son likes sitting on and starting my motorbike and I've just got him his first balance bike. I'm sure he'd love a starter button and some engine noises on his bike. I'm obviously not after great audio quality, just reasonable (ideally adjustable) volume and battery life for a toy.
  14. Found this through hackaday. Sunrise Alarm Clock. Uses a G2553 (Programmed via Launchpad) Uses a DFC-77 Atomic Radiowave Time Receiver for, well, atomic time. Standard Character LCD (via a shift register) (and pwmed backlight) Settings through Pushbuttons Simple Alarm via PWM melody. 10mm LEDS to provide Sunlight (These could/should be replaced with high current 1a/3a type leds imho) And battery backup (with backup status recognition on p1.4 interrupt) via three diodes! A full featured project, though it could use better leds, and unless you are in Europe, a different clock (either standalone rtc, or a regional radio clock source WWV or WWVB in US though I can't find a source for modules) And a complete schematic would be nice (I think they mislabeled which regulator they use, since they have 5v in on a 7805 regulator (5v out), connected to the g2553) http://renaud.schleck.free.fr/reveil.php