del2rpp icon indicating copy to clipboard operation
del2rpp copied to clipboard

reaper projects contain no note data (Deluge 4.0, Python >= 3.10)

Open scitoast opened this issue 1 year ago • 0 comments

Hi there! This package appears to fail to include note data in the Reaper projects it exports.

Context:

  • Deluge Firmware 4.0
  • Reaper 6.61 (or presumably later)
  • Jupyterlab running Python 3.10 and above

Problem / symptoms:

Basically after conversion from Deluge to RPP, when I load the resultant RPP file, all the tracks are there, properly named, and with all the clips in their proper locations -- but none of the clips contain any note data. All clips are blank.

Further details:

I confess that this might be at root something in pydel. The process gives no error messages other than indicating (as usual) there are unused attribs / etc from the Deluge file.

See code below which should reproduce the problem assuming you're in a folder with some Deluge songs. Side note: I had to create some aliases because Python 3.10 deprecates collections.Iterable, so maybe that aspect of del2rpp at least needs to be updated. But this imported fine afterward.

!git clone https://github.com/dcower/del2rpp.git
!pip3 install pydel rpp 

import glob
files = glob.glob("./SONG*")

import collections.abc

#Python 3.10  deprecated Iterable in collections, so make some aliases:
collections.Iterable = collections.abc.Iterable
collections.Mapping = collections.abc.Mapping
collections.MutableSet = collections.abc.MutableSet
collections.MutableMapping = collections.abc.MutableMapping

#Now it imports.
from del2rpp import del2rpp
import os
import types

#Process each file put in the current working directory.
for filename in files:
    output_name = os.path.splitext(filename)[0] + ".rpp"
    
    args=types.SimpleNamespace()
    args.input_file = open(filename, "r")
    args.output_file = open(output_name, "w")

    del2rpp.convert(args)
    
    args.input_file.close()
    args.output_file.close()

scitoast avatar Feb 28 '23 16:02 scitoast