Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests/testTrack,testOld files #1

Open
Quefumas opened this issue Oct 1, 2020 · 3 comments
Open

Fix tests/testTrack,testOld files #1

Quefumas opened this issue Oct 1, 2020 · 3 comments
Labels
good first issue Good for newcomers

Comments

@Quefumas
Copy link
Owner

Quefumas commented Oct 1, 2020

  • fix dependencies directory structure
  • ensure things still compile
@Quefumas Quefumas added the good first issue Good for newcomers label Oct 1, 2020
@zivkaplan
Copy link
Contributor

Hi,
I want to help with this issue.

For a start I took testTrack.py file.

  1. Change the example wav file to Kushaura. Do you want me to find some clean guitar sample to add for the amp test? or everything can and should be done with Kushaura?

  2. Organise imports, update names and delete the unused. on that subject: LowPassBasic and Butterworth are missing in Gensound current version. Do they have new names?

  3. update as such:

# --- current ---
def IIR_basic_test():
    s = WAV(african)[10e3:20e3]
    s[5e3:] *= IIR_basic() # y(n) = 0.3*x(n) + 0.7*y(n-1)
    audio = s.mixdown(sample_rate=44100, byte_width=2, max_amplitude=0.2)
    # play_Audio(audio)
    export_test(audio, IIR_basic_test)

# --- updated? ---
def IIR_general_test():
    audio = WAV(kushaura)[10e3:20e3]
    audio[3e3:] *= IIR_general([0,  -0.5,0,0],
                           [0.25, 0.15,0.07,0.03])
    audio.play(sample_rate=44100, byte_width=2, max_amplitude=0.2)
    export_test(audio, IIR_general_test)

Did I understand correctly?

@Quefumas
Copy link
Owner Author

I'd like to eventually migrate all of the content in tests/* to be examples in the wiki.

  • Some snippets are cool and just need to be cleaned up and kept up to date (this means the sample wave needs to be renamed consistently to test_wav too).
  • Some (many?) can be removed, since they don't show any interesting functionality. For example, IIR_basic_test just isn't relevant anymore, the IIR class is official and documented, this example doesn't do anything interesting with it.
  • Some use features which are experimental and/or haven't been fully documented yet (anything to do with parametrization; the guitar amp is experimental also).

Probably the 1st step would be to sift through them and decide which is which, delete everything which is not relevant and start fixing the rest, later moving it into the wiki. Examples of the 3rd case would be dealt with on a case-by-case basis, I guess.

@Quefumas
Copy link
Owner Author

Also, in particular for LowPassBasic, Butterworth, these are filters that will probably be available in the future. If the examples using them are doing anything interesting then we can perhaps trade them for the filters that were added in 0.4 and keep the snippet, if it's just testing to see that the transform is working, well, we can just get rid of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants