Giter VIP home page Giter VIP logo

typepiano's Introduction

TypePiano

Play a piano as you type. Convert your computer keyboard into a musical keyboard.

What is it?

An app that runs in the background and generates specific music notes for different keystroke combinations.

Why is it?

This application is based on Virtual Piano.

Most similar music apps generate a sound that have exponential or cosine frequency responce. This is one of the rare ones who's notes follow a time-varying gaussian curve.

In human language; it sounds very close to the real thing. Hence, this application has 3 major purpose,

  1. Preserve the original project.
  2. Make it offline.
  3. Plug headphones in your school/college/office and play paino while pretending to work.

How does it work?

The project uses JNativeHook that leverages platform-dependent native code to create low-level system-wide hooks. These hooks capture your keystrokes no matter what application is currently running and is in focus.

Different key combinations are assigned a note, that is played via one of the implimented Player implimentation.

Using Locally

If you want to run this project locally,

Requirements

  1. Java 7 or above
  2. Windows 7,8 or 10

Build

For the first download/clone of this repo,

  1. Import the JPlay3 folder as a Java project using your IDE (Eclipse/Netbeans).
  2. If the IDE does not detect the lib folder, then add its contents as external jars.
  3. Add "resources" folder as a Source. In Eclipse: Project -> Properties -> Java Build Path -> Source -> Add Folder

Run

To directly use it.

  1. Download the jar from latest release.
  2. Double click the jar. This will start the app in background (You can check this under processes in TaskManager).
  3. Press a key anywhere, to hear a sound.
  4. To stop the app. Press F9 key.

Changing Player

The current application has support for 4 different players. The TinyPlayer is used by default.

To modify this,

  1. Check the currently supported players in Players.java
public enum Players {
	CLIP_PLAYER (ClipPlayer.class, Extension.WAV),
	JFX_PLAYER (JfxPlayer.class, Extension.MP3),
	JACO_PLAYER (JaCoPlayer.class, Extension.MP3),
	TINY_PLAYER (TinyPlayer.class, Extension.WAV);
  ...
 }
  1. Open the file TypePiano.java.
  2. Update the player passed to Conductor.
Conductor mainConductor = new Conductor(Players.TINY_PLAYER);
  1. Build the project.

Key Map

The current version has keys 0-9 and A-Z mapped to the piano. Additinally, the sharp notes (the black keys in the piano) can be played by pressing Shift+Key.

The current version covers 3 and a half octaves as seen below.

Known Issues

  • Using MP3 files has latency but they are very small in size for the same quality. Currently using WAV format instead.
  • The CLIP_PLAYER misses notes.
  • The TINY_PLAYER gives jitters sometimes.

Licence

Licenced under GNU GENERAL PUBLIC LICENSE v3.0. It is free to copy and distribute.

typepiano's People

Contributors

saurabh-parihar avatar ssp5zone avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

geolle

typepiano's Issues

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.