Changeset 05ed7f5 for python/lib/gen_code.py
- Timestamp:
- Jul 2, 2020, 7:03:56 PM (4 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/gen_code.py
r7b8e51c r05ed7f5 21 21 'method': '"default"', 22 22 'uri': '"none"', 23 'transpose': '0.', 23 24 } 24 25 … … 84 85 'filterbank': 'self->n_filters', 85 86 'tss': 'self->buf_size', 87 'pitchshift': 'self->hop_size', 86 88 'dct': 'self->size', 87 89 } … … 97 99 'wavetable': 'self->hop_size', 98 100 'tss': 'self->buf_size / 2 + 1', 101 'pitchshift': 'self->hop_size', 99 102 } 100 103 … … 291 294 if p['type'] == 'char_t*': 292 295 return self.check_valid_char(p) 296 if p['type'] == 'smpl_t': 297 return self.check_valid_smpl(p) 293 298 else: 294 299 print ("ERROR, no idea how to check %s for validity" % p['type']) … … 311 316 self->{name} = {defval}; 312 317 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.) {{ 313 327 self->{name} = {name}; 314 328 }}
Note: See TracChangeset
for help on using the changeset viewer.