Ignore:
Timestamp:
Jul 2, 2020, 7:03:56 PM (4 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, fix/ffmpeg5, master
Children:
e7c6216
Parents:
7b8e51c (diff), bd183b3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'feature/timestretch'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/gen_code.py

    r7b8e51c r05ed7f5  
    2121    'method': '"default"',
    2222    'uri': '"none"',
     23    'transpose': '0.',
    2324    }
    2425
     
    8485        'filterbank': 'self->n_filters',
    8586        'tss': 'self->buf_size',
     87        'pitchshift': 'self->hop_size',
    8688        'dct': 'self->size',
    8789        }
     
    9799        'wavetable': 'self->hop_size',
    98100        'tss': 'self->buf_size / 2 + 1',
     101        'pitchshift': 'self->hop_size',
    99102        }
    100103
     
    291294        if p['type'] == 'char_t*':
    292295            return self.check_valid_char(p)
     296        if p['type'] == 'smpl_t':
     297            return self.check_valid_smpl(p)
    293298        else:
    294299            print ("ERROR, no idea how to check %s for validity" % p['type'])
     
    311316    self->{name} = {defval};
    312317    if ({name} != NULL) {{
     318        self->{name} = {name};
     319    }}
     320""".format(defval = aubiodefvalue[name], name = name)
     321
     322    def check_valid_smpl(self, p):
     323        name = p['name']
     324        return """
     325    self->{name} = {defval};
     326    if ({name} != 0.) {{
    313327        self->{name} = {name};
    314328    }}
Note: See TracChangeset for help on using the changeset viewer.