metrasynth / radiant-voices

Work with SunVox file format tools (create, modify, read, write)
https://radiant-voices.rtfd.io/
Other
40 stars 3 forks source link

Sunvox 2.0 file format #71

Open matthewryanscott opened 2 years ago

matthewryanscott commented 2 years ago

2.0

2.1

2.1b

2.1.1

2.1.1c

2.1.2

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.48%.

Quality metrics Before After Change
Complexity 2.68 ⭐ 2.51 ⭐ -0.17 👍
Method Length 66.49 🙂 66.69 🙂 0.20 👎
Working memory 9.84 🙂 10.09 😞 0.25 👎
Quality 69.97% 🙂 69.49% 🙂 -0.48% 👎
Other metrics Before After Change
Lines 8095 8173 78
Changed files Quality Before Quality After Quality Change
src/python/genrv/codegen/python/gen.py 51.21% 🙂 50.69% 🙂 -0.52% 👎
src/python/genrv/tools/generate.py 83.23% ⭐ 83.37% ⭐ 0.14% 👍
src/python/rv/__init__.py 100.00% ⭐ 100.00% ⭐ 0.00%
src/python/rv/api.py 78.32% ⭐ 78.32% ⭐ 0.00%
src/python/rv/controller.py 84.41% ⭐ 85.16% ⭐ 0.75% 👍
src/python/rv/note.py 51.91% 🙂 50.57% 🙂 -1.34% 👎
src/python/rv/pattern.py 78.23% ⭐ 78.08% ⭐ -0.15% 👎
src/python/rv/project.py 52.98% 🙂 52.81% 🙂 -0.17% 👎
src/python/rv/chunks/array.py 84.56% ⭐ 85.35% ⭐ 0.79% 👍
src/python/rv/chunks/chunk.py 95.37% ⭐ 95.37% ⭐ 0.00%
src/python/rv/chunks/drawnwaveform.py 91.21% ⭐ 91.21% ⭐ 0.00%
src/python/rv/lib/iff.py 83.39% ⭐ 83.34% ⭐ -0.05% 👎
src/python/rv/modules/__init__.py 56.19% 🙂 55.30% 🙂 -0.89% 👎
src/python/rv/modules/amplifier.py 88.78% ⭐ 88.78% ⭐ 0.00%
src/python/rv/modules/analoggenerator.py 86.26% ⭐ 86.26% ⭐ 0.00%
src/python/rv/modules/compressor.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/dcblocker.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/delay.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/distortion.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/drumsynth.py 33.37% 😞 33.37% 😞 0.00%
src/python/rv/modules/echo.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/eq.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/feedback.py 88.78% ⭐ 88.78% ⭐ 0.00%
src/python/rv/modules/filter.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/filterpro.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/flanger.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/fm.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/generator.py 87.84% ⭐ 87.84% ⭐ 0.00%
src/python/rv/modules/glide.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/gpio.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/input.py 90.24% ⭐ 90.24% ⭐ 0.00%
src/python/rv/modules/kicker.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/lfo.py 90.24% ⭐ 90.24% ⭐ 0.00%
src/python/rv/modules/loop.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/metamodule.py 78.61% ⭐ 79.11% ⭐ 0.50% 👍
src/python/rv/modules/modulator.py 89.26% ⭐ 89.26% ⭐ 0.00%
src/python/rv/modules/module.py 74.54% 🙂 75.94% ⭐ 1.40% 👍
src/python/rv/modules/multictl.py 51.92% 🙂 51.94% 🙂 0.02% 👍
src/python/rv/modules/multisynth.py 80.56% ⭐ 80.56% ⭐ 0.00%
src/python/rv/modules/pitch2ctl.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/pitchshifter.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/reverb.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/sound2ctl.py 91.55% ⭐ 91.55% ⭐ 0.00%
src/python/rv/modules/spectravoice.py 76.59% ⭐ 76.59% ⭐ 0.00%
src/python/rv/modules/velocity2ctl.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/vibrato.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/vocalfilter.py 89.75% ⭐ 89.75% ⭐ 0.00%
src/python/rv/modules/vorbisplayer.py 92.04% ⭐ 92.04% ⭐ 0.00%
src/python/rv/modules/waveshaper.py 90.51% ⭐ 90.51% ⭐ 0.00%
src/python/rv/modules/base/adsr.py 56.88% 🙂 51.30% 🙂 -5.58% 👎
src/python/rv/modules/base/amplifier.py 88.35% ⭐ 87.19% ⭐ -1.16% 👎
src/python/rv/modules/base/analoggenerator.py 48.06% 😞 47.97% 😞 -0.09% 👎
src/python/rv/modules/base/compressor.py 83.83% ⭐ 83.83% ⭐ 0.00%
src/python/rv/modules/base/ctl2note.py 74.85% 🙂 74.85% 🙂 0.00%
src/python/rv/modules/base/dcblocker.py 91.56% ⭐ 91.56% ⭐ 0.00%
src/python/rv/modules/base/delay.py 62.26% 🙂 59.51% 🙂 -2.75% 👎
src/python/rv/modules/base/distortion.py 83.28% ⭐ 81.67% ⭐ -1.61% 👎
src/python/rv/modules/base/drumsynth.py 80.61% ⭐ 80.61% ⭐ 0.00%
src/python/rv/modules/base/echo.py 67.83% 🙂 65.65% 🙂 -2.18% 👎
src/python/rv/modules/base/eq.py 87.78% ⭐ 87.78% ⭐ 0.00%
src/python/rv/modules/base/feedback.py 90.28% ⭐ 90.28% ⭐ 0.00%
src/python/rv/modules/base/filter.py 60.47% 🙂 60.47% 🙂 0.00%
src/python/rv/modules/base/filterpro.py 59.15% 🙂 58.61% 🙂 -0.54% 👎
src/python/rv/modules/base/flanger.py 75.54% ⭐ 75.54% ⭐ 0.00%
src/python/rv/modules/base/fm.py 74.39% 🙂 74.39% 🙂 0.00%
src/python/rv/modules/base/generator.py 75.10% ⭐ 75.10% ⭐ 0.00%
src/python/rv/modules/base/glide.py 89.83% ⭐ 89.83% ⭐ 0.00%
src/python/rv/modules/base/gpio.py 89.53% ⭐ 89.53% ⭐ 0.00%
src/python/rv/modules/base/input.py 90.28% ⭐ 90.28% ⭐ 0.00%
src/python/rv/modules/base/kicker.py 81.94% ⭐ 81.94% ⭐ 0.00%
src/python/rv/modules/base/lfo.py 51.25% 🙂 48.69% 😞 -2.56% 👎
src/python/rv/modules/base/loop.py 82.62% ⭐ 60.39% 🙂 -22.23% 👎
src/python/rv/modules/base/metamodule.py 65.65% 🙂 65.29% 🙂 -0.36% 👎
src/python/rv/modules/base/modulator.py 84.55% ⭐ 84.55% ⭐ 0.00%
src/python/rv/modules/base/multictl.py 55.56% 🙂 55.56% 🙂 0.00%
src/python/rv/modules/base/multisynth.py 51.81% 🙂 51.81% 🙂 0.00%
src/python/rv/modules/base/output.py 99.00% ⭐ 99.00% ⭐ 0.00%
src/python/rv/modules/base/pitch2ctl.py 79.97% ⭐ 79.97% ⭐ 0.00%
src/python/rv/modules/base/pitchdetector.py 66.91% 🙂 66.91% 🙂 0.00%
src/python/rv/modules/base/pitchshifter.py 79.18% ⭐ 79.18% ⭐ 0.00%
src/python/rv/modules/base/reverb.py 80.78% ⭐ 80.78% ⭐ 0.00%
src/python/rv/modules/base/sampler.py 55.51% 🙂 54.81% 🙂 -0.70% 👎
src/python/rv/modules/base/sound2ctl.py 67.83% 🙂 67.83% 🙂 0.00%
src/python/rv/modules/base/spectravoice.py 94.18% ⭐ 94.18% ⭐ 0.00%
src/python/rv/modules/base/velocity2ctl.py 86.13% ⭐ 86.13% ⭐ 0.00%
src/python/rv/modules/base/vibrato.py 67.27% 🙂 67.27% 🙂 0.00%
src/python/rv/modules/base/vocalfilter.py 79.57% ⭐ 68.94% 🙂 -10.63% 👎
src/python/rv/modules/base/vorbisplayer.py 86.72% ⭐ 86.72% ⭐ 0.00%
src/python/rv/modules/base/waveshaper.py 63.08% 🙂 63.08% 🙂 0.00%
src/python/rv/readers/module.py 85.37% ⭐ 85.39% ⭐ 0.02% 👍
src/python/rv/readers/pattern.py 96.14% ⭐ 96.14% ⭐ 0.00%
src/python/rv/readers/sunvox.py 81.48% ⭐ 81.76% ⭐ 0.28% 👍
src/python/rv/tools/patch_decompiler.py 61.92% 🙂 61.85% 🙂 -0.07% 👎
tests/python/reader/test_empty.py 82.20% ⭐ 81.42% ⭐ -0.78% 👎
tests/python/readwrite/project/test_empty_project.py 86.35% ⭐ 85.53% ⭐ -0.82% 👎
tests/python/readwrite/project/test_single_fm.py 55.57% 🙂 55.57% 🙂 0.00%
tests/python/readwrite/synth/test_amplifier.py 90.14% ⭐ 89.23% ⭐ -0.91% 👎
tests/python/readwrite/synth/test_analog_generator.py 64.99% 🙂 64.05% 🙂 -0.94% 👎
tests/python/readwrite/synth/test_compressor.py 89.99% ⭐ 89.99% ⭐ 0.00%
tests/python/readwrite/synth/test_dc_blocker.py 95.69% ⭐ 95.69% ⭐ 0.00%
tests/python/readwrite/synth/test_delay.py 87.91% ⭐ 86.21% ⭐ -1.70% 👎
tests/python/readwrite/synth/test_distortion.py 90.90% ⭐ 90.90% ⭐ 0.00%
tests/python/readwrite/synth/test_drum_synth.py 84.60% ⭐ 84.60% ⭐ 0.00%
tests/python/readwrite/synth/test_echo.py 90.29% ⭐ 87.62% ⭐ -2.67% 👎
tests/python/readwrite/synth/test_filter.py 82.22% ⭐ 82.22% ⭐ 0.00%
tests/python/readwrite/synth/test_filter_pro.py 80.28% ⭐ 80.28% ⭐ 0.00%
tests/python/readwrite/synth/test_flanger.py 86.77% ⭐ 86.77% ⭐ 0.00%
tests/python/readwrite/synth/test_generator.py 86.47% ⭐ 86.47% ⭐ 0.00%
tests/python/readwrite/synth/test_glide.py 91.21% ⭐ 91.21% ⭐ 0.00%
tests/python/readwrite/synth/test_kicker.py 88.35% ⭐ 88.35% ⭐ 0.00%
tests/python/readwrite/synth/test_loop.py 91.21% ⭐ 87.34% ⭐ -3.87% 👎
tests/python/readwrite/synth/test_metamodule.py 72.22% 🙂 73.80% 🙂 1.58% 👍
tests/python/readwrite/synth/test_multictl.py 80.83% ⭐ 80.83% ⭐ 0.00%
tests/python/readwrite/synth/test_multisynth.py 80.66% ⭐ 83.41% ⭐ 2.75% 👍
tests/python/readwrite/synth/test_pitch2ctl.py 89.38% ⭐ 89.38% ⭐ 0.00%
tests/python/readwrite/synth/test_sampler.py 54.73% 🙂 54.69% 🙂 -0.04% 👎
tests/python/readwrite/synth/test_sound2ctl.py 89.23% ⭐ 89.23% ⭐ 0.00%
tests/python/readwrite/synth/test_spectravoice.py 80.13% ⭐ 80.13% ⭐ 0.00%
tests/python/readwrite/synth/test_vocal_filter.py 89.38% ⭐ 81.17% ⭐ -8.21% 👎
tests/python/readwrite/synth/test_vorbis_player.py 90.90% ⭐ 90.90% ⭐ 0.00%

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
src/python/rv/tools/patch_decompiler.py module_layout 21 😞 428 ⛔ 23.60% ⛔ Refactor to reduce nesting. Try splitting into smaller methods
src/python/rv/modules/multictl.py MultiCtl.macro 15 🙂 281 ⛔ 20 ⛔ 27.55% 😞 Try splitting into smaller methods. Extract out complex expressions
src/python/rv/project.py Project.chunks 21 😞 445 ⛔ 9 🙂 34.04% 😞 Refactor to reduce nesting. Try splitting into smaller methods
src/python/rv/note.py Note.tabular_repr 15 🙂 206 ⛔ 15 😞 36.03% 😞 Try splitting into smaller methods. Extract out complex expressions
src/python/rv/project.py Project.connect 24 😞 191 😞 10 😞 38.55% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

TheTechRobo commented 1 year ago

What is rv._vendor supposed to contain and how does its Chunk implementation differ from the chunk module? (Or is it just because the chunk module is deprecated?) It appears to be missing.

matthewryanscott commented 1 year ago

What is rv._vendor supposed to contain and how does its Chunk implementation differ from the chunk module? (Or is it just because the chunk module is deprecated?) It appears to be missing.

@TheTechRobo The chunk module is being removed in Python 3.13 which is why it was vendorized in this branch. That was an oversight on my part, forgetting to add the file to the commit. If you copy the stdlib's chunk module to src/python/rv/_vendor it should work fine.

Please note: This repo is unmaintained nowadays due to lack of opportunities to work on it consistently, so I won't be fixing this any time soon. I haven't yet archived it on GitHub but I did just update the description to warn future readers.