Parallax Forums
  HomeLog InRegisterCommunity CalendarSearch the ForumHelp
   
Parallax Forums > Public Forums > Completed Projects > Propeller and VMusic2 sound sequencer  Forum Quick Jump
 
New Topic Post Reply Printable Version
[ << Previous Thread | Next Thread >> ] | Show Newest Post First ]

Mike Green
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Oct 2004
Total Posts : 13553
 
   Posted 9/23/2007 9:24 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
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.
Image Attachment :
Image Preview
PrismProject.jpg
  382KB (image/jpeg)
This image has been viewed 612 time(s).

File Attachment :
FullDuplexSerialMod.spin   9KB (application/octet-stream)
This file has been downloaded 183 time(s).

File Attachment :
PrismProject.spin   7KB (application/octet-stream)
This file has been downloaded 208 time(s).

File Attachment :
VMusic2.spin   15KB (application/octet-stream)
This file has been downloaded 270 time(s).
Back to Top
 

Mike Green
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Oct 2004
Total Posts : 13553
 
   Posted 9/23/2007 9:49 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
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.

File Attachment :
PrismPrjBasic.spin   48KB (application/octet-stream)
This file has been downloaded 204 time(s).

File Attachment :
i2cFemto.spin   54KB (application/octet-stream)
This file has been downloaded 167 time(s).

File Attachment :
FullDuplexSerialMod.spin   9KB (application/octet-stream)
This file has been downloaded 160 time(s).
Back to Top
 

Unsoundcode
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Aug 2006
Total Posts : 998
 
   Posted 9/24/2007 10:44 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
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.
Back to Top
 

Mike Green
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Oct 2004
Total Posts : 13553
 
   Posted 9/24/2007 11:43 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
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.
Back to Top
 

Unsoundcode
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Aug 2006
Total Posts : 998
 
   Posted 9/25/2007 9:34 AM (GMT -8)    Quote This PostAlert An Admin About This Post.

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 :o)

Jeff T.

 

Back to Top
 

Chris Savage (Parallax)
Forum Moderator



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 10411
 
   Posted 9/25/2007 9:43 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Mike, very nice! Great use of all these external peripheral devices and it must have took some work!


Chris Savage
Parallax Tech Support
 

Back to Top
 

Mike Green
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Oct 2004
Total Posts : 13553
 
   Posted 9/25/2007 10:08 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
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.
Back to Top
 
[ << Previous Thread | Next Thread >> ]
New Topic Post Reply Printable Version
 
Forum Information
Currently it is Friday, November 20, 2009 8:36 PM (GMT -8)
There are a total of 393,723 posts in 55,520 threads.
In the last 3 days there were 84 new threads and 703 reply posts. View Active Threads
Who's Online
This forum has 17685 registered members. Please welcome our newest member, Steve H.
57 Guest(s), 7 Registered Member(s) are currently online.  Details
Peter Jakacki, Mike Green, aconz2, Cluso99, Little-endian, Rich_W8VK, Franklin