samplepad-editor icon indicating copy to clipboard operation
samplepad-editor copied to clipboard

make this work with different samplepad versions

Open LesserChance opened this issue 5 years ago • 7 comments

Looks like there are slight differences to the file format between samplerack and samplepad pro

LesserChance avatar Aug 14 '20 16:08 LesserChance

Hey @LesserChance - I created a kit for a samplepad pro and loaded it onto my device running the 1.0.19 firmware.

The kit appeared as kit number 11, but I get the message "KIT FILE DATA ERROR".

So then I edited the kit on the device to make it a mix of internal/card samples and saved it again, as far as I can tell this is the kit, zipped up: ABC1.zip

Does this help?

davenice avatar Apr 13 '21 22:04 davenice

If it would be helpful I could be a bit more structured with how I setup the kit on the card to make decoding easier.

I haven't fully understood kitFile.js yet, but the file structure of my kit file does at least look fairly similar to what you've got laid out in your hex template blocks- perhaps it will be as simple as having slightly different template blocks for the samplepad pro.

davenice avatar Apr 13 '21 22:04 davenice

Nice, thanks @davenice. If possible, it'd be great to also get the kit file that had the data error so I can compare it to the functioning one you linked above.

LesserChance avatar Apr 14 '21 15:04 LesserChance

I haven't looked at this myself yet, but I did the following:

  • Used SamplePad Editor to create a kit called Test1 where every main pad was 1980Clap2.wav

  • Saved the kit and took a copy from the SD card: Test1-dataerror.zip

  • Loaded the kit onto the SamplePad Pro

  • It showed as a data error and all of the kit data seemed to have been retained from one of my other kits (so I don't think it loaded other than the name!)

  • I then set all of the pads to 1980Clap2.wav from the device itself, saved the kit back to SD and then took a copy: TEST1-fixedondevice.zip

I think this will be a bit more confusing because my kit will have had different settings for sensitivity etc - perhaps I need to think of a way to reset them back to normal to enable an easier comparison.

davenice avatar May 20 '21 07:05 davenice

Nice, thanks for the repro steps. I think the files you have here are enough to give me some leads.

LesserChance avatar May 20 '21 16:05 LesserChance

@LesserChance if you have any info you could share on anything you've discovered about the differences, I'd be happy to help as well; just don't want to repeat work you've already done 🙂

brettdh avatar Mar 07 '22 15:03 brettdh

Hello! I just got a question about this through email as well, so I'll share my response which has some detail. The newest version technically should be working based on the provided data above, but I cannot test. Here are the details on the file structure as I currently understand it:

The main file that you can reference for the file structure is const.js. There's a var called KitBuffer which maps the memory locations in the kit file based on the device type. Each pad just has two defined blocks of data at a specific memory location (see PAD_MEMORY_BLOCK_LOCATIONS) in the file, those blocks are in a defined format which is detailed in PAD_PARAM_MEMORY_LOCATION. So, for instance, if you want to find the value for the samplerack kick level parameter in the file it'd start at memory location 0x0F87 (0x0F80 [samplerack kick, block 1] + 0x07 [block 1, "location"])

It's definitely a different file between devices, as it looks like the SampleRack can handle a few more pads. The kitFile class is responsible for reading and writing the files, and you can see how it handles different types of files based on the device type.

LesserChance avatar Apr 23 '22 01:04 LesserChance