It is currently Tue Nov 21, 2017 1:11 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Fri Oct 17, 2014 5:57 am 
Offline

Joined: Sat Jun 28, 2014 2:35 am
Posts: 36
Hello. I want to take songs from Darkwing Duck and Chip&Dale2, and memorise every bit of it. For that, I need to record an output of NSF as a list of register values, get some info on how these registers converts to actual soundwave, and get notes and instruments out of this mess.

Actually, I want to convert them to flash markup language. And make some visulation program. I want to see it, not just hear. I want to know it, to keep it in my head clear as much as possible.

You can give some shortcuts for me, don't you?


Last edited by michikaze on Fri Oct 17, 2014 7:11 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Oct 17, 2014 6:54 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2981
Location: Tampere, Finland
NSF importer should come in handy: http://rainwarrior.ca/projects/nes/nsfimport.html

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Fri Oct 17, 2014 7:03 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5824
Location: Canada
If you're familiar with Famitracker, this program will let you analyze the frame-by-frame changes visually:
http://rainwarrior.ca/projects/nes/nsfimport.html

Edit: TheFox beat me to it while I had the tab open.


Top
 Profile  
 
PostPosted: Fri Oct 17, 2014 8:51 pm 
Offline

Joined: Sun Mar 03, 2013 1:52 am
Posts: 94
Location: Texas, USA
Is "Flash markup language" the same thing as FlMML?:
Google Translate wrote:
FlMML is a library for you to play the music in Flash.
It allows you to play the melody just pass the text of the MML notation.

I found a script for the NES emulator FCEUX that looks like it will convert NES audio playing in FCEUX into MML. (I have never used MML. I found this script while looking for sound visualization scripts for FCEUX.)

The script collection: emu2midi-lua. In the right margin, click on Download ZIP.
A blog post about how to use it: MIDI Converter Runs On Emulator

FCUEX can play NSF files, so if the script works, maybe this will do what you want.
_____

I got the script to write a MML file, but I don't know how to use the MML file to confirm it works well. EDIT: The MML text works well, see below.

The script normally requires a base64 extension and a MIDI extension, but I don't know how to install those. In nes2midi.lua, it looks like the base64 code is only used to embed DPCM samples, so I just disabled that code for now. And if you remove the line that writes the MIDI file, then the script will still write the MML file and a debugging text file. These are the changes I made:

In nes2midi.lua, find this line near the top and remove it:

local base64 = require("base64")

Near the bottom, find this line:

ch.patch = string.format("%d,%d,%s", ch.dmcseed, ch.dmcloop and 1 or 0, base64.encode(memory.readbyterange(ch.dmcaddress, ch.dmcsize)))

Change the part beginning with 0, to the end of the line to be: 0, "")

Also near the bottom, remove this line:

writer:writeMidiFile("testVGM.mid")

_____

EDIT: Using the stand-alone Flash player, I opened flmll.swf from this download and pasted in the MML text. The converted MML text works well for internal audio and NTSC speeds. Expansion audio isn't converted. Music designed for PAL speeds will play fast in the MML version, but you can lower the T number at the beginning of the MML text to adjust the speed.


Last edited by Bavi_H on Fri Oct 17, 2014 10:43 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Oct 17, 2014 9:20 pm 
Offline

Joined: Sun Mar 03, 2013 1:52 am
Posts: 94
Location: Texas, USA
By the way, FCEUX comes with some example music visualization scripts (SoundDisplay.lua and SoundDisplay2.lua). If you are willing to use something other than Flash, maybe you can make visualizations the way you want using FCEUX's scripting language. For example, I made my own script to visualize things the way I wanted to:

Script: Scrolling Pitch Display.
Videos: Battle Kid 2 Demo startup story and title screen, Utaco credits screen.
(I'm not good at converting videos for YouTube. The script runs smoothly and in sync in FCEUX.)

If you still want to use Flash, the FCEUX visualization scripts might still help you understand NES audio better. For example, when using the FCEUX visualizations with NES ROMs, you can pause the emulator, then press the Frame Advance key to step one frame at a time and watch the visualization change. This can help you analyze how some of the faster effects are created.

Unfortunately, when you open an NSF file in FCEUX, the script isn't allowed to draw graphics on the screen, so you can't normally use visualization scripts when FCEUX is playing an NSF file. However, in the FCEUX source code, a line can be added to allow the script to draw graphics on the NSF playback screen. If you're interested and unfamiliar with compiling it yourself, I think I can compile a (edit:) Windows version.


Top
 Profile  
 
PostPosted: Tue Oct 21, 2014 1:55 pm 
Offline

Joined: Sat Jun 28, 2014 2:35 am
Posts: 36
And direct conversion to FlMML, amasing! Thank you all, really.

(I forgot to mention, nsfplay have a nice visualizer too. With register values, volume, and a nice little keyboard. Just click "NSFplug" -> view -> keyboard)


Top
 Profile  
 
PostPosted: Thu Oct 23, 2014 5:28 am 
Offline

Joined: Sat Jun 28, 2014 2:35 am
Posts: 36
Tried emu2midi-lua, output is kind of unreadable. I, I'm wondering if there is a tool to export/import famitrackef files as text. Like this http://famitracker.com/forum/posts.php?id=3129 . I'll try to understand output in meantime.

And a little unrelated question, just to not create another thread. Can you recommend lightweight midi editor? For both linux and windows. Not for creating something complex, just to look inside midi files.

Edit: Tried to nsfimport stage select music from DW (at 160 rows per frame), music slied down one row every 9-10 frames. I guess importing process does loses some data, it's not a perfect convertion. Btw, there is a line "Harware length counters are not supported by FamiTracker, and are essentially rounded down to the nearest frame by the import process." in the readme. I know it's a very very minor detail, but it still bugs me.


Top
 Profile  
 
PostPosted: Thu Oct 23, 2014 6:41 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5824
Location: Canada
michikaze wrote:
And a little unrelated question, just to not create another thread. Can you recommend lightweight midi editor? For both linux and windows. Not for creating something complex, just to look inside midi files.


BRELS MIDI editor is pretty simple and direct: http://breno.sarmen.to/midi/


Top
 Profile  
 
PostPosted: Thu Oct 23, 2014 5:58 pm 
Offline

Joined: Sun Mar 03, 2013 1:52 am
Posts: 94
Location: Texas, USA
michikaze wrote:
Can you recommend lightweight midi editor?
I like Sekaiju, a MIDI sequencer for Windows. It defaults to Japanese, but you can change it to English: Go to the (S) menu and choose Language.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 7 hours


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:  
Powered by phpBB® Forum Software © phpBB Group