MIDI to M64 Tool « 1 2 3
Users browsing this thread: 1 Guest(s)

(23-09-2016, 05:16 PM)Christopher Brown Wrote: I thought RobiNERD was doing something with the code, maybe not? If nobody has made a move in a little bit I'll probably do it myself in time for Christmas.

No, I looked in the code and was not able to compile without vb, i stopped paying for vb as it was of no use anymore a few months ago...
Lorem Ipsum.

(23-09-2016, 06:35 PM)RobiNERD Wrote:
(23-09-2016, 05:16 PM)Christopher Brown Wrote: I thought RobiNERD was doing something with the code, maybe not? If nobody has made a move in a little bit I'll probably do it myself in time for Christmas.

No, I looked in the code and was not able to compile without vb, i stopped paying for vb as it was of no use anymore a few months ago...

What does VB have to do with C++? Also, community version of Visual Studio is free.

I assumed he meant "VS." Though I also don't understand why it's difficult to compile in any other C environment (especially considering you posted a makefile).

Hi, I've successfully compiled this program in Visual Studio 2015, but whenever I try to run it through command prompt, I always get an error like this:
Code:
Debug Assertion Failed!
Program C:\WINDOWS\SYSTEM32\MSVCP140D.dll
File: c:\program files (x86)\microsoft visual studio 14.0\vc\include\vector
Line: 159
Expression: vector iterator + offset out of range
I'm not quite sure what to do here, as I haven't coded anything in visual basic.

So it's officially been a year since anything has been done with the GitHub, no-one seems to really be talking about this, so I'm just curious what's going on. It's been half a year since you last visited, and the last time anything was said on this was over 11 months ago.

Don't let this die please. It's too good for the hacking community not to have.
David, please make a UI for this ASAP.
Working on a major hack behind closed doors. (for better marketing.) If you're interested, check out the dedicated Discord server here.

I have heard your plaintive cries, and I have descended to aid you all. Look no further, the best UI for Midi2M64 has finally been made.

[Image: 0IKxL4Z.png]

You can get the program here!!

From what I hear, the program doesn't get the instrument sets right, but if you play with them you can probably get it sounding good.

On a more serious note, I know there's a few problems with the compiling. To fix this, make sure to switch the project to Release mode in Visual Studio, otherwise it's going to run the Debug code which contains a commented out debug file name that crashes it. If you do that, you'll need to change the 'Whole Program Optimization' option for the project to none. Also switch it to x86 mode if you're on a 32 bit computer.

Also, if you're not on the most up-to-date Visual Studio, you might have a couple of problems like I did. I solved them by:
-Renaming 'uint32_t' to 'unsigned int'
-Changing 'signedbit(float)' to 'float < 0.0', though this change might make a mistake if the float is Nan or Infinity.
(This post was last modified: 09-08-2017, 02:59 AM by mib_f8sm9c. Edit Reason: expanded on options change )

Also instruments don't change, it just increments(+1) track by track so instead of what you actually want, you'll get;

track 1
c1 00
track 2
c1 01
track 3
c1 02
track 4
c1 03

(0xc1 = set program, i.e in instrument list 0x11 / 17(title screen), c1 00 = Snare drum, c1 01 =  eletric bass)

for general percussion you have to use c1 7f

You'll want to use this to make it easier to find it and change it to what you want.

After parsing it you should see something like

Code:
-----------------------------------
TRACK 1 (CHANNEL 0) AT OFFSET 0x1f
-----------------------------------

0x1f: C4 --> Begin track
0x20: 90 00 97 --> Load Music Track (Layer 0) from offset 0x97
0x23: C1 00 --> Set Program = 0
0x25: D4 00 --> Reverb/Echo = 0x00
0x27: D8 00 --> Vibrato range = 0x00
0x29: D3 00 --> Pitch/Pitchbend = 0x00
0x2b: DD 28 --> Set Track Pan = 40
0x2d: DF 70 --> Track Volume = 112
0x2f: FD 89 01 --> Timestamp: Other (0x901)

What you want is that 0x23: C1 00 --> Set Program = 0, open your m64 in an hex editor and jump to 0x23 to change it to what you want.

I haven't checked the other parameters like D4 reverb or D8 vibrato but the process is pretty much the same.
(This post was last modified: 11-08-2017, 02:04 PM by Nutta.)
Gone for a while.

So yeah, what Nutta and I noticed when experimenting with this tool is that it seems to not be able to handle chords, which means you have to split them manually. There's also no easy way to loop the music so basically, it'll only play once and that's it. Probably best to stick to MusicXML for now.

yep no looping so you have to put in FB 00 05 to the track header to loop from 0x05 where the track loading start then repoint all the 0x9* load layer commands by the length byte (you add 3). pretty time consuming.

it also adds a weird single tick into the whole m64's length so if you have an m64 of 4 4/4(0x300) measures for example;
[Image: 7TndmEQ.png]
instead of FD 83 00, you get FD 83 01, a tick of 1 is added to the variable timestamp for no reason and it is in all the track headers and master header so you have to subtract 1 from all the variable timestamps.

(a step = 24 ticks)
32nd - half step
16th - 1 step
8th - 2 steps
4th - 3 steps
2nd - 4 steps
whole - 8 steps

32nd note - 12 ticks 0x0c

16th note - 24 ticks 0x18

8th note - 48 ticks 0x30

4th note - 72 ticks 0x48

2nd note - 96 ticks 0x60

Whole note = 192 ticks 0xc0

4 bars = 1 4/4 measure 0x300

---------------------------------------------------
No layer utilization which means no chords, something skelux' musicxml actually did right, so you have to split it into new tracks and waste all the polyphony
instead of using 0x91 to load another layer for the chords or 92/93/94 to load more, it also does some weird transposition so things on low octaves will not play when they go below octave 2, the only good thing is the support for automation and how it optimizes the note data better and supports all note lengths.
Gone for a while.

How am I supposed to use this?

MIDI to M64 Tool « 1 2 3
Users browsing this thread: 1 Guest(s)


  EN ・日本語