Login:
Menu:
Post: Author:
FamiTracker > General > FamiTracker Talk > DPCM conversation to RAW waveforms Owner: 8BitZtuner New post
Page 2 of 2 Sort: Goto Page: << Previous [1] [2]
Posted: 2014-09-12 14:22 Reply | Quote
8BitZtuner

Avatar

Member for: 4590 days
Location: Germany
Status: Offline

#61812
Jarhmander: I seem to have problems when I want a dmc file to be converted.

Here's what I input:
$ ./dmc2raw.py test.dmc
File "./dmc2raw.py", line 29
print "usage: %s infile [outfile]" % PROGNAME
^
SyntaxError: invalid syntax


Posted: 2014-09-12 14:35  (Last Edited: 2014-09-12 14:39) Reply | Quote
Jarhmander

Avatar

Member for: 7344 days
Status: Offline

#61814
Thanks jsr!

@8Bit: Looks like you're using Python3. Change the line
Quote:
print "usage: %s infile [outfile]" % PROGNAME

to
Quote:
print("usage: %s infile [outfile]" % PROGNAME)

That's because print is no longer a statement, it's a function now. The rest should be fine however, though I didn't test it.

EDIT: or change the shebang to #!/usr/bin/env python2

Posted: 2014-09-12 14:42  (Last Edited: 2014-09-12 16:39) Reply | Quote
8BitZtuner

Avatar

Member for: 4590 days
Location: Germany
Status: Offline

#61815
Well.
I changed that line and it dumped out a empty .raw file. (Python 3 comes preloaded with Linux, or atleast with Manjaro).

Here's the output:
$ ./dmc2rawpy3.py test.dmc
Traceback (most recent call last):
File "./dmc2rawpy3.py", line 49, in <module>
fout.write( chr(counter) )
TypeError: 'str' does not support the buffer interface

Edit: I changed the shebang. I though the Sound would be sharp. But it's awesome anyway!

Posted: 2014-09-12 23:18 Reply | Quote
Jarhmander

Avatar

Member for: 7344 days
Status: Offline

#61837
Glad it did want you wanted. I edited the script in my last post so it has the modified shebang; I wasn't careful enough with the differences between Python2 and Python3. The previous permissions still apply.

Posted: 2014-09-13 01:39 Reply | Quote
8BitZtuner

Avatar

Member for: 4590 days
Location: Germany
Status: Offline

#61839
Linux recognized the changed shebang and gave me a good DMC.
It's great for sample ripping that don't have a high/lowpass.
This is literally perfect!
I had to look up the correct frequency to make it sound the same.


Thanks man!

Posted: 2014-09-13 04:03 Reply | Quote
Jarhmander

Avatar

Member for: 7344 days
Status: Offline

#61845
That's alright!
BTW, Manjaro looks like a cool distro, for some time I wanted to use Arch Linux but yours is basically an user-friendlier Arch Linux. Gotta try that.

Posted: 2014-09-13 15:18 Reply | Quote
8BitZtuner

Avatar

Member for: 4590 days
Location: Germany
Status: Offline

#61855
I actually tried to run cpows port of FamiTracker on Manjaro, turns out I need some dependencies from the AUR (Arch User Repository).
But I can't remember what.

Page 2 of 2 Sort: Goto Page: << Previous [1] [2]