It is currently Fri Sep 22, 2017 4:28 am




Post new topic Reply to topic  [ 181 posts ]  Go to page 1, 2, 3, 4, 5 ... 13  Next
Author Message
 Post subject: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 3:24 am 
Member
User avatar

Joined: Thu Jul 03, 2008 12:40 am
Posts: 237
Location: LA
What up folks! Like a gang of other peoples 'round here lately, I just picked up a SX to add to my little collection of SP's.. 202, and a 303 with a busted out.

Anyway, I started digging thru the file directories on the SD card, and noticed the raw samples of course, as well as all those bin files which presumably hold data. The bin files in the factory folder are zips of some sort, but the others look like they just hold info in plain binary form. So I broke out a hex editor and started exploring PAD_INFO.BIN in the SMPL folder.

(warning, about to nerd out hardcore)...

a line for a single pad will look something like this (this is an example of A1 with the factory sample loaded)...

00 00 02 00 00 19 57 4C 00 00 02 00 00 19 57 4C 7F 00 01 01 00 00 02 00 00 00 03 FB 00 00 03 FB

notice the #'s are in in pairs... each pair is a byte (hexidecimal), and represents a decimal value of 0-255.. and can be calculated (in this case using big endian) to get decimal values.

This is what I'm thinking so far (but I will have to do some additional testing)...

00 00 02 00 - original start point for sample
00 19 57 4C - original end point for sample (ultimately those 4 bytes are the filesize, I've matched those values in the file to the actual fizesizes and it all adds up so far)

now below it repeats, so I'm thinking this is for the loop points (will test tonight).
00 00 02 00 - loop start point for sample
00 19 57 4C - loop end point for sample

now comes...

7F 00 01 01

breaks down like this...

7F - Volume? (value 00 to 7F, which equals 0-127)

00 - Reverse switch? (value 00 = off, 01 = on)

01 - Loop switch? (value 00 = off, 01 = on)

01 - Gate switch? (value 00 = off, 01 = on)


then...

00 00 02 00 - Number of channels in samples (02 = stereo, 01 = mono)

and lastly...

00 00 03 FB - 000003FB hex (big endian) converts to 1019 in decimal. Funny thing is the sample itself right from the factory disc comes up as 101.9 bpm. What a coincidence?!

then those four bytes repeat with tempo info again. I'm thinking one is the original tempo, and one is the current tempo of the sample... but will just have to test. it might just be repeated for redundancy.


Anyway, that's where I'm at... But what's cool about knowing this is it would be pretty straight forward to build an program that could do hella sample management maybe. Management beyond that crappy program it comes with... stuff like batch processing samples, setting gate/rev/loop/loop points, building sample packs that you can save in a library then just dump to SD. Definately something I'm gonna keep investigating. I've coded a few simple VST plugins, and don't think it would be too difficult to make something kinda useful for the SP heads!

Haven't even touched the patten data yet either... who knows the possibilities.
Anywho, just sharing the discovery... might have to start coding this shit up when the time permits.

one.

_________________
http://soundcloud.com/speeps
http://truthseekersradio.org


Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 4:59 am 
Member

Joined: Thu Jun 26, 2008 4:34 pm
Posts: 630
Location: san antonio, tx
dude...

make something awesome... someone did it for the electribes and it makes those machines worth owning... if i could have the same program for the 404 that would be rad

ps massive amounts of respect for knowing/reading that language


Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 6:02 am 
Member
User avatar

Joined: Fri Jun 22, 2007 4:37 pm
Posts: 2301
Location: Adelaide
have you tried editing the file yet and then playing the sample to see what changed?

that would be the quickest way to verify what everything does

- go through each byte (or 4 in the case of the suspected start/end) one by one.. for the 01's like you say.. its a good bet they're on/off switches, then for the rest.. if its a low value, go for high, or if its high, switch to low..

You could make a cool manager that used it, like a sample manager that let you set start/end points... but at the same time.. It seems like an aweful lot of effort to go through to make a software app that does that you could do on the SP just by pressing a button or turning a knob.
Being able to set start/end points visually would be useful though for people that import their samples from computer..


Another cool thing that could be done... is have a manager that works the other way around -
you've been working on your SP.. now you wanna load up your project in a DAW to work on it some more... rather than have to resample everything or record it out one track at a time -

you have a program that takes the wavs off the card, uses the start/end points etc to cut them up for you.

Then *hopefully* the pattern information is stored somewhere in there as well.. If we could get that it could be converted into a midi file.. Then you just load each cut up sample into a sample player, load the midi file.. bam!

Figuring out the pattern info would be a little more difficult, but shouldnt be too hard (if it is stored in binary).

Actually I'd say just to go for the pattern -> midi file... it's easy enough to resample the samples to cut the start/end points etc.. If we could turn patterns into midi files though.. that would be sick!

imagine.. on the road.. writing a little song ... but its not really made up of the samples you want..
then you get home.. just import the midi files from your SP's patterns.. load up BFD drums or a kontakt instrument or something.. sweet!

And then the other way... loading a midi file into your SP pattern bank!

_________________
Samples.


Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 6:15 am 
Member
User avatar

Joined: Thu Jul 03, 2008 12:40 am
Posts: 237
Location: LA
werd! I'm def gonna at least try and see if I can make something useful from this all this. There is definately enough possibilities that it might be worth the effort. I really dig the idea of something that can build midi from the pattern info. That would be useful considering the SX doesn't have a midi out.

I just fired up the box and did some tests... here's the revamp on the PAD_INFO.BIN file

using this an the example line...
000002000019574C000002000019574C7F01010101000200000003FB000003FB

Broken down it goes something like this (corrected a few things from last time)...

00 00 02 00 ORIGINAL SAMPLE START
00 19 57 4C ORIGNAL SAMPLE END
00 00 02 00 USER SAMPLE START
00 19 57 4C USER SAMPLE END

7F VOLUME (00-7F is decimal 0-127)
01 LOFI (00=Off, 01=ON)
01 LOOP (00=OFF, 01=ON)
01 GATE (00=OFF, 01=ON)

01 REVERSE (00=OFF,01=ON)
00 ???
02 CHANNELS (01=MONO, 02=STEREO)
00 TEMPO MODE (00=OFF, 01=PATTERN, 02=USER)

00 00 03 FB TEMPO (ORIGINAL)
00 00 03 FB TEMPO (USER DEFINED)

When the SX imports audio, it converts to everything to 44.1 / 16bit and creates a new aiff/wav with a roland specific header. I'd guess the machine can probably detect if the file was just thrown on the card by checking the header, and checking the filesize.

Interesting shit... :shock:

_________________
http://soundcloud.com/speeps
http://truthseekersradio.org


Last edited by ModuLR on Wed Jan 13, 2010 7:12 pm, edited 1 time in total.

Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 1:35 pm 
Member

Joined: Wed Nov 25, 2009 11:14 pm
Posts: 222
That's some very cool stuff.


Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 1:56 pm 
Most Helpful Member of the Year '09
User avatar

Joined: Sat Oct 13, 2007 9:13 am
Posts: 2761
Location: Netherlands
It would certainly not be too difficult to build a program around this, as you don't have to convert to the SP-404 old format anymore. I don't currently have an SP-404sx (yet?), but this is very interesting stuff indeed!

_________________
"A man who misses his opportunity, and a monkey who misses his branch,
cannot be saved."

www.myspace.com/phemoxband
www.myspace.com/phemox
www.soundclick.com/phemox


Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 5:05 pm 
Member

Joined: Fri May 18, 2007 8:59 am
Posts: 264
Location: Wales, UK
Great work here.

I wonder what happens when you apply trimming after adjusting sample start-end. Does the sample file get cropped or does the start & end points simply get changed to the same as the loop points?

For using the sample info to export a loop directly usable in a DAW, how possible is it to convert into a loop format that most DAWs understand? Acid loops seem well supported and some allow REX. WAVs can contain loop info in the file header, but not all software notices it.

Is there a sampler format that's commonly supported? Once upon a time, Akai S1000 programs (containing the samples and to which midi notes they applied to, loop points and the rest) could be loaded into other machines and software samplers.

Then there is the OMF format meant for DAW project interchange where a text file (ADL) describes how audio files should import into a DAWs tracks, but I don't know how loops are treated - they probably still have to be in a format the DAW understands, but it must be fairly easy to convert the 404 sample info into an ADL text file.

--------------------

I'd really like to see an app that can export the 404 sequence patterns as midi. Otherwise they are stuck in the 404. Probably the same process applies to 404SX and the original 404. Samples on the other hand, are only workable with the SX because the original 404 sample files have Roland's own data compression applied.


Cheers
Jim

_________________
Just when you think things couldn't get any more exciting - they don't.


Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 5:33 pm 
Newcomer of the Year '09
User avatar

Joined: Sat Dec 06, 2008 6:24 pm
Posts: 1340
Location: Zurich, Switzerland
Sorry for being the stupid one here, but what could you possibly change in the machine(not supposed to sound offending or sarcastic)?
Respect for trying it ;)

_________________
https://soundcloud.com/computersmusic
http://www.lesbraun.bandcamp.com
SP-404 - Tascam 414 MKII
FORMERLY KNOWN AS COMPUTERS OR AKADEMIK


Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 6:15 pm 
Member

Joined: Wed Nov 25, 2009 11:14 pm
Posts: 222
If the editor was something like the Yamaha TWE with batch processing and mp3 encoding it would be pretty dope. Finding a way to export Midi sequences should be the first thing on the list though.


Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 6:57 pm 
Most Helpful Member of the Year '09
User avatar

Joined: Sat Oct 13, 2007 9:13 am
Posts: 2761
Location: Netherlands
COMPUTERS wrote:
Sorry for being the stupid one here, but what could you possibly change in the machine(not supposed to sound offending or sarcastic)?
Respect for trying it ;)


Things like this are usually among the first few things you must figure out to be able to write editors or even a hacked / 3rd party OS for this machine.

Creating a very basic editor if things like location for start-end points are known, shouldn't really be too difficult. Heck I could probably pull it off myself and throw in a few features like auto chopping based on a fixed length. Chopping based on level values might be a bit more difficult, but is still very doable too.

Does anyone know what the SP-404sx editor from Roland can do?

(As it's a bit stupid to reinvent the wheel just for the sake of reinventing.)

_________________
"A man who misses his opportunity, and a monkey who misses his branch,
cannot be saved."

www.myspace.com/phemoxband
www.myspace.com/phemox
www.soundclick.com/phemox


Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 7:04 pm 
Member
User avatar

Joined: Thu Jul 03, 2008 12:40 am
Posts: 237
Location: LA
Jim Y wrote:
I wonder what happens when you apply trimming after adjusting sample start-end. Does the sample file get cropped or does the start & end points simply get changed to the same as the loop points?

It won't crop the file unless you use the truncate function. Basically, sample start/end seems to be just the start/end points of the audio chunk after the wav/aiff header. I made a fix to the post earler.. it's not loop start/end.. it's the user defined start/end based on using mark and trim with the knob.

Quote:
For using the sample info to export a loop directly usable in a DAW, how possible is it to convert into a loop format that most DAWs understand? Acid loops seem well supported and some allow REX. WAVs can contain loop info in the file header, but not all software notices it.

I'd imagine it's possible to pull loop info as long as the specs for the format are available. Propellerheads has always been kinda hush with their info so REX might be more difficult.

The 404 is doing things in the simplest way.. OMF has a pretty complicated spec. It would be easier for it just to create midi since that's all it is anyway.

Quote:
I'd really like to see an app that can export the 404 sequence patterns as midi. Otherwise they are stuck in the 404. Probably the same process applies to 404SX and the original 404. Samples on the other hand, are only workable with the SX because the original 404 sample files have Roland's own data compression applied.

I started looking at the pattern files last night. I can see the notes, and what I believe are the velocities. I don't quite understand how it's storing the timing info, or the quantize info... but I'll do a few more comparisons to see what I can figure out.


@COMPUTERS - pretty much, it could open up a number of possibilities... the midi side could be useful because you might be able to finally export your patterns, as well as import patterns from midi files without timing issues since pattern recording doesn't sync. Audio wise, you could drastically improve the utility roland provides.. at least support all the switches on the SP, and make the interface drag and drop. You could make a batch processor, you also might be able to import acid/apple loops with the loop points intact. If the spec has opened, maybe you could have a REX extracted and auto mapped to pads on the SP. Stuff like that is all within the realm of possibility. Even if it's pointless I love this kinda shit.. heheh! :)

_________________
http://soundcloud.com/speeps
http://truthseekersradio.org


Last edited by ModuLR on Wed Jan 13, 2010 7:14 pm, edited 1 time in total.

Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 7:10 pm 
Member
User avatar

Joined: Thu Jul 03, 2008 12:40 am
Posts: 237
Location: LA
PHeMoX wrote:
Does anyone know what the SP-404sx editor from Roland can do?)

It handles the audio conversion and lets you put samples on pads, that's it.

It's uber basic. It would be much nicer with a drag and drop browser and if it didn't actually convert the samples until after you've decided which samples you want on the pads for sure. It has much room for improvement imo.

_________________
http://soundcloud.com/speeps
http://truthseekersradio.org


Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 7:24 pm 
Most Helpful Member of the Year '09
User avatar

Joined: Sat Oct 13, 2007 9:13 am
Posts: 2761
Location: Netherlands
Jim Y wrote:
I'd really like to see an app that can export the 404 sequence patterns as midi. Otherwise they are stuck in the 404. Probably the same process applies to 404SX and the original 404.


Both SP-404s don't have midi out though (not over USB either), so it might require hacking and updating of the actual OS for that.

Quote:
Samples on the other hand, are only workable with the SX because the original 404 sample files have Roland's own data compression applied.


Not necessarily, as the 404 can import WAV files and convert them already. It would require testing on how to set things up to work comfortably and in a useful manner, but perhaps you can hook up 404 itself to convert the files instead of having to write a converter yourself. Through USB access it should be possible to retrieve the converted files and go from there as far as file editing goes. There should be a lot possible actually. :)

_________________
"A man who misses his opportunity, and a monkey who misses his branch,
cannot be saved."

www.myspace.com/phemoxband
www.myspace.com/phemox
www.soundclick.com/phemox


Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 7:28 pm 
Most Helpful Member of the Year '09
User avatar

Joined: Sat Oct 13, 2007 9:13 am
Posts: 2761
Location: Netherlands
ModuLR wrote:
PHeMoX wrote:
Does anyone know what the SP-404sx editor from Roland can do?)

It handles the audio conversion and lets you put samples on pads, that's it.

It's uber basic. It would be much nicer with a drag and drop browser and if it didn't actually convert the samples until after you've decided which samples you want on the pads for sure. It has much room for improvement imo.


I see, that in itself means trying to build one ourselves isn't a futile endeavor at all. :p

Could you post some screenshots of that editor just to get an impression?

_________________
"A man who misses his opportunity, and a monkey who misses his branch,
cannot be saved."

www.myspace.com/phemoxband
www.myspace.com/phemox
www.soundclick.com/phemox


Offline
 Profile  
Top 
 Post subject: Re: Hacking the 404SX
PostPosted: Wed Jan 13, 2010 8:29 pm 
Member

Joined: Fri May 18, 2007 8:59 am
Posts: 264
Location: Wales, UK
ModulR,
"It won't crop the file unless you use the truncate function. Basically, sample start/end seems to be just the start/end points of the audio chunk after the wav/aiff header."

That's what I meant by "apply trimming", because if the sample will be effectively re-written to the new length, then the existing SX utility should do all you need - it ought to produce a trimmed sample when you pull it off the card (provided you've applied the truncate)?
There's no Sample Start followed by a loop region such as instrument type samplers understand on the 404, so knowing the loop points of a trimmed/truncated sample probably won't be necessary - That's IF the sample really does get truncated of course ;)

Thinking about the patterns, I realise I have no definite idea of how a sequencer actually plays midi. Knowing the sequencers PPQN (ticks) rate and the maximum pattern length, bar count and smallest quantise value might help.

If I had to write a simple sequencer I'd probably have 2 arrays. I'd store the pattern lengh separate, then simply write an array of the events as they came in and also write their time-stamp (ticks from the start or bar# + beat # plus ticks) in another array . Then playing back I'd count ticks to the first time stamp and play the first event out, and on until the end bar/max time. Adding non-destructive quantise means adding a calculated offset with each time stamp (another array?) which would be zero if quantise is off or if it's right on the button to begin with. Destructive quantise would simply change the time stamp. But there must be many ways of of organising a sequencer. I take my hat off to you if you can work the 404 out!

Best of luck


Jim

_________________
Just when you think things couldn't get any more exciting - they don't.


Offline
 Profile  
Top 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 181 posts ]  Go to page 1, 2, 3, 4, 5 ... 13  Next



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: