It is currently Tue Sep 19, 2017 4:51 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Jun 11, 2016 8:37 pm 
Offline
User avatar

Joined: Fri Feb 27, 2009 2:35 pm
Posts: 208
Location: Fort Wayne, Indiana
Manually transcribing music from Famitracker over to Pently's format is tedious, especially in comparison to all the other music engines that can convert from Famitracker with an included conversion tool.

I whipped up a simple converter that mostly works for most things I throw at it. It's still a work in progress, and it doesn't yet support the effects here (except arpeggio) or converting noise instruments to sound effects, and it still doesn't fully support multiple songs yet. There are also still some problems with some songs I've tried, that I'm still working out.

GitHub repository if someone wants to help on the code or compile it.


Attachments:
File comment: First level music from Alter Ego through the converter (with percussion manually changed) and with problems on pitch sliding instruments
pently.nes [24.02 KiB]
Downloaded 92 times
Top
 Profile  
 
PostPosted: Sat Jun 11, 2016 8:46 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1727
Location: DIGDUG
Cool.

Would it be ok if I made an asm6 version of Pently and removed that python dependency? (I believe the note table is generated from scratch every time).
?

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Sun Jun 12, 2016 1:17 pm 
Offline
User avatar

Joined: Fri Feb 27, 2009 2:35 pm
Posts: 208
Location: Fort Wayne, Indiana
I'm not Pently's author, but because it's licensed under the MIT License I'd assume you could do whatever with its source as long as you kept the copyright notices.

Assuming you mean the note frequency table, in my own projects I just include a table that works right into the game and don't have Python generate it. The Famitracker->Pently conversion is still going to need Python though since it needs pentlyas.py


Top
 Profile  
 
PostPosted: Sun Jun 12, 2016 1:47 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18984
Location: NE Indiana, USA (NTSC)
If I wrote pentlyas in C or C++ instead of Python, there'd be a dependency on a C or C++ compiler.

In what language could I write something that doesn't have a dependency on some programming language not bundled with every major personal computer operating system?


Top
 Profile  
 
PostPosted: Sun Jun 12, 2016 2:13 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6152
Location: Seattle
The difference is that C/C++ binaries can be compiled using mingw and depend on nothing not already distributed with the OS.


Top
 Profile  
 
PostPosted: Sun Jun 12, 2016 2:34 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1727
Location: DIGDUG
My point was...I don't need a Python script to make a note table. I made a note table a year ago, hand calculated with a calculator.

I'm aware that you're not the author, I was asking tepples. I'd like to make Pently useable for the 60% or so who don't use ca65 or have Python installed.

I was just excited that someone wrote a famitracker to pently conversion tool, and I thought this would be the next logical step.

Quote:
licensed under the MIT License I'd assume you could do whatever

I thought it would be polite to ask anyway.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Sun Jun 12, 2016 7:01 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18984
Location: NE Indiana, USA (NTSC)
lidnariq wrote:
The difference is that C/C++ binaries can be compiled using mingw and depend on nothing not already distributed with the OS.

MinGW binaries don't work out of the box on OS X, FreeBSD, or GNU/Linux. First you need to install Wine. And Wine doesn't work in non-i386 environments, such as the Raspberry Pi in NovaSquirrel's bedroom or the AMD64-only PC in calima's room. True, ft2pently users will already have either Windows or Wine installed as a dependency of FamiTracker, but people writing directly in Pently-MML might not. Finally, I'd need to learn how to install a cross-compiler on the computer that I primarily use to develop Pently, which runs an OS based on Debian GNU/Linux, so that I can create MinGW binaries, and I'd need to rewrite everything line by line in C++ and eat the overhead of maintaining C++ compared to maintaining Python.

Perhaps I could continue to distribute the Python version as free software, make a line-by-line translation into C++ that's not updated as often, make the C++ translation proprietary software, charge for copies of the C++ translation to cover the cost of purchasing a genuine Windows license on which to test a MinGW port, the cost of my time keeping the Windows installation updated, and the cost of my time making the C++ translation. I imagine most users of Windows would install Python to work around this, just as they install Oracle's Java virtual machine to play Minecraft.


Top
 Profile  
 
PostPosted: Mon Jun 13, 2016 12:17 am 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 1516
Location: Fukuoka, Japan
Note: didn't read all the details.

If it's just something that generate text them most people should have a browser installed. In that case, JavaScript can be a solution.


Top
 Profile  
 
PostPosted: Mon Jun 13, 2016 12:46 am 
Offline
User avatar

Joined: Fri Feb 27, 2009 2:35 pm
Posts: 208
Location: Fort Wayne, Indiana
tepples wrote:
If I wrote pentlyas in C or C++ instead of Python, there'd be a dependency on a C or C++ compiler.

Pentlyas isn't the thing that's being complained about, the frequency table generation is. This is solvable by just including a premade NTSC or PAL table, and I already do this in my games. It's not the language used for generating the table, but the fact that the step is there at all.

Rewriting pentlyas in C++ would be a waste of time, because I think the only people who care about having to get Python are Windows users, and you can have a py2exe build available for them. When I release a Windows build of ft2pently I'm going to include an exe of pentlyas alongside it.

