Skip to content

Commit

Permalink
audio loop from realgsm
Browse files Browse the repository at this point in the history
  • Loading branch information
deleolajide committed Oct 24, 2024
1 parent 83cf8aa commit 7c4ae6b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Summary
<img src=https://jus-be.github.io/orin-ayo/assets/orinayo.png>

Orin Ayo is an Arranger/Looper Controller.
Orin Ayo is a Guitar Arranger.

It was originally developed to turn a guitar games controller HID device into a chord based MIDI controller for an arranger keyboard, module, looper, device or application. It lets you play chords and control the arranger or looper with the buttons on a gutar games controller.

Expand Down
Binary file added docs/assets/chords/funk_96_10000_10000_2.chord
Binary file not shown.
15 changes: 15 additions & 0 deletions docs/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ var rgIndex = 0;
var nextRgIndex = 0;
var styleStarted = false;
var activeChord = null;
var forwardChord = null;
var arrChordType = "maj";
var guitarAvailable = false;
var firstChord = [base, base + 4, base + 7];
Expand Down Expand Up @@ -4029,6 +4030,17 @@ function playChord(chord, root, type, bass) {
{
if (gamePadModeButton.innerText != "Color Tabs") {
midiRealGuitar.playNote(chord, 1, {velocity: getVelocity()});
} else {
forwardChord = [];
if (pad.buttons[GREEN]) forwardChord.push(127);
if (pad.buttons[RED]) forwardChord.push(126);
if (pad.buttons[YELLOW]) forwardChord.push(125);
if (pad.buttons[BLUE]) forwardChord.push(124);
if (pad.buttons[ORANGE]) forwardChord.push(123);
if (pad.axis[STRUM] == STRUM_UP) forwardChord.push(122);
if (pad.axis[STRUM] == STRUM_DOWN) forwardChord.push(121);

if (forwardChord.length > 0) midiRealGuitar.playNote(forwardChord, 1, {velocity: getVelocity()});
}
}
}
Expand Down Expand Up @@ -4430,6 +4442,9 @@ function stopChord() {
{
if (gamePadModeButton.innerText != "Color Tabs") {
midiRealGuitar.stopNote(activeChord, 1);
} else if (forwardChord) {
midiRealGuitar.stopNote(forwardChord, 1);
forwardChord = null;
}
}

Expand Down
3 changes: 2 additions & 1 deletion docs/js/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ var chord_loops = [
"assets/chords/electro-jazz_90_10667.chord",
"assets/chords/fender-strum_120_4000.chord",
"assets/chords/folk_114_16842.chord",
"assets/chords/funk_90_10667.chord",
"assets/chords/funk_90_10667.chord",
"assets/chords/funk_96_10000_10000_2.chord",
"assets/chords/funk_100_24000.chord",
"assets/chords/funk_105_22857.chord",
"assets/chords/funk_113_16991.chord",
Expand Down
4 changes: 2 additions & 2 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"manifest_version": 3,
"name": "OrinAyo",
"short_name": "OrinAyo",
"description": "Convert a Logitech Guitar Hero controller into an Arranger",
"version": "0.9.3",
"description": "The Guitar Arranger",
"version": "0.9.4",

"background": {
"service_worker": "./js/background.js"
Expand Down

0 comments on commit 7c4ae6b

Please sign in to comment.