Coder Social home page Coder Social logo

Comments (12)

aureliet avatar aureliet commented on May 30, 2024 1

For the problem I mentionned before, problem solved . Just change theses cases :

case "Add2" :
           note2 = note1+2;
           note3 = note1+4;
           note4 = note1+7;
           break;

       case "Addm2" :
           note2 = note1+1;
           note3 = note1+4;
           note4 = note1+7;
           break;

       case "Addm3" :
           note2 = note1+3;
           note3 = note1+4;
           note4 = note1+7;
           break;

from piano.

felipefialho avatar felipefialho commented on May 30, 2024

Uhmmmm

Maybe you can create a triggers to simulate click on keys...

from piano.

developez avatar developez commented on May 30, 2024

i am thinking to make chords programatically, do you think that is possible??

from piano.

felipefialho avatar felipefialho commented on May 30, 2024

I think yes.

But I don't have imagined it when I've created this project.

from piano.

developez avatar developez commented on May 30, 2024

By the momento firing click does not work:

$($("li.key")[1]).click();

I suppose that to fire the event that plays the sound will be enough

from piano.

felipefialho avatar felipefialho commented on May 30, 2024

The correct approach is

$("li.key:nth-child(2) > .black-key").trigger('click'); or $("li.key:nth-child(2) > .white-key").trigger('click');

from piano.

developez avatar developez commented on May 30, 2024

that sounds on you machine???

from piano.

felipefialho avatar felipefialho commented on May 30, 2024

Not, it's weird.

I need to test again later.

from piano.

aureliet avatar aureliet commented on May 30, 2024

Hello from France :)
You think about making chords, like this ? http://www.pianochord.org/

I would be very interested to. And I would be interested to contribute to it.
The other day, I just made a simple keyboard on my Codepen, but it isn't as good as yours.

from piano.

felipefialho avatar felipefialho commented on May 30, 2024

Hi @aureliet. This is an old project (since 2013), but I want to update it.

I like any suggestion to improve piano and I am open to PR's accepts 😹

Thanks!

from piano.

aureliet avatar aureliet commented on May 30, 2024

Hello @lfeh !

My code can be better, I think, but now we can have the chords.

Can I propose the app to a music school?
They won't pay me for it. Maybe one free piano lesson but that's all. They would be interested to use it on their website for their students.

dev.zip

Edit :
in the index.html :
Now we have data-number on the spans. From this, we can calculate the chords.
And we have two selects, to get the different chords variations.

in the _general.js :
The js I added to make chords

And... we will have to add notes, because from the A# to the end, we don't have enough...

from piano.

felipefialho avatar felipefialho commented on May 30, 2024

Hey @developez, check if it works now?

from piano.

Related Issues (14)

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.