Git Product home page Git Product logo

aposynthese's People

Contributors

dependabot[bot] avatar momonala avatar

Stargazers

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

Watchers

 avatar

Forkers

knalavadi bniss

aposynthese's Issues

get rid of video creation

this is a big ticket. I would like to to not create the video with the Decomposer class. Instead it should only decompose a song into its spectrogram, chromogram, and a 3rd matrix of size (88, 128, 25*t), where 88=number of keyboard keys, 128 is the amplitude range, and t is the number of seconds (so 25fps). This matrix can be json serialized and sent as a HTTP response to a front end software for visualization.

The idea is that the intermediate matrix of the keyboard visualization is the largest memory in object (several GB), and the computation of filling this matrix plus the build movie step is quite time expensive. This can all be pushed to a separate process on the client side to speed up the entire request.

resize issue

Solve: WARNING:root:IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=16, resizing from (536, 960) to (544, 960) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to None (risking incompatibility). You may also see a FFMPEG warning concerning speedloss due to data not being aligned.

Issue cause because of approximation below, where self.width_full no longer divisuble by 16, which is needed for compatibility with most video codecs.

 # sizes and variables for genreating full frame visualization
        num_time_steps_in_1_sec = int(self.t_final / (self.stop_time or self.duration))
        stretch_vec_factor = int((self.width_full - self.keyboard_width) / num_time_steps_in_1_sec)
        self.piano_roll_width = num_time_steps_in_1_sec * stretch_vec_factor
        self.width_full = self.keyboard_width+self.piano_roll_width  # update full frame size to approximated

udpate freqs.csv to avoid redundant column formatting

The following can be precomputed and stored to disk

    freqs['Helmholtzname'] = freqs.Helmholtzname.apply(lambda x: x.replace('′', ''))
    freqs['Helmholtzname'] = freqs.Helmholtzname.apply(lambda x: x.replace('͵', ''))
    freqs['Helmholtzname'] = freqs.Helmholtzname.apply(lambda x: x.split(' ')[0])
    freqs['Helmholtzname'] = freqs.Helmholtzname.apply(lambda x: x.upper())
    freqs['Frequency (Hz)'] = freqs['Frequency (Hz)'].astype(np.float16)
    freqs['Keynumber'] = freqs['Keynumber'].astype(np.uint8)
    freqs = freqs[freqs.Keynumber <= 88]
    freqs = freqs.sort_values('Keynumber', ascending=False)
    freqs.index = range(1, 89)

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.