Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Feb 26, 2022
0 parents commit 3b21e01
Show file tree
Hide file tree
Showing 164 changed files with 16,697 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/.git
/.github
/.wordpress-org
/node_modules
/vendor
.distignore
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.prettierrc.js
.stylelintignore
.stylelintrc.js
.wp-env.json
composer.json
composer.lock
package-lock.json
package.json
phpcs.ruleset.xml
README.md
tsconfig.json
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 2
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
vendor/
build/
24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
extends: [
'plugin:@wordpress/eslint-plugin/recommended',
'plugin:@typescript-eslint/eslint-recommended',
],
parser: '@typescript-eslint/parser',
rules: {
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off',
'@wordpress/no-unsafe-wp-apis': 'off',
'no-nested-ternary': 'off',
'prettier/prettier': [
'error',
{
useTabs: true,
tabWidth: 2,
singleQuote: true,
printWidth: 100,
bracketSpacing: true,
parenSpacing: true,
},
],
},
};
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.vscode
node_modules/
vendor/
build/
.wp-env.override.json
11 changes: 11 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
...require( '@wordpress/prettier-config' ),
semi: true,
useTabs: true,
tabWidth: 2,
singleQuote: true,
printWidth: 100,
bracketSpacing: true,
parenSpacing: true,
parser: 'typescript'
}
8 changes: 8 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules/
build/
vendor/
*.js
*.ts
*.tsx
*.xml
*.md
11 changes: 11 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
extends: [
'@wordpress/stylelint-config/scss',
'stylelint-config-recess-order',
],
rules: {
"no-descending-specificity": null,
"font-weight-notation": null,
"selector-class-pattern": null,
}
}
Binary file added .wordpress-org/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"core": null,
"plugins": [ "." ],
"config": {
"WP_DEBUG": true
}
}
339 changes: 339 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Piano Block

![Piano Block](https://raw.githubusercontent.com/t-hamano/piano-block/main/.wordpress-org/banner-1544x500.png)

"Piano Block" is a WordPress custom block plugin that allows you to play a variety of tones using the piano keyboard on the block editor.

## Features

- 14 instruments
- Realistic sound based on sound sources sampled from actual instruments
- Variable volume, switchable octave pitch and sustain pedal status

## How to build

```
$ npm install
$ npm run build
```

## Resources, Audio Samples

### Web Audio framework (Tone.js)
* License: MIT License
* Source: https://github.com/Tonejs/Tone.js/

### Splendid Grand Piano (Acoustic Piano)
* License: Public Domain
* Source: https://github.com/sfzinstruments/SplendidGrandPiano

### Greg Sullivan's E-Pianos (Electric Piano 1, 2)
* License: CC-BY-3.0
* Source: https://github.com/sfzinstruments/GregSullivan.E-Pianos

### tonewheel organ sound samples by hammondman (Organ)
* License: CC0-1.0
* Source: https://freesound.org/people/hammondman/packs/18844/

### Shinyguitar by Karoryfer Samples (Electric Guitar, Acoustic Guitar)
* License: CC-BY-4.0
* Source: https://github.com/sfzinstruments/karoryfer.shinyguitar

### Pastabass by Karoryfer Samples (Electric Bass)
* License: CC-BY-4.0
* Source: https://github.com/sfzinstruments/karoryfer.pastabass

### Meatbass by Karoryfer Samples (Acoustic Bass)
* License: CC-BY-4.0
* Source: https://github.com/sfzinstruments/karoryfer.meatbass

### Bear Sax by Karoryfer Samples (Sax)
* License: CC-BY-4.0
* Source: https://github.com/sfzinstruments/karoryfer.bear-sax

### VS Chamber Orchestra (Flute, Harp, Muted Trumpet, Violin, Xylophone)
* License: CC0-1.0
* Source: https://github.com/sgossner/VSCO-2-CE

### SVG Repo (Block Icon)
* License: CC0
* Source: https://www.svgrepo.com/svg/47923/piano-keys-part

### Free SVG (Block Background Image)
* License: Public Domain
* Source: https://freesvg.org/wg-3

### Gooogle Fonts (Banner Font)
* License: Apache License 2.0
* Source: https://fonts.google.com/specimen/Yellowtail

## Author

[Tetsuaki Hamano (Github)](https://github.com/t-hamano)
Binary file added assets/block_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/instruments/acoustic-bass/A1.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-bass/A2.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-bass/A3.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-bass/C1.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-bass/C2.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-bass/C3.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-bass/C4.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-bass/Ds1.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-bass/Ds2.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-bass/Ds3.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-bass/Fs1.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-bass/Fs2.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-bass/Fs3.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-guitar/A2.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-guitar/A3.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-guitar/A4.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-guitar/A5.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-guitar/C3.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-guitar/C4.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-guitar/C5.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-guitar/C6.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-guitar/Cs2.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-piano/A1.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-piano/A2.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-piano/A3.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-piano/A4.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-piano/A5.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-piano/A6.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-piano/D2.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-piano/D3.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-piano/D4.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-piano/D5.mp3
Binary file not shown.
Binary file added assets/instruments/acoustic-piano/D6.mp3
Binary file not shown.
Binary file added assets/instruments/electric-bass/Cs1.mp3
Binary file not shown.
Binary file added assets/instruments/electric-bass/Cs2.mp3
Binary file not shown.
Binary file added assets/instruments/electric-bass/Cs3.mp3
Binary file not shown.
Binary file added assets/instruments/electric-bass/Cs4.mp3
Binary file not shown.
Binary file added assets/instruments/electric-bass/G1.mp3
Binary file not shown.
Binary file added assets/instruments/electric-bass/G2.mp3
Binary file not shown.
Binary file added assets/instruments/electric-bass/G3.mp3
Binary file not shown.
Binary file added assets/instruments/electric-guitar/A2.mp3
Binary file not shown.
Binary file added assets/instruments/electric-guitar/A3.mp3
Binary file not shown.
Binary file added assets/instruments/electric-guitar/A4.mp3
Binary file not shown.
Binary file added assets/instruments/electric-guitar/A5.mp3
Binary file not shown.
Binary file added assets/instruments/electric-guitar/C3.mp3
Binary file not shown.
Binary file added assets/instruments/electric-guitar/C4.mp3
Binary file not shown.
Binary file added assets/instruments/electric-guitar/C5.mp3
Binary file not shown.
Binary file added assets/instruments/electric-guitar/C6.mp3
Binary file not shown.
Binary file added assets/instruments/electric-guitar/Cs2.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-1/A1.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-1/A2.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-1/A3.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-1/A4.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-1/A5.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-2/A1.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-2/B2.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-2/C2.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-2/Cs4.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-2/Cs5.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-2/E3.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-2/E4.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-2/F2.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-2/G4.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-2/G5.mp3
Binary file not shown.
Binary file added assets/instruments/electric-piano-2/Gs3.mp3
Binary file not shown.
Binary file added assets/instruments/flute/A4.mp3
Binary file not shown.
Binary file added assets/instruments/flute/A5.mp3
Binary file not shown.
Binary file added assets/instruments/flute/A6.mp3
Binary file not shown.
Binary file added assets/instruments/flute/C4.mp3
Binary file not shown.
Binary file added assets/instruments/flute/C5.mp3
Binary file not shown.
Binary file added assets/instruments/flute/C6.mp3
Binary file not shown.
Binary file added assets/instruments/flute/E4.mp3
Binary file not shown.
Binary file added assets/instruments/flute/E5.mp3
Binary file not shown.
Binary file added assets/instruments/flute/E6.mp3
Binary file not shown.
Binary file added assets/instruments/harp/A2.mp3
Binary file not shown.
Binary file added assets/instruments/harp/A6.mp3
Binary file not shown.
Binary file added assets/instruments/harp/B3.mp3
Binary file not shown.
Binary file added assets/instruments/harp/C5.mp3
Binary file not shown.
Binary file added assets/instruments/harp/D2.mp3
Binary file not shown.
Binary file added assets/instruments/harp/D6.mp3
Binary file not shown.
Binary file added assets/instruments/harp/E3.mp3
Binary file not shown.
Binary file added assets/instruments/harp/F4.mp3
Binary file not shown.
Binary file added assets/instruments/harp/G5.mp3
Binary file not shown.
Binary file added assets/instruments/muted-trumpet/A5.mp3
Binary file not shown.
Binary file added assets/instruments/muted-trumpet/As3.mp3
Binary file not shown.
Binary file added assets/instruments/muted-trumpet/As4.mp3
Binary file not shown.
Binary file added assets/instruments/muted-trumpet/C4.mp3
Binary file not shown.
Binary file added assets/instruments/muted-trumpet/D5.mp3
Binary file not shown.
Binary file added assets/instruments/muted-trumpet/Ds4.mp3
Binary file not shown.
Binary file added assets/instruments/muted-trumpet/F5.mp3
Binary file not shown.
Binary file added assets/instruments/muted-trumpet/Gs4.mp3
Binary file not shown.
Binary file added assets/instruments/organ/C3.mp3
Binary file not shown.
Binary file added assets/instruments/organ/C4.mp3
Binary file not shown.
Binary file added assets/instruments/organ/C5.mp3
Binary file not shown.
Binary file added assets/instruments/organ/G2.mp3
Binary file not shown.
Binary file added assets/instruments/organ/G3.mp3
Binary file not shown.
Binary file added assets/instruments/organ/G4.mp3
Binary file not shown.
Binary file added assets/instruments/organ/G5.mp3
Binary file not shown.
Binary file added assets/instruments/sax/As2.mp3
Binary file not shown.
Binary file added assets/instruments/sax/As3.mp3
Binary file not shown.
Binary file added assets/instruments/sax/Cs2.mp3
Binary file not shown.
Binary file added assets/instruments/sax/Cs3.mp3
Binary file not shown.
Binary file added assets/instruments/sax/Cs4.mp3
Binary file not shown.
Binary file added assets/instruments/sax/E2.mp3
Binary file not shown.
Binary file added assets/instruments/sax/E3.mp3
Binary file not shown.
Binary file added assets/instruments/sax/E4.mp3
Binary file not shown.
Binary file added assets/instruments/sax/G2.mp3
Binary file not shown.
Binary file added assets/instruments/sax/G3.mp3
Binary file not shown.
Binary file added assets/instruments/sax/G4.mp3
Binary file not shown.
Binary file added assets/instruments/violin/A3.mp3
Binary file not shown.
Binary file added assets/instruments/violin/A4.mp3
Binary file not shown.
Binary file added assets/instruments/violin/A5.mp3
Binary file not shown.
Binary file added assets/instruments/violin/A6.mp3
Binary file not shown.
Binary file added assets/instruments/violin/C4.mp3
Binary file not shown.
Binary file added assets/instruments/violin/C5.mp3
Binary file not shown.
Binary file added assets/instruments/violin/C6.mp3
Binary file not shown.
Binary file added assets/instruments/violin/E4.mp3
Binary file not shown.
Binary file added assets/instruments/violin/E5.mp3
Binary file not shown.
Binary file added assets/instruments/violin/E6.mp3
Binary file not shown.
Binary file added assets/instruments/xylophone/C5.mp3
Binary file not shown.
Binary file added assets/instruments/xylophone/C6.mp3
Binary file not shown.
Binary file added assets/instruments/xylophone/C7.mp3
Binary file not shown.
Binary file added assets/instruments/xylophone/G4.mp3
Binary file not shown.
Binary file added assets/instruments/xylophone/G5.mp3
Binary file not shown.
Binary file added assets/instruments/xylophone/G6.mp3
Binary file not shown.
Binary file added assets/instruments/xylophone/G7.mp3
Binary file not shown.
18 changes: 18 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "t-hamano/piano-block",
"description": "WordPress Plugin",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Tetsuaki Hamano"
}
],
"require-dev": {
"squizlabs/php_codesniffer": "*",
"wp-coding-standards/wpcs": "*"
},
"scripts": {
"phpcs": "phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs",
"lint": "phpcs ./ --standard=./phpcs.ruleset.xml"
}
}
116 changes: 116 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3b21e01

Please sign in to comment.