Shop OBEX P1 Docs P2 Docs Learn Events
Propeller and VMusic2 sound sequencer — Parallax Forums

Propeller and VMusic2 sound sequencer

Mike GreenMike Green Posts: 23,101
edited 2010-03-08 15:02 in Robotics
Here is the Spin code and a picture for a two channel audio sequencer for a sound installation piece. It uses a VMusic2 and a monaural amplifier for each channel with a Propeller Protoboard controlling the VMusic2's and a bank of 6 reed relays for each channel to connect the output of each channel to one of six speakers. The idea is that there are sound fragments ... pieces of interviews with several people and the fragments move around the room where the piece is installed. The two VMusic2 units are stacked and the two memory stick drives have the same content. There's a subdirectory for each person and the files in the subdirectory are numbered with a two digit number following the person's name and an MP3 extension. For example, one file is \SUSAN\SUSAN01.MP3. In the root directory, there is a playlist for each VMusic2 device named SEQUENCn.TXT where n is 1 or 2. The playlist contains a list, one per line, consisting of the subdirectory name followed by the file number, then the speaker number to be used (with a space as a delimiter). Each playlist is ended by a line consisting of just "*** END ***". There's a uOLED-128 display used to display information about the files being played. The top half of the screen is for one device. The bottom half of the screen is used for the other. The main program manages the screen while the two copies of the VMusic2 object manage each of the devices and communicate with the main program through a message buffer.

There are several routines in the VMusic2 object that should be useful for the memory stick datalogger as well including routines to fill a buffer and to look at the end of the buffer for a specific response from the device. There's a routine to change directories and read a file into a buffer.

There are still some minor bugs, but I'm posting this as an example of a complex VMusic driver that has pieces applicable to other Vinculum uses as well.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-24 05:49
    For those that are interested, here's a modified version of BoeBotBasic that has statements for displaying on the uOLED-128 (SHOW), controlling the relays (RELAY), and communicating with the VMusic2 devices (READ/WRITE/TEST). There's the beginning of a little support for a single string (STR) and a pattern match routine (MATCH). I know the pattern match doesn't work and I haven't tested the string support much.

    This was used for testing the audio sequencer hardware and figuring out some of the sloppy details of the VMusic2. It illustrates how useful BoeBotBasic (or FemtoBasic) is for testing new hardware.
  • UnsoundcodeUnsoundcode Posts: 1,530
    edited 2007-09-24 18:44
    Mike Green said...
    There are still some minor bugs, but I'm posting this as an example of a complex VMusic driver that has pieces applicable to other Vinculum uses as well
    This is great stuff, I intend to buy my first ever Prop within the next few days (when I decide which package I want, possibly the the education kit. What do you think??)
    The Vinculum and Parallax data logger are of particular interest to me, articles such as this are what I will be looking for.

    Jeff T.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-24 19:43
    My personal bias would be to get the USB PropStick and then all the other bits and pieces of the PEK. My reasoning is that the PropStick comes assembled and ready to go. You'll need a 5V regulator if you're going to use the data logger, but that's easy. All the I/O pins are accessible, even pins 28-31. The PEK is nice because of the breadboard and the extra parts for the tutorials. If you're nice and neat, you could just use the PEK as is. It's easier and more reliable to use the PropStick for some permanent project, socketed on a custom PCB, than to leave things on the breadboard.
  • UnsoundcodeUnsoundcode Posts: 1,530
    edited 2007-09-25 17:34
    I compared the kits and decided to go with the Propstick USB. I have breadboards and PSU's so I didn't really need that part of the education kit. I dont know the importance of Pins 28 - 31 just yet, but I have them.

    its going to be a long time before I start hooking up peripherals but the Prop is on its way [noparse]:o[/noparse])

    Jeff T.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-09-25 17:43
    Mike, very nice! Great use of all these external peripheral devices and it must have took some work!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-25 18:08
    Thanks. You might notice from the picture that the optional VGA/keyboard/mouse connectors are installed so you can run a modified FemtoBasic as well for a "self-contained" unit. The intention was to provide an editor at some point that would let you modify the playlists with only a display and a keyboard. With the oLED-128, the editing could even be done with only a keyboard. There's only about 2 weeks until the piece gets installed, so that'll have to wait for some other opportunity. It's been running now for 2 days without a glitch, so I expect it will work fine for a month in the gallery. A past version used a uMP3 and Prop-1 and would hang up after a day or two due to a problem with the uMP3. This is much better.
  • Adrian1Adrian1 Posts: 1
    edited 2010-03-08 06:45
    this is great stuff i lvoe this but can u tell me how much this costs

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Adrian
  • Mike GreenMike Green Posts: 23,101
    edited 2010-03-08 15:02
    You'll have to price it out yourself. It's been about 2.5 years and things change. The major pieces are:

    1 - Propeller Protoboard with Accessory Kit
    2 - VMusic2 + 2GB Memory Stick
    2 - Kit 47 Monoaural amplifiers
    1 - oLED-128 display
    1 - Power Brick (9V? x 2A)
    12 - Reed Relays

    Maybe $200-$250 for the pieces

    Post Edited (Mike Green) : 3/8/2010 3:09:18 PM GMT
Sign In or Register to comment.