Stringing Code Together to Play Music

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
  • ruby_cover_band

    Enough Coverage To Beat The Band

    A guitar is a string instrument, and each of those strings make a sound when you play them. For this example we'll focus on the happy path, which is that plucking the string plays the expected note. The code I built also considers that strings can break, and attempting to play broken strings won't work. You can look at the full implementation to see how that works.

  • sonic-pi-cli

    A simple command line interface for Sonic Pi, written in Ruby

    This is all in a string (the data type, not the part of the instrument), because we're going to pass it to Sonic Pi via the sonic-pi-cli gem. This is going to execute the note method in Sonic Pi to play that single tone.

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • Sonic-Pi-Examples

    Contains simple examples of the usage of Sonic-Pi

    We'll then take all of those notes and pass them to our amplifier, using Sonic Pi's play_pattern_timed method. This also allows us to define a time between each note, so we can place a small amount of time in between each to simulate the time it would take your hand to complete a downstroke across all the strings.

  • Sonic Pi

    Code. Music. Live.

    In our last post, I talked about how I built an interface to Sonic Pi when I was preparing my RubyConf 2020 talk about Ruby's Coverage module. At the end of that post, we could send sounds to Sonic Pi. Today, we'll have our code play the guitar, and send those sounds to our amplifier.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts