cseq2mid by kr3nshaw at 10:00 PM EDT on May 30, 2018
My search for the sequences used in the StreetPass minigames led me to this post. The person who uploaded the archive also included cseq2midi by soneek, but the version provided doesn't convert the sequences properly.

Using the source code of soneek's program (also provided in the archive), I rewrote cseq2mid from scratch. My version is capable of converting all of the musical sequences without fail.

The program struggles to convert ambient sequences, due to the usage of arithmetic operations and multiple subroutines. If there's anybody who understands more about this than I do, please look at the source code on GitHub and tell me which commands I haven't implemented properly.

The next step is to work out how to create SF2 or DLS files from the data in the StreetPass BCSAR, as some of the sequences sound a bit odd when played back using GM. I haven't been able to find a tool that does this yet. Does anyone know of such a program?

0x1B840.CSEQ
0x1B840.mid
cseq2mid (MacOS)
Source

edited August 18, 2022
by 54634564 at 2:52 PM EDT on June 1, 2018
If you're curious about the bits of the format you have listed as unknown, check out this bcseq 'decompiler' I threw together. I posted this in the 3DS thread like two and a half years ago, but it looks like the original link is down.

https://pastebin.com/B9zGwBWb
by 54634564 at 3:03 PM EDT on June 1, 2018
Found this documentation I must have been working on, my memory is a little hazy. This may be more useful than that messy python code in my last post.

cseq file format
https://pastebin.com/Q7SSJWNq

commands
https://pastebin.com/BcWVm9kB
by kr3nshaw at 1:16 AM EDT on June 2, 2018
That's incredible useful. Thanks so much!

Do you have a Discord account or something that I could use to privately message you on?
by icecream at 12:07 AM EDT on June 5, 2018
Hey kr3n, it's me from the Discord, figured this would be the best place to point you to this:
https://drive.google.com/open?id=0B2lMV7NovfEOZWt1QTE1ZEp5d0E
This has the .BCSARs from the games added in 2017 and I think they deserve a look see just as much as the other ones.
by kr3nshaw at 10:41 PM EDT on June 5, 2018
3DSUSoundArchiveTool segfaults on every minigame except Slot Racer. I wish soneek would read this ;/

On the plus side, the sequences from Slot Racer convert perfectly.

edited 10:46 PM EDT June 5, 2018
by a574045075 at 10:32 PM EDT on October 11, 2018
@kr3nshaw
Can you share cseq2mid again? The link is invalid. I need this tool.
by hcs at 2:22 AM EDT on October 12, 2018
The Streetpass_DLC_Music.rar link in that post is still good and provides the old version Kai used for the rewrite.
by icecream at 1:03 PM EDT on October 13, 2018
The rewrite's source is available here:
https://github.com/kr3nshaw/caesar

edited August 18, 2022
by hcs at 9:19 AM EDT on October 14, 2018
Thanks icecream (and of course kr3nshaw)! IPFS link with a release build
by a574045075 at 10:01 PM EDT on October 20, 2018
Thank you,hcs

edited 10:01 PM EDT October 20, 2018
by a574045075 at 10:01 PM EDT on October 20, 2018
Does anyone know how to convert this NA_BGM_FIELD.cseq file to MIDI? This file is extracted from oot3d using caesar.I haven't found a tool that can be converted.

https://www6.zippyshare.com/v/iAIMTMkz/file.html
by 54634564 at 11:08 PM EDT on October 21, 2018
If you decompile the cseq with the python script I posted on the last page you'll see that it's not a simple music track.
https://pastebin.com/peY2hCxS
It's checking and setting variables and such. Not really something that can be easily translated to midi.

My script isn't fully decompiling this cseq due to oversight on my part. cba to fix it, tbh. Add "self.labelFromOffset(0, 'loc')" after line 51 as a band-aid.

edited 11:09 PM EDT October 21, 2018
by ultramario1998 at 1:03 AM EST on November 10, 2018
Whoa, thanks so much for this. Works great on KK Slider's songs; I've been looking for tools that could properly convert *cseq > mid for years--suffice it to say the original program didn't do a thing.

A bit off-topic, of course, but my goal is to eventually go backwards (ie have KK sing what I tell him to). I assume the only way to do this is via SDK tools?
by icecream at 2:14 AM EST on November 10, 2018
This wiki page (which is from August 2018 at the earliest) seems to proclaim that such a converter exists, though no link is provided, nor is one publicly available. Aside from that, I'm not aware of any tools that can convert them or are being worked on to convert them, even in the SDK (though to be fair I have no idea what actually is in the SDK, if someone wants to fill in the blanks please do). Even if you had one, unless you like aimless hex editing you can't put it into the game, since there is no (publicly) known way to decompile/edit a BCSAR, something the SDK definitely cannot do. I've looked into it for a bit, but haven't really been sure how to approach it.
by icecream at 10:13 PM EST on November 21, 2018
Slight update: I've looked into what the SDK contains and nothing indicates it has any way of generating CSEQ/CBNK/CWAR.

....which is strange. If the SDK can't create these files, what can?

This tool has experimental BCSAR packing and unpacking code, though I have doubts such a format is a priority for the dude making the tool.
by The Monk at 3:01 AM EST on January 16, 2019
Good day, folks. I'm currently working on a BCSAR extractor. If possible, I would like some pointers on how to go about sequencing 3DS music.
by icecream at 3:15 PM EST on January 16, 2019
What do you mean by that, actually creating the sequence or turning it into a format the 3DS can recognize?
by The Monk at 3:30 AM EST on January 17, 2019
I'm not at all familiar with the music world's jargon, so it might be better if I explained.

