diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md new file mode 100644 index 0000000..1361e12 --- /dev/null +++ b/src/CHANGELOG.md @@ -0,0 +1,18 @@ +# Changelog + +Based on KeepAChangelog. +Generated by **Documatic.** + +## Unreleased + +### Added + +* Files via upload + +### Changed + +* Readme.md + +### Removed + +* .replit diff --git a/src/DearDiary/.gitignore b/src/DearDiary/.gitignore new file mode 100644 index 0000000..af4a771 --- /dev/null +++ b/src/DearDiary/.gitignore @@ -0,0 +1,28 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +/shared +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +.now +.local diff --git a/src/DearDiary/.prettierrc.js b/src/DearDiary/.prettierrc.js new file mode 100644 index 0000000..9847dbd --- /dev/null +++ b/src/DearDiary/.prettierrc.js @@ -0,0 +1,7 @@ +// prettier.config.js or .prettierrc.js +module.exports = { + trailingComma: 'es5', + tabWidth: 2, + singleQuote: true, + printWidth: 120, +}; diff --git a/src/DearDiary/LICENSE b/src/DearDiary/LICENSE new file mode 100644 index 0000000..54bc437 --- /dev/null +++ b/src/DearDiary/LICENSE @@ -0,0 +1,8 @@ +Copyright 2020 Stephen Haney, Suyash Joshi, Devin Lane + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/src/DearDiary/README.md b/src/DearDiary/README.md new file mode 100644 index 0000000..f4dfc0a --- /dev/null +++ b/src/DearDiary/README.md @@ -0,0 +1,107 @@ +# Turn your journal into music + +## [DearDiary.ai](https://deardiary.ga/) + + +--- + +Illustration of a peaceful tree, leaning to the left, with birds flying away + +## Why use it? + +We want you to journal and to feel better. [Studies](https://pubmed.ncbi.nlm.nih.gov/23790815/) [show](https://pubmed.ncbi.nlm.nih.gov/16942980/) that journaling increases mindfulness and alleviates stress, anxiety, and depression. + +We also want you to create music. Like journaling, the mental health benefits of creating music are [well-documented](https://www.sciencedirect.com/science/article/abs/pii/S0272735809000026). And music is awesome. + +## How it works + +**Sentiment Analysis** +As you type each word, we perform sentiment analysis using the popular natural language processing library VADER.js. This returns a prediction score from -1.0 to +1.0, that we interpret as a sentiment along the spectrum of negative to neutral to positive. + +**Music Creation using Magenta** +We use Google’s Magenta MusicVAE pre-trained model to interpolate between two pre-composed melodies—one happy, one sad—created by our teammate Devin Lane who has a background in music composition and education. As you type, our app creates new music that lives in the latent space of the emotion spectrum between happy, neutral, and sad based on our sentiment analysis. + +**Visuals and a e s t h e t i c** +We opt for minimal and calming design because we want people to freely express their thoughts and feelings. We animate an SVG tree with leaves and birds by covering parts of the image with white squares that we dynamically remove as the user types. + +**Playfulness and Creativity** +We build in Easter eggs to encourage playfulness and creativity. The music changes with punctuation, special characters, upper case, and deleting. Try strong emotion words to see what you can create! + +**Playback and social sharing** +We save entries using Google Firestore for realtime persistence so that users can save, share, and replay the exact song they create. We integrate "share to Twitter" and "share as a link" functionality. + +## What is exciting and useful about this project? + +**Artistic and musical considerations**: Expanding the boundaries of user-generated art informed by AI trained on creative musicians' compositions. + +**Music education and empowerment**: more people feel that—yes—they can create music. + +**Mindfulness, mental health, emotional awareness**: A soothing, engaging return to the self. A recharge in the deluge of a storm. + +**Coping during 2020**: Traumatic events abound—COVID-19, reckoning with social and racial justice, natural disasters, political division—we offer a moment to come into deeper awareness with your emotions. This radical self-compassion is an important step in societal transformation. + +## Challenges we ran into, what we learned, and what we're proud of + +**NLP sentiment score** is a limited metric for gauging emotion of text. We were hoping to find a multi-dimensional emotion library, but there are only a few available and they're all paid services. It would be a great open source project to build an detailed emotion NLP API that runs in the browser and is accessible to scrappy teams. + +**Music**: writing melodies that were contrasted enough to convey different emotions, yet similar enough to create musically-satisfying interpolations. Lots of trial and error with very dissonant AI interpolations between the compositions. + +**Playback**: Engineered advanced custom diffing solution to playback exact melody snapshot of user activity and implemented state management system to accurately play back each note character by character. + +**Browser compatibility**: Extensive testing and bug resolution for Chrome, Firefox, Safari, MacOS, Windows, and iOS. + +## What's next for Dear Diary + +- Increase dialogue with mental health professionals for maximum emotional benefit and enjoyment for users + +- Increase dialogue community of users who are musically timid, yet curious + +- Increase dialogue with general users for next directions + +- Offer new sound design and melodies + +- Offer journal entry saving and user accounts as well as new sharing integrations + +- Improved visuals using generative AI + +## Areas for future research and technological developments in the community + +- Improved multi-dimensional emotion ranking libraries + +- ImprovRNN often produced results we found not musical + +- Integrate MIDI to Tone.js and Magenta.js + +- Improved documentation to match the quality of the examples + +- Create audio plug-ins for DAWs like Logic and Reaper + +--- + +### Prior art: + +Jazz Keys: https://jazzkeys.plan8.co/ + +Magenta-js: https://github.com/magenta/magenta-js + +Tone.js: https://tonejs.github.io/ + + +### Codebase instructions + +#### To generate sequences: + +To generate sequences, navigate to /generate-melodies. This will interpolate the two seed sequences and output the results to the browser console. You can then update /src/sequences.json with the output, which will be consumed by the app on the next deploy. + +#### To convert from a midi file to INoteSequence: + +Place your .mid file in the public folder and manually update /src/components/MidiConvert.tsx to point at the right path. Then navigate to /midi-convert in your browser. Check the console for the sequence version. + +#### To run the repo + +``` +// install deps: +yarn +// run next dev: +yarn dev +``` diff --git a/src/DearDiary/next-env.d.ts b/src/DearDiary/next-env.d.ts new file mode 100644 index 0000000..7b7aa2c --- /dev/null +++ b/src/DearDiary/next-env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/src/DearDiary/package.json b/src/DearDiary/package.json new file mode 100644 index 0000000..20abc8e --- /dev/null +++ b/src/DearDiary/package.json @@ -0,0 +1,35 @@ +{ + "name": "one-story-one-song", + "version": "0.1.0", + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "@emotion/core": "^10.0.35", + "@emotion/styled": "^10.0.27", + "@magenta/music": "^1.19.0", + "firebase": "^7.19.1", + "lodash.debounce": "^4.0.8", + "next": "9.5.2", + "react": "16.13.1", + "react-dom": "16.13.1", + "tone": "^14.7.39", + "vader-sentiment": "^1.1.3" + }, + "devDependencies": { + "@babel/plugin-proposal-class-properties": "^7.10.4", + "@babel/plugin-proposal-decorators": "^7.10.5", + "@types/lodash.debounce": "^4.0.6", + "@types/node": "^14.6.0", + "@types/react": "^16.9.46", + "@types/styled-components": "^5.1.2", + "eslint": "^7.7.0", + "eslint-config-prettier": "^6.11.0", + "eslint-plugin-jsx-a11y": "^6.3.1", + "eslint-plugin-react": "^7.20.6", + "eslint-plugin-react-hooks": "^4.1.0", + "typescript": "^3.9.7" + } +} diff --git a/src/DearDiary/public/complete-tree.png b/src/DearDiary/public/complete-tree.png new file mode 100644 index 0000000..786cba3 Binary files /dev/null and b/src/DearDiary/public/complete-tree.png differ diff --git a/src/DearDiary/public/favicon.png b/src/DearDiary/public/favicon.png new file mode 100644 index 0000000..66dd2d8 Binary files /dev/null and b/src/DearDiary/public/favicon.png differ diff --git a/src/DearDiary/public/happy-2-2020-08-30.mid b/src/DearDiary/public/happy-2-2020-08-30.mid new file mode 100644 index 0000000..6599b47 Binary files /dev/null and b/src/DearDiary/public/happy-2-2020-08-30.mid differ diff --git a/src/DearDiary/public/happy-2020-08-27.mid b/src/DearDiary/public/happy-2020-08-27.mid new file mode 100644 index 0000000..700aa0d Binary files /dev/null and b/src/DearDiary/public/happy-2020-08-27.mid differ diff --git a/src/DearDiary/public/happy-3-2020-08-30.mid b/src/DearDiary/public/happy-3-2020-08-30.mid new file mode 100644 index 0000000..390c9bb Binary files /dev/null and b/src/DearDiary/public/happy-3-2020-08-30.mid differ diff --git a/src/DearDiary/public/happy-4-2020-08-30.mid b/src/DearDiary/public/happy-4-2020-08-30.mid new file mode 100644 index 0000000..8bd43b8 Binary files /dev/null and b/src/DearDiary/public/happy-4-2020-08-30.mid differ diff --git a/src/DearDiary/public/sad-2-2020-08-28.mid b/src/DearDiary/public/sad-2-2020-08-28.mid new file mode 100644 index 0000000..c3e050e Binary files /dev/null and b/src/DearDiary/public/sad-2-2020-08-28.mid differ diff --git a/src/DearDiary/public/sad-3-2020-08-30.mid b/src/DearDiary/public/sad-3-2020-08-30.mid new file mode 100644 index 0000000..863ae42 Binary files /dev/null and b/src/DearDiary/public/sad-3-2020-08-30.mid differ diff --git a/src/DearDiary/public/samples/A1.mp3 b/src/DearDiary/public/samples/A1.mp3 new file mode 100644 index 0000000..0b2ff3a Binary files /dev/null and b/src/DearDiary/public/samples/A1.mp3 differ diff --git a/src/DearDiary/public/samples/A2.mp3 b/src/DearDiary/public/samples/A2.mp3 new file mode 100644 index 0000000..c469969 Binary files /dev/null and b/src/DearDiary/public/samples/A2.mp3 differ diff --git a/src/DearDiary/public/samples/A3.mp3 b/src/DearDiary/public/samples/A3.mp3 new file mode 100644 index 0000000..57924c5 Binary files /dev/null and b/src/DearDiary/public/samples/A3.mp3 differ diff --git a/src/DearDiary/public/samples/A4.mp3 b/src/DearDiary/public/samples/A4.mp3 new file mode 100644 index 0000000..3b19af8 Binary files /dev/null and b/src/DearDiary/public/samples/A4.mp3 differ diff --git a/src/DearDiary/public/samples/C1.mp3 b/src/DearDiary/public/samples/C1.mp3 new file mode 100644 index 0000000..2b840fc Binary files /dev/null and b/src/DearDiary/public/samples/C1.mp3 differ diff --git a/src/DearDiary/public/samples/C2.mp3 b/src/DearDiary/public/samples/C2.mp3 new file mode 100644 index 0000000..3fca8d0 Binary files /dev/null and b/src/DearDiary/public/samples/C2.mp3 differ diff --git a/src/DearDiary/public/samples/C3.mp3 b/src/DearDiary/public/samples/C3.mp3 new file mode 100644 index 0000000..14daa30 Binary files /dev/null and b/src/DearDiary/public/samples/C3.mp3 differ diff --git a/src/DearDiary/public/samples/C4.mp3 b/src/DearDiary/public/samples/C4.mp3 new file mode 100644 index 0000000..d5f5819 Binary files /dev/null and b/src/DearDiary/public/samples/C4.mp3 differ diff --git a/src/DearDiary/public/samples/C5.mp3 b/src/DearDiary/public/samples/C5.mp3 new file mode 100644 index 0000000..7064bc8 Binary files /dev/null and b/src/DearDiary/public/samples/C5.mp3 differ diff --git a/src/DearDiary/public/samples/C6.mp3 b/src/DearDiary/public/samples/C6.mp3 new file mode 100644 index 0000000..c8e20f6 Binary files /dev/null and b/src/DearDiary/public/samples/C6.mp3 differ diff --git a/src/DearDiary/public/samples/Ds1.mp3 b/src/DearDiary/public/samples/Ds1.mp3 new file mode 100644 index 0000000..a5d68f5 Binary files /dev/null and b/src/DearDiary/public/samples/Ds1.mp3 differ diff --git a/src/DearDiary/public/samples/Ds2.mp3 b/src/DearDiary/public/samples/Ds2.mp3 new file mode 100644 index 0000000..9e7cf54 Binary files /dev/null and b/src/DearDiary/public/samples/Ds2.mp3 differ diff --git a/src/DearDiary/public/samples/Ds3.mp3 b/src/DearDiary/public/samples/Ds3.mp3 new file mode 100644 index 0000000..ba3cc48 Binary files /dev/null and b/src/DearDiary/public/samples/Ds3.mp3 differ diff --git a/src/DearDiary/public/samples/Ds4.mp3 b/src/DearDiary/public/samples/Ds4.mp3 new file mode 100644 index 0000000..f131233 Binary files /dev/null and b/src/DearDiary/public/samples/Ds4.mp3 differ diff --git a/src/DearDiary/public/samples/Fs1.mp3 b/src/DearDiary/public/samples/Fs1.mp3 new file mode 100644 index 0000000..254ecc4 Binary files /dev/null and b/src/DearDiary/public/samples/Fs1.mp3 differ diff --git a/src/DearDiary/public/samples/Fs2.mp3 b/src/DearDiary/public/samples/Fs2.mp3 new file mode 100644 index 0000000..3d1de69 Binary files /dev/null and b/src/DearDiary/public/samples/Fs2.mp3 differ diff --git a/src/DearDiary/public/samples/Fs3.mp3 b/src/DearDiary/public/samples/Fs3.mp3 new file mode 100644 index 0000000..c097190 Binary files /dev/null and b/src/DearDiary/public/samples/Fs3.mp3 differ diff --git a/src/DearDiary/public/samples/Fs4.mp3 b/src/DearDiary/public/samples/Fs4.mp3 new file mode 100644 index 0000000..780ba59 Binary files /dev/null and b/src/DearDiary/public/samples/Fs4.mp3 differ diff --git a/src/DearDiary/public/samples/wind-birbs.mp3 b/src/DearDiary/public/samples/wind-birbs.mp3 new file mode 100644 index 0000000..48e2e50 Binary files /dev/null and b/src/DearDiary/public/samples/wind-birbs.mp3 differ diff --git a/src/DearDiary/public/vercel.svg b/src/DearDiary/public/vercel.svg new file mode 100644 index 0000000..fbf0e25 --- /dev/null +++ b/src/DearDiary/public/vercel.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/DearDiary/src/components/AboutOverlay.tsx b/src/DearDiary/src/components/AboutOverlay.tsx new file mode 100644 index 0000000..20c946d --- /dev/null +++ b/src/DearDiary/src/components/AboutOverlay.tsx @@ -0,0 +1,141 @@ +import React from 'react'; +import styled from '@emotion/styled'; +import { keyframes } from '@emotion/core'; + +export const bounceIn = keyframes` + 0% { + transform: scale(0.98); + } + + 60% { + transform: scale(1.008); + } + + 100% { + transform: scale(1); + } +`; + +export const Modal = styled.div({ + backgroundColor: 'rgba(255, 255, 255, 0.9)', + maxWidth: 660, + margin: 'auto', + top: '5vh', + maxHeight: '90vh', + position: 'relative', + padding: '50px 60px', + borderRadius: 4, + boxShadow: '0 0 1rem 0 rgba(0, 0, 0, .08)', + border: '1px solid #eee', + fontSize: '21px', + lineHeight: '32px', + overflow: 'auto', + animation: `${bounceIn} 1s ease`, + boxSizing: 'border-box', + + '@media (min-width: 768px)': { + top: '10vh', + maxHeight: '80vh', + }, +}); + +export const CloseButton = styled.button({ + position: 'absolute', + top: 20, + right: 20, + padding: 5, + outline: 0, + background: 'none', + border: 0, + cursor: 'pointer', + opacity: '0.6', + transition: 'transform 1s ease-out', + '&:hover': { + transform: 'scale(1.1)', + }, +}); + +const EmbedContainer = styled.div(` + position: relative; + padding-bottom: 56.25%; + height: 0; + overflow: hidden; + max-width: 100%; + + > iframe, > object, > embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } +`); + +type Props = { + setIsOpen: (isOpen: boolean) => void; +}; +export const AboutOverlay = ({ setIsOpen }: Props) => { + return ( +
{ + // If the click is on the overlay, close the modal + if (e.currentTarget === e.target) { + setIsOpen(false); + } + }} + > + +

Hello Mate!

+

+ We created this for a ML & Music project for Documatic Hackathon 2022. +

+ +

+ + GitHub link (open source) + +

+

Authors

+

+ Van.sh07 – follow up Instagram +

+

+ Vansh 0.0 – Check out Portfolio Website! +

+

+ Radon Development[Owner] – Check out !RadonDev.com +

+ setIsOpen(false)}> + + + + +
+
+ ); +}; diff --git a/src/DearDiary/src/components/GenerateMelodies.tsx b/src/DearDiary/src/components/GenerateMelodies.tsx new file mode 100644 index 0000000..0a93151 --- /dev/null +++ b/src/DearDiary/src/components/GenerateMelodies.tsx @@ -0,0 +1,742 @@ +import { useEffect } from 'react'; +import { MusicVAE, INoteSequence, sequences } from '@magenta/music/es6'; +import { toMidi } from './utils/midiHelpers'; + +const MidiConvert = () => { + useEffect(() => { + const vae = new MusicVAE('https://storage.googleapis.com/magentadata/js/checkpoints/music_vae/mel_16bar_small_q2'); + + const SAD: INoteSequence = { + ticksPerQuarter: 480, + timeSignatures: [{ time: 0, numerator: 4, denominator: 4 }], + tempos: [{ time: 0, qpm: 120 }], + notes: [ + { + pitch: 64, + velocity: 74, + startTime: 0, + endTime: 0.24583333333333332, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 71, + velocity: 87, + startTime: 0.25, + endTime: 0.4947916666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 71, + velocity: 101, + startTime: 0.5, + endTime: 0.7458333333333333, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 69, + velocity: 97, + startTime: 0.75, + endTime: 0.9958333333333333, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 71, + velocity: 101, + startTime: 1, + endTime: 1.2458333333333333, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 60, + velocity: 91, + startTime: 1.25, + endTime: 1.4958333333333333, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 64, + velocity: 83, + startTime: 1.5, + endTime: 1.7458333333333333, + instrument: 0, + program: 0, + isDrum: false, + }, + { pitch: 71, velocity: 99, startTime: 1.75, endTime: 2, instrument: 0, program: 0, isDrum: false }, + { pitch: 64, velocity: 74, startTime: 2, endTime: 2.245833333333333, instrument: 0, program: 0, isDrum: false }, + { + pitch: 71, + velocity: 87, + startTime: 2.25, + endTime: 2.4947916666666665, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 71, + velocity: 101, + startTime: 2.5, + endTime: 2.745833333333333, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 69, + velocity: 97, + startTime: 2.75, + endTime: 2.995833333333333, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 71, + velocity: 101, + startTime: 3, + endTime: 3.245833333333333, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 64, + velocity: 83, + startTime: 3.25, + endTime: 3.495833333333333, + instrument: 0, + program: 0, + isDrum: false, + }, + { pitch: 71, velocity: 99, startTime: 3.5, endTime: 3.75, instrument: 0, program: 0, isDrum: false }, + { pitch: 64, velocity: 99, startTime: 3.75, endTime: 4, instrument: 0, program: 0, isDrum: false }, + { pitch: 84, velocity: 99, startTime: 4, endTime: 4.25, instrument: 0, program: 0, isDrum: false }, + { pitch: 83, velocity: 99, startTime: 4.25, endTime: 4.5, instrument: 0, program: 0, isDrum: false }, + { pitch: 64, velocity: 99, startTime: 4.5, endTime: 4.75, instrument: 0, program: 0, isDrum: false }, + { pitch: 76, velocity: 99, startTime: 4.75, endTime: 5, instrument: 0, program: 0, isDrum: false }, + { pitch: 74, velocity: 99, startTime: 5, endTime: 5.25, instrument: 0, program: 0, isDrum: false }, + { pitch: 64, velocity: 99, startTime: 5.25, endTime: 5.5, instrument: 0, program: 0, isDrum: false }, + { pitch: 72, velocity: 99, startTime: 5.5, endTime: 5.75, instrument: 0, program: 0, isDrum: false }, + { pitch: 71, velocity: 99, startTime: 5.75, endTime: 6, instrument: 0, program: 0, isDrum: false }, + { pitch: 72, velocity: 99, startTime: 6, endTime: 6.25, instrument: 0, program: 0, isDrum: false }, + { pitch: 71, velocity: 99, startTime: 6.25, endTime: 6.5, instrument: 0, program: 0, isDrum: false }, + { pitch: 74, velocity: 99, startTime: 6.5, endTime: 6.75, instrument: 0, program: 0, isDrum: false }, + { pitch: 72, velocity: 99, startTime: 6.75, endTime: 7, instrument: 0, program: 0, isDrum: false }, + { pitch: 74, velocity: 99, startTime: 7, endTime: 7.25, instrument: 0, program: 0, isDrum: false }, + { pitch: 72, velocity: 99, startTime: 7.25, endTime: 7.5, instrument: 0, program: 0, isDrum: false }, + { pitch: 76, velocity: 99, startTime: 7.5, endTime: 7.75, instrument: 0, program: 0, isDrum: false }, + { pitch: 74, velocity: 99, startTime: 7.75, endTime: 8, instrument: 0, program: 0, isDrum: false }, + { pitch: 76, velocity: 99, startTime: 8, endTime: 8.25, instrument: 0, program: 0, isDrum: false }, + { pitch: 74, velocity: 99, startTime: 8.25, endTime: 8.5, instrument: 0, program: 0, isDrum: false }, + { pitch: 77, velocity: 99, startTime: 8.5, endTime: 8.75, instrument: 0, program: 0, isDrum: false }, + { pitch: 76, velocity: 99, startTime: 8.75, endTime: 9, instrument: 0, program: 0, isDrum: false }, + { pitch: 77, velocity: 99, startTime: 9, endTime: 9.25, instrument: 0, program: 0, isDrum: false }, + { pitch: 76, velocity: 99, startTime: 9.25, endTime: 9.5, instrument: 0, program: 0, isDrum: false }, + ], + totalTime: 9.5, + quantizationInfo: { stepsPerQuarter: 4 }, + }; + + const HAPPY: INoteSequence = { + ticksPerQuarter: 480, + timeSignatures: [{ time: 0, numerator: 4, denominator: 4 }], + notes: [ + { + pitch: 65, + velocity: 103, + startTime: 4.094791666666667, + endTime: 4.219791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 72, + velocity: 91, + startTime: 4.219791666666667, + endTime: 4.344791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 76, + velocity: 87, + startTime: 4.344791666666667, + endTime: 4.469791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 77, + velocity: 73, + startTime: 4.469791666666667, + endTime: 4.594791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 69, + velocity: 73, + startTime: 4.594791666666667, + endTime: 4.719791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 76, + velocity: 101, + startTime: 4.719791666666667, + endTime: 4.844791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 77, + velocity: 101, + startTime: 4.844791666666667, + endTime: 4.969791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 72, + velocity: 101, + startTime: 4.969791666666667, + endTime: 5.094791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 81, + velocity: 101, + startTime: 5.094791666666667, + endTime: 5.219791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 88, + velocity: 101, + startTime: 5.219791666666667, + endTime: 5.344791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 89, + velocity: 101, + startTime: 5.344791666666667, + endTime: 5.469791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 88, + velocity: 101, + startTime: 5.469791666666667, + endTime: 5.594791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 84, + velocity: 101, + startTime: 5.594791666666667, + endTime: 5.719791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 86, + velocity: 101, + startTime: 5.719791666666667, + endTime: 5.844791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 84, + velocity: 101, + startTime: 5.844791666666667, + endTime: 5.969791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 83, + velocity: 101, + startTime: 5.969791666666667, + endTime: 6.094791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 84, + velocity: 101, + startTime: 6.094791666666667, + endTime: 6.219791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 67, + velocity: 103, + startTime: 6.219791666666667, + endTime: 6.344791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 74, + velocity: 91, + startTime: 6.344791666666667, + endTime: 6.469791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 76, + velocity: 87, + startTime: 6.469791666666667, + endTime: 6.594791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 81, + velocity: 87, + startTime: 6.594791666666667, + endTime: 6.719791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 79, + velocity: 87, + startTime: 6.719791666666667, + endTime: 6.844791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 88, + velocity: 87, + startTime: 6.844791666666667, + endTime: 6.969791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 91, + velocity: 87, + startTime: 6.969791666666667, + endTime: 7.094791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 96, + velocity: 87, + startTime: 7.094791666666667, + endTime: 7.219791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 93, + velocity: 87, + startTime: 7.219791666666667, + endTime: 7.344791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 93, + velocity: 87, + startTime: 7.344791666666667, + endTime: 7.469791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 93, + velocity: 87, + startTime: 7.469791666666667, + endTime: 7.594791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 90, + velocity: 87, + startTime: 7.594791666666667, + endTime: 7.719791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 86, + velocity: 87, + startTime: 7.719791666666667, + endTime: 7.844791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 81, + velocity: 87, + startTime: 7.844791666666667, + endTime: 7.969791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 81, + velocity: 87, + startTime: 7.969791666666667, + endTime: 8.094791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 76, + velocity: 87, + startTime: 8.094791666666667, + endTime: 8.219791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 74, + velocity: 87, + startTime: 8.219791666666667, + endTime: 8.344791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 69, + velocity: 87, + startTime: 8.344791666666667, + endTime: 8.469791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 67, + velocity: 87, + startTime: 8.469791666666667, + endTime: 8.594791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 62, + velocity: 87, + startTime: 8.594791666666667, + endTime: 8.719791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 60, + velocity: 87, + startTime: 8.719791666666667, + endTime: 8.844791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 69, + velocity: 87, + startTime: 8.844791666666667, + endTime: 8.969791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 76, + velocity: 87, + startTime: 8.969791666666667, + endTime: 9.094791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 74, + velocity: 87, + startTime: 9.094791666666667, + endTime: 9.219791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 86, + velocity: 87, + startTime: 9.219791666666667, + endTime: 9.344791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 74, + velocity: 87, + startTime: 9.344791666666667, + endTime: 9.469791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 86, + velocity: 87, + startTime: 9.469791666666667, + endTime: 9.594791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 79, + velocity: 87, + startTime: 9.594791666666667, + endTime: 9.719791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 88, + velocity: 87, + startTime: 9.719791666666667, + endTime: 9.844791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 79, + velocity: 87, + startTime: 9.844791666666667, + endTime: 9.969791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 89, + velocity: 87, + startTime: 9.969791666666667, + endTime: 10.094791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 76, + velocity: 87, + startTime: 10.094791666666667, + endTime: 10.219791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 89, + velocity: 87, + startTime: 10.219791666666667, + endTime: 10.344791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 74, + velocity: 87, + startTime: 10.344791666666667, + endTime: 10.469791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 89, + velocity: 87, + startTime: 10.469791666666667, + endTime: 10.594791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 76, + velocity: 87, + startTime: 10.594791666666667, + endTime: 10.719791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 74, + velocity: 87, + startTime: 10.719791666666667, + endTime: 10.844791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 88, + velocity: 87, + startTime: 10.844791666666667, + endTime: 10.969791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 72, + velocity: 87, + startTime: 10.969791666666667, + endTime: 11.094791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 81, + velocity: 87, + startTime: 11.094791666666667, + endTime: 11.219791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 72, + velocity: 87, + startTime: 11.219791666666667, + endTime: 11.344791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 79, + velocity: 87, + startTime: 11.344791666666667, + endTime: 11.469791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 74, + velocity: 87, + startTime: 11.469791666666667, + endTime: 11.594791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 77, + velocity: 87, + startTime: 11.594791666666667, + endTime: 11.719791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 76, + velocity: 87, + startTime: 11.719791666666667, + endTime: 11.844791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + { + pitch: 86, + velocity: 87, + startTime: 11.844791666666667, + endTime: 11.969791666666667, + instrument: 0, + program: 0, + isDrum: false, + }, + ], + totalTime: 11.969791666666667, + quantizationInfo: { stepsPerQuarter: 4 }, + }; + + const quantizedHappy = sequences.quantizeNoteSequence(HAPPY, 4); + const quantizedSad = sequences.quantizeNoteSequence(SAD, 4); + + vae.initialize().then(() => { + vae.interpolate([quantizedSad, quantizedHappy], 20).then((melodies) => { + console.log(JSON.stringify(melodies)); + }); + }); + }, []); + + return
Check the console!
; +}; + +export default MidiConvert; diff --git a/src/DearDiary/src/components/JournalScreen.tsx b/src/DearDiary/src/components/JournalScreen.tsx new file mode 100644 index 0000000..1199772 --- /dev/null +++ b/src/DearDiary/src/components/JournalScreen.tsx @@ -0,0 +1,364 @@ +import React, { useRef, useEffect, forwardRef, useCallback } from 'react'; +import { Tree } from './Tree'; +import { melodies } from '../melodies'; +import { toNote } from './utils/midiHelpers'; +import debounce from 'lodash.debounce'; +import * as Tone from 'tone'; +import throttle from 'lodash.debounce'; +import { persistKeys, dbSelectionEvent, dbKeyPress } from '../firebase/persistKeys'; +import { ShareAndAbout } from './ShareAndAbout'; +import { ProductHuntBadge } from './ProductHuntBadge'; +import styled from '@emotion/styled'; + +const allNotes = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']; +const scale = ['C', 'D', 'E', 'F', 'G', 'A', 'B']; + +const silentKeys: Record = { + Shift: false, + Escape: false, + Enter: false, + Meta: false, + Control: false, + Alt: false, + Tab: false, + ' ': false, + ArrowUp: false, + ArrowDown: false, + ArrowLeft: false, + ArrowRight: false, +}; + +/** Don't persist these keys, we don't use them: */ +const ignoreKeysForPersist = new Set([ + 'Shift', + 'ArrowLeft', + 'ArrowUp', + 'ArrowRight', + 'ArrowDown', + 'Meta', + 'Escape', + 'Control', + 'Alt', + 'Tab', + 'CapsLock', + 'Home', + 'End', +]); + +type chord = string[]; +const chords: Record = { + Am: ['A2', 'E3', 'C3'], + Am7: ['A2', 'E3', 'C4', 'G4'], + Amaj9: ['A2', 'E3', 'B3'], + C: ['C2', 'E3', 'G3'], + Cmaj7: ['C3', 'E3', 'G4', 'B4'], + Cmaj9: ['C2', 'E3', 'B3', 'D4'], + Cmaj7NoRoot: ['E3', 'G4', 'B4'], +}; +const chordKeys: Record> = { + '.': [chords.C, chords.Am, chords.Cmaj7], + '!': [chords.Cmaj9, chords.Am7], + '?': [chords.Cmaj7NoRoot], +}; + +const JournalTextArea = styled.textarea({ + position: 'relative', + zIndex: 3, + boxSizing: 'border-box', + height: 'calc(100vh - 180px)', + width: '100%', + maxWidth: '700px', + fontSize: '33px', + border: 0, + resize: 'none', + outline: 'none', + color: '#333', + paddingTop: '60px', + paddingBottom: '60px', + paddingLeft: '20px', + paddingRight: '20px', + backgroundColor: 'rgba(255, 255, 255, 0.5)', + + '@media (min-width: 768px)': { + height: 'calc(100vh - 110px)', + paddingTop: '60px', + paddingBottom: '60px', + paddingLeft: '60px', + paddingRight: '30px', + }, +}); + +type Props = { + readonly?: boolean; + sampler: Tone.Sampler; +}; +const JournalScreen = ({ readonly = false, sampler }: Props) => { + const noteIndex = useRef(0); + const treeIndex = useRef(0); + const treeCoverOpacityChange = useRef('0'); + const lastNotePlayed = useRef('C3'); + + const unsavedPersists = useRef>([]); + const lastSelectionWasAtLength = useRef(true); + const firstKeyPressTime = useRef(0); + const currentSentiment = useRef(0.5); + + /** Throttled save to the DB to persist any unpersisted key presses */ + const persist = useCallback( + debounce( + () => { + const urlPieces = window.location.pathname.split('/'); + const entryId = urlPieces[2]; + if (entryId) { + persistKeys(entryId, unsavedPersists.current); + unsavedPersists.current = []; + } + }, + 1000, + { leading: true, trailing: true } + ), + [] + ); + + const readSentiment = useCallback( + throttle( + (sample: string) => + // Score the text + fetch('/api/sentiment', { + method: 'post', + body: JSON.stringify({ sample }), + }).then((res) => { + if (res.status === 200) { + try { + res.json().then((result) => { + // Assign the new sentiment score as a 0-1 scale + currentSentiment.current = Number.isFinite(result.sentiment) + ? Math.min(Math.max((result.sentiment + 1) / 2, 0), 1) + : 0.5; + + console.log('new sentiment ' + currentSentiment.current); + }); + } catch (e) { + console.log(e); + } + } + }), + 1000, + { leading: true, trailing: true } + ), + [] + ); + + return ( + <> + { + if (!readonly) { + const textarea = e.currentTarget; + const selectionStart = textarea.selectionStart; + const selectionEnd = textarea.selectionEnd; + + if (selectionStart === selectionEnd && selectionStart === textarea.textLength) { + // Bail if the selection is at the end, and the previous selection was at the end + // We don't need this info as it will happen automatically and we can save some space + if (lastSelectionWasAtLength.current === true) { + return; + } + lastSelectionWasAtLength.current = true; + } else { + lastSelectionWasAtLength.current = false; + } + + // Add this key press to the list to be persisted at the next save event + unsavedPersists.current.push({ + type: 'selection', + selectionStart, + selectionEnd, + timeFromBegin: Date.now() - firstKeyPressTime.current, + }); + + persist(); + } + }} + placeholder="How are you feeling? Start typing" + onChange={(e) => { + if (!readonly) { + persist(); + } + const newValue = e.currentTarget.value; + const lastCharacter = newValue[newValue.length - 1]; + + if (lastCharacter === ' ' || lastCharacter === '.' || lastCharacter === '!' || lastCharacter === '?') { + const totalEntry = e.currentTarget.value; + // Move the sentiment with the most recent writing: + const recentWriting = totalEntry.substring(totalEntry.length - 65); + readSentiment(recentWriting); + } + }} + onKeyDown={(e) => { + if (firstKeyPressTime.current === 0) { + firstKeyPressTime.current = Date.now(); + } + + // Bail early for OS key combos + if (e.metaKey || e.ctrlKey) { + return; + } + + const dbKey: dbKeyPress = { + type: 'key', + key: e.key, + timeFromBegin: Date.now() - firstKeyPressTime.current, + notes: [], + }; + + if (ignoreKeysForPersist.has(e.key) === false) { + // Add this key press to the list to be persisted at the next save event + // The notes will get filled in before the persist happens + unsavedPersists.current.push(dbKey); + } + + // If it's a silent key, bail out: + const shouldBeSilent = silentKeys[e.key]; + if (shouldBeSilent === false) { + return; + } + + // If it's a chord key, play the chord: + let chord = null; + if (chordKeys[e.key]) { + const chordToPlayIndex = Math.floor(Math.random() * chordKeys[e.key].length); + chord = chordKeys[e.key][chordToPlayIndex]; + + // Play a chord for this key + let delay = 0; + let velocity = 0.25; + + const chordToUse = Math.random() > 0.7 ? chord.reverse() : chord; + const duration = 4; + + for (const note of chordToUse) { + setTimeout(() => { + sampler.triggerAttackRelease([note], duration, undefined, velocity); + }, delay); + // Add it to the DB copy: + dbKey.notes.push({ note: note, duration, velocity, delayFromKeyPress: delay }); + + // Play the chord slower and lighter as it goes: + if (delay === 0) { + delay = 65; + } else { + delay *= 2; + } + velocity = velocity - 0.175 * velocity; + } + + return; + } + + // If it's backspace or delete, descend the scale + if (e.key === 'Backspace' || e.key === 'Delete') { + if (e.currentTarget.value.length === 0) { + // Bail out if there's nothing to delete + return; + } + const note = lastNotePlayed.current.replace(/[^a-z#+]/gi, ''); + const octave = parseInt(lastNotePlayed.current.replace(/[^0-9+]/gi, '')); + const noteIndex = allNotes.indexOf(note); + + if (noteIndex !== -1) { + let descendingNote; + let descendingNoteOctave; + + if (noteIndex === 0) { + // Reached the root, lower the octave and grab the max child + descendingNoteOctave = octave - 1; + descendingNote = allNotes[allNotes.length - 1]; + } else { + descendingNoteOctave = octave; + descendingNote = allNotes[noteIndex - 1]; + } + + if (descendingNoteOctave === 0) { + // If we reach 0, start up high again + descendingNoteOctave = 5; + } + + const noteWithOctave = `${descendingNote}${descendingNoteOctave}`; + const velocity = 0.15; + const duration = 3; + sampler.triggerAttackRelease([noteWithOctave], duration, undefined, velocity); + // Add it to the DB copy: + dbKey.notes.push({ note: noteWithOctave, duration, velocity, delayFromKeyPress: 0 }); + + lastNotePlayed.current = noteWithOctave; + } + + return; + } + + // Play the next note in the sequence + // console.log('sentiment score: ' + currentSentiment.current); + const melodyIndex = Math.round(melodies.length * currentSentiment.current); + console.log({ melodyIndex }); + const melody = melodies[melodyIndex] ?? melodies[0]; + + let nextKey; + if (noteIndex.current > melody.notes.length - 1) { + // If we're above this melody's last note, use the last note: + nextKey = melody.notes[melody.notes.length - 1]; + } else { + // Otherwise, use the key at this index: + nextKey = melody.notes[noteIndex.current]; + } + const nextNote = toNote(nextKey.pitch!); + + // Randomize velocity between 0.1 and 0.2, but mostly hit 0.2 + const velocity = Math.max(Math.min(Math.random() / 2, 0.2), 0.1); + const duration = 3; + sampler.triggerAttackRelease([nextNote], duration, undefined, velocity); + // Add it to the DB copy: + dbKey.notes.push({ note: nextNote, duration, velocity, delayFromKeyPress: 0 }); + + // Remember the last note we played: + lastNotePlayed.current = nextNote; + + // Hide a new svg cover every N keystrokes: + const coverCount = Math.floor(treeIndex.current / 6); + const treeBranch = document.querySelector('#cover-' + coverCount) as SVGElement; + if (treeBranch) { + treeBranch.style.transition = 'opacity 0.5s ease-in'; + treeBranch.style.opacity = treeCoverOpacityChange.current; + } + // Hard coding magic numberz for JAM spririt... update this if we want multiple graphics later + if (coverCount === 21) { + // We've hit the end of the tree, start over + treeIndex.current = 0; + treeCoverOpacityChange.current = treeCoverOpacityChange.current === '1' ? '0' : '1'; + } + + // +/- 1 to the tree index + treeIndex.current += 1; + // +1 to the note index + noteIndex.current += 1; + if (noteIndex.current === melodies[1].notes!.length) { + // Restart the melody if we've run out of notes + noteIndex.current = 0; + } + }} + > + + + + + + {/* */} + + ); +}; + +export default JournalScreen; diff --git a/src/DearDiary/src/components/MidiConvert.tsx b/src/DearDiary/src/components/MidiConvert.tsx new file mode 100644 index 0000000..e7f443a --- /dev/null +++ b/src/DearDiary/src/components/MidiConvert.tsx @@ -0,0 +1,14 @@ +import { useEffect } from 'react'; +import * as mm from '@magenta/music/es6'; + +const MidiConvert = () => { + useEffect(() => { + const sequence = mm + .urlToNoteSequence('/happy-4-2020-08-30.mid') + .then((sequence) => console.log(JSON.stringify(sequence))); + }, []); + + return
Check the console
; +}; + +export default MidiConvert; diff --git a/src/DearDiary/src/components/ProductHuntBadge.tsx b/src/DearDiary/src/components/ProductHuntBadge.tsx new file mode 100644 index 0000000..3dcc369 --- /dev/null +++ b/src/DearDiary/src/components/ProductHuntBadge.tsx @@ -0,0 +1,38 @@ +import React from 'react'; +import styled from '@emotion/styled'; + +const BadgeWrapper = styled.div({ + position: 'absolute', + top: '60px', + right: '40px', + display: 'none', + opacity: 0.5, + transition: 'opacity 0.5s ease-out', + + '&:hover': { + opacity: 1, + }, + + '@media (min-width: 1024px)': { + display: 'block', + }, +}); + +export const ProductHuntBadge = () => { + return ( + + + Dear Diary AI - Turn your journal into music | Product Hunt Embed + + + ); +}; diff --git a/src/DearDiary/src/components/ShareAndAbout.tsx b/src/DearDiary/src/components/ShareAndAbout.tsx new file mode 100644 index 0000000..031fa9c --- /dev/null +++ b/src/DearDiary/src/components/ShareAndAbout.tsx @@ -0,0 +1,88 @@ +import React, { useState } from 'react'; +import { AboutOverlay } from './AboutOverlay'; +import styled from '@emotion/styled'; +import { ShareOverlay } from './ShareOverlay'; + +export const BottomButton = styled.button({ + border: '3px solid rgba(0, 0, 0, 0.6)', + padding: '10px', + paddingLeft: '30px', + paddingRight: '30px', + fontSize: '20px', + background: 'none', + color: '#555', + borderRadius: 3, + cursor: 'pointer', + margin: 10, + marginTop: 0, + backgroundColor: '#fff', + transition: 'transform 1s ease-out, color 1s ease-out', + '&:hover': { + transform: 'scale(1.04)', + color: '#464da4', + }, +}); + +const Wrapper = styled.div({ + position: 'fixed', + zIndex: 3, + bottom: 50, + paddingLeft: '20', + paddingRight: '20', + textAlign: 'right', + display: 'flex', + flexWrap: 'wrap', + justifyContent: 'space-around', + '@media (min-width: 768px)': { + bottom: 30, + left: 60, + }, +}); + +const PrivacyWrapper = styled.div({ + position: 'fixed', + zIndex: 3, + bottom: 10, + width: '100%', + textAlign: 'center', + color: '#555', + fontWeight: 'bold', + '@media (min-width: 768px)': { + textAlign: 'left', + left: 60, + paddingLeft: '10px', + paddingRight: '10px', + }, +}); + +type Props = { + readonly: boolean; +}; +export const ShareAndAbout = ({ readonly }: Props) => { + const [aboutIsOpen, setAboutIsOpen] = useState(false); + const [shareIsOpen, setShareIsOpen] = useState(false); + + return ( + <> + {aboutIsOpen && } + {shareIsOpen && } + + + (window.location.href = '/?write')}>NEW + + window.location.reload()}>REPLAY + + setShareIsOpen(true)}>SHARE + + setAboutIsOpen(true)}>ABOUT + + + + Entries are public to anyone with this URL.{' '} + + Privacy info! 0.0 + + + + ); +}; diff --git a/src/DearDiary/src/components/ShareOverlay.tsx b/src/DearDiary/src/components/ShareOverlay.tsx new file mode 100644 index 0000000..67fe3a8 --- /dev/null +++ b/src/DearDiary/src/components/ShareOverlay.tsx @@ -0,0 +1,91 @@ +import React from 'react'; +import { BottomButton } from './ShareAndAbout'; +import { CloseButton, Modal } from './AboutOverlay'; + +type Props = { + setIsOpen: (isOpen: boolean) => void; +}; +export const ShareOverlay = ({ setIsOpen }: Props) => { + return ( +
{ + // If the click is on the overlay, close the modal + if (e.currentTarget === e.target) { + setIsOpen(false); + } + }} + > + +

Share your Creativity!

+

+ Thanks for sharing your Art! You can copy the link out of the address bar or use one of these links below. +

+ +

Whoever you send it to will see your words play back in real time.

+ +
+ { + navigator.clipboard.writeText(window.location.href); + const button = e.currentTarget; + button.innerText = 'Copied'; + setTimeout(() => { + button.innerText = 'Copy link'; + }, 1700); + }} + style={{ marginLeft: 0, width: 160 }} + > + Copy link + +
+ + + window.open( + `https://twitter.com/intent/tweet?text=This%20app%20makes%20music%20out%20of%20your%20journal%20entry,%20so%20cool!%20Check%20out%20mine%20and%20make%20yours%20too%20${window.location.href}` + ) + } + > + Tweet + + + window.open(`https://www.facebook.com/sharer/sharer.php?u=${window.location.href}`)} + > + Facebook + + + setIsOpen(false)}> + + + + +
+
+ ); +}; diff --git a/src/DearDiary/src/components/Tree.tsx b/src/DearDiary/src/components/Tree.tsx new file mode 100644 index 0000000..2dc2c52 --- /dev/null +++ b/src/DearDiary/src/components/Tree.tsx @@ -0,0 +1,156 @@ +import React from 'react'; + +export const Tree = () => { + return ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ ); +}; diff --git a/src/DearDiary/src/components/WinnerBadge.tsx b/src/DearDiary/src/components/WinnerBadge.tsx new file mode 100644 index 0000000..406b37d --- /dev/null +++ b/src/DearDiary/src/components/WinnerBadge.tsx @@ -0,0 +1,60 @@ +import React from 'react'; +import styled from '@emotion/styled'; + +const StyledBadge = styled.a({ + position: 'absolute', + zIndex: 15, + bottom: 20, + left: '50%', + transform: 'translateX(-50%)', + textDecoration: 'none', + fontFamily: 'arial', + minWidth: '275px', + + '@media (min-width: 768px)': { + transform: 'none', + left: 'auto', + bottom: 'auto', + top: '60px', + right: '40px', + }, + + '&:hover:': { + textDecoration: 'none', + }, +}); + +const TopBar = styled.div({ + backgroundColor: '#F6C55F', + color: '#70582A', + fontSize: 22, + padding: 4, + paddingTop: 7, + lineHeight: 1, + textAlign: 'center', + borderRadius: '3px 3px 0 0', + fontWeight: 700, +}); + +const BottomBar = styled.div({ + backgroundColor: '#fff', + color: '#999', + fontSize: '14px', + paddingTop: 4, + paddingBottom: 4, + paddingLeft: 10, + paddingRight: 10, + textAlign: 'center', + border: '1px solid #F6C55F', + borderRadius: '0 0 3px 3px', + textTransform: 'uppercase', +}); + +export const WinnerBadge = () => { + return ( + + Van.sh07 + RadonDevelopment + + ); +}; diff --git a/src/DearDiary/src/components/utils/midiHelpers.ts b/src/DearDiary/src/components/utils/midiHelpers.ts new file mode 100644 index 0000000..5e3e0ca --- /dev/null +++ b/src/DearDiary/src/components/utils/midiHelpers.ts @@ -0,0 +1,32 @@ +// generates an array where indices correspond to midi notes +// Credit: from https://medium.com/@torinblankensmith/melody-mixer-using-deeplearn-js-to-mix-melodies-in-the-browser-8ad5b42b4d0b +const everyNote = 'C,C#,D,D#,E,F,F#,G,G#,A,A#,B,' + .repeat(20) + .split(',') + .map(function (x, i) { + return x + '' + Math.floor(i / 12); + }); + +// returns the midi pitch value for the given note. +// returns -1 if not found +export function toMidi(note: string | number) { + return everyNote.indexOf(note.toString()); +} + +/** + * Convert a midi note to a pitch class (just the pitch no octave) + * Credit: https://github.com/Tonejs/Midi/blob/master/src/Note.ts + */ +function midiToPitchClass(midi: number): string { + const scaleIndexToNote = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']; + const note = midi % 12; + return scaleIndexToNote[note]; +} + +/** + * Convert a midi note into a pitch + */ +export function toNote(midi: number): string { + const octave = Math.floor(midi / 12) - 1; + return midiToPitchClass(midi) + octave.toString(); +} diff --git a/src/DearDiary/src/firebase/createEntry.ts b/src/DearDiary/src/firebase/createEntry.ts new file mode 100644 index 0000000..223a430 --- /dev/null +++ b/src/DearDiary/src/firebase/createEntry.ts @@ -0,0 +1,28 @@ +import { db } from './initFirebase'; +import getServerTimestamp from './getServerTimestamp'; +import { dbKeyPress, dbSelectionEvent } from './persistKeys'; + +export type Entry = { + ip: string | null; + latitude: string | null; + longitude: string | null; + events: Record; + created: number; + updated: number; +}; + +export async function generateEntry() { + const locationData = await (await fetch('/api/getLocationByIp')).json(); + (window as any).ip = locationData.ip; + + const docRef = await db.collection('entries').add({ + ip: locationData?.ip || null, + latitude: locationData?.latitude || null, + longitude: locationData?.longitude || null, + keys: {}, + created: getServerTimestamp(), + updated: getServerTimestamp(), + }); + + return docRef.id; +} diff --git a/src/DearDiary/src/firebase/getServerTimestamp.ts b/src/DearDiary/src/firebase/getServerTimestamp.ts new file mode 100644 index 0000000..f81d4d9 --- /dev/null +++ b/src/DearDiary/src/firebase/getServerTimestamp.ts @@ -0,0 +1,13 @@ +import firebase from 'firebase/app'; + +function getServerTimestamp() { + // Store the server time in MS number format: + if (firebase.firestore) { + return firebase.firestore.Timestamp.now().toMillis(); + } + + // This is really just used to let CI tests pass where firebase doesn't exist + return Date.now(); +} + +export default getServerTimestamp; diff --git a/src/DearDiary/src/firebase/initFirebase.ts b/src/DearDiary/src/firebase/initFirebase.ts new file mode 100644 index 0000000..322bd91 --- /dev/null +++ b/src/DearDiary/src/firebase/initFirebase.ts @@ -0,0 +1,17 @@ +import firebase from 'firebase/app'; +import '@firebase/firestore'; + +if (!firebase.apps.length) { + var config = { + apiKey: process.env.firebase_browser_key, + authDomain: 'deardiary-aeca1.firebaseapp.com', + databaseURL: 'https://deardiary-aeca1.firebaseio.com', + projectId: 'deardiary-aeca1', + storageBucket: 'deardiary-aeca1.appspot.com', + messagingSenderId: '614530160945', + appId: '1:614530160945:web:e89752f6b4158c7a2ef810', + }; + firebase.initializeApp(config); +} + +export const db = firebase.firestore(); diff --git a/src/DearDiary/src/firebase/persistKeys.ts b/src/DearDiary/src/firebase/persistKeys.ts new file mode 100644 index 0000000..97ab8bb --- /dev/null +++ b/src/DearDiary/src/firebase/persistKeys.ts @@ -0,0 +1,65 @@ +import { db } from './initFirebase'; +import getServerTimestamp from './getServerTimestamp'; + +export type dbNote = { + note: string; + velocity: number; + duration: number; + delayFromKeyPress: number; +}; + +export type dbKeyPress = { + type: 'key'; + key: string; + timeFromBegin: number; + notes: Array; +}; + +export type dbSelectionEvent = { + type: 'selection'; + selectionStart: number; + selectionEnd: number; + timeFromBegin: number; +}; + +export function persistEventIsKey(event: dbKeyPress | dbSelectionEvent): event is dbKeyPress { + return event.type === 'key'; +} + +export function persistEventIsSelection(event: dbKeyPress | dbSelectionEvent): event is dbSelectionEvent { + return event.type === 'selection'; +} + +export function persistKeys(entryId: string, persistEvents: Array) { + const batch = db.batch(); + const entryDoc = db.collection('entries').doc(entryId); + + for (const persistEvent of persistEvents) { + if (persistEventIsKey(persistEvent)) { + batch.update(entryDoc, { + [`events.${persistEvent.timeFromBegin}`]: { + key: persistEvent.key, + type: persistEvent.type, + notes: persistEvent.notes, + }, + ip: (window as any).ip, + }); + } else if (persistEventIsSelection(persistEvent)) { + batch.update(entryDoc, { + [`events.${persistEvent.timeFromBegin}`]: { + type: persistEvent.type, + selectionStart: persistEvent.selectionStart, + selectionEnd: persistEvent.selectionEnd, + }, + ip: (window as any).ip, + }); + } + } + + batch.update(entryDoc, { + updated: getServerTimestamp(), + ip: (window as any).ip, + }); + + return batch.commit(); +} diff --git a/src/DearDiary/src/melodies.ts b/src/DearDiary/src/melodies.ts new file mode 100644 index 0000000..b3ff6b9 --- /dev/null +++ b/src/DearDiary/src/melodies.ts @@ -0,0 +1 @@ +export const melodies = [{"tempos":[{"qpm":120}],"notes":[{"pitch":64,"quantizedStartStep":"0","quantizedEndStep":"2"},{"pitch":71,"quantizedStartStep":"2","quantizedEndStep":"4"},{"pitch":71,"quantizedStartStep":"4","quantizedEndStep":"6"},{"pitch":69,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":71,"quantizedStartStep":"8","quantizedEndStep":"10"},{"pitch":60,"quantizedStartStep":"10","quantizedEndStep":"12"},{"pitch":64,"quantizedStartStep":"12","quantizedEndStep":"14"},{"pitch":71,"quantizedStartStep":"14","quantizedEndStep":"16"},{"pitch":64,"quantizedStartStep":"16","quantizedEndStep":"18"},{"pitch":71,"quantizedStartStep":"18","quantizedEndStep":"20"},{"pitch":71,"quantizedStartStep":"20","quantizedEndStep":"22"},{"pitch":64,"quantizedStartStep":"22","quantizedEndStep":"24"},{"pitch":69,"quantizedStartStep":"24","quantizedEndStep":"26"},{"pitch":71,"quantizedStartStep":"26","quantizedEndStep":"28"},{"pitch":64,"quantizedStartStep":"28","quantizedEndStep":"30"},{"pitch":71,"quantizedStartStep":"30","quantizedEndStep":"32"},{"pitch":84,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":71,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":76,"quantizedStartStep":"36","quantizedEndStep":"38"},{"pitch":76,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":71,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":72,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":74,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":71,"quantizedStartStep":"46","quantizedEndStep":"48"},{"pitch":72,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":71,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":74,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":72,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":74,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":72,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":76,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":74,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":76,"quantizedStartStep":"64","quantizedEndStep":"66"},{"pitch":74,"quantizedStartStep":"66","quantizedEndStep":"68"},{"pitch":77,"quantizedStartStep":"68","quantizedEndStep":"70"},{"pitch":76,"quantizedStartStep":"70","quantizedEndStep":"72"},{"pitch":77,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":76,"quantizedStartStep":"74","quantizedEndStep":"76"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":64,"quantizedStartStep":"0","quantizedEndStep":"2"},{"pitch":71,"quantizedStartStep":"2","quantizedEndStep":"4"},{"pitch":71,"quantizedStartStep":"4","quantizedEndStep":"6"},{"pitch":69,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":71,"quantizedStartStep":"8","quantizedEndStep":"10"},{"pitch":65,"quantizedStartStep":"10","quantizedEndStep":"12"},{"pitch":67,"quantizedStartStep":"12","quantizedEndStep":"14"},{"pitch":71,"quantizedStartStep":"14","quantizedEndStep":"16"},{"pitch":64,"quantizedStartStep":"16","quantizedEndStep":"18"},{"pitch":71,"quantizedStartStep":"18","quantizedEndStep":"20"},{"pitch":71,"quantizedStartStep":"20","quantizedEndStep":"22"},{"pitch":64,"quantizedStartStep":"22","quantizedEndStep":"24"},{"pitch":69,"quantizedStartStep":"24","quantizedEndStep":"26"},{"pitch":71,"quantizedStartStep":"26","quantizedEndStep":"28"},{"pitch":84,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":71,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":76,"quantizedStartStep":"36","quantizedEndStep":"38"},{"pitch":72,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":71,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":69,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":76,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":72,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":74,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":71,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":72,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":76,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":69,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":72,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":76,"quantizedStartStep":"64","quantizedEndStep":"66"},{"pitch":74,"quantizedStartStep":"66","quantizedEndStep":"68"},{"pitch":77,"quantizedStartStep":"68","quantizedEndStep":"70"},{"pitch":76,"quantizedStartStep":"70","quantizedEndStep":"72"},{"pitch":77,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":76,"quantizedStartStep":"74","quantizedEndStep":"76"},{"pitch":74,"quantizedStartStep":"76","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":64,"quantizedStartStep":"0","quantizedEndStep":"2"},{"pitch":71,"quantizedStartStep":"2","quantizedEndStep":"4"},{"pitch":71,"quantizedStartStep":"4","quantizedEndStep":"6"},{"pitch":69,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":71,"quantizedStartStep":"8","quantizedEndStep":"10"},{"pitch":69,"quantizedStartStep":"10","quantizedEndStep":"12"},{"pitch":64,"quantizedStartStep":"12","quantizedEndStep":"14"},{"pitch":71,"quantizedStartStep":"14","quantizedEndStep":"16"},{"pitch":64,"quantizedStartStep":"16","quantizedEndStep":"18"},{"pitch":71,"quantizedStartStep":"18","quantizedEndStep":"20"},{"pitch":71,"quantizedStartStep":"20","quantizedEndStep":"22"},{"pitch":69,"quantizedStartStep":"22","quantizedEndStep":"24"},{"pitch":71,"quantizedStartStep":"24","quantizedEndStep":"26"},{"pitch":64,"quantizedStartStep":"26","quantizedEndStep":"28"},{"pitch":71,"quantizedStartStep":"28","quantizedEndStep":"30"},{"pitch":76,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":72,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":76,"quantizedStartStep":"36","quantizedEndStep":"38"},{"pitch":71,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":76,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":72,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":76,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":74,"quantizedStartStep":"46","quantizedEndStep":"48"},{"pitch":72,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":74,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":76,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":74,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":72,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":72,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":72,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":71,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":76,"quantizedStartStep":"64","quantizedEndStep":"66"},{"pitch":74,"quantizedStartStep":"66","quantizedEndStep":"68"},{"pitch":77,"quantizedStartStep":"68","quantizedEndStep":"70"},{"pitch":76,"quantizedStartStep":"70","quantizedEndStep":"72"},{"pitch":77,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":76,"quantizedStartStep":"74","quantizedEndStep":"76"},{"pitch":74,"quantizedStartStep":"76","quantizedEndStep":"78"},{"pitch":71,"quantizedStartStep":"78","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":64,"quantizedStartStep":"0","quantizedEndStep":"4"},{"pitch":72,"quantizedStartStep":"4","quantizedEndStep":"6"},{"pitch":71,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":62,"quantizedStartStep":"8","quantizedEndStep":"10"},{"pitch":72,"quantizedStartStep":"10","quantizedEndStep":"12"},{"pitch":71,"quantizedStartStep":"12","quantizedEndStep":"14"},{"pitch":71,"quantizedStartStep":"16","quantizedEndStep":"18"},{"pitch":64,"quantizedStartStep":"18","quantizedEndStep":"20"},{"pitch":71,"quantizedStartStep":"20","quantizedEndStep":"22"},{"pitch":64,"quantizedStartStep":"22","quantizedEndStep":"24"},{"pitch":62,"quantizedStartStep":"26","quantizedEndStep":"28"},{"pitch":64,"quantizedStartStep":"28","quantizedEndStep":"30"},{"pitch":74,"quantizedStartStep":"30","quantizedEndStep":"32"},{"pitch":76,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":72,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":76,"quantizedStartStep":"36","quantizedEndStep":"38"},{"pitch":76,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":71,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":72,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":69,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":76,"quantizedStartStep":"46","quantizedEndStep":"48"},{"pitch":72,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":74,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":76,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":72,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":74,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":72,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":72,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":72,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":76,"quantizedStartStep":"64","quantizedEndStep":"66"},{"pitch":74,"quantizedStartStep":"66","quantizedEndStep":"68"},{"pitch":77,"quantizedStartStep":"68","quantizedEndStep":"70"},{"pitch":72,"quantizedStartStep":"70","quantizedEndStep":"72"},{"pitch":81,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":74,"quantizedStartStep":"74","quantizedEndStep":"76"},{"pitch":76,"quantizedStartStep":"76","quantizedEndStep":"78"},{"pitch":74,"quantizedStartStep":"78","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":71,"quantizedStartStep":"0","quantizedEndStep":"2"},{"pitch":64,"quantizedStartStep":"2","quantizedEndStep":"4"},{"pitch":71,"quantizedStartStep":"4","quantizedEndStep":"6"},{"pitch":67,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":69,"quantizedStartStep":"8","quantizedEndStep":"10"},{"pitch":64,"quantizedStartStep":"10","quantizedEndStep":"12"},{"pitch":71,"quantizedStartStep":"12","quantizedEndStep":"14"},{"pitch":64,"quantizedStartStep":"14","quantizedEndStep":"16"},{"pitch":71,"quantizedStartStep":"16","quantizedEndStep":"18"},{"pitch":64,"quantizedStartStep":"18","quantizedEndStep":"20"},{"pitch":71,"quantizedStartStep":"20","quantizedEndStep":"22"},{"pitch":64,"quantizedStartStep":"22","quantizedEndStep":"24"},{"pitch":74,"quantizedStartStep":"24","quantizedEndStep":"26"},{"pitch":64,"quantizedStartStep":"26","quantizedEndStep":"28"},{"pitch":74,"quantizedStartStep":"28","quantizedEndStep":"30"},{"pitch":64,"quantizedStartStep":"30","quantizedEndStep":"32"},{"pitch":76,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":72,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":76,"quantizedStartStep":"36","quantizedEndStep":"38"},{"pitch":72,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":71,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":72,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":69,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":72,"quantizedStartStep":"46","quantizedEndStep":"48"},{"pitch":76,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":69,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":71,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":69,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":74,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":65,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":69,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":72,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":76,"quantizedStartStep":"64","quantizedEndStep":"66"},{"pitch":79,"quantizedStartStep":"66","quantizedEndStep":"68"},{"pitch":77,"quantizedStartStep":"68","quantizedEndStep":"70"},{"pitch":76,"quantizedStartStep":"70","quantizedEndStep":"72"},{"pitch":77,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":74,"quantizedStartStep":"74","quantizedEndStep":"76"},{"pitch":76,"quantizedStartStep":"76","quantizedEndStep":"78"},{"pitch":71,"quantizedStartStep":"82","quantizedEndStep":"86"},{"pitch":74,"quantizedStartStep":"86","quantizedEndStep":"92"},{"pitch":67,"quantizedStartStep":"92","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":71,"quantizedStartStep":"0","quantizedEndStep":"2"},{"pitch":64,"quantizedStartStep":"2","quantizedEndStep":"6"},{"pitch":69,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":71,"quantizedStartStep":"8","quantizedEndStep":"10"},{"pitch":62,"quantizedStartStep":"10","quantizedEndStep":"12"},{"pitch":64,"quantizedStartStep":"12","quantizedEndStep":"14"},{"pitch":71,"quantizedStartStep":"14","quantizedEndStep":"16"},{"pitch":71,"quantizedStartStep":"16","quantizedEndStep":"18"},{"pitch":64,"quantizedStartStep":"18","quantizedEndStep":"20"},{"pitch":71,"quantizedStartStep":"20","quantizedEndStep":"22"},{"pitch":67,"quantizedStartStep":"22","quantizedEndStep":"24"},{"pitch":71,"quantizedStartStep":"24","quantizedEndStep":"26"},{"pitch":62,"quantizedStartStep":"26","quantizedEndStep":"28"},{"pitch":64,"quantizedStartStep":"28","quantizedEndStep":"30"},{"pitch":71,"quantizedStartStep":"30","quantizedEndStep":"32"},{"pitch":76,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":72,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":72,"quantizedStartStep":"36","quantizedEndStep":"38"},{"pitch":76,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":72,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":76,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":72,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":69,"quantizedStartStep":"46","quantizedEndStep":"48"},{"pitch":76,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":69,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":71,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":69,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":72,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":69,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":72,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":69,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":76,"quantizedStartStep":"64","quantizedEndStep":"66"},{"pitch":79,"quantizedStartStep":"66","quantizedEndStep":"68"},{"pitch":77,"quantizedStartStep":"68","quantizedEndStep":"70"},{"pitch":81,"quantizedStartStep":"70","quantizedEndStep":"72"},{"pitch":72,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":74,"quantizedStartStep":"74","quantizedEndStep":"76"},{"pitch":72,"quantizedStartStep":"76","quantizedEndStep":"78"},{"pitch":71,"quantizedStartStep":"78","quantizedEndStep":"80"},{"pitch":71,"quantizedStartStep":"80","quantizedEndStep":"84"},{"pitch":74,"quantizedStartStep":"84","quantizedEndStep":"88"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":71,"quantizedStartStep":"0","quantizedEndStep":"2"},{"pitch":64,"quantizedStartStep":"2","quantizedEndStep":"6"},{"pitch":69,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":71,"quantizedStartStep":"8","quantizedEndStep":"10"},{"pitch":62,"quantizedStartStep":"10","quantizedEndStep":"12"},{"pitch":64,"quantizedStartStep":"12","quantizedEndStep":"14"},{"pitch":71,"quantizedStartStep":"14","quantizedEndStep":"16"},{"pitch":71,"quantizedStartStep":"16","quantizedEndStep":"18"},{"pitch":64,"quantizedStartStep":"18","quantizedEndStep":"20"},{"pitch":71,"quantizedStartStep":"20","quantizedEndStep":"22"},{"pitch":67,"quantizedStartStep":"22","quantizedEndStep":"24"},{"pitch":71,"quantizedStartStep":"24","quantizedEndStep":"26"},{"pitch":62,"quantizedStartStep":"26","quantizedEndStep":"28"},{"pitch":67,"quantizedStartStep":"28","quantizedEndStep":"30"},{"pitch":71,"quantizedStartStep":"30","quantizedEndStep":"32"},{"pitch":76,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":72,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":72,"quantizedStartStep":"36","quantizedEndStep":"38"},{"pitch":76,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":72,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":76,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":72,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":69,"quantizedStartStep":"46","quantizedEndStep":"48"},{"pitch":76,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":69,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":71,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":69,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":72,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":69,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":72,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":69,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":76,"quantizedStartStep":"64","quantizedEndStep":"66"},{"pitch":79,"quantizedStartStep":"66","quantizedEndStep":"68"},{"pitch":77,"quantizedStartStep":"68","quantizedEndStep":"70"},{"pitch":69,"quantizedStartStep":"70","quantizedEndStep":"72"},{"pitch":72,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":79,"quantizedStartStep":"74","quantizedEndStep":"76"},{"pitch":76,"quantizedStartStep":"76","quantizedEndStep":"78"},{"pitch":74,"quantizedStartStep":"78","quantizedEndStep":"80"},{"pitch":71,"quantizedStartStep":"80","quantizedEndStep":"82"},{"pitch":74,"quantizedStartStep":"82","quantizedEndStep":"86"},{"pitch":71,"quantizedStartStep":"86","quantizedEndStep":"88"},{"pitch":74,"quantizedStartStep":"88","quantizedEndStep":"92"},{"pitch":71,"quantizedStartStep":"92","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":71,"quantizedStartStep":"0","quantizedEndStep":"4"},{"pitch":64,"quantizedStartStep":"4","quantizedEndStep":"6"},{"pitch":67,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":71,"quantizedStartStep":"8","quantizedEndStep":"10"},{"pitch":62,"quantizedStartStep":"10","quantizedEndStep":"12"},{"pitch":72,"quantizedStartStep":"12","quantizedEndStep":"16"},{"pitch":71,"quantizedStartStep":"16","quantizedEndStep":"18"},{"pitch":64,"quantizedStartStep":"18","quantizedEndStep":"20"},{"pitch":71,"quantizedStartStep":"20","quantizedEndStep":"22"},{"pitch":74,"quantizedStartStep":"22","quantizedEndStep":"24"},{"pitch":64,"quantizedStartStep":"24","quantizedEndStep":"26"},{"pitch":74,"quantizedStartStep":"26","quantizedEndStep":"28"},{"pitch":64,"quantizedStartStep":"28","quantizedEndStep":"32"},{"pitch":76,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":72,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":72,"quantizedStartStep":"36","quantizedEndStep":"38"},{"pitch":72,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":76,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":72,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":72,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":69,"quantizedStartStep":"46","quantizedEndStep":"48"},{"pitch":76,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":69,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":74,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":72,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":69,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":72,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":72,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":69,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":76,"quantizedStartStep":"64","quantizedEndStep":"66"},{"pitch":81,"quantizedStartStep":"66","quantizedEndStep":"68"},{"pitch":69,"quantizedStartStep":"68","quantizedEndStep":"70"},{"pitch":69,"quantizedStartStep":"70","quantizedEndStep":"72"},{"pitch":72,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":69,"quantizedStartStep":"74","quantizedEndStep":"76"},{"pitch":74,"quantizedStartStep":"76","quantizedEndStep":"78"},{"pitch":79,"quantizedStartStep":"78","quantizedEndStep":"80"},{"pitch":71,"quantizedStartStep":"80","quantizedEndStep":"82"},{"pitch":74,"quantizedStartStep":"82","quantizedEndStep":"84"},{"pitch":71,"quantizedStartStep":"84","quantizedEndStep":"86"},{"pitch":74,"quantizedStartStep":"86","quantizedEndStep":"90"},{"pitch":76,"quantizedStartStep":"90","quantizedEndStep":"92"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":71,"quantizedStartStep":"0","quantizedEndStep":"4"},{"pitch":64,"quantizedStartStep":"4","quantizedEndStep":"6"},{"pitch":67,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":71,"quantizedStartStep":"8","quantizedEndStep":"10"},{"pitch":62,"quantizedStartStep":"10","quantizedEndStep":"12"},{"pitch":74,"quantizedStartStep":"12","quantizedEndStep":"14"},{"pitch":71,"quantizedStartStep":"14","quantizedEndStep":"16"},{"pitch":71,"quantizedStartStep":"16","quantizedEndStep":"18"},{"pitch":71,"quantizedStartStep":"18","quantizedEndStep":"20"},{"pitch":67,"quantizedStartStep":"20","quantizedEndStep":"22"},{"pitch":71,"quantizedStartStep":"22","quantizedEndStep":"24"},{"pitch":64,"quantizedStartStep":"24","quantizedEndStep":"26"},{"pitch":64,"quantizedStartStep":"30","quantizedEndStep":"32"},{"pitch":76,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":72,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":72,"quantizedStartStep":"36","quantizedEndStep":"38"},{"pitch":72,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":72,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":72,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":72,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":72,"quantizedStartStep":"46","quantizedEndStep":"48"},{"pitch":76,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":69,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":72,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":74,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":69,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":72,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":77,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":72,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":76,"quantizedStartStep":"64","quantizedEndStep":"66"},{"pitch":77,"quantizedStartStep":"66","quantizedEndStep":"68"},{"pitch":79,"quantizedStartStep":"68","quantizedEndStep":"70"},{"pitch":77,"quantizedStartStep":"70","quantizedEndStep":"72"},{"pitch":69,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":79,"quantizedStartStep":"74","quantizedEndStep":"76"},{"pitch":74,"quantizedStartStep":"76","quantizedEndStep":"78"},{"pitch":79,"quantizedStartStep":"78","quantizedEndStep":"80"},{"pitch":76,"quantizedStartStep":"80","quantizedEndStep":"84"},{"pitch":67,"quantizedStartStep":"84","quantizedEndStep":"86"},{"pitch":64,"quantizedStartStep":"86","quantizedEndStep":"88"},{"pitch":74,"quantizedStartStep":"92","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":71,"quantizedStartStep":"0","quantizedEndStep":"4"},{"pitch":64,"quantizedStartStep":"4","quantizedEndStep":"6"},{"pitch":67,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":71,"quantizedStartStep":"8","quantizedEndStep":"10"},{"pitch":74,"quantizedStartStep":"10","quantizedEndStep":"12"},{"pitch":69,"quantizedStartStep":"12","quantizedEndStep":"16"},{"pitch":71,"quantizedStartStep":"16","quantizedEndStep":"20"},{"pitch":64,"quantizedStartStep":"20","quantizedEndStep":"22"},{"pitch":67,"quantizedStartStep":"22","quantizedEndStep":"24"},{"pitch":64,"quantizedStartStep":"28","quantizedEndStep":"30"},{"pitch":74,"quantizedStartStep":"30","quantizedEndStep":"32"},{"pitch":76,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":72,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":72,"quantizedStartStep":"36","quantizedEndStep":"38"},{"pitch":65,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":72,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":77,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":76,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":77,"quantizedStartStep":"46","quantizedEndStep":"48"},{"pitch":76,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":69,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":72,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":74,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":77,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":69,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":72,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":69,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":76,"quantizedStartStep":"64","quantizedEndStep":"65"},{"pitch":74,"quantizedStartStep":"65","quantizedEndStep":"66"},{"pitch":76,"quantizedStartStep":"66","quantizedEndStep":"67"},{"pitch":74,"quantizedStartStep":"67","quantizedEndStep":"68"},{"pitch":76,"quantizedStartStep":"68","quantizedEndStep":"69"},{"pitch":74,"quantizedStartStep":"69","quantizedEndStep":"70"},{"pitch":76,"quantizedStartStep":"70","quantizedEndStep":"71"},{"pitch":79,"quantizedStartStep":"71","quantizedEndStep":"72"},{"pitch":76,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":79,"quantizedStartStep":"74","quantizedEndStep":"76"},{"pitch":76,"quantizedStartStep":"76","quantizedEndStep":"78"},{"pitch":79,"quantizedStartStep":"78","quantizedEndStep":"80"},{"pitch":76,"quantizedStartStep":"80","quantizedEndStep":"84"},{"pitch":67,"quantizedStartStep":"84","quantizedEndStep":"86"},{"pitch":64,"quantizedStartStep":"86","quantizedEndStep":"88"},{"pitch":67,"quantizedStartStep":"88","quantizedEndStep":"90"},{"pitch":74,"quantizedStartStep":"90","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":71,"quantizedStartStep":"0","quantizedEndStep":"4"},{"pitch":67,"quantizedStartStep":"4","quantizedEndStep":"6"},{"pitch":71,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":64,"quantizedStartStep":"8","quantizedEndStep":"10"},{"pitch":71,"quantizedStartStep":"10","quantizedEndStep":"12"},{"pitch":74,"quantizedStartStep":"12","quantizedEndStep":"14"},{"pitch":71,"quantizedStartStep":"16","quantizedEndStep":"20"},{"pitch":64,"quantizedStartStep":"20","quantizedEndStep":"22"},{"pitch":67,"quantizedStartStep":"22","quantizedEndStep":"24"},{"pitch":71,"quantizedStartStep":"28","quantizedEndStep":"30"},{"pitch":74,"quantizedStartStep":"30","quantizedEndStep":"32"},{"pitch":76,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":72,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":72,"quantizedStartStep":"36","quantizedEndStep":"38"},{"pitch":65,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":72,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":77,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":72,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":79,"quantizedStartStep":"46","quantizedEndStep":"48"},{"pitch":76,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":69,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":72,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":69,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":72,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":81,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":69,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":72,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":79,"quantizedStartStep":"64","quantizedEndStep":"66"},{"pitch":77,"quantizedStartStep":"66","quantizedEndStep":"68"},{"pitch":76,"quantizedStartStep":"68","quantizedEndStep":"69"},{"pitch":77,"quantizedStartStep":"69","quantizedEndStep":"70"},{"pitch":79,"quantizedStartStep":"70","quantizedEndStep":"72"},{"pitch":88,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":77,"quantizedStartStep":"74","quantizedEndStep":"76"},{"pitch":74,"quantizedStartStep":"76","quantizedEndStep":"78"},{"pitch":77,"quantizedStartStep":"78","quantizedEndStep":"80"},{"pitch":76,"quantizedStartStep":"80","quantizedEndStep":"82"},{"pitch":74,"quantizedStartStep":"82","quantizedEndStep":"84"},{"pitch":71,"quantizedStartStep":"84","quantizedEndStep":"86"},{"pitch":67,"quantizedStartStep":"86","quantizedEndStep":"88"},{"pitch":64,"quantizedStartStep":"88","quantizedEndStep":"90"},{"pitch":67,"quantizedStartStep":"90","quantizedEndStep":"92"},{"pitch":64,"quantizedStartStep":"92","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":71,"quantizedStartStep":"0","quantizedEndStep":"4"},{"pitch":67,"quantizedStartStep":"4","quantizedEndStep":"6"},{"pitch":71,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":64,"quantizedStartStep":"10","quantizedEndStep":"14"},{"pitch":67,"quantizedStartStep":"14","quantizedEndStep":"18"},{"pitch":64,"quantizedStartStep":"18","quantizedEndStep":"20"},{"pitch":71,"quantizedStartStep":"20","quantizedEndStep":"22"},{"pitch":74,"quantizedStartStep":"22","quantizedEndStep":"26"},{"pitch":76,"quantizedStartStep":"26","quantizedEndStep":"28"},{"pitch":74,"quantizedStartStep":"28","quantizedEndStep":"30"},{"pitch":67,"quantizedStartStep":"30","quantizedEndStep":"32"},{"pitch":76,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":72,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":72,"quantizedStartStep":"36","quantizedEndStep":"38"},{"pitch":65,"quantizedStartStep":"38","quantizedEndStep":"39"},{"pitch":72,"quantizedStartStep":"39","quantizedEndStep":"40"},{"pitch":76,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":79,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":72,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":77,"quantizedStartStep":"46","quantizedEndStep":"48"},{"pitch":76,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":69,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":72,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":69,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":72,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":81,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":69,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":72,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":79,"quantizedStartStep":"64","quantizedEndStep":"66"},{"pitch":77,"quantizedStartStep":"66","quantizedEndStep":"68"},{"pitch":72,"quantizedStartStep":"68","quantizedEndStep":"70"},{"pitch":77,"quantizedStartStep":"70","quantizedEndStep":"72"},{"pitch":77,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":79,"quantizedStartStep":"74","quantizedEndStep":"76"},{"pitch":74,"quantizedStartStep":"76","quantizedEndStep":"78"},{"pitch":76,"quantizedStartStep":"78","quantizedEndStep":"80"},{"pitch":76,"quantizedStartStep":"80","quantizedEndStep":"82"},{"pitch":67,"quantizedStartStep":"82","quantizedEndStep":"84"},{"pitch":72,"quantizedStartStep":"84","quantizedEndStep":"86"},{"pitch":74,"quantizedStartStep":"86","quantizedEndStep":"88"},{"pitch":64,"quantizedStartStep":"88","quantizedEndStep":"90"},{"pitch":74,"quantizedStartStep":"90","quantizedEndStep":"92"},{"pitch":76,"quantizedStartStep":"92","quantizedEndStep":"94"},{"pitch":67,"quantizedStartStep":"94","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":64,"quantizedStartStep":"2","quantizedEndStep":"6"},{"pitch":74,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":76,"quantizedStartStep":"8","quantizedEndStep":"12"},{"pitch":64,"quantizedStartStep":"12","quantizedEndStep":"18"},{"pitch":64,"quantizedStartStep":"18","quantizedEndStep":"22"},{"pitch":69,"quantizedStartStep":"22","quantizedEndStep":"28"},{"pitch":76,"quantizedStartStep":"28","quantizedEndStep":"30"},{"pitch":76,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":72,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":65,"quantizedStartStep":"36","quantizedEndStep":"37"},{"pitch":72,"quantizedStartStep":"37","quantizedEndStep":"38"},{"pitch":76,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":72,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":77,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":72,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":69,"quantizedStartStep":"46","quantizedEndStep":"48"},{"pitch":76,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":69,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":72,"quantizedStartStep":"52","quantizedEndStep":"54"},{"pitch":69,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":77,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":69,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":77,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":79,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":79,"quantizedStartStep":"64","quantizedEndStep":"66"},{"pitch":77,"quantizedStartStep":"66","quantizedEndStep":"67"},{"pitch":76,"quantizedStartStep":"67","quantizedEndStep":"68"},{"pitch":74,"quantizedStartStep":"68","quantizedEndStep":"69"},{"pitch":76,"quantizedStartStep":"69","quantizedEndStep":"70"},{"pitch":79,"quantizedStartStep":"70","quantizedEndStep":"71"},{"pitch":76,"quantizedStartStep":"71","quantizedEndStep":"72"},{"pitch":74,"quantizedStartStep":"72","quantizedEndStep":"74"},{"pitch":76,"quantizedStartStep":"74","quantizedEndStep":"75"},{"pitch":74,"quantizedStartStep":"75","quantizedEndStep":"76"},{"pitch":76,"quantizedStartStep":"76","quantizedEndStep":"78"},{"pitch":72,"quantizedStartStep":"78","quantizedEndStep":"80"},{"pitch":76,"quantizedStartStep":"80","quantizedEndStep":"82"},{"pitch":72,"quantizedStartStep":"82","quantizedEndStep":"84"},{"pitch":67,"quantizedStartStep":"84","quantizedEndStep":"86"},{"pitch":69,"quantizedStartStep":"86","quantizedEndStep":"88"},{"pitch":74,"quantizedStartStep":"88","quantizedEndStep":"90"},{"pitch":67,"quantizedStartStep":"90","quantizedEndStep":"92"},{"pitch":76,"quantizedStartStep":"92","quantizedEndStep":"94"},{"pitch":67,"quantizedStartStep":"94","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":71,"quantizedStartStep":"2","quantizedEndStep":"6"},{"pitch":67,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":71,"quantizedStartStep":"8","quantizedEndStep":"10"},{"pitch":67,"quantizedStartStep":"10","quantizedEndStep":"14"},{"pitch":69,"quantizedStartStep":"14","quantizedEndStep":"18"},{"pitch":71,"quantizedStartStep":"18","quantizedEndStep":"22"},{"pitch":67,"quantizedStartStep":"22","quantizedEndStep":"24"},{"pitch":71,"quantizedStartStep":"24","quantizedEndStep":"28"},{"pitch":67,"quantizedStartStep":"28","quantizedEndStep":"30"},{"pitch":71,"quantizedStartStep":"30","quantizedEndStep":"32"},{"pitch":88,"quantizedStartStep":"32","quantizedEndStep":"34"},{"pitch":77,"quantizedStartStep":"34","quantizedEndStep":"36"},{"pitch":72,"quantizedStartStep":"36","quantizedEndStep":"37"},{"pitch":69,"quantizedStartStep":"37","quantizedEndStep":"38"},{"pitch":72,"quantizedStartStep":"38","quantizedEndStep":"40"},{"pitch":77,"quantizedStartStep":"40","quantizedEndStep":"42"},{"pitch":72,"quantizedStartStep":"42","quantizedEndStep":"44"},{"pitch":77,"quantizedStartStep":"44","quantizedEndStep":"46"},{"pitch":72,"quantizedStartStep":"46","quantizedEndStep":"47"},{"pitch":72,"quantizedStartStep":"47","quantizedEndStep":"48"},{"pitch":76,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":79,"quantizedStartStep":"50","quantizedEndStep":"52"},{"pitch":72,"quantizedStartStep":"52","quantizedEndStep":"53"},{"pitch":69,"quantizedStartStep":"53","quantizedEndStep":"54"},{"pitch":76,"quantizedStartStep":"54","quantizedEndStep":"56"},{"pitch":79,"quantizedStartStep":"56","quantizedEndStep":"58"},{"pitch":77,"quantizedStartStep":"58","quantizedEndStep":"60"},{"pitch":69,"quantizedStartStep":"60","quantizedEndStep":"62"},{"pitch":72,"quantizedStartStep":"62","quantizedEndStep":"64"},{"pitch":79,"quantizedStartStep":"64","quantizedEndStep":"65"},{"pitch":76,"quantizedStartStep":"65","quantizedEndStep":"66"},{"pitch":74,"quantizedStartStep":"66","quantizedEndStep":"67"},{"pitch":72,"quantizedStartStep":"67","quantizedEndStep":"68"},{"pitch":76,"quantizedStartStep":"68","quantizedEndStep":"69"},{"pitch":74,"quantizedStartStep":"69","quantizedEndStep":"70"},{"pitch":84,"quantizedStartStep":"70","quantizedEndStep":"71"},{"pitch":74,"quantizedStartStep":"71","quantizedEndStep":"72"},{"pitch":76,"quantizedStartStep":"72","quantizedEndStep":"73"},{"pitch":74,"quantizedStartStep":"73","quantizedEndStep":"74"},{"pitch":83,"quantizedStartStep":"74","quantizedEndStep":"75"},{"pitch":74,"quantizedStartStep":"75","quantizedEndStep":"76"},{"pitch":76,"quantizedStartStep":"76","quantizedEndStep":"77"},{"pitch":74,"quantizedStartStep":"77","quantizedEndStep":"78"},{"pitch":83,"quantizedStartStep":"78","quantizedEndStep":"79"},{"pitch":74,"quantizedStartStep":"79","quantizedEndStep":"80"},{"pitch":76,"quantizedStartStep":"80","quantizedEndStep":"82"},{"pitch":72,"quantizedStartStep":"82","quantizedEndStep":"84"},{"pitch":67,"quantizedStartStep":"84","quantizedEndStep":"86"},{"pitch":69,"quantizedStartStep":"86","quantizedEndStep":"88"},{"pitch":72,"quantizedStartStep":"88","quantizedEndStep":"90"},{"pitch":74,"quantizedStartStep":"90","quantizedEndStep":"92"},{"pitch":67,"quantizedStartStep":"92","quantizedEndStep":"94"},{"pitch":76,"quantizedStartStep":"94","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":71,"quantizedStartStep":"2","quantizedEndStep":"6"},{"pitch":67,"quantizedStartStep":"6","quantizedEndStep":"8"},{"pitch":71,"quantizedStartStep":"8","quantizedEndStep":"12"},{"pitch":69,"quantizedStartStep":"12","quantizedEndStep":"18"},{"pitch":71,"quantizedStartStep":"18","quantizedEndStep":"22"},{"pitch":67,"quantizedStartStep":"22","quantizedEndStep":"26"},{"pitch":64,"quantizedStartStep":"26","quantizedEndStep":"30"},{"pitch":79,"quantizedStartStep":"30","quantizedEndStep":"32"},{"pitch":88,"quantizedStartStep":"32","quantizedEndStep":"33"},{"pitch":88,"quantizedStartStep":"33","quantizedEndStep":"34"},{"pitch":84,"quantizedStartStep":"34","quantizedEndStep":"35"},{"pitch":88,"quantizedStartStep":"35","quantizedEndStep":"36"},{"pitch":86,"quantizedStartStep":"36","quantizedEndStep":"37"},{"pitch":88,"quantizedStartStep":"37","quantizedEndStep":"38"},{"pitch":89,"quantizedStartStep":"38","quantizedEndStep":"39"},{"pitch":88,"quantizedStartStep":"39","quantizedEndStep":"40"},{"pitch":89,"quantizedStartStep":"40","quantizedEndStep":"41"},{"pitch":88,"quantizedStartStep":"41","quantizedEndStep":"42"},{"pitch":86,"quantizedStartStep":"42","quantizedEndStep":"43"},{"pitch":88,"quantizedStartStep":"43","quantizedEndStep":"44"},{"pitch":89,"quantizedStartStep":"44","quantizedEndStep":"45"},{"pitch":88,"quantizedStartStep":"45","quantizedEndStep":"46"},{"pitch":93,"quantizedStartStep":"46","quantizedEndStep":"47"},{"pitch":88,"quantizedStartStep":"47","quantizedEndStep":"48"},{"pitch":76,"quantizedStartStep":"48","quantizedEndStep":"50"},{"pitch":79,"quantizedStartStep":"50","quantizedEndStep":"51"},{"pitch":76,"quantizedStartStep":"51","quantizedEndStep":"52"},{"pitch":74,"quantizedStartStep":"52","quantizedEndStep":"53"},{"pitch":76,"quantizedStartStep":"53","quantizedEndStep":"54"},{"pitch":79,"quantizedStartStep":"54","quantizedEndStep":"55"},{"pitch":76,"quantizedStartStep":"55","quantizedEndStep":"56"},{"pitch":74,"quantizedStartStep":"56","quantizedEndStep":"57"},{"pitch":76,"quantizedStartStep":"57","quantizedEndStep":"58"},{"pitch":79,"quantizedStartStep":"58","quantizedEndStep":"59"},{"pitch":74,"quantizedStartStep":"59","quantizedEndStep":"60"},{"pitch":76,"quantizedStartStep":"60","quantizedEndStep":"61"},{"pitch":74,"quantizedStartStep":"61","quantizedEndStep":"62"},{"pitch":76,"quantizedStartStep":"62","quantizedEndStep":"63"},{"pitch":72,"quantizedStartStep":"63","quantizedEndStep":"64"},{"pitch":79,"quantizedStartStep":"64","quantizedEndStep":"65"},{"pitch":76,"quantizedStartStep":"65","quantizedEndStep":"66"},{"pitch":74,"quantizedStartStep":"66","quantizedEndStep":"67"},{"pitch":72,"quantizedStartStep":"67","quantizedEndStep":"68"},{"pitch":76,"quantizedStartStep":"68","quantizedEndStep":"69"},{"pitch":79,"quantizedStartStep":"69","quantizedEndStep":"70"},{"pitch":81,"quantizedStartStep":"70","quantizedEndStep":"71"},{"pitch":74,"quantizedStartStep":"71","quantizedEndStep":"72"},{"pitch":83,"quantizedStartStep":"72","quantizedEndStep":"73"},{"pitch":74,"quantizedStartStep":"73","quantizedEndStep":"74"},{"pitch":79,"quantizedStartStep":"74","quantizedEndStep":"75"},{"pitch":74,"quantizedStartStep":"75","quantizedEndStep":"76"},{"pitch":83,"quantizedStartStep":"76","quantizedEndStep":"77"},{"pitch":74,"quantizedStartStep":"77","quantizedEndStep":"78"},{"pitch":83,"quantizedStartStep":"78","quantizedEndStep":"79"},{"pitch":74,"quantizedStartStep":"79","quantizedEndStep":"80"},{"pitch":76,"quantizedStartStep":"80","quantizedEndStep":"81"},{"pitch":74,"quantizedStartStep":"81","quantizedEndStep":"82"},{"pitch":72,"quantizedStartStep":"82","quantizedEndStep":"84"},{"pitch":71,"quantizedStartStep":"84","quantizedEndStep":"86"},{"pitch":69,"quantizedStartStep":"86","quantizedEndStep":"88"},{"pitch":72,"quantizedStartStep":"88","quantizedEndStep":"90"},{"pitch":69,"quantizedStartStep":"90","quantizedEndStep":"92"},{"pitch":67,"quantizedStartStep":"92","quantizedEndStep":"94"},{"pitch":72,"quantizedStartStep":"94","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":64,"quantizedStartStep":"6","quantizedEndStep":"10"},{"pitch":74,"quantizedStartStep":"10","quantizedEndStep":"14"},{"pitch":76,"quantizedStartStep":"14","quantizedEndStep":"20"},{"pitch":72,"quantizedStartStep":"20","quantizedEndStep":"28"},{"pitch":62,"quantizedStartStep":"28","quantizedEndStep":"32"},{"pitch":88,"quantizedStartStep":"32","quantizedEndStep":"33"},{"pitch":88,"quantizedStartStep":"33","quantizedEndStep":"34"},{"pitch":84,"quantizedStartStep":"34","quantizedEndStep":"35"},{"pitch":88,"quantizedStartStep":"35","quantizedEndStep":"36"},{"pitch":86,"quantizedStartStep":"36","quantizedEndStep":"37"},{"pitch":88,"quantizedStartStep":"37","quantizedEndStep":"38"},{"pitch":89,"quantizedStartStep":"38","quantizedEndStep":"39"},{"pitch":88,"quantizedStartStep":"39","quantizedEndStep":"40"},{"pitch":89,"quantizedStartStep":"40","quantizedEndStep":"41"},{"pitch":88,"quantizedStartStep":"41","quantizedEndStep":"42"},{"pitch":93,"quantizedStartStep":"42","quantizedEndStep":"43"},{"pitch":88,"quantizedStartStep":"43","quantizedEndStep":"44"},{"pitch":93,"quantizedStartStep":"44","quantizedEndStep":"45"},{"pitch":88,"quantizedStartStep":"45","quantizedEndStep":"46"},{"pitch":86,"quantizedStartStep":"46","quantizedEndStep":"47"},{"pitch":88,"quantizedStartStep":"47","quantizedEndStep":"48"},{"pitch":88,"quantizedStartStep":"48","quantizedEndStep":"49"},{"pitch":86,"quantizedStartStep":"49","quantizedEndStep":"50"},{"pitch":88,"quantizedStartStep":"50","quantizedEndStep":"51"},{"pitch":86,"quantizedStartStep":"51","quantizedEndStep":"52"},{"pitch":88,"quantizedStartStep":"52","quantizedEndStep":"53"},{"pitch":81,"quantizedStartStep":"53","quantizedEndStep":"54"},{"pitch":86,"quantizedStartStep":"54","quantizedEndStep":"55"},{"pitch":88,"quantizedStartStep":"55","quantizedEndStep":"56"},{"pitch":81,"quantizedStartStep":"56","quantizedEndStep":"57"},{"pitch":88,"quantizedStartStep":"57","quantizedEndStep":"58"},{"pitch":86,"quantizedStartStep":"58","quantizedEndStep":"59"},{"pitch":88,"quantizedStartStep":"59","quantizedEndStep":"60"},{"pitch":81,"quantizedStartStep":"60","quantizedEndStep":"61"},{"pitch":88,"quantizedStartStep":"61","quantizedEndStep":"62"},{"pitch":93,"quantizedStartStep":"62","quantizedEndStep":"63"},{"pitch":88,"quantizedStartStep":"63","quantizedEndStep":"64"},{"pitch":79,"quantizedStartStep":"64","quantizedEndStep":"65"},{"pitch":76,"quantizedStartStep":"65","quantizedEndStep":"66"},{"pitch":74,"quantizedStartStep":"66","quantizedEndStep":"67"},{"pitch":72,"quantizedStartStep":"67","quantizedEndStep":"68"},{"pitch":76,"quantizedStartStep":"68","quantizedEndStep":"69"},{"pitch":79,"quantizedStartStep":"69","quantizedEndStep":"70"},{"pitch":81,"quantizedStartStep":"70","quantizedEndStep":"71"},{"pitch":74,"quantizedStartStep":"71","quantizedEndStep":"72"},{"pitch":88,"quantizedStartStep":"72","quantizedEndStep":"73"},{"pitch":86,"quantizedStartStep":"73","quantizedEndStep":"74"},{"pitch":88,"quantizedStartStep":"74","quantizedEndStep":"75"},{"pitch":86,"quantizedStartStep":"75","quantizedEndStep":"76"},{"pitch":83,"quantizedStartStep":"76","quantizedEndStep":"77"},{"pitch":74,"quantizedStartStep":"77","quantizedEndStep":"78"},{"pitch":79,"quantizedStartStep":"78","quantizedEndStep":"79"},{"pitch":74,"quantizedStartStep":"79","quantizedEndStep":"80"},{"pitch":76,"quantizedStartStep":"80","quantizedEndStep":"81"},{"pitch":72,"quantizedStartStep":"81","quantizedEndStep":"82"},{"pitch":74,"quantizedStartStep":"82","quantizedEndStep":"83"},{"pitch":71,"quantizedStartStep":"83","quantizedEndStep":"84"},{"pitch":67,"quantizedStartStep":"84","quantizedEndStep":"85"},{"pitch":74,"quantizedStartStep":"85","quantizedEndStep":"86"},{"pitch":76,"quantizedStartStep":"86","quantizedEndStep":"87"},{"pitch":67,"quantizedStartStep":"87","quantizedEndStep":"88"},{"pitch":76,"quantizedStartStep":"88","quantizedEndStep":"89"},{"pitch":74,"quantizedStartStep":"89","quantizedEndStep":"90"},{"pitch":76,"quantizedStartStep":"90","quantizedEndStep":"91"},{"pitch":67,"quantizedStartStep":"91","quantizedEndStep":"92"},{"pitch":83,"quantizedStartStep":"92","quantizedEndStep":"93"},{"pitch":74,"quantizedStartStep":"93","quantizedEndStep":"94"},{"pitch":76,"quantizedStartStep":"94","quantizedEndStep":"95"},{"pitch":67,"quantizedStartStep":"95","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":64,"quantizedStartStep":"8","quantizedEndStep":"14"},{"pitch":79,"quantizedStartStep":"14","quantizedEndStep":"32"},{"pitch":88,"quantizedStartStep":"32","quantizedEndStep":"33"},{"pitch":88,"quantizedStartStep":"33","quantizedEndStep":"34"},{"pitch":84,"quantizedStartStep":"34","quantizedEndStep":"35"},{"pitch":88,"quantizedStartStep":"35","quantizedEndStep":"36"},{"pitch":91,"quantizedStartStep":"36","quantizedEndStep":"37"},{"pitch":93,"quantizedStartStep":"37","quantizedEndStep":"38"},{"pitch":84,"quantizedStartStep":"38","quantizedEndStep":"39"},{"pitch":88,"quantizedStartStep":"39","quantizedEndStep":"40"},{"pitch":93,"quantizedStartStep":"40","quantizedEndStep":"41"},{"pitch":88,"quantizedStartStep":"41","quantizedEndStep":"42"},{"pitch":84,"quantizedStartStep":"42","quantizedEndStep":"43"},{"pitch":93,"quantizedStartStep":"43","quantizedEndStep":"44"},{"pitch":88,"quantizedStartStep":"44","quantizedEndStep":"45"},{"pitch":93,"quantizedStartStep":"45","quantizedEndStep":"46"},{"pitch":88,"quantizedStartStep":"46","quantizedEndStep":"47"},{"pitch":93,"quantizedStartStep":"47","quantizedEndStep":"48"},{"pitch":88,"quantizedStartStep":"48","quantizedEndStep":"49"},{"pitch":86,"quantizedStartStep":"49","quantizedEndStep":"50"},{"pitch":84,"quantizedStartStep":"50","quantizedEndStep":"51"},{"pitch":74,"quantizedStartStep":"51","quantizedEndStep":"52"},{"pitch":76,"quantizedStartStep":"52","quantizedEndStep":"53"},{"pitch":86,"quantizedStartStep":"53","quantizedEndStep":"54"},{"pitch":84,"quantizedStartStep":"54","quantizedEndStep":"55"},{"pitch":88,"quantizedStartStep":"55","quantizedEndStep":"56"},{"pitch":86,"quantizedStartStep":"56","quantizedEndStep":"57"},{"pitch":84,"quantizedStartStep":"57","quantizedEndStep":"58"},{"pitch":88,"quantizedStartStep":"58","quantizedEndStep":"59"},{"pitch":84,"quantizedStartStep":"59","quantizedEndStep":"60"},{"pitch":86,"quantizedStartStep":"60","quantizedEndStep":"61"},{"pitch":88,"quantizedStartStep":"61","quantizedEndStep":"62"},{"pitch":84,"quantizedStartStep":"62","quantizedEndStep":"63"},{"pitch":86,"quantizedStartStep":"63","quantizedEndStep":"64"},{"pitch":79,"quantizedStartStep":"64","quantizedEndStep":"65"},{"pitch":81,"quantizedStartStep":"65","quantizedEndStep":"66"},{"pitch":88,"quantizedStartStep":"66","quantizedEndStep":"67"},{"pitch":91,"quantizedStartStep":"67","quantizedEndStep":"68"},{"pitch":93,"quantizedStartStep":"68","quantizedEndStep":"69"},{"pitch":91,"quantizedStartStep":"69","quantizedEndStep":"70"},{"pitch":88,"quantizedStartStep":"70","quantizedEndStep":"71"},{"pitch":86,"quantizedStartStep":"71","quantizedEndStep":"72"},{"pitch":84,"quantizedStartStep":"72","quantizedEndStep":"73"},{"pitch":88,"quantizedStartStep":"73","quantizedEndStep":"74"},{"pitch":91,"quantizedStartStep":"74","quantizedEndStep":"75"},{"pitch":88,"quantizedStartStep":"75","quantizedEndStep":"76"},{"pitch":86,"quantizedStartStep":"76","quantizedEndStep":"77"},{"pitch":88,"quantizedStartStep":"77","quantizedEndStep":"78"},{"pitch":91,"quantizedStartStep":"78","quantizedEndStep":"79"},{"pitch":88,"quantizedStartStep":"79","quantizedEndStep":"80"},{"pitch":89,"quantizedStartStep":"80","quantizedEndStep":"82"},{"pitch":88,"quantizedStartStep":"82","quantizedEndStep":"83"},{"pitch":86,"quantizedStartStep":"83","quantizedEndStep":"84"},{"pitch":84,"quantizedStartStep":"84","quantizedEndStep":"86"},{"pitch":93,"quantizedStartStep":"86","quantizedEndStep":"88"},{"pitch":89,"quantizedStartStep":"88","quantizedEndStep":"90"},{"pitch":93,"quantizedStartStep":"90","quantizedEndStep":"92"},{"pitch":89,"quantizedStartStep":"92","quantizedEndStep":"94"},{"pitch":91,"quantizedStartStep":"94","quantizedEndStep":"96"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":88,"quantizedStartStep":"32","quantizedEndStep":"33"},{"pitch":88,"quantizedStartStep":"33","quantizedEndStep":"34"},{"pitch":84,"quantizedStartStep":"34","quantizedEndStep":"35"},{"pitch":88,"quantizedStartStep":"35","quantizedEndStep":"36"},{"pitch":93,"quantizedStartStep":"36","quantizedEndStep":"37"},{"pitch":88,"quantizedStartStep":"37","quantizedEndStep":"38"},{"pitch":84,"quantizedStartStep":"38","quantizedEndStep":"39"},{"pitch":93,"quantizedStartStep":"39","quantizedEndStep":"40"},{"pitch":93,"quantizedStartStep":"40","quantizedEndStep":"41"},{"pitch":96,"quantizedStartStep":"41","quantizedEndStep":"42"},{"pitch":88,"quantizedStartStep":"42","quantizedEndStep":"43"},{"pitch":93,"quantizedStartStep":"43","quantizedEndStep":"44"},{"pitch":96,"quantizedStartStep":"44","quantizedEndStep":"45"},{"pitch":93,"quantizedStartStep":"45","quantizedEndStep":"46"},{"pitch":88,"quantizedStartStep":"46","quantizedEndStep":"47"},{"pitch":84,"quantizedStartStep":"47","quantizedEndStep":"48"},{"pitch":76,"quantizedStartStep":"49","quantizedEndStep":"50"},{"pitch":79,"quantizedStartStep":"50","quantizedEndStep":"51"},{"pitch":76,"quantizedStartStep":"51","quantizedEndStep":"52"},{"pitch":86,"quantizedStartStep":"52","quantizedEndStep":"53"},{"pitch":88,"quantizedStartStep":"53","quantizedEndStep":"54"},{"pitch":84,"quantizedStartStep":"54","quantizedEndStep":"55"},{"pitch":81,"quantizedStartStep":"55","quantizedEndStep":"56"},{"pitch":76,"quantizedStartStep":"56","quantizedEndStep":"57"},{"pitch":86,"quantizedStartStep":"57","quantizedEndStep":"58"},{"pitch":88,"quantizedStartStep":"58","quantizedEndStep":"59"},{"pitch":81,"quantizedStartStep":"59","quantizedEndStep":"60"},{"pitch":86,"quantizedStartStep":"60","quantizedEndStep":"61"},{"pitch":88,"quantizedStartStep":"61","quantizedEndStep":"62"},{"pitch":81,"quantizedStartStep":"62","quantizedEndStep":"63"},{"pitch":84,"quantizedStartStep":"63","quantizedEndStep":"64"},{"pitch":79,"quantizedStartStep":"64","quantizedEndStep":"65"},{"pitch":81,"quantizedStartStep":"65","quantizedEndStep":"66"},{"pitch":88,"quantizedStartStep":"66","quantizedEndStep":"67"},{"pitch":91,"quantizedStartStep":"67","quantizedEndStep":"68"},{"pitch":93,"quantizedStartStep":"68","quantizedEndStep":"69"},{"pitch":91,"quantizedStartStep":"69","quantizedEndStep":"70"},{"pitch":93,"quantizedStartStep":"70","quantizedEndStep":"71"},{"pitch":88,"quantizedStartStep":"71","quantizedEndStep":"72"},{"pitch":86,"quantizedStartStep":"72","quantizedEndStep":"73"},{"pitch":88,"quantizedStartStep":"73","quantizedEndStep":"74"},{"pitch":93,"quantizedStartStep":"74","quantizedEndStep":"75"},{"pitch":91,"quantizedStartStep":"75","quantizedEndStep":"76"},{"pitch":86,"quantizedStartStep":"76","quantizedEndStep":"77"},{"pitch":88,"quantizedStartStep":"77","quantizedEndStep":"78"},{"pitch":86,"quantizedStartStep":"78","quantizedEndStep":"79"},{"pitch":88,"quantizedStartStep":"79","quantizedEndStep":"80"},{"pitch":89,"quantizedStartStep":"80","quantizedEndStep":"81"},{"pitch":88,"quantizedStartStep":"81","quantizedEndStep":"82"},{"pitch":86,"quantizedStartStep":"82","quantizedEndStep":"83"},{"pitch":88,"quantizedStartStep":"83","quantizedEndStep":"84"},{"pitch":86,"quantizedStartStep":"84","quantizedEndStep":"85"},{"pitch":88,"quantizedStartStep":"85","quantizedEndStep":"86"},{"pitch":89,"quantizedStartStep":"86","quantizedEndStep":"87"},{"pitch":88,"quantizedStartStep":"87","quantizedEndStep":"88"},{"pitch":86,"quantizedStartStep":"88","quantizedEndStep":"89"},{"pitch":88,"quantizedStartStep":"89","quantizedEndStep":"90"},{"pitch":93,"quantizedStartStep":"90","quantizedEndStep":"91"},{"pitch":88,"quantizedStartStep":"91","quantizedEndStep":"92"},{"pitch":86,"quantizedStartStep":"92","quantizedEndStep":"93"},{"pitch":88,"quantizedStartStep":"93","quantizedEndStep":"94"},{"pitch":93,"quantizedStartStep":"94","quantizedEndStep":"95"},{"pitch":88,"quantizedStartStep":"95","quantizedEndStep":"96"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":88,"quantizedStartStep":"32","quantizedEndStep":"33"},{"pitch":88,"quantizedStartStep":"33","quantizedEndStep":"34"},{"pitch":84,"quantizedStartStep":"34","quantizedEndStep":"35"},{"pitch":88,"quantizedStartStep":"35","quantizedEndStep":"36"},{"pitch":93,"quantizedStartStep":"36","quantizedEndStep":"37"},{"pitch":88,"quantizedStartStep":"37","quantizedEndStep":"38"},{"pitch":84,"quantizedStartStep":"38","quantizedEndStep":"39"},{"pitch":93,"quantizedStartStep":"39","quantizedEndStep":"40"},{"pitch":93,"quantizedStartStep":"40","quantizedEndStep":"41"},{"pitch":96,"quantizedStartStep":"41","quantizedEndStep":"42"},{"pitch":93,"quantizedStartStep":"42","quantizedEndStep":"43"},{"pitch":96,"quantizedStartStep":"43","quantizedEndStep":"44"},{"pitch":88,"quantizedStartStep":"44","quantizedEndStep":"45"},{"pitch":93,"quantizedStartStep":"45","quantizedEndStep":"46"},{"pitch":84,"quantizedStartStep":"46","quantizedEndStep":"47"},{"pitch":88,"quantizedStartStep":"47","quantizedEndStep":"48"},{"pitch":77,"quantizedStartStep":"50","quantizedEndStep":"51"},{"pitch":76,"quantizedStartStep":"51","quantizedEndStep":"52"},{"pitch":81,"quantizedStartStep":"52","quantizedEndStep":"53"},{"pitch":86,"quantizedStartStep":"53","quantizedEndStep":"54"},{"pitch":84,"quantizedStartStep":"54","quantizedEndStep":"55"},{"pitch":81,"quantizedStartStep":"55","quantizedEndStep":"56"},{"pitch":86,"quantizedStartStep":"56","quantizedEndStep":"57"},{"pitch":88,"quantizedStartStep":"57","quantizedEndStep":"58"},{"pitch":86,"quantizedStartStep":"58","quantizedEndStep":"59"},{"pitch":84,"quantizedStartStep":"59","quantizedEndStep":"60"},{"pitch":81,"quantizedStartStep":"60","quantizedEndStep":"61"},{"pitch":88,"quantizedStartStep":"61","quantizedEndStep":"62"},{"pitch":84,"quantizedStartStep":"62","quantizedEndStep":"63"},{"pitch":81,"quantizedStartStep":"63","quantizedEndStep":"64"},{"pitch":79,"quantizedStartStep":"64","quantizedEndStep":"65"},{"pitch":81,"quantizedStartStep":"65","quantizedEndStep":"66"},{"pitch":88,"quantizedStartStep":"66","quantizedEndStep":"67"},{"pitch":91,"quantizedStartStep":"67","quantizedEndStep":"68"},{"pitch":93,"quantizedStartStep":"68","quantizedEndStep":"69"},{"pitch":91,"quantizedStartStep":"69","quantizedEndStep":"70"},{"pitch":93,"quantizedStartStep":"70","quantizedEndStep":"71"},{"pitch":88,"quantizedStartStep":"71","quantizedEndStep":"72"},{"pitch":86,"quantizedStartStep":"72","quantizedEndStep":"73"},{"pitch":88,"quantizedStartStep":"73","quantizedEndStep":"74"},{"pitch":93,"quantizedStartStep":"74","quantizedEndStep":"75"},{"pitch":91,"quantizedStartStep":"75","quantizedEndStep":"76"},{"pitch":86,"quantizedStartStep":"76","quantizedEndStep":"77"},{"pitch":88,"quantizedStartStep":"77","quantizedEndStep":"78"},{"pitch":86,"quantizedStartStep":"78","quantizedEndStep":"79"},{"pitch":84,"quantizedStartStep":"79","quantizedEndStep":"80"},{"pitch":89,"quantizedStartStep":"80","quantizedEndStep":"81"},{"pitch":88,"quantizedStartStep":"81","quantizedEndStep":"82"},{"pitch":86,"quantizedStartStep":"82","quantizedEndStep":"83"},{"pitch":88,"quantizedStartStep":"83","quantizedEndStep":"84"},{"pitch":89,"quantizedStartStep":"84","quantizedEndStep":"85"},{"pitch":88,"quantizedStartStep":"85","quantizedEndStep":"86"},{"pitch":86,"quantizedStartStep":"86","quantizedEndStep":"87"},{"pitch":81,"quantizedStartStep":"87","quantizedEndStep":"88"},{"pitch":79,"quantizedStartStep":"88","quantizedEndStep":"89"},{"pitch":76,"quantizedStartStep":"89","quantizedEndStep":"90"},{"pitch":74,"quantizedStartStep":"90","quantizedEndStep":"91"},{"pitch":69,"quantizedStartStep":"91","quantizedEndStep":"92"},{"pitch":76,"quantizedStartStep":"92","quantizedEndStep":"93"},{"pitch":69,"quantizedStartStep":"93","quantizedEndStep":"94"},{"pitch":74,"quantizedStartStep":"94","quantizedEndStep":"95"},{"pitch":69,"quantizedStartStep":"95","quantizedEndStep":"256"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"},{"tempos":[{"qpm":120}],"notes":[{"pitch":88,"quantizedStartStep":"32","quantizedEndStep":"33"},{"pitch":88,"quantizedStartStep":"33","quantizedEndStep":"34"},{"pitch":84,"quantizedStartStep":"34","quantizedEndStep":"35"},{"pitch":88,"quantizedStartStep":"35","quantizedEndStep":"36"},{"pitch":93,"quantizedStartStep":"36","quantizedEndStep":"37"},{"pitch":93,"quantizedStartStep":"37","quantizedEndStep":"38"},{"pitch":84,"quantizedStartStep":"38","quantizedEndStep":"39"},{"pitch":93,"quantizedStartStep":"39","quantizedEndStep":"40"},{"pitch":96,"quantizedStartStep":"40","quantizedEndStep":"41"},{"pitch":93,"quantizedStartStep":"41","quantizedEndStep":"42"},{"pitch":96,"quantizedStartStep":"42","quantizedEndStep":"43"},{"pitch":93,"quantizedStartStep":"43","quantizedEndStep":"44"},{"pitch":96,"quantizedStartStep":"44","quantizedEndStep":"45"},{"pitch":93,"quantizedStartStep":"45","quantizedEndStep":"46"},{"pitch":84,"quantizedStartStep":"46","quantizedEndStep":"47"},{"pitch":93,"quantizedStartStep":"47","quantizedEndStep":"48"},{"pitch":81,"quantizedStartStep":"49","quantizedEndStep":"50"},{"pitch":83,"quantizedStartStep":"50","quantizedEndStep":"51"},{"pitch":88,"quantizedStartStep":"51","quantizedEndStep":"52"},{"pitch":86,"quantizedStartStep":"52","quantizedEndStep":"53"},{"pitch":89,"quantizedStartStep":"53","quantizedEndStep":"54"},{"pitch":88,"quantizedStartStep":"54","quantizedEndStep":"55"},{"pitch":81,"quantizedStartStep":"55","quantizedEndStep":"56"},{"pitch":79,"quantizedStartStep":"56","quantizedEndStep":"57"},{"pitch":81,"quantizedStartStep":"57","quantizedEndStep":"58"},{"pitch":88,"quantizedStartStep":"58","quantizedEndStep":"59"},{"pitch":93,"quantizedStartStep":"59","quantizedEndStep":"60"},{"pitch":91,"quantizedStartStep":"60","quantizedEndStep":"61"},{"pitch":93,"quantizedStartStep":"61","quantizedEndStep":"62"},{"pitch":88,"quantizedStartStep":"62","quantizedEndStep":"63"},{"pitch":81,"quantizedStartStep":"63","quantizedEndStep":"64"},{"pitch":79,"quantizedStartStep":"64","quantizedEndStep":"65"},{"pitch":81,"quantizedStartStep":"65","quantizedEndStep":"66"},{"pitch":72,"quantizedStartStep":"66","quantizedEndStep":"67"},{"pitch":74,"quantizedStartStep":"67","quantizedEndStep":"68"},{"pitch":79,"quantizedStartStep":"68","quantizedEndStep":"69"},{"pitch":72,"quantizedStartStep":"69","quantizedEndStep":"70"},{"pitch":74,"quantizedStartStep":"70","quantizedEndStep":"71"},{"pitch":72,"quantizedStartStep":"71","quantizedEndStep":"72"},{"pitch":74,"quantizedStartStep":"72","quantizedEndStep":"73"},{"pitch":67,"quantizedStartStep":"73","quantizedEndStep":"74"},{"pitch":72,"quantizedStartStep":"74","quantizedEndStep":"75"},{"pitch":74,"quantizedStartStep":"75","quantizedEndStep":"76"},{"pitch":76,"quantizedStartStep":"76","quantizedEndStep":"77"},{"pitch":67,"quantizedStartStep":"77","quantizedEndStep":"78"},{"pitch":74,"quantizedStartStep":"78","quantizedEndStep":"79"},{"pitch":76,"quantizedStartStep":"79","quantizedEndStep":"80"},{"pitch":77,"quantizedStartStep":"80","quantizedEndStep":"81"},{"pitch":76,"quantizedStartStep":"81","quantizedEndStep":"82"},{"pitch":74,"quantizedStartStep":"82","quantizedEndStep":"83"},{"pitch":72,"quantizedStartStep":"83","quantizedEndStep":"84"},{"pitch":76,"quantizedStartStep":"84","quantizedEndStep":"85"},{"pitch":69,"quantizedStartStep":"85","quantizedEndStep":"86"},{"pitch":72,"quantizedStartStep":"86","quantizedEndStep":"87"},{"pitch":76,"quantizedStartStep":"87","quantizedEndStep":"88"},{"pitch":69,"quantizedStartStep":"88","quantizedEndStep":"89"},{"pitch":74,"quantizedStartStep":"89","quantizedEndStep":"90"},{"pitch":76,"quantizedStartStep":"90","quantizedEndStep":"91"},{"pitch":69,"quantizedStartStep":"91","quantizedEndStep":"92"},{"pitch":74,"quantizedStartStep":"92","quantizedEndStep":"93"},{"pitch":69,"quantizedStartStep":"93","quantizedEndStep":"94"},{"pitch":74,"quantizedStartStep":"94","quantizedEndStep":"95"},{"pitch":69,"quantizedStartStep":"95","quantizedEndStep":"96"}],"quantizationInfo":{"stepsPerQuarter":4},"totalQuantizedSteps":"256"}] diff --git a/src/DearDiary/src/pages/_document.js b/src/DearDiary/src/pages/_document.js new file mode 100644 index 0000000..b058869 --- /dev/null +++ b/src/DearDiary/src/pages/_document.js @@ -0,0 +1,85 @@ +import Document, { Html, Head, Main, NextScript } from 'next/document'; + +class MyDocument extends Document { + static async getInitialProps(ctx) { + const initialProps = await Document.getInitialProps(ctx); + return { ...initialProps }; + } + + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + +