Code Monkey home page Code Monkey logo

chordcalc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

chordcalc's Issues

Suggestion: game /quiz mode

Not sure how the mechanics would work, maybe choose which chords to drill, or scales, or have to identify all scale notes in some range of frets...

Investigate use of soundfonts to replace custom wav generation

I was playing around to see if javascript midi.js could be used to do midi within pythonista (answer yes... It's slow)... But came across "soundfonts" which are sampled sounds, or at least generated samples.

https://github.com/gleitz/midi-js-soundfonts/tree/master/FluidR3_GM

Here's a dirty script to download a few sounds and create a slew of mp3s. I was lazy and downloaded the single .js which contains all sounds, rather than downloading individual mp3s which might be faster since they don't need to be base64 encoded... Maybe. A better option might be to zip them up for distribution.

import json, base64, urllib,ui
instruments=['banjo','acoustic_guitar_steel','slap_bass_1']


def download_soundfont(instrument):
    print 'downloading'+instrument
    p=ui.Label()
    p.present('popover')
    def report(count,size,total):
        p.text= '{:0.0f} % complete'.format(round(100*count*size/(1.0*total)))
        p.size_to_fit()
        if not p.on_screen:
            p.present('popover')
        p.set_needs_display()
    filename=instrument+'-mp3.js'

    urllib.urlretrieve('https://raw.githubusercontent.com/gleitz/midi-js-soundfonts/master/FluidR3_GM/'+filename
                       ,filename
                       ,report)
    p.close()


    with open(instrument+'-mp3.js') as f:
        s=f.read()

    #extract the dict
    s=s[s.find('{\n'):s.find(',\n\n}')-1]+'"}'
    d=json.loads(s)

    for note,data in d.items():
        start=data.find('//')
        with open(instrument+'_'+note+'.mp3','wb') as f:
          f.write(base64.decodestring(data[start:]))


for inst in instruments:
    download_soundfont(inst)

5 string banjo tuning

Standard 5 string banjo tuning is g'DGbd.

Also. Something is strange about adding a new tuning... For 5 string banjo, the tuning shows g'DGbg', but the spinners come up as g' D G c g'. The second to last spinner shows s different value than the tuning, until that spinner is touched.

This is in devel-capo branch (is that the latest? You might want to push to master)

Consider zipping up sound fonts

Consider zipping up sound fonts, then just grabbing data over the wire once (per instrument maybe), then unzipping locally.. Opening url's is expensive, at least on a slow/lossy connection..

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.