Example #1
0
    '-map', "['out']", f
])

getWEM(audio_dir, internalName)
shutil.rmtree(audio_dir + 'Wwise_Template/')

extractTar(audio_dir)
subprocess.call(
    ['ffmpeg', '-i', d1 + mp3, '-ss',
     str(OFFSET_PREVIEW), '-t', '30', f])

getWEM(audio_dir, internalName, preview=True)
shutil.rmtree(audio_dir + 'Wwise_Template/')

gpa = SngBuilder(gp, gp.Tracks[0], sync)
x = xmlhelpers.json2xml('song', gpa.run())
z = xml2sng.compile_xml(x)

urns = [z[0]]
manifests = [z[1]]
sngs = [z[2]]

hsandb, xblock = hsan.hsan(manifests)

for urn, sng in zip(urns, sngs):
    u = d + 'songs/bin/macos/'
    with open(u + urn + '.sng', 'wb') as s:
        s.write(sng)

u = d + 'manifests/songs_dlc_' + internal_name + '/'
for urn, manifest in zip(urns, manifests):
Example #2
0
                 '-map', "['out']", f])

getWEM(audio_dir, internalName)
shutil.rmtree(audio_dir + 'Wwise_Template/')

extractTar(audio_dir)
subprocess.call(['ffmpeg', '-i', d1 + mp3, '-ss', str(OFFSET_PREVIEW), '-t', '30', f])

getWEM(audio_dir, internalName, preview=True)
shutil.rmtree(audio_dir + 'Wwise_Template/')




gpa = SngBuilder(gp, gp.Tracks[0], sync)
x = xmlhelpers.json2xml('song', gpa.run())
z = xml2sng.compile_xml(x)

urns = [z[0]]
manifests = [z[1]]
sngs = [z[2]]

hsandb, xblock = hsan.hsan(manifests)

for urn, sng in zip(urns, sngs):
    u = d + 'songs/bin/macos/'
    with open(u + urn + '.sng', 'wb') as s:
        s.write(sng)

u = d + 'manifests/songs_dlc_' + internal_name + '/'
for urn, manifest in zip(urns, manifests):
Example #3
0
    def run(self):
        self.clear()
        while self.bar_idx < len(self.song.MasterBars):
            bar_settings = self.song.MasterBars[self.bar_idx]
            bar = self.song.Bars[bar_settings.Bars[self.track['@id']]]

            # TODO: beat value
            # gp.MasterTrack['Automations']['Automation']['Type'] == 'Tempo'
            self.new_bar(bar, bar_settings)

            self.bar_idx += 1  # no repeats -> get position in score
            self.measure += 1  # counting repeats -> compute time

        return self.json()


if __name__ == '__main__':
    from docopt import docopt
    from xml.dom.minidom import parseString

    args = docopt(__doc__)

    gp, mp3, sync = load_goplayalong(args['FILE'])

    # TODO: other tracks
    sng = SngBuilder(gp, gp.Tracks[0], sync)

    x = json2xml('song', sng.run())
    print parseString(x).toprettyxml()
Example #4
0
    def run(self):
        self.clear()
        while self.bar_idx < len(self.song.MasterBars):
            bar_settings = self.song.MasterBars[self.bar_idx]
            bar = self.song.Bars[bar_settings.Bars[self.track['@id']]]

            # TODO: beat value
            # gp.MasterTrack['Automations']['Automation']['Type'] == 'Tempo'
            self.new_bar(bar, bar_settings)

            self.bar_idx += 1  # no repeats -> get position in score
            self.measure += 1  # counting repeats -> compute time

        return self.json()


if __name__ == '__main__':
    from docopt import docopt
    from xml.dom.minidom import parseString

    args = docopt(__doc__)

    gp, mp3, sync = load_goplayalong(args['FILE'])

    # TODO: other tracks
    sng = SngBuilder(gp, gp.Tracks[0], sync)

    x = json2xml('song', sng.run())
    print parseString(x).toprettyxml()