I was able to extract a thousand or so of CWAV files from a BCSAR. After converting them to WAV, I found out that they are "pieces" of the actual songs from the game.

If I got this correctly, the CSEQ files, after being converted to MIDI, will allow me to listen to the game music as it was meant to be, especially because there are references to "BGM" inside the BCSAR.

I would like to know how to go about feeding that MIDI and those WAVs to a program, and get some actual music back. My environment is Debian Stretch, but I can fire up Windows 7 if needed.
by icecream at 12:44 PM EST on January 17, 2019
Uh........then you would just use caesar (or anything that can turn the .CBNK and .CWAR into a SoundFont, not that any other program exists for that purpose anyway), load the sequence and SoundFont in your DAW of choice, and play it back.....It's the same as any other format with SoundFonts and sequences really.

I know next to nothing about Debian so I can't help you on that front unfortunately.

edited 12:44 PM EST January 17, 2019
by The Monk at 11:55 AM EST on January 20, 2019
Many thanks for the hints, I'll be sure to experiment with Caesar.
by icecream at 11:37 AM EDT on March 10, 2019
I felt this was most appropriate for this thread: I did some digging and there does seem in fact to be an official tool for converting sequences. Unfortunately (or perhaps fortunately....), no information about it seems to exist anywhere on the net, not even a name; the only reason I even know about it is that I heard it via word of mouth.

If it's anything like the DS's equivalent, then this should allow conversion to .CBNK and .CWAR as well.
caesar source code by icecream at 12:05 AM EDT on March 28, 2019
Thought I'd let everyone (who cares) know: the source code for caesar is now on github:
https://github.com/kr3nshaw/caesar
Assume all binaries available currently are out of date.
by kr3nshaw at 12:16 AM EDT on March 28, 2019
I'm updating the binary every time I make a commit, so hopefully that's not the case.
by MDHEXT at 3:59 PM EDT on August 27, 2019
i say we should create a new format and have the extension be ".3sf".
by icecream at 2:41 PM EDT on August 30, 2019
I've talked to a few people interested in it and while we all agree that the 3DS needs an equivalent of either "sf" or Nitro Studio (since the playback would be accurate to the console), we have no idea where to even begin. We'd essentially have to program a sound system and none of us have the knowledge or skills to do so. Even Gota7, the author of Citric Composer (who also made Nitro Studio), isn't sure how to approach it. I've spoken to Kermalis about adding compatibility with VG Music Studio, but that's a long shot.

If you know someone that is interested in this and has the skills to do so (preferably someone who has written an *sf format), please let us know.


edited 12:37 PM EDT August 31, 2019
starters by MDHEXT at 11:02 PM EDT on September 14, 2019
for starters, we should begin to examine the 2sf, and gsf formats. these are capable of re-creating different effects for the music they contain. i'd recommend creating a format that doesn't just work for bcsar files, but also their Wii and WiiU variants. stepping back and seeing what all these formats have in common, as well as looking to the structure of other sf formats, will allow us to create a format that is versatile and useful to rippers. i think that the first step should be to map out the file structure of the brsar, bcsar, and bfsar formats. after that, we can begin looking for ways to create a new sf extension based off of the newly acquired knowledge. this thread is now the homebase for the development of this new sf format.

edited 11:02 PM EDT September 14, 2019
by icecream at 10:33 AM EDT on September 15, 2019
I completely agree that the best starting point are the existing *sf formats for other Nintendo consoles. What I meant though was more along the lines of "none of the people I've spoken to know how to read the *sf code", and the people that can haven't expressed any interest yet (again except maybe Kermalis, and since he isn't specifically focusing on B*SAR it's a bit of a shot in the dark). I know there's interest, especially for the Wii U sequences, but no one seems to be committed into actually making it happen. I'd try myself, but I am no programmer. :p

edited 10:34 AM EDT September 15, 2019
by MDHEXT at 12:55 AM EDT on September 16, 2019
instead of reading sf code, try looking at the way the memory is organized compared to the original music files. think "compare 2sf to sdat".
by icecream at 10:01 PM EDT on September 19, 2019
If you have any alternate forms of contact, maybe you can help me find someone to spearhead the programming?
by MDHEXT at 3:12 PM EDT on September 20, 2019
can we ask kode54? he knows how to read sf code and has made many foobar2000 components.
by MDHEXT at 1:00 PM EDT on September 24, 2019
Mario Kart 7's bcsar fails to be extracted by caesar. why is that?
by icecream at 9:20 PM EDT on September 24, 2019
Uhhh, does it? It works fine for me. Unless you're talking about getting sequences from there.
by MDHEXT at 12:51 PM EDT on September 25, 2019
Image of error
by MDHEXT at 12:55 PM EDT on September 25, 2019
i'm guessing that the external groups are an issue. extracting the bcsar using my fork of these tools shows that there are some external groups that can't be accounted for. these are just my thoughts tho.

edited 12:55 PM EDT September 25, 2019
by MDHEXT at 1:47 AM EDT on September 28, 2019
http://3sf.joshw.info
by MDHEXT at 3:24 AM EDT on September 28, 2019
We need an intimate knowledge of the dsp systems of each of the b*sar processes. That includes a copy of their SDK's.


Go to Page 0

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source