Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  Midi for Sansa Fuze V2 - RAM / PATCH Requirements
« previous next »
  • Print
Pages: [1]

Author Topic: Midi for Sansa Fuze V2 - RAM / PATCH Requirements  (Read 3196 times)

Offline coachn

  • Member
  • *
  • Posts: 21
Midi for Sansa Fuze V2 - RAM / PATCH Requirements
« on: December 11, 2010, 03:17:46 PM »
If I'm to have any success finding a suitable patch file set for my quest to play midi files on my device, I'm going to need information (I think).  If anyone can provide this, it would be appreciated.

When the midi program is loaded, is it loaded into RAM?  How much of the 8M of RAM is left?  What's available/necessary ...
  • to store the patch files?
  • to play a midi file?

Can anyone help out here?

Thanks in advance.

Coach
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Midi for Sansa Fuze V2 - RAM / PATCH Requirements
« Reply #1 on: December 11, 2010, 03:57:23 PM »
Quote from: coachn on December 11, 2010, 03:17:46 PM
When the midi program is loaded, is it loaded into RAM?  How much of the 8M of RAM is left? 

Probably about 5MB of total space are left over for loading the midi patch, maybe a little more.

Quote from: coachn on December 11, 2010, 03:17:46 PM
What's available/necessary ...
  • to store the patch files?
  • to play a midi file?

I think it depends on the file.  Unfortunately I have no idea, and short of the digging into the midi player source code I don't know of any way to find out.
Logged

Offline coachn

  • Member
  • *
  • Posts: 21
Re: Midi for Sansa Fuze V2 - RAM / PATCH Requirements
« Reply #2 on: December 11, 2010, 07:22:35 PM »
Thanks.  I'm making effort to take existing patches and reduce their overall size. 

Not knowing how much RAM is available or what's needed, it's a bit like bowling with a curtain in front of the pins. 
Logged

Offline siber_cat314

  • Member
  • *
  • Posts: 41
Re: Midi for Sansa Fuze V2 - RAM / PATCH Requirements
« Reply #3 on: December 28, 2010, 05:50:56 AM »
I remember poking around in the source for the MIDI player because I got "MALLOC BARF"s when loading certain MIDI files.

After going through the code, I found that:
1. The MIDI file is scanned once, figuring out all the patches it will actually need to play. It then loads them (I'm guessing that the size of the patch is the amount of RAM it takes up).

2. All the remaining RAM is used as an audio buffer to play the MIDI. I'm not sure what the bare minimum is here.

As for how much RAM is available, that should be (again, I'm guessing) the amount listed on System > Debug > View Buffering Thread > alloc. It'll be the number on the right. Mine (on the Sansa e200v2 with 8mb RAM) says 2,890,848, so almost 3MB.
Oh! Plus the plugin buffer, which is... crap, I can't find it right now.
Logged
Quote from: Zardoz
so if i scribble some nonsense and post it on a site, i reserve all rights to my scribbled nonsense?
Quote from: Llorean
If it can be described as a creative work, yes.

Offline coachn

  • Member
  • *
  • Posts: 21
Re: Midi for Sansa Fuze V2 - RAM / PATCH Requirements
« Reply #4 on: January 02, 2011, 11:21:33 PM »
Thanks.  Most of my midis are about 50K or less. 

I'm thinking if I take some of the voices that are huge and switch them with smaller ones, I might actualy have a chance at this.

Although your numbers tell me that you're having problems with 8M ram.  What hope do I have with 4M ram?
Logged

Offline siber_cat314

  • Member
  • *
  • Posts: 41
Re: Midi for Sansa Fuze V2 - RAM / PATCH Requirements
« Reply #5 on: January 05, 2011, 02:32:12 AM »
Well, let me know if you get it working. Or rather, let everyone know. With the reduced RAM on some of the recent flash-based players, the midi player plugin has suffered a bit. This will breathe a bit more life into it.
Logged
Quote from: Zardoz
so if i scribble some nonsense and post it on a site, i reserve all rights to my scribbled nonsense?
Quote from: Llorean
If it can be described as a creative work, yes.

Offline coachn

  • Member
  • *
  • Posts: 21
Re: Midi for Sansa Fuze V2 - RAM / PATCH Requirements
« Reply #6 on: January 05, 2011, 06:13:23 PM »
Will do. 

I'm going to, when I get some time, load a simple drum track to see if the bare minimum will actually play.  If it does... then add on from there.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  Midi for Sansa Fuze V2 - RAM / PATCH Requirements
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.075 seconds with 15 queries.