Blog

Category: Music

  • What software teams can learn from music masterclasses

    What software teams can learn from music masterclasses

    I come from a musical background, with degrees in piano performance and piano accompanying and chamber music, and I think a lot about how that’s shaped who I’ve become in web and software development. I’ve even gotten to give a talk relating musicianship skills to programming and open source management in a concert hall in Vienna that included a piano performance. For this blog post I want to talk about another particular aspect of the classical music world: masterclasses.

    Masterclasses are not unique to classical music, but they do form a central and critical component of music study. A masterclass is a format in which musicians perform a work for an established artist and the artist then gives them feedback rather like a lesson, except that all of this happens in front of an audience. You might also hear about “studio class” in music school settings, which are similar except that it is not an open audience but instead one made up of your peers who share the same primary professor. For big artists coming to a school or a region, you might have to audition (compete) for a spot to be criticized publicly on your performance. Put that way, it might not sound very appealing, but it is foundational in how to function and succeed as a musician and really in any profession, including as a part of a software team, which is what I do today.

    Managing feedback in group settings

    The first experience in managing professional feedback is typically how you receive it. Sometimes you might not immediately agree with what you’re being asked to do, and that’s okay. What’s important is to respect the time and effort of the person giving you the feedback and show them that you understand it, even if after synthesizing that information you decide it’s not the direction you want to go. In music, that means acknowledging what you’ve heard by demonstrating the requested change on the spot. This might be a specific request, like “play this section softer”, or something that requires more interpretation, like “don’t lose momentum by getting stuck before the high point of this phrase”. This kind of flexibility is itself a skill, and one that is of high value.

    In software, your feedback sessions might not involve direct and immediate action in the same way, but it can be very helpful to show that you understand a concept. For instance, you might say “I hear you, and I need to think about it some more; I’ll start by trying out a different way of structuring this file”. Do be careful not to just repeat back verbatim all the time or come across as explaining back in a condescending way.

    As you progress through your career, you will likely find yourself in the position of also giving feedback in a group setting. For many people who are just beginning this part of the journey, this can be quite intimidating because you have not previously had experience in doing this. You also may have had bad experiences in the past with feedback that was not delivered in a constructive way. This is where an early culture of group feedback comes in so handy, notably in the studio class setting: professors are asking your peers to also learn how to process, structure, and deliver feedback in real time. You hear from your professor every week; this is an opportunity for students to deliver a polished performance, receive feedback, and give feedback all at once.

    That said, peer groups can also be intimidating. This is not unlike having to give a talk or demo some code in front of your coworkers – it can feel like more pressure than a large room of strangers because these are people whose opinions you are exposed to on a near-daily basis and hopefully care about. Remember that we are all learning all the time, and your peers may also need to work on their delivery! Some strategies you may have encountered are to use “yes, and” instead of “but”, or to begin feedback with related praise.

    I highly recommend that teams actively solicit peer feedback at various stages throughout a project and also workshop methods of requesting and giving feedback, something that can be facilitated by an engineering manager. An EM might even want to structure some team meetings much like a studio class, where people present on something they’re working on so that not only do they have a chance to share about something they might not otherwise get to talk about, but the team also has a mechanism built-in for giving and receiving feedback. Soliciting feedback is also a skill in its own right – a culture of regular and expected feedback goes a long way toward building that in all levels of team members.

    Arriving prepared

    Another major difference between masterclasses and lessons is that you are expected to present a polished product at a masterclass, whereas lessons are to workshop that polish. In a masterclass setting, you and any collaborators enter the stage, bow, and perform to applause before proceeding with the feedback from the masterclass artist. Some professors, especially at the conservatory level, also require performance attire when performing in studio class (though perhaps not black tie).

    Working on a software team typically does not involve building something in a vacuum until you’re ready to release it to the world – you hopefully have team checkpoints that are more equivalent to music lessons. But there is a lot to be said for knowing that even though you’re ready to share your work publicly and have met your deadline, there’s still more that can be done, rather like a software beta. And even for something you’ve been performing for a long time, a fresh perspective can change not only how you’re approaching that piece, but how you think about your craft in general. Always be prepared to show your best and recognize that true mastery is in knowing that there’s always another level to reach for.

    Cross-discipline knowledge

    While masterclasses are typically with an individual artist who specializes in an instrument, many works involve other musicians, such as a string quartet or a piano trio. These are things that are worth bringing to masterclasses too! Related, it’s also valuable to have lessons from people who might normally be considered outside of your discipline – one of the best lessons I’ve ever had was with a jazz professor who spent 2 hours pushing me to express myself more and more.

    Not only do your collaborators need to be equally prepared, you need to work together to really achieve artistry. All too often you will see lower-level instrumental masterclasses where the pianist is an afterthought, plunking their way dutifully through concerto reductions, and it shows. Sometimes the masterclass artist will also dutifully ignore them, but more often they have to involve all collaborators in their feedback. No amount of telling a vocalist to evoke the dreamy sparkling of Debussy’s Nuit d’Etoiles is going to work if the pianist is heavy-handed on those rolled chords, or vice versa. (This is also why collaborative pianists have to study lyric diction and multiple languages and can specialize in vocal coaching, but I digress.)

    Not only does feedback need to be inclusive of a group while also targeted to each individual, it needs to be clearly contextualized. In music, that means including music history and theory as well – the performance practices of the era, specific notational quirks of the composer, what harmonies are and how do they drive the piece, and limitations of instruments and how they interact together. So when giving feedback to a software team, be sure to continually frame things within broader feature or product goals, and tie the various disciplines together to create that cohesive whole.

    In both giving and receiving that style of feedback, you will find that you need to have some amount of understanding of disciplines outside of your own. That doesn’t mean that you need to be an expert; in fact, you will probably be received poorly if you try to instruct somebody on how specifically to accomplish something you don’t normally work on. Instead, much like framing within broader goals, think about how you might inspire somebody to look at something a different way, or contextualize within your own discipline so that they can understand you better as well.

    Bonus: watch a masterclass!

    Here’s a 45 minute masterclass session with Benjamin Zander, the music director/conductor of the Boston Philharmonic Orchestra and the Boston Philharmonic Youth Orchestra, and Amanda Chi, the cello section lead of the youth orchestra. I promise you don’t need to be a musician to get something out of this – at one point, Maestro Zander acknowledges non-musicians in the audience and gives them a brief explanation of what he means by the direction and pull of harmonies. But even outside of that, you’ll see some real mastery of not only the musical material from both parties, but also how to address both audience and performer, contextualize the feedback, and deliver that feedback in a constructive and suggestive way rather than making it into a personal demand. I also really enjoy what he talks about at the end, differentiating between what you need to do as a performer of this solo piece versus what you need to do as the leader of your group.

  • Building a swipe card jukebox using a Raspberry Pi

    Building a swipe card jukebox using a Raspberry Pi

    Update, May 2020: Here’s the video of a talk I gave at !!con about this build!

    You know how everybody hates on recipe blogs that start posts with stories even though a) it’s good for copyright and b) stories can tell you a lot of things about humans and the why and how of their food, well if that’s you then you’re going to hate this tech recipe! Or you’ve already scrolled past this.

    So. Last year, I saw this tweet:

    I have never done any hardware tinkering, but I immediately wanted to make one of these for my kids. The oldest is pretty good with making requests from voice assistants, but the little one isn’t there yet and we have some other problems anyway: preferring edited or specific alternate versions, difficulty requesting things that aren’t in English, and often a lot of people in the house making a lot of noise, which leads to yelling and garbled results. (See what I did there, I defined the problems I was trying to solve for, it’s like I’m good at my job or something.)

    Since I have a few Raspberry Pis I’ve acquired as conference speaker gifts, I wanted to try to use as many existing parts as possible. My first thought was that I would like to play audio through an unused Google Home Mini, but it doesn’t have aux-in and honestly I just could not decipher the documentation around Google Assistant+Actions and those type of generic names and entangled services make things highly unsearchable. I decided to go with regular audio output and figure I can keep iterating with software and/or hardware over time.

    The original maker doesn’t seem to have ended up doing a write up of what he did, so I took a look at other similar things people have built. I found this blog post, which took me to their code on GitHub. Availability and pricing as well as a love for the more tactile experience told me I still wanted to use swipe cards rather than RFID, and I don’t really know Python and wanted to make something with as little configuration or dependency management as possible so I figured I was on my own code-wise. That said, that blog post gave me a general direction for approach and led me to Pi MusicBox, which also serves as the base for my player.

    I finally ordered the materials off Amazon mid-December for my spouse to bring back from his trip to the US, and got to work because I only had a week to get it all done. Here’s my planner page I worked on to get a head start while I waited:

    I love paper planners, this is a Happy Planner project sheet which I’m really enjoying, maybe I’ll write a post on how I use planners at some point and really become a Planner Person.

    First up was testing the card reader and setting up the writer, which was not a smooth process. I had to find the writer software online, because who has a CD drive anymore? The driver took forever to finish installation for some reason, but once it got there it seemed to work. Except that the card reader wasn’t returning anything. I tried a regular old bank card (I used one for a defunct account just to be extra safe) and only got numbers, no name, even though having done my time in retail I knew my name should show up in the magstripe data. I tried writing data to a fresh card in all 3 tracks and would only get tracks 2 and 3 from the reader, or sometimes even just track 3. Seems like a malfunctioning card reader (I’ve also occasionally noticed ghost input now that the jukebox has been running for a few days). Update in 2020: I got a second card reader and it works correctly.

    Because tracks 2 and 3 can only contain numbers, I decided that the best route to go would be to just encode numbers sequentially and grab that line from a list of Spotify URIs for playback. My first few tests got nowhere – successful write, but wouldn’t read. I tried finding a new card reader in person but to no avail. I tried test data again and… it worked? That’s when I realized that my test data had three numbers, so I tried putting 001 and voilà, that fixed it. After thinking through it a bit, I actually realized that this was the best route anyway – if a Spotify URI stops working, I can swap it out, and the usual ISO encoding for cards is all-caps anyway, and the URIs are case-sensitive.

    I decided to put the number on all 3 tracks since the reader seemed to unpredictably read either one or both of tracks 2 and 3 and I might replace it later. This was pretty easy in the card writer software, which allows you to create cards from a file, which I generated using a quick and dirty Bash script. I also made a card with 999 as a special case for toggling playback – there is also a local web server you can access for various functionality including shutdown/reboot, but a basic toggle seemed useful for the kids.

    The script itself is extremely small – it does a little Bash magic (parameter expansion!) to extract the first number it comes across, strips off any leading zeroes, and then gets the indicated line from a list of song URIs if it’s not a special case card and plays said song. I stressed about it for a long time but in the end, my first working run was less than 10 lines of code.

    For labels, the initial inspiration indicated that they made a React app that pulled in the data to make printables, which is super cool! I, however, am a weirdo who despite being a programmer is still often faster knocking stuff out in Photoshop/Illustrator as opposed to writing a whole app. I also wanted to use artwork besides album covers for many of the cards so that my 2 year-old can differentiate between tracks from a Mother Goose Club or El Reino Infantil album and pick what she wants – this has already proven successful 🙂

    I did not hand-make a fancy box, though I might end up 3D printing something eventually, but I did discover that some of the drawer organizers I use were a great size and are good enough for now. Here’s what I ended up with for Christmas morning:

    I enjoy posting about the process of building or learning things, and I’ve had a lot of people asking me about this, so I think it makes sense to blog about the process and the result. So now that you know why I decided to build a jukebox and how I arrived at the choices I made, let’s get into the step-by-step.

    Materials

    • Raspberry Pi (any model, 2+ recommended)
    • MicroSD card (1GB+)
    • Speakers
    • WiFi adapter if needed for the Pi
    • Magnetic stripe cards (mine)
    • Magnetic stripe card writer (mine)
    • Magnetic stripe card reader that emulates keyboard input (mine, the first one I had so you can avoid that one because of the issues)
    • Spotify Premium account (protip if you have kids: use a family account and set up individual accounts for devices so you don’t run into playback limitations and you keep your recommendations somewhat more sane, I name them things like Alexa so if you ever see a reference to an Alexa Sandí associated with me please know that is not my actual child and somebody has sold or stolen my data)
    • A computer that can flash SD cards, run the card writer driver and software (I’m on a 12″ MacBook), and if you want to use my templates, access Adobe Illustrator
    • USB keyboard and HDMI monitor for initial setup (I used my Magic Keyboard with a cable and a TV)
    • Whatever you need to print 2×3″ labels (I had them printed onto adhesive sheets at Office Depot and cut them to size myself)

    Process

    1. Set up Pi MusicBox. I found their documentation to be perfectly adequate, just note that when setting up Spotify you have to authorize and generate tokens that are copied into the config file.
    2. Boot up the Raspberry Pi with the card reader plugged in and log in. Test Spotify playback by running mpc add spotify:track:7GhIk7Il098yCjg4BQjzvb && mpc play
    3. Optional but recommended: fork my GitHub repo so you have your own copy and can keep your song list edits there. After forking, be sure to edit jukebox.sh to point to the songs.txt in your own repo.
    4. Run curl https://raw.githubusercontent.com/helen/swipe-jukebox/master/jukebox.sh > jukebox.sh (substitute in your own username if you’ve forked the repo above).
    5. Set root to auto-login on boot and /root/jukebox.sh to run after login so the setup can live headlessly going forward. These instructions work well, noting that the user for MusicBox is root, not pi.
    6. Run bash jukebox.sh; this will download the song list referenced in the script as songs.txt. Enter a number like 1 at the prompt that says Swipe: to ensure the script is working as expected. If you want to quit the script, hit ctrl-c.
    7. Edit songs.txt to your liking. I have found the easiest way to do this is to create a Spotify playlist and then select-all, right click, go to the Share menu item, select Copy Spotify URIs, and paste the result into the file. I also decided to paste the results into a Google Sheet along with the titles and artists extracted using a playlist converter tool so I have them conveniently numbered and saved separately.
    8. Encode the cards. I found the easiest way to do this was to write them from a file, which just loads up each record sequentially and writes it to the next card you swipe. There’s both a sample file that goes up to 250 in the repo, as well as the Bash script I used to generate that file in case you want to go higher or if you get interrupted and need to make a subset. I wrote the number for each card on the back and also tested every card in the reader after writing, which at this point should trigger the appropriate playback.
    9. Create the labels for the cards. I recommend you make them 2″ x 3″. There is an Illustrator template in the repo for those of you who are graphically-inclined. The intended artwork area is 1.5 inches square.
    10. Print the labels for the cards and stick them on – I tested each individual one again before putting the label on because I am extremely particular, but if you make a mistake it’s fine, you can change the order of the URIs in the songs.txt file (and your playlist, if using one).
    11. Shut down the Raspberry Pi – I find it easiest to do this by navigating to the web interface (typically at http://musicbox.local).
    12. Box everything up and plug it in again to test the whole experience. When it’s headless, you’ll want to wait a minute or two for the green light to stop blinking so much for everything to be ready to go.
    13. Enjoy!

    If you build one, please let me know! I’d also love to hear any tips or tricks or issues you come across if you try following along with this – I’m a software developer, as far as I’ve ever experienced there are always going to be bugs 🙂

  • Music (and public school) saved my life

    http://www.cnn.com/2017/01/27/health/turning-points-ryan-speedo-green/index.html

    I read this bit on CNN earlier about a classmate of mine at the Governor’s School for the Arts. I got know him when I served as the rehearsal pianist in the cited Robert Brown’s stead for that year’s production of The Magic Flute – Ryan was one of our two Sarastros (there were two casts). Funnily enough, I remember getting into a physical altercation with somebody during a rehearsal, and I am 90% sure it was Ryan. Probably not a surprise to anybody who knew either of us.

    Reading this made me think about how important caring adults, music, and public school were in saving me from myself. I grew up in a violent household without a ton of resources (though to give my dad credit he deserves, he put a lot of work into always paying for school and piano necessities), and I was a mediocre student at best. Without teachers and counselors who could read past the anger, I would probably have been bounced out of multiple schools, and who knows what would have happened then. Without the opportunity to deep dive into music studies before adulthood, I have no idea what I would have done in college and beyond, and I’ve publicly spoken about the huge impact my musical training has had on my professional success in technology.

    I’ve been aware of the importance of having a program like the Governor’s School for the Arts available to me since my attendance as a high school senior. GSA is a free program that relies on a partnership with 8 surrounding public school districts for busing and admissions/school credit. Virginia Beach specifically has special programs within its regular public high schools, also with public school busing provided, so I went to a math and science academy in the mornings (well, if I bothered to get up that day) and then GSA for piano in the afternoons. Opera rehearsals were at night and I was paid for them as an actual hire, which was a very cool job for a teen. If we’d had to pay for tuition or transportation, a lot of things would have been a lot harder, and I may never have gotten to do it at all.

    I think about this availability a lot as my child enters public school age in a time and place where private and charter schools are the assumed norm for a lot of my parenting peers, and I’m frequently the lone dissenting voice who continues to believe in taking part in an admittedly imperfect equalizing system. I put my kid into a charter school lottery for pre-K4 next year and was honestly rather relieved when he ended up pretty far down on the wait list. As a planner, it’s hard to wait for public school registration (which isn’t a very clear process to begin with) and there’s a lot less information out there about each specific school because they’re not trying to sell themselves, but I genuinely believe that getting to know the people around you and hopefully some people who are very different from yourself is a critical part of education. It might still turn out that the specific combination of the neighborhood school and my son doesn’t work out for whatever reason, but we have to give it a fair chance, the same way I believe that all of his peers deserve a fair chance.

    Jersey City has universal pre-K which I think is critically important, so I’ll probably be volunteering at our two local pre-K4 options (regular and bilingual) to get a feel for them over the next couple of months; pre-K3 is almost all through city-contracted providers, so this year was not a local school. There’s also a progressive bent in me that wishes all parents were required to send their kids to their local public school for X period of time, because I am real tired of hearing nothing but negative talk from a bunch of yuppie parents who’ve never bothered to get to know the people or the schools directly around them. (Aside: said parents really don’t like it when you ask them if they’re sure the schools are the problem or if it’s that they’re trying to excuse their fear of unknown brown and/or “poor” people.)

    Props to you, Ryan, and thanks for sharing your story. Even now as an adult, it’s comforting for me to know I wasn’t the only one, and if even one kid going through the same thing sees this and is inspired, I believe that’s some of the best success we can find.

  • Helen Grimaud: Bach-Busoni Chaconne in D minor

    This is the kind of performance that takes over my entire being – I cannot move or speak or even think when I listen.

  • Music for BrooklynJS #18

    Last night, my husband (clarinetist Adrián Sandí) and I were the musical guests for BrooklynJS’s 18th edition. I gave a talk there last August on how being a trained musician has made me a better developer (a preliminary feeler for the talk I eventually fleshed out for WordCamp SF), so it was especially fitting to come back and be a musician for a night. I promised to publish a set list, and thought that a post with some more details would be nice, since 20th century clarinet and piano music is a little niche. As I do have two degrees in music, and Adrián three, we’re quite nerdy about classical music and this post is a bit long. I hope you enjoy it, anyway 🙂

    One of the things Adrián and I like to do best is programming – not in the code sense, but in terms of how you put a concert program together. There’s what we consider “standard repertoire” for clarinet and piano – Brahms (we snuck some into the WordPress 4.0 release video), Mozart, Weber, and so on. But there’s also a lot of really interesting music out there that’s not performed as often, particularly newer compositions and arrangements. For one of my Master’s recitals, the first half was programmed as an exploratory arc of different styles of major works for clarinet and piano from 1954, 1920, and 1981. You can hear that entire arc on Adrián’s site. So, last night, we thought we’d do the same, but cast the net a little wider for six brief selections and introduce what’s always a really engaged audience to some things they probably didn’t know existed and are very meaningful to us as musicians and people.

    1. Astor Piazzolla – Le Grand Tango (arranged by Adrián Sandí), final section

    Astor Piazzolla was an Argentine tango composer/arranger and bandoneon player who really brought traditional tango music into the modern era, known as nuevo tango. He wrote Le Grand Tango in 1982 for legendary cellist Mstislav Rostropovich, and it has really become a staple of showy cello repertoire. But why let string players have all the fun? Arrangements are a really great way to flex your musical skills and expand repertoire for your instrument. I mean, sure, it seems silly to have the Franck violin sonata played by everything from flute to viola to tuba (yes, really), but why not?

    I particularly like Piazzolla’s music because it contains clear influences from both the jazz and classical worlds, and is very listener-friendly as well as being fun to watch in performance. Try it out as your work day music sometime, whether original recordings or the fun little Piazzolla Remixed album. Here’s a video of Piazzolla himself on bandoneon as well as Yo-Yo Ma on cello, performing one of his most popular works, Libertango.

     2. Alexander Scriabin – Prelude in G-flat Major, op. 16 no. 3 (arranged by Willard Elliot)

    This particular work is from 1895, so ever-so-slightly outside of the 20th century, but I very much consider Scriabin to be a 20th century composer. His early works are Romantic-sounding and tonal, with clear influences from Chopin. Check out his piano concerto if you’re into Chopin. However, later in life, Scriabin’s compositions became much more dissonant and atonal, and his synesthesia (associating tones with colors, in his case) led to his development of a color organ – an instrument that would project colors. His famous tone poem Prometheus includes a part for the instrument. Another NYC clarinetist friend of ours from Eastman days, Isabel Kim, is working on a project with The Nouveau Classical Project called Mysterium Novum, a realization of Scriabin’s unfinished sketches for the planned-grandiose Mysterium. If the idea of a synesthetic music and art installation excites you (it does me, as somebody whose 9th grade scientific research project was a survey asking people what color they associated with a given piece of music without knowing that synesthesia was a condition), keep your eye out for that in the next couple of years. Synesthesia itself is also a fun topic to read more about – if you loved The Phantom Tollbooth and something about the scene where an A is crunchy and crisp like an apple resonated with you, or you know who Richard Feynman is, you’ll especially enjoy it.

    3. Dmitri Shostakovich – Prelude in D-flat Major, op. 87 no. 15

    Written between 1950-1951, Shostakovich’s complete set of 24 Preludes and Fugues (one for each major and minor key) was written for Tatiana Nikolayeva after adjudicating her win in the first International J.S. Bach Competition. I learned the D-flat Major set for my college senior recital, and gave a lecture recital on its structure and parallels with its key parallel from the second volume of Bach’s Well-Tempered Clavier. The fugue is fiendishly hard – a fast-moving nearly-twelve-tone textbook fugue that eventually incorporates the rhythmic motif from the prelude. It’s also, in my view, an incredible work of art, and worth the pursuit. The prelude is less challenging (though still quite difficult, particularly for those of us with small hands), and always a fun piece for listeners. The ending is classical jokester Shostakovich – he fakes us out with three completely-wrong notes before finally ending. I’m personally partial to Keith Jarrett’s recording – despite being best known as a (temperamental) jazz pianist, his incredible technique as a pianist really comes through in his almost-too-fast rendition. However, it’s not available for streaming anywhere, so here’s Marc-André Hamelin performing the set live with the score overlaid – there are some hairy moments even by a guy who’s known for tackling music considered to be impossible, which just goes to show how hard it is.

    4. Paquito D’Rivera – Lecuonerias from The Cape Cod Files

    Lecuonerias is one of a set of small pieces written in 2009 for Jon Manasse (a former professor of Adrián’s) and Jon Nakamatsu (a pianist I’ve had masterclasses with). This third movement is a solo clarinet improvisation around melodies by Cuban composer Ernesto Lecuona. It’s quite likely you’ve heard Lecuona’s Malagueña before. As a proud Tico (Costa Rican), Adrián is particularly dedicated to the inclusion of works by and influenced by Latino and other Hispanic composers in his programs.

    5. Witold Lutosławski – Dance Preludes (movements 1 and 5)

    Lutosławski’s Dance Preludes, from 1954, are one of our absolute favorite things to play. Each of the five movements is very short, ranging from 30 seconds to 2 minutes, and showcases the influence of Polish folk music. There are some very tricky meters contained within, much of which don’t even line up between the piano and clarinet parts. The end result is a delightful and whimsical off-kilter set of pieces that, like everything else we played in the set, really appeals to audiences.

    6. Joseph Horovitz – Sonatina, movement 3

    Also one of our favorite things to play, Horovitz’s jazz-influenced Sonatina for clarinet and piano from 1981 has really seen a good amount of traction in clarinet recital programs recently, and for good reason. From its beautifully flowing first movement to the gorgeous ballad of the second movement to the up-tempo final movement that clearly displays its jazz and popular influences, it’s both audience-friendly and challenging for both musicians. While Adrián and I are not particularly sentimental, if you asked us for “our song”, it would be the second movement, which we first learned together almost exactly ten years ago. Here’s us playing it at my Master’s recital in 2008.