Google Sheets Studio is a Piano Roll in Google Sheets using Google App Scripts and WebAudioAPI. From the data presented in the file, a sequence of notes and pitches will be played from the Add-on. Reading the rows as musical pitches — low-numbered as low notes, and high-numbered as high notes — and the columns as musical time — left-to-right, with each column as a specified note/beat duration — then the spreadsheet can act as a quantized piano roll.
Install from the Google Workspace Marketplace. Note that you will need to access it using your UCI email. See the user manual for installation and setup information, including alternative download links.
My project is about building a Piano Roll on Google Sheets using an Add-on coded in Google App Scripts.
Google App Scripts uses a JavaScript-based language called Google Scripts (.gs),
but it presents different capabilities than JavaScript. Google Script is used to read, write,
and manipulate data from Google Sheets (or really any Google App you want).
However, it is unable to use WebAudioAPI or any API in general since it is specifically for Google Apps.
The workaround I was able to find organically, however, was that you are allowed to add HTML files to your Google App Script,
originally to be used to create a sidebar. In the HTML file, you can add a <script>
tag
and use JavaScript with all its functionalities as usual (including WebAudioAPI!).
This was affirmed when I found a "best practices" article from the Google Developers website
that encouraged separating the HTML, CSS, and JavaScript into their individual .html files. That article shows a "Javascript.html" file
that begins with the <script>
tag and ends with the </script>
tag, and all the JavaScript in between.
Organizing the JS this way allows me to neatly use WebAudioAPI in my project.
Consider this if you ever look into WebAudio on Google Apps! I couldn't find many resources (or any at all!) regarding WebAudio on Google Apps.
A Max project that generates a melody over a drum beat.
The melody is randomly generated over 3 octaves of the C major scale, favoring the pentatonic notes more.
The drum beat consists of a kick, snare, and cymbal, played in a simple syncopated rhythm, at 190bpm.
The snare maintains the 2 and 4. The kick randomly adds additional kicks on the beats that aren't in the main rhythm.
The cymbal randomly generates and simulates a choking kind of sound, where it stops cleanly.
A Max project that takes MIDI input, i.e. from a MIDI controller and plays sounds.
The keys on the MIDI controller play a sound file that is pitchshifted based on the corresponding semitone away from middle C.
Pads 1 and 2 play kick drum and snare drum samples, respectively.
The modulation wheel controls amplitude modulation (tremolo).
The first fader controls volume.
A web app that allows you to create a melody using an oscillator and an accompanying breakbeat.
The UI allows you to view your melody in a piano roll style grid.
Unfortunately due to issues figuring out local testing of sound files using WebAudioAPI,
I was not able to switch the oscillator melody out for sound files as I had originally envisioned.
A Max project that takes keyboard input of typing my name ("antoine nguyen") to play sound
files for each character that arranges to be a familiar melody!
I implemented a queuing system to ensure that the melody would only play when the
correct order of characters for my name is inputted.
If an incorrect character is inputted, the queue is reset and an error sound plays. When the
complete sequence of characters is inputted, a completion sound plays.