Code Monkey home page Code Monkey logo

ebl-reading's People

Contributors

jackbucinskas avatar misaim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dbrookman olnium

ebl-reading's Issues

Add non-strict output verification.

Currently output file verification is reasonably strict:

re.sub('[^0-9a-zA-Z\.,:%\-_#]+', '', ebl_file['header_3']['filename'])

We should add a new flag and a secondary regex which allows some chars through for OS's where it doesn't matter - i.e Mac OS X and Linux both allow !, ? and ' ' chars in filenames, although windows doesn't.

Could also look at replacing some strings. '/w' is used for shorthand "with", / is used for time sig's and could be "slash" or a dash.

Fix output filename replacements

Filename conversion sucks right now. I manually replace every character that I've found which is illegal on my platform (mac) and linux.

Ideally we only replace chars outside of A-Z, a-z, and 0-9.
Some exceptions are

  • # (Sharp in music notation)
  • \w (Common "with" abbreviation)
  • / (Slash? Potentially with a '-'... Used for fake filenames/folders in some old files)
  • _ Because why not
  • - For the same reason

Should log them maybe.

Fix Testing

Testing is... Lackluster. I'd like to have a stack of home-made EBL files with known WAV outputs that we can compare to.

Fix EBL Reading

EBL reading sucks presently. mono-support branch kind of improves it, but we still have problems with some headers.

I think they are smaller (or bigger... depends on audio start) than the majority of the dataset. Currently, header files are mostly assumed to be the correct size, while we do check for channel size and read the appropriate amount of bytes - this is improved on mono-support branch.

Probably we should be checking a bunch of headers (automatically) for consistency and spot patterns - like header 3 length in bytes is encoded in header 2, and the data channel sizes are encoded weirdly.

Synth KitSL001.ebl.zip

Swap to better performance monitoring

As per @jackbucinskas suggestion, we should swap to better performance monitoring i.e

start_time = time.perf_counter()
    
for i in range(10):
    print(i)
    
end_time = time.perf_counter()
execution_time = end_time - start_time
print(f"The execution time is: {execution_time}")

Byte Array Zipper Merge Optimization

In main.py we have these lines (Roughly 199 in latest version):

wav_data = b""
for i in range(0, channel_size, 2):
    wav_data += channel_1_data[i : i + 2]
    wav_data += channel_2_data[i : i + 2]

This combines two continuous sets of bytes into one like a zipper, 2 bytes at a time.

I haven't profiled it, but large files (>1mb) tend to take a while, with this as the only hold up I can see. I know it's slow - it's doing a copy every time!

Preserve Filename removes filename metadata.

When running conversions with -p (Preserve Filename) flag, the resulting output has the originals filename (with suffix as .wav).
The metadata-encoded Emulator X-3 filename is lost. Suggestions:

  • Append metadata filename to end of original filename
  • ...The opposite
  • Encode trackname within WAV file

Fix recursive_scan

From @jackbucinskas

i personally don't like so many embedded if and for loops, it makes it hard for someone to pick up the code in the future
i would suggest moving the if / for loop into a separate function with a descriptive function name

He's right, it's a bit of a mess. I was several beers deep. Needs to be re-worked.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.