PC Engine Homebrew News: The duo that brought you FX-Unit Yuki returns! A demo for "Nyanja!" is available, an action platformer akin to games like Bubble Bobble & Snow Bros in gameplay style.
Main Menu

PC Engine/TG-16 Music (MIDI to MML to SQUIRREL)

Started by PCEngineFX, 06/18/2015, 03:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Windcharger

Quote from: Gredler on 12/17/2016, 07:04 PMAhhh thanks, the only usable result I've been able to muster has also been through notepad as well, which Arkhan insists is madness.
You are most welcome, and it is indeed madness, I just have near limitless patience and a penchant for tedious tasks.  lol

QuoteIn his tutorials and suggested workflow he uses 3MLE to convert a midi to MML then you copy and paste the MML code from 3MLE to your squirrel code, and then compile that as a rom. I've yet to successfully complete this process, and have had to rely on creating the music in MML by hand.
Though I haven't tried that yet, I'm pretty sure I could get it to work reasonable easily (for me anyway as I can both read music and code) because I know what I would be looking for in the MML if things got wonky.  I just like building songs from the ground up one measure or channel at a time because it allows you to address any issues as you find them instead of hunting for them later.  Definitely not an approach I would recommend for everyone though.  However, a lot of what I do really is needlessly tedious, so in the not so distant future I'm sure I will be using some additional software (I'm looking at you Fruity Loops) to assist with certain things, and depending on how that goes I may code up a little parser to fix any issues (if any) I find common with that conversion process.

QuoteIf I am not mistaken, his intention is for the artist to make a song in a program and export it as a midi, convert that midi to mml, then put that mll into squirrel code for a useable result. My friends and I have failed miserably at this, and Cabbage is the only guy besides Arkhan who've I've heard success from.
I'm pretty sure that was and still is Arkhan Asylum's intention, and I have some thoughts on this...

QuoteI was hoping you had success and could give us more info, because what you have shown us is manicured and glorious, but it was not as simple as export>convert>compile from the sounds of it.
Aww, thanks again.  :)
I'm sure I could still give plenty of info on this and would be happy to help out.  Though I haven't done it yet, it sounds like the biggest issue is that the songs fall apart due to timing.  When this happens it is important to do an audit of each measure in each channel (unless you can tell what the affected channel is by listening) and confirm it has the correct number of beats per whatever the time signature you are working with is.  So, for 4/4 time (probably most common time signature) every measure has to have 4 beat counts per measure regardless of what types of notes are used.  The devil is usually (but not always) in the rests.  I can't tell you how many times I've left something as small as a 1/16th rest out and everything starts to fall apart.  Of course my recommendation would always be to complete the composition/conversion prior to shifting the timing of channels around with rests for effects like echoing and such as well.

Quote from: Gredler on 12/17/2016, 07:04 PM
Quote from: Windcharger on 12/17/2016, 04:43 AMFun fact: My current MIDI program came bundled with my NEC Ready 9022 Multi Media PC (the "Turbo" runs deep in me :wink:) from 1995!  I'm using the Midisoft Recording Session v1.22 software (which is 16-bit software) for my MIDI needs atm.
All the more bad ass! Nice work, and dedication! I found my grandpa's NEC win 3.1.1 / dos 4.0 lappy in the garage not too long ago, maybe I should try to ressurect it to make my art on to be more true to the craft :P Nah, I'll stick to windows 10 and PhotoShop CC - I CANT GO BAAAAACK!
lol  Thanks and I understand...  Yeah, I got that machine as a Socket 5 Pentium 100Mhz with 8MB RAM, 1MB onboard video, OPL3 onboard audio, quad speed CD drive, and a 1GB HD.  It's now a K6-2 400Mhz with 128MB RAM, 32MB PCI Kyro (Power VR FTW!) video card, Sound Blaster Live!, Mitsumi 8x CD-R, and 13.6GB HD.   :D  I actually still playfully consider it my 'main machine' as I use it so often.  I'm also still sporting Adobe Photoshop v5 (even on my Windows 7 machines) because I'm just so used to it.  Yeah, getting that to work on Win 7 was fun...   :roll:

OldMan

Just out of curiosity, windcharger...

Are you using the new HuC?. The old Huc? Building for CD, or building for card?
Is this actually intended for a game, or just for learning how to do it?

I can't speak to Psycho Arkhan Asylum's intent...but I do know he prefers to create the songs via midi (he can actually play a keyboard fairly well); the rest of it it is just his workflow to get it into an acceptable pce format.
Does anybody know it 3mle (or whatever it is) can output the midi as text? If so, it would be fairly easy to write a filter that converts it to pce format.

Windcharger

Quote from: TheOldMan on 12/18/2016, 02:50 AMJust out of curiosity, windcharger...

Are you using the new HuC?. The old Huc? Building for CD, or building for card?
Is this actually intended for a game, or just for learning how to do it?
Good question...  According to the Squirrel compiler I'm using HuC v3.21, so the old one I assume, and I'm building for card for the time being.  Right now I'm just messing around to get familiar with the hardware from a coding perspective as I have a great many lofty goals in the future for this system.  While I'm pretty intimate with the capabilities of this hardware I lack much experience coding for it.  And while my songs are not currently optimized for use in games, they could be made to be rather easily.

Oh, and I'd like to take this opportunity to formally thank you for your contributions to Squirrel as well!!   :D

Quote from: TheOldMan on 12/18/2016, 02:50 AMI can't speak to arkhans intent...but I do know he prefers to create the songs via midi (he can actually play a keyboard fairly well); the rest of it it is just his workflow to get it into an acceptable pce format.
Gotcha...  Pretty neat.  I'm a professional software engineer (and graphic designer) in real life but mostly use modern languages (Ruby, SQL, etc...)  My music experience is mostly from playing clarinet in junior high and high school in concert and symphonic band, which was exactly 3,748 years ago yesterday.   :wink:

elmer

Quote from: Windcharger on 12/17/2016, 09:44 PM
Quote from: Gredler on 12/17/2016, 07:04 PMI was hoping you had success and could give us more info, because what you have shown us is manicured and glorious, but it was not as simple as export>convert>compile from the sounds of it.
Aww, thanks again.  :)
I'm sure I could still give plenty of info on this and would be happy to help out.  Though I haven't done it yet, it sounds like the biggest issue is that the songs fall apart due to timing.  When this happens it is important to do an audit of each measure in each channel (unless you can tell what the affected channel is by listening) and confirm it has the correct number of beats per whatever the time signature you are working with is.  So, for 4/4 time (probably most common time signature) every measure has to have 4 beat counts per measure regardless of what types of notes are used.  The devil is usually (but not always) in the rests.  I can't tell you how many times I've left something as small as a 1/16th rest out and everything starts to fall apart.  Of course my recommendation would always be to complete the composition/conversion prior to shifting the timing of channels around with rests for effects like echoing and such as well.
IMHO, this is one of the biggest practical problems with MML/Squirrel.

"Yes", BITD all the pro musicians had to do this careful accounting cumulative-note-lengths-per-measure, but it's a total PITA, and not at all user-friendly.

It's the kind of tedious drudgery that computers are supposed to have saved us from.

IIRC, 3MLE is supposed to make this process a little easier by outputing measure information into the MML file.

elmer

Quote from: Windcharger on 12/18/2016, 03:44 AM
Quote from: TheOldMan on 12/18/2016, 02:50 AMAre you using the new HuC?. The old Huc?
Good question...  According to the Squirrel compiler I'm using HuC v3.21, so the old one I assume, and I'm building for card for the time being.
I'm going to assume that most folks won't be able to use Squirrel with the new HuC until you release a version that supports the recent changes.

The only people that I've given the integration-fixes to are Gredler and DarkKobold.

Arkhan Asylum

Quote from: elmer on 12/18/2016, 04:12 PM
Quote from: Windcharger on 12/17/2016, 09:44 PM
Quote from: Gredler on 12/17/2016, 07:04 PMI was hoping you had success and could give us more info, because what you have shown us is manicured and glorious, but it was not as simple as export>convert>compile from the sounds of it.
Aww, thanks again.  :)
I'm sure I could still give plenty of info on this and would be happy to help out.  Though I haven't done it yet, it sounds like the biggest issue is that the songs fall apart due to timing.  When this happens it is important to do an audit of each measure in each channel (unless you can tell what the affected channel is by listening) and confirm it has the correct number of beats per whatever the time signature you are working with is.  So, for 4/4 time (probably most common time signature) every measure has to have 4 beat counts per measure regardless of what types of notes are used.  The devil is usually (but not always) in the rests.  I can't tell you how many times I've left something as small as a 1/16th rest out and everything starts to fall apart.  Of course my recommendation would always be to complete the composition/conversion prior to shifting the timing of channels around with rests for effects like echoing and such as well.
IMHO, this is one of the biggest practical problems with MML/Squirrel.

"Yes", BITD all the pro musicians had to do this careful accounting cumulative-note-lengths-per-measure, but it's a total PITA, and not at all user-friendly.

It's the kind of tedious drudgery that computers are supposed to have saved us from.

IIRC, 3MLE is supposed to make this process a little easier by outputing measure information into the MML file.
It's only a problem if you aren't aware of it, and it's hardly as tedious as you imply.   

It's standard "sheet music" fare.   It's as user friendly as composing real sheet music.   :-"

You have to finish a measure.   Trackers avoid this by having the whole rigid column/step thing.   Piano rolls treat all blankness as rests (3MLE is doing this).  Step sequencers do this also.    We don't have an interface to fill in the blanks for you, so you have to do it yourself.   Some older sequencers require you to punch in rests yourself.

It's likely, as pointed out already, that trailing rests are not existing.  So, your patterns end earlier than the measure actually ends.   Then, they will loop early and everything loses sync.   This is REALLY easy to fix once you do it one time and see what it is.

You really just need to spot check the measures in 3MLE, and see if the white indicator marker lines up with ends of measures.  If not, add some rests until it does.  You just move the cursor in the text editor left to right from note to note and watch the indicator.     The visual piano roll thing makes it really easy to look and notice "hey there's a gap between the last note, and the  measure end.  I need a rest here!"

Gredler, if you give me an example of your  stuff *not* working, I can show you how to fix it. 

You probably need something as simple as an R8 or R16 to finish off a measure and have it stay lined up.

It would be nice if 3MLE put the rests in for you, but it doesn't, because the players/etc. are a little more sophisticated due to having the built in concept of a measure.   It fixes it for you behind the scenes.
This "max-level forum psycho" (:lol:) destroyed TWO PC Engine groups in rage: one by Aaron Lambert on Facebook "Because Chris 'Shadowland' Runyon!," then the other by Aaron Nanto "Because Le NightWolve!" Him and PCE Aarons don't have a good track record together... Both times he blamed the Aarons in a "Look-what-you-made-us-do?!" manner, never himself nor his deranged, destructive, toxic turbo troll gang!

Arkhan Asylum

Man this tapatalk program blows.   Quote button is dumb.

I was referring to the triangles, yeah.    You can use them with some envelopes and sweeping and get those weird ass tom noises.   I still havent really figured out what to call them.

Captoms.

I had a utility that yanked waves out of roms but i cant find it lol   


I could remake it eventually.

I used it to yank out Neutopia waves. 
This "max-level forum psycho" (:lol:) destroyed TWO PC Engine groups in rage: one by Aaron Lambert on Facebook "Because Chris 'Shadowland' Runyon!," then the other by Aaron Nanto "Because Le NightWolve!" Him and PCE Aarons don't have a good track record together... Both times he blamed the Aarons in a "Look-what-you-made-us-do?!" manner, never himself nor his deranged, destructive, toxic turbo troll gang!