Shop OBEX P1 Docs P2 Docs Learn Events
PROJECT: HYDRA Dense Music Format (HDMF) Driver and Application Suite Release 1 — Parallax Forums

PROJECT: HYDRA Dense Music Format (HDMF) Driver and Application Suite Release 1

epmoyerepmoyer Posts: 314
edited 2009-01-29 07:06 in Propeller 1
hdmf_logo.jpg

The HYDRA Dense Music Format (HDMF) Driver and Application Suite is finished.

HDMF is a suite of drivers, documentation, and utilities that enable the easy creation and playback of complex, emotive, polyphonic music on the Hydra platform by converting MIDI song data into HDMF data sets which can be played by HDMF drivers. The attached package is jam packed with demos and examples to help you get great music into your games quickly and painlessly.

I began work on HDMF intending to write a simple set of tools which would allow me to add good music to SpaceWar!. It grew unbidden into a month long obsession to provide a robust music framework that would serve the whole Hydra community. Now it is done. And it is good.

Go forth and rock.

hdmf_translator_010release.jpg

The open bug list, release history, and latest version will be maintained here in this first thread entry, which I will continue to update as necessary.

Open Issues:

  No known issues.




RELEASE HISTORY:

Release 1.2 
  HDMF Translator 1.2.0
      Some MIDI files (in apparent violation of the spec) include an
    extra zero byte after the 'End of Track' event.  Ignore any data after
    the 'End of Track' event to correct this.

Release 1.1 
  HDMF Translator 1.1.0
    Dynamically allocate note space on the fly so that any size MIDI file may be loaded.
    Correct COM control so that it moves properly when resizing the main form.
    Add "about" box.
    Fix Configuration window crash when MIDI's containing more than 8 tracks are loaded.   

Release 1.0
  Initial Release




Post Edited (epmoyer) : 5/29/2007 3:33:37 PM GMT
«1

Comments

  • JT CookJT Cook Posts: 487
    edited 2007-05-27 20:02
    Sweet, I will have to check it out after I get home tonight.
  • epmoyerepmoyer Posts: 314
    edited 2007-05-27 20:38
    The VB source code for the HDMF Translator application put me just a hair over the 2K upload limit when I tried to include it in the main release zip. For those who are interested, the VB source is attached.

    <Edited post: The source has been updated to 1.1.0 and is now maintained as an attachment to the first post in this thread.>

    Post Edited (epmoyer) : 5/28/2007 3:14:11 PM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-05-27 23:54
    Hmmmmmm.. Just in time for a vacation day... sweet!

    Oldbitcollector

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
  • AndreLAndreL Posts: 1,004
    edited 2007-05-28 01:42
    Eric,

    Are you going to finish up spacewar! ? Or it the 17 version as done as its going to get?

    Andre'
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-05-28 02:37
    I'm notorious for finding ways that the programmer didn't intend to use the software. [noparse]:)[/noparse]

    With that in mind....

    I've converted the Liveplayer to work on my propeller board.. Very Cool! All the midi files included
    work perfectly! ---but--- I've noticed when I attempt to load some movie themes (larger midi files)
    into the HDMF Converter, I get the following error.

    "Unhandled exception has occured in your application... If you Click.. blah blah

    Index was outside the bounds of the array."

    I'm pushing it further than it was intended. I'd like to use it to create a simple music player.
    If you if want your code twisted.. I'm your guy.. [noparse]:)[/noparse]

    Great work!
    Oldbitcollector


    Update: This thing really shines when applied to it's intended use.
    Attached are a few SID to MIDI conversions that really work well
    from some 80's video games. Wow

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!

    Post Edited (Oldbitcollector) : 5/28/2007 4:37:47 AM GMT
  • epmoyerepmoyer Posts: 314
    edited 2007-05-28 04:31
    Andre' said...
    Are you going to finish up spacewar! ? Or it the 17 version as done as its going to get?
    Version 1.8 is the latest, and is posted on the SpaceWar! thread. I kind of expect to honor the SpaceWar! tradition and hack at it forever, but I consider 1.8 to be a "complete" and stable release of the currently implemented features.

    I'll be releasing an update with music and the new start screens once I've finished putting together the music for it; I haven't touched it since I started working on HDMF. I'd also like to use it as a platform for doing full color with the E512K card if I can get a full color driver running fast enough.

    Oldbitcollector,
    Yes, I don't do dynamic memory allocation on the buffers used to build the song data and at present I don't even bounds check them (which was kind of an oversight). During development I just pushed the buffer sizes up and up until they were able to handle large songs and then I wasn't getting errors any more by the time I started tracking bugs. I'll post a running bug list shortly and track the open issues. You'll also find that the COM port box doesn't get handled properly when you resize the window.

    "Please excuse the crudity of this model. I didn't have time to build it to scale or to paint it."
    -Doc, Back to the Future
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-05-28 04:45
    In reviewing the ones that didn't work, it looks like most of them would be too big for the space of the Liveplayer.
    Perhaps, you could simply setup to sample from the beginning to wherever it runs out of space...

    We have no excuses anymore for releases without sound and music! [noparse]:)[/noparse]

    "It's Good"
    Marty: BTTF

    Oldbitcollector

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
  • epmoyerepmoyer Posts: 314
    edited 2007-05-28 04:55
    The HDMF Translator will automatically send a partial data set if the song does not fit in the Live Player's buffer. You'll see that happen if you convert one of the large jazz or ragtime piano pieces. The Converter will also log that it is doing the truncation like the example below ( from translating ChanticleerF.mid ) :

    Transmitting song data to HDMF Live Player...
      Note: LivePlayer has a 7168 byte song data buffer.
            Sending 7165 of 20617 bytes...
    Send complete.
    



    The crash you are experiencing is from the app's internal buffers overflowing.
    I have started a bug list in the first posting on this thread and I will work through the open issues periodically. I'll also maintain the latest release in the first posting of this thread.
  • epmoyerepmoyer Posts: 314
    edited 2007-05-28 06:00
    Release 1.1 has been posted and fixes all current known issues.
    The file is available from the first posting in this thread.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-05-28 13:38
    It works perfectly!

    Feature Request...

    How about one (or more) instruments in the Configuration screen which allow setting of
    the envelope controls, attack, delay, sustain, and release? This would allow
    unlimited instruments to be created. You could control the input values to
    valid ranges with 4 pulldowns.

    Oldbit

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
  • epmoyerepmoyer Posts: 314
    edited 2007-05-28 14:33
    That's listed as a future option in section 4.8 ("Stuff You Can't Do") of the manual.

    The envelope control's are a straight hand off to Nick's sound driver, and Nick's driver implements an 8 stage ADSR-ish envelope. The first cut at allowing user envelope entry will be to just allow user input in the combo box, and allow you to type your own 32 bit hex value there. The only reason I didn't add it yet is that I didn't want to eat the time to implement the necessary error checking on the user input.
  • BaggersBaggers Posts: 3,019
    edited 2007-05-28 15:08
    epmoyer excellent work [noparse]:)[/noparse]
    plays great, had my 4 year old daughter wanting to hear more midi's, so had to go googling lol

    Cheers
    Baggers.
  • epmoyerepmoyer Posts: 314
    edited 2007-05-28 15:15
    I have updated the HDMF Translator source code to the newest version (1.1.0) and have moved it to the first post in this thread, where I will maintain it. Also, the Translator source is now an .msi installer because Visual Studio will generate .msi source code releases for me automatically which makes it much easier (and less error prone) for me to release source that way.
  • CardboardGuruCardboardGuru Posts: 443
    edited 2007-05-28 15:33
    Hi Eric,

    Well done on this project! I've been hard at it with DK these last few days so I haven't really had a chance to explore HDMF. But now I'm going to make some time. I have already read the manual though, and that's an impressive bit of work. Amazing to have done so much in so little time.
  • RedNifreRedNifre Posts: 84
    edited 2007-05-28 23:55
    Really great!

    Unfortunately the program crashes with some midis [noparse]:([/noparse]
    Like these:
    http://www.midishrine.com/index.php?id=132
  • epmoyerepmoyer Posts: 314
    edited 2007-05-29 01:19
    RedNifre

    I found the problem and have a fix. Needs some regression testing before I post it and I don't have time to adequately test it now, but I have quickly verified that it fixes the problem you were seeing and still works with a bunch of old files.

    The MIDI's on the page you posted have an extra byte in their MTRK (i.e. Track) chunks AFTER their final "End of Track" event. As near as I can tell that is a violation of the MIDI spec, but in any case its not hard to code around. I added a patch to skip over any data after the "End of Track" event and that fixes the problem.

    PM me your email address and I'll send you version 1.2.0 to try out before it goes public.
  • epmoyerepmoyer Posts: 314
    edited 2007-05-29 03:51
    Version 1.2.0 of the HDMF Translator is now tested and released. The update fixes the issue RedNifre found with some MIDI files on the midishrine site.
  • KeeblerKeebler Posts: 58
    edited 2007-05-29 06:11
    Congrats epmoyer!

    BTW, with regards to HAM, I've·fixed the issue with adding an asset that's as big as the EEPROM.·· I'm going to try and add the variable EEPROM size and call that 1.07
  • RedNifreRedNifre Posts: 84
    edited 2007-05-29 10:22
    Wow, thanks! Thats what I call fast customer service. wink.gif
  • JT CookJT Cook Posts: 487
    edited 2007-05-29 19:19
    I just downloaded the software and it is really nice. I also had to download a few video game midi's as well to try out. Including a live tester is a really nice touch. Anything that leads to faster prototyping is alway welcome.
  • epmoyerepmoyer Posts: 314
    edited 2007-05-29 22:38
    Thanks for the encouragement. I was trying to make it super easy for developers to get good music into Hydra games and I believe I've done that. People without the time or skill to compose their own music can leverage existing MIDI content, and composers can very quickly hear their compositions on the target hardware. Right now I'm composing the music for Carboard Guru's DK port and for SpaceWar!; I'm able to sit at a MIDI keyboard, play a piece, and with about 5 clicks of the mouse hear it on the Hydra. That's what I was aiming for and in practice it's proving to be a very productive composition environment for me.
  • BamseBamse Posts: 561
    edited 2007-09-11 03:27
    Very impressive...

    Thanks Epmoyer...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2008-06-28 18:23
    Wow! Excellent!!!! I never knew that HDMF even existed. I was trying to figure out if how to do MIDI with the Propeller and found this by accident. jumpin.gif Time to play yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
  • CassLanCassLan Posts: 586
    edited 2008-07-05 03:45
    Hey, I wanted to say thanks!

    This is such an awesome and COMPLETE tool set for using MIDI in prop projects, I know almost nothing about MIDI (except that its a music file format) but I was able to convert one to BYTE Declarations and play it from within a project on a demo board I'm working on within 5 minutes.

    The community owes you one!

    Rick
  • geokonstgeokonst Posts: 48
    edited 2009-01-22 14:51
    Hello everyone!
    I've got a problem using the Application suite. I am uploading the live player binary on a protoboard (wish nick's driver was available) and then trying to connect live using the HDMF Application. I receive a wrong response msg for a couple of attemts and then a no repsonse one.

    Does anyone have an idea what's wrong? What i want to do is test how the propeller would work as a standalone midi player before buying a hydra (i only need the sound driver [noparse]:([/noparse] ).
  • mparkmpark Posts: 1,305
    edited 2009-01-22 22:33
    Do you just want to hear how HDMF music sounds?

    What exactly have you done, and what exactly are the messages you get?
  • geokonstgeokonst Posts: 48
    edited 2009-01-24 18:17
    Yes I want to see how the propeller sounds as a midi player.

    I have uploaded EPM_HDMF_Live_Player_010.eeprom on a protoboard. I then start the HDMF translator, load a midi file from the examples, set the right port and hit send to Live Player (all options unchecked).
    What I get is:
    Making HDMF data set...
      Song will be constrained to use no more than 6 channels.
      Total HDMF song size: 427 bytes.
    HDMF Data set complete.
     
    Transmitting song data to HDMF Live Player...
      Sending 427 bytes...
      Err: Unexpected data receieved from live player.
           Transmission aborted.
    
    


    and the second (or third) time i get:
    Transmitting song data to HDMF Live Player...
      Sending 427 bytes...
      Err: Timed out (no ack received).
    
    



    any ideas?
  • mparkmpark Posts: 1,305
    edited 2009-01-24 21:23
    I imagine that EPM_HDMF_Live_Player_010.eeprom is compiled for the HYDRA, which has a different crystal and pin assignments than a protoboard. If you like, I could post a recording of HDMF renditions of some tunes.

    There's also this thread, in which I play around with the same sound driver that HDMF uses: http://forums.parallax.com/showthread.php?p=774500
  • geokonstgeokonst Posts: 48
    edited 2009-01-25 12:10
    Thanks mpark. Of course its the crystal setting. That's always the case when I'm stuck- i never check that. Unfortunately I can't recompile without the sound driver.

    I would greatly appreciate it if you could post some recordings of the driver playing midi files. What I am looking for is a showcase of what that chip can do, not just a tune. But, really, whatever you've got [noparse]:)[/noparse]

    Thanks a lot mpark and btw CHADsynth is awsome, post more videos.
  • mparkmpark Posts: 1,305
    edited 2009-01-26 05:03
    Attached is hdmf.mp3.dat. Download and rename without the .dat suffix. It contains HDMF's renditions of Ms. Pac Man, Galaga, Mario (partial), and a couple of TRON bits.

    If you liked CHAD synth, check out Rainbow synth: http://forums.parallax.com/showthread.php?p=777004
Sign In or Register to comment.