---

I can try to help with an asm6 port of Pently. I'd like to know if the rest of these effects have any demand. If they're not important I'm probably going to work on optimizing the resulting files for ROM space.


Top
 Profile  
 
PostPosted: Mon Jun 13, 2016 6:08 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18984
Location: NE Indiana, USA (NTSC)
Banshaku wrote:
If it's just something that generate text them most people should have a browser installed. In that case, JavaScript can be a solution.

That would depend on a way of copying and pasting text into the browser and then copying and pasting the result, all from the command prompt. Node.js is a JavaScript environment intended to be used at the command line, but I imagine that more desktop PCs have Python than Node.js installed.

NovaSquirrel wrote:
Pentlyas isn't the thing that's being complained about, the frequency table generation is.

My reasoning is that if you have Python installed to do one, you might as well have Python installed to do the other. But if py2exe is available to you, and the scope of the functionality of the program built with py2exe is the major issue, then I could add a command-line argument to have pentlyas.py include a frequency table in its output (by importing mktables.py).

NovaSquirrel wrote:
I'd like to know if the rest of these effects have any demand.

In Press Your Luck, I used Bxx (loop point other than start of song), Dxx (variable pattern length), and Sxx (note cut at fractional row).

In a Balloon Fight-esque NSF, I used Bxx (loop point other than start of song), grace wait (Gxx), and staccato (Sxx), though most of the Sxx uses would have been captured by the staccato flag of Pently instruments.

In Byelomorye Dam Zone, I used Bxx (loop point other than start of song), 3xx (legato) for the arpeggiated pad during Waluigi Pinball, Dxx (variable pattern length) at the end of each section, and Qxy (hammer-on) a few places throughout the thing.

In Concentration Room and Zap Ruder, the jingle after the end of a level needs C00 (stop playback).

I'll provide FTMs of these three songs once the Press Your Luck contest ends.


Top
 Profile  
 
PostPosted: Mon Jun 13, 2016 10:24 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1727
Location: DIGDUG
Ok, I made a functioning asm6 version of Pently...but I need to clean it up a lot, put back in a few 'if, else' bits I deleted, double check it, etc.

Just FYI, I had to change most of the important macros (or remove them entirely).

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Mon Jun 13, 2016 1:54 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1727
Location: DIGDUG
Here's a slightly broken version of Pently for asm6...

http://dl.dropboxusercontent.com/s/smvk ... y_asm6.zip

I say 'slightly broken' because the Happy Flappy Crappy song doesn't seem to play right. Not sure why. All the other tests seem to play fine.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Mon Jun 13, 2016 5:17 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18984
Location: NE Indiana, USA (NTSC)
tepples wrote:
I could add a command-line argument to have pentlyas.py include a frequency table in its output

This feature has been pushed to GitHub, along with a new slur notation.


Top
 Profile  
 
PostPosted: Tue Jun 14, 2016 6:57 am 
Offline
Formerly ~J-@D!~
User avatar

Joined: Sun Mar 12, 2006 12:36 am
Posts: 445
Location: Rive nord de Montréal
Sorry to go a bit off-topic, but I must say something.

Yes, I did troll tepples for, you know, Coily things, because it was fun remembering what Koitsu said. But my honest opinion of the matter is, I can't agree more on the choice of Python for his script compared to C/C++. I would do exactly the same. I might be one of the few in this forum to strongly advocate C++, but you can't beat the productivity of a scripting language, especially one with tons of libraries like Python. I can't count the times I wrote scripts using Python that were simple, almost "throw away" programs done really quickly that would be much longer to write in C++, and do not even mention C. In a matter of hours I made a code generator for C using Python that rendered several characters of a particular font to 1bit bitmap and encoded them into a RLE-like format, then generated a source code containing arrays with the bitmap data, structs with metadata and pointer to those arrays, and finally an array of those structs. Even with my experience it would have taken a couple of days making the same thing using C++.

tepples, please ignore the complaints about some "Python" dependencies, it's not worth your time. After all, you made the tools for you, didn't you. And frankly, Python causes less problems in porting to Windows that supporting any kind of compiling setup, be it cross-compiling or using a separate VM to develop for Windows. When problem arises, you can fix the Windows compatibility problem in a matter of minutes. Heck, even the user can modify the script to test and fix things.


Top
 Profile  
 
PostPosted: Tue Jun 14, 2016 6:59 pm 
Offline
User avatar

Joined: Fri Feb 27, 2009 2:35 pm
Posts: 208
Location: Fort Wayne, Indiana
I've got a bunch of stuff implemented (slur, loop points, pattern breaks, tempo changes, grace notes, delayed note cuts, slurring up or down, multiple songs, attack channel) though I still have a lot of things to do.

I attached a Windows build of ft2pently (build it from here if on Linux) as well as the Alter Ego song I was using as a test, and the readme should explain how to use it. I wasn't able to get py2exe working.

I'm putting this on hold for now as I'd really like to get back to Nova the Squirrel.


Attachments:
ft2pently.zip [85.5 KiB]
Downloaded 83 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bing [Bot] and 5 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