FoFiX 4.0.0 Development Thread

Discussion particular to FoFiX, its development, and themes
Forum rules
This topic is 2 years and 4 months old. Instead of replying, please begin a new topic, or search for another related topic that may be more suitable.
User avatar
blazingamer
Member
Posts: 2018
Joined: November 17th, 2007
Location: Pennsylvania
Reputation: 0
Contact:

Re: FoFiX 4.0.0 Development Thread

Postby blazingamer » Fri Dec 30, 2011 2:12 am

None of us really understand the MIDI parser so I'm sorry, but I can't help you there :/ We really do need to get out there asking for help.
User avatar
NewCreature
Member
Posts: 716
Joined: November 23rd, 2006
Location: Murray, KY
Reputation: 3
Contact:

Re: FoFiX 4.0.0 Development Thread

Postby NewCreature » Thu Mar 08, 2012 1:16 am

What is the problem with the Sysex parsing? It should be easy to fix as long as FoFiX isn't supposed to be doing anything with these events. The code looks ok but it doesn't handle divided Sysex events at all:

Code: Select all

            # Is it a sysex_event ??
            elif status == SYSTEM_EXCLUSIVE:
                # ignore sysex events
                sysex_length = raw_in.readVarLen()
                # don't read sysex terminator
                sysex_data = raw_in.nextSlice(sysex_length-1)
                # only read last data byte if it is a sysex terminator
                # It should allways be there, but better safe than sorry
                if raw_in.readBew(move_cursor=0) == END_OFF_EXCLUSIVE:
                    eo_sysex = raw_in.readBew()
                dispatch.sysex_event(sysex_data)
                # the sysex code has not been properly tested, and might be fishy!

The code falsely assumes that the event will not be divided but still checks for the terminator byte. If the event is divided, the parser will choke because it will be one byte behind. If the sysex events aren't being used, you should be able to just do this to fix it:

Code: Select all

            # Is it a sysex_event ??
            elif status == SYSTEM_EXCLUSIVE:
                # ignore sysex events
                sysex_length = raw_in.readVarLen()
                sysex_data = raw_in.nextSlice(sysex_length)
                dispatch.sysex_event(sysex_data)
                # the sysex code has not been properly tested, and might be fishy!
            elif status == SYSTEM_EXCLUSIVE_CONTINUED: #needs to be defined in constants.py
                # ignore sysex events
                sysex_length = raw_in.readVarLen()
                sysex_data = raw_in.nextSlice(sysex_length)
                dispatch.sysex_event(sysex_data)

The MIDI spec I am looking at is confusing, though. It suggests the terminator should be included in the data that sysex_length covers. If that is true, the above code should work. If the terminator is separate then this should work:

Code: Select all

            # Is it a sysex_event ??
            elif status == SYSTEM_EXCLUSIVE:
                # ignore sysex events
                sysex_length = raw_in.readVarLen()
                sysex_data = raw_in.nextSlice(sysex_length)
                if raw_in.readBew(move_cursor=0) == END_OFF_EXCLUSIVE:
                    eo_sysex = raw_in.readBew()
                dispatch.sysex_event(sysex_data)
                # the sysex code has not been properly tested, and might be fishy!
            elif status == SYSTEM_EXCLUSIVE_CONTINUED: #needs to be defined in constants.py
                # ignore sysex events
                sysex_length = raw_in.readVarLen()
                sysex_data = raw_in.nextSlice(sysex_length)
                if raw_in.readBew(move_cursor=0) == END_OFF_EXCLUSIVE:
                    eo_sysex = raw_in.readBew()
                dispatch.sysex_event(sysex_data)
"Stop putting so much stock in all of this stuff, live your life for those that you love." - Relient K
EOF - A Song Editor for Frets On Fire
Jpop fanatic
raynebc
Moderator
Posts: 5671
Joined: April 20th, 2008
Location: Megumi Island
Reputation: 111

Re: FoFiX 4.0.0 Development Thread

Postby raynebc » Thu Mar 08, 2012 3:13 am

It should be sufficient for FoFiX to ignore the event by just parsing past it, like FoFLC does. The bug opened on this problem is here:
http://code.google.com/p/fofix/issues/detail?id=1268

Without knowing more about Python, I'm assuming that the problem is that there's no sysex_event() method defined, so the "dispatch.sysex_event()" that occurs fails. Perhaps that part can be commented out, since nothing is expected to be done with the data?
Services
VeTRooTpat
Member
Posts: 1
Joined: January 16th, 2012
Reputation: 0

Services

Postby VeTRooTpat » Thu Mar 08, 2012 5:23 am

I consider, that you are not right. I am assured. Let's discuss. Write to me in PM.
THE HYPNOTOAD!
User avatar
thekiwimaddog
Member
Posts: 485
Joined: December 11th, 2009
Reputation: 0

Re: FoFiX 4.0.0 Development Thread

Postby thekiwimaddog » Thu Mar 08, 2012 6:50 am

Or you could just talk about it here, where it's currently being discussed.
Image
User avatar
NewCreature
Member
Posts: 716
Joined: November 23rd, 2006
Location: Murray, KY
Reputation: 3
Contact:

Re: FoFiX 4.0.0 Development Thread

Postby NewCreature » Thu Mar 08, 2012 10:27 am

Looking at the code I can see that 'dispatch.sysex_event' should be 'dispatch.system_exclusive'. That would at least let the program continue to run. Still not sure if the sysex parsing itself is correct.

Edit: The dispatcher doesn't do anything with sysex events so it would probably be better to just eat up the sysex events and not try to dispatch them. If nobody else wants to try to fix this, I can do it. I just need a chart with sysex events to test with.
"Stop putting so much stock in all of this stuff, live your life for those that you love." - Relient K
EOF - A Song Editor for Frets On Fire
User avatar
NewCreature
Member
Posts: 716
Joined: November 23rd, 2006
Location: Murray, KY
Reputation: 3
Contact:

Re: FoFiX 4.0.0 Development Thread

Postby NewCreature » Sat Mar 10, 2012 1:44 am

Removing the line 'dispatch.sysex_event(sysex_data)' does indeed fix the problem. Here is a patch:

FoFiX MIDI Sysex Patch
"Stop putting so much stock in all of this stuff, live your life for those that you love." - Relient K
EOF - A Song Editor for Frets On Fire
weirdpeople
Member
Posts: 1105
Joined: August 16th, 2008
Location: Texas
Reputation: 15
Contact:

Re: FoFiX 4.0.0 Development Thread

Postby weirdpeople » Sat Mar 10, 2012 4:30 pm

NewCreature i have have applied your patch.
Developer of clone hero, and Former FoFiX developer
aka drumbilical
User avatar
italianstal1ion
Member
Posts: 1342
Joined: July 28th, 2007
Location: Behind a drum set
Reputation: 57
Contact:

Re: FoFiX 4.0.0 Development Thread

Postby italianstal1ion » Sat Mar 10, 2012 4:45 pm

This is great news. Thanks developers!
Index of all Drum Topics on the Forum in one convenient place
Image
Image Image
Image Image
Image Image
Drum Project 7 Released!
Drum Project 8 Released!
Drum project 9 Released!!
Image My personal topic.
Can't get enough?

Spoiler:Image Feedback + EOF Pro Notation
Image Albelgim collaboration
If you appreciate my work and would like to see more, a donation would certainly motivate me! Thank you.
Image

weirdpeople
Member
Posts: 1105
Joined: August 16th, 2008
Location: Texas
Reputation: 15
Contact:

Re: FoFiX 4.0.0 Development Thread

Postby weirdpeople » Sun Mar 11, 2012 4:52 am

Just fixed vocals, there is just some rockmeter issues but they work so far. There is also this crash that randomly started happening after i posted this originally.....
Developer of clone hero, and Former FoFiX developer
lastsaves
Member
Posts: 6
Joined: March 13th, 2012
Reputation: 0

Any chance for future development?

Postby lastsaves » Tue Mar 27, 2012 4:19 pm

Hi guys,
is there any chance for FoFiX 4.0 being actively developed?
Its quite awesome stuff and makes me sad that is on the halt since November 2010.
Thumbs up for anyone willing to continue.
AustinG
Member
Posts: 1
Joined: January 19th, 2012
Reputation: 0

Re: FoFiX 4.0.0 Development Thread

Postby AustinG » Thu Apr 26, 2012 8:01 pm

fofix 4.0 dont work on my comp, it keeps saying stuff bout log problems

Return to “FoFiX”

Who is online

Users browsing this forum: No registered users and 14 guests