• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding audio files - adds two copies
#1
I've just started using MSP and I'm discovering new features all the time - it's a really nice piece of work, so thanks!

I do see some strange behaviour, however. When I add an audio file to a song, I found that two copies of the same file are listed in the Audio Files box after I've made my selection. This occurs when I click the Folder with Magnifier icon and select "File Manager +" as the file picker. The native file manager doesn't appear as an option while Dropbox and some other Apps do. If I select a file using the plain Folder icon instead, a single copy of the file is added to the list, as expected. 

Another audio file quirk I've noticed is that, having made a backup using the Desktop Companion, if I extract a song from the backup on my PC, associated audio files are not successfully extracted. Extraction starts as normal, the PDF of the sheet music is extracted but then a dialogue pops up saying, for example: 

---------------------------
Error creating audio file
---------------------------
Error creating: D:\MobileSheetsPro\Along Came Betty\02 Along Came Betty.mp3
---------------------------
OK 
---------------------------


When I dismiss this by clicking OK, I get a similar message for a second audio file attached to this song. Dismissing this second message then generates a final dialogue:

---------------------------
Extraction Successful
---------------------------
Song files successfully extracted to D:\MobileSheetsPro\
---------------------------
OK 
---------------------------


but of course the audio files are not there.

These audio files work correctly in the app on my tablet. Is it possible that they are not being copied to the backup?

One thing I've noticed. I have a lot of songs held in a single large multi-page PDF file. When I extract a single song, the entire PDF is stored in the song folder on my PC. The backup doesn't look big enough to have multiple copies of the PDF in it, so it looks as though MSP is making a single copy of the PDF and extracting it for every song that references it, which is great.
Reply
#2
I can't seem to reproduce the problem you described with using File Manager +, so it may be OS version specific. What kind of tablet are you currently using and what OS version is it running?  On version 9.0, when I tap the icon with a magnifying glass, it brings up Google's standard file picker. If I tap the icon at the top left, I can then pick File Manager + as the source. If I then pick an audio file, only a single instance of it is added to the song.

As far as the problem you encountered with the .msb file, that's definitely not what should happen. I just tested creating a simple library, added an audio file to a song, created a backup file, and extracted that song using the backup file in the companion app, and the audio file was successfully extracted. So it definitely sounds like the .msb file that you created does not have the audio file in it. If you can create a new backup file and verify the same behavior occurs (and the audio files are successfully loaded when you load that song in MS Pro), then I can take a look at the backup file to see what the problem is.

You are correct that the backup file will only contain a single instance of a file. This was very important for users that utilize snippets and CSVs and share files among many songs.

Thanks,
Mike
Reply
#3
Thanks for the quick response. My tablet is a GT-N8010 (Samsung Galaxy Note 10.1 (2012)) running Android 4.4.2. I have a newer tablet, but I like using this one for all my music-related apps as I can take it to gigs without worrying too much about it being broken/stolen.

I created a simple library with one song (single page PDF) and an attached audio file (attached with FM+ and then deleting one copy Smile ), backed it up to my PC then extracted the song. In this case, the audio file was correctly restored along with the PDF.

I then tried a library with just one song, but taken from a multi-page PDF. When I pointed the new song to the PDF file, it took ages to autocrop all the pages in the file (my normal library was created by importing a CSV that indexed the same PDF file and I don't recall it spending any time cropping pages at all). However, taking a backup and extracting it once again created both the PDF and the audio file, so it doesn't appear to be related to having a large PDF.

Do you have any other suggestions I can try?

Storing just one copy of the large PDF is, of course, the best solution. One improvement to the extraction process would be to just extract the specific page(s) linked by a song, but that would mean incorporating PDF manipulation code, of course, which you may not want to do.
Reply
#4
Another observation:

I tried extracting all songs in the database (1152) to see if that would pull out the audio files, and only 20 songs were extracted... not the first or last 20 but a seemingly random, but repeatable, selection.

Only a few songs in the library have audio attached. Weirdly, 'Along Came Betty' (as per my first post) was extracted but, although the PDF was missing (I think because the large PDF had been extracted for another song), both audio files were extracted, so they are in the database. Extracting just 'Along Came Betty' again failed to pull out the audio files.
Reply
#5
Can you share the backup file with me at mike@zubersoft.com? I can take a look at what's going on with the extraction code. Perhaps it does have something to do with the way the same PDF is used multiple times and there is a bug in the code. If sharing the file will be a problem, let me know and I'll just run through some tests to see if I can reproduce it myself using the Import->CSV feature.

Thanks,
Mike
Reply
#6
Happy to share the backup file but it's very large (250MB) as there are several of those large PDFs in it. I'll see if the problem occurs with a smalller, single PDF version and get back to you.
Reply
#7
Ok, I've now got a library that is about 71MB (single large PDF), I've added audio to just one file and I see the same behaviour. That is, no audio extracted when extracting that single song and, if I extract all songs, this time only two songs are extracted, one of which is the one with audio and this time the audio is extracted (and this is repeatable).

I've sent you an email with a link to the file.
Reply
#8
Just for additional info, Restore of both the smaller and the full library appears to work correctly in that all of the songs and the audio files seem to be correctly populated. The option to restore to original file locations appears not to be honoured, however. All PDF and audio files are restored to folders within the com.zubersoft.mobilesheetspro folder on my SD card rather than the location they were originally in... I'm guessing that this may be because of Android's restrictions on writing to media?

*UPDATE* 
I deleted the com.zubersoft.mobilesheetspro directory on the SD card and used the "Fix Broken Filepaths" tool to locate the missing files, which are in a directory of my own on the SD card. The automatic setting fixed a couple of the missing paths (to two multi-page PDFs) but failed to fix the third. It said no broken filepaths found. However, the "Find Missing Files" tool recognised that the path was incorrect for this final file. Manual replacement in the "Fix Broken Filepaths" tool failed - 0 paths replaced, and the same with Automatic. However, using Automatic and checking "Confirm replacement for each file" did fix the problem, but I had to accept the change for each song that referenced the PDF.
Reply
#9
Just checking that you received my email with the link to the library file.
Reply
#10
Yes, I sure did, I'm just juggling all of the various support requests. I'll dig into it today.

Thanks,
Mike
Reply
#11
Sorry for the delay in answering your question from before. If you restore a backup that was pointing to an SD card and you had unchecked "Let MobileSheets Manage my Files", then MobileSheetsPro is going to be unable to access the SD card due to permissions. The approach you took is certainly one way to get around this. 

It's interesting that you had to use the option to confirm each replacement. I'll have to look into that, as it shouldn't have been necessary.

Thanks,
Mike
Reply
#12
No problem, I'm sure you'll get round to it when you have time. 

I'm up and running again now so none of the issues I've been having is critical. It would be nice to get the extraction working correctly at some point though.

Cheers, Steve
Reply
#13
I've got a fix in place now. The optimization used to only include a file once in the backup was throwing off the processing of all files that came after it in the song during extraction. 

Thanks,
Mike
Reply
#14
Great... glad you were able to isolate the problem.
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.