• Understand classes in Kotlin

    In computer programming, we use classes to define templates for how to describe things. A class can represent a thing: A person, a chair, a bank account, a musical instrument, and so on. Each thing, or object, can have properties. For instance, a musical instrument can belong to a certain family: strings, woodwinds, brass, percussion, or voice. It can have a range, from lowest note to highest. It can have subcategories (or child classes): A string instrument has a certain number of strings, and might be bowed or plucked. A woodwind instrument can have 0, 1, or 2 reeds. A percussion instrument can have definite pitch (like a marimba or tympani) or indefinite pitch (like cymbals or a snare drum).

    This essay introduces how to work with classes in Kotlin. This article assumes you know the basics of the Kotlin language and how to run Kotlin code. If you’d like to follow along with these code examples, all of this can be run in the Kotlin Playground or your favorite Kotlin IDE.

    Create a new class

    To create a class in Kotlin, you use the class keyword, followed by the name of your choice in TitleCamelCase:

    class MusicalInstrument

    A class can have constructor parameters. Constructor parameters are added in parentheses after the class name. I like to start each parameter name with an underscore, to differentiate between them and any properties defined later in the class. (More on that later…)

    class MusicalInstrument(_name: String, _family: String, _height: Double, _width: Double, _clef: String)

    You can make your parameters easier to read by putting them on different lines. Here I line them up vertically, but you can format them a number of ways and still have valid code. Just remember to make it all readable and consistent:

    class MusicalInstrument(
        _name: String,
        _family: String,
        _height: Double,
        _width: Double,
        _length: Double,
        _clef: String)

    Class properties

    A class has properties inside the curly braces section. You can immediately initialize your properties with parameters:

    class MusicalInstrument(
        _name: String,
        _family: String,
        _height: Double,
        _width: Double,
        _length: Double,
        _clef: String)
        val name = _name
        val family = _family
        val height = _height
        val width = _width
        val length = _length,
        val clef = _clef 

    You can actually make the above code even simpler by declaring the properties right in the parameter declaration with val or var. This example eliminates the need for that underscore convention I mentioned earlier, and instead declares the parameters I need right up front:

    class MusicalInstrument(
        val name: String,
        val family: String,
        val height: Double,
        val width: Double,
        val length: Double,
        val clef: String)

    You can add additional parameters in the body of your class definition. Here’s an example of a volume parameter, which is calculated based on the dimensions of the instrument – useful when planning your next orchestra tour:

    class MusicalInstrument(
        val name: String,
        val family: String,
        val height: Double,
        val width: Double,
        val length: Double,
        val clef: String)
        var volume = height * width * length

    Create an instance of a class

    Now that you have a fairly well-defined class, the next step is to create an instance of it and start calling it from your program. In this example, use the var keyword to create an instance of MusicalInstrument in main() called instrument.

    fun main() {
      var violin = MusicalInstrument(
        "Violin", "strings",
        12, 25, 60,
    class MusicalInstrument(
        val name: String,
        val family: String,
        val height: Double,
        val width: Double,
        val length: Double,
        val clef: String)
        var volume = height * width * length

    This above code uses the MusicalInstrument class as a template to describe a violin. Now you can extract data from it and have it appear in your program:

    fun main() {
      var violin = MusicalInstrument(
        "Violin", "strings",
        12, 25, 60,
      println("The ${violin.name} is in the ${violin.family} family")

    You can access the defined parameters such as the name of the instrument and the instrument family because you added those parameters to the instance. You can also access the properties that were defined in the body of the class:

    fun main() {
      var violin = MusicalInstrument(
        12, 25, 60,
      println("The ${violin.name} is in the ${violin.family} family")
      println("Volume: ${violin.volume} cm³")

    In the above example, you called violin.volume from the MusicalInstrument class, and it took your inputs of height, width, and length and did the math for you!

    You can also add functions to classes. When a function exists as part of a class, it is called a method. This example moves the println() work to the class and then calls it with violin.printInfo():

    fun main() {
      var violin = MusicalInstrument(
        12, 25, 60,
    class MusicalInstrument(
      val name: String,
      val family: String,
      val height: Int,
      val width: Int,
      val length: Int,
      val clef: String) {
      var volume = height * width * length
      fun printInfo() {
        println("Instrument: $name")
        println("Family: $family")
        println("Clef: $clef")
        println("Volume: $volume cm³")

    This is just a quick introduction to Kotlin classes. In future posts, I’ll explore polymorphism, inheritance, and more. Stay tuned…

  • Functions in math vs programming

    My coffee thought for this morning is that the fundamental concept of function in your calculus class is the same idea as a function in computer science. Basically, a function is a way of indicating a formula that can take input and produce output. To illustrate, here’s a basic example of a mathematical function:


    This formula takes in a value for x and returns the cube value of x. If you feed this function a value of 2, it’ll give you back a value of 8. Give it a 5 and it’ll return 125.

    Here’s a function I wrote in the Kotlin programming language called cube() that performs a similar (for lack of a better word) function:

    fun main() {
    fun cube(number: Int): Int {
        return number * number * number

    This function takes an integer as input and will return the cube value of that number, just like the mathematical formula I mentioned earlier. The results are the same: Feed this function a value of 2, it’ll give you back a value of 8. Give it a 5 and it’ll return 125.

    Vive la différence!

    It is worth noting one major difference between math functions and code functions: The math function will work for any value, while the computer function has limitations on the size of the data type. For the above example, we could increase the size of the data type by using Long instead of Int, but either way there’s an upper limit as to how big of a number you can use. Incidentally, in Kotlin the Int the upper value limit is 2147483647, and for Long the upper limit is 9223372036854775807. In Kotlin, you can use MAX_VALUE to find the upper limit of a given data type, such as Integer.MAX_VALUE and Long.MAX_VALUE.

    Code functions can also do lots of other things besides return a value. You can throw in print statements, additional routines, more functions, and all sorts of other side effects. A math function does exactly the same thing every time given similar inputs, while a code function can behave differently depending on the state of the program when the function is called.

    But overall, math and code functions can generally be thought of as the same beast. I found this to be an interesting thought exercise to consider the similarities and differences between the domains of calculus and computer science.

    Powers that be

    While going through this thought exercise, I decided to segue my thought process into how Kotlin handles exponents. Here’s a Kotlin function I wrote called powerOf() that takes a number and a power value and returns the result:

    fun main() {
    fun powerOf(number:Double, power: Double): Double {
        var count = power
        var result = 1.0
        while (count != 0.0) {
            result *= number
        return result

    Here I use a Double data type to handle any double-type inputs or results, and the invocation of powerOf(2,3) in main() results in 8.

    However, I didn’t really need to write any of this, except to satisfy my morning coffee curiosity to work out how such a function might be implemented. You can more easily just import kotlin.math.pow to get the same result with much less code like this:

    import kotlin.math.pow
    fun main() {

    I realize that was an unnecessary side trip, considering the title of this post was about the differences between math and code functions, but this darn keyboard lets me type anything…

  • Speak Selection in Mac OS X Monterey

    Accessibility panel with the speak selection option checked.

    When I have to process a lot of reading material on my computer, I often find it helpful to leverage accessibility features. Larger text helps a ton, and that’s easy to enable with a simple ⌘ + keyboard shortcut in most web browsers. For my needs, text-to-speech has been extraordinarily helpful in keeping focused and moving forward when there is the potential for distraction. I tried a number of accessibility features on various platforms, and lately my go-to tool has been the speak selection feature that is found on Mac OS X Monterey

    To enable it, do the following:

    1. In Mac OS X Monterey, open System Preferences.
    2. Click Accessibility and then Spoken Content.
    3. Enable the Speak selection checkbox.
    4. Customize the system voice, speaking rate, and volume. Siri Voice 1 and 4 are very high quality. Adjust the settings to your preference. I use the default speaking rate and volume.
    5. Click Options to customize your settings. My keyboard shortcut is the most important part, and I leave it to the default Option Esc keys.

    To invoke the text to speech feature in a web page, simply select some text and use the Option + Esc keyboard shortcut. To have it stop speaking, use Option + Esc a second time. That’s it! Happy reading!

  • The Recipe for San Bei Ji

    photo of temple rooftops in Taiwan

    I would be remiss in publishing a website with the domain “sanbeiji.com” without some kind of explanation. And a recipe.

    San bei ji is a traditional Taiwanese dish. In Mandarin, it is written 三杯鷄, and translates to “three cup chicken”. The name comes from the key ingredients: A cup of sesame oil, a cup of rice wine, and a cup of soy sauce.

    I secured the domain sanbeiji.com sometime in 2001. I wanted to start a website to practice my web coding skills. I was in Taiwan at that time, and had exhausted quite a list of potential domain name candidates. We went out for food, and san bei ji was ordered. It was delicious, and the domain name was available, and so there it was: Another great decision based on my gut.

    This recipe specifies gluten free soy sauce, but you’ll get the same result with the regular version.


    • 1/2 chicken
    • 1 fresh large old ginger root, cut into 10 to 15 pieces
    • 6 cloves of garlic, chopped
    • 1/4 cup sesame oil
    • 1/4 cup rice wine
    • 1/4 cup gluten free soy sauce
    • 2 teaspoons of sugar
    • fresh basil leaves


    Wash the chicken and cut it into small pieces using a cleaver. (Traditional style: chicken is hacked into small parts about 1 inches in diameter, leaving bones in for flavor.) Heat the sesame oil in the frying pan until sizzling. Add the ginger, and stir fry until everything is a little dry. Add the garlic fry it up. Add the chicken, rice wine, soy sauce, and sugar. Set the heat to low and cook everything covered for 20 minutes or until all liquids are condensed and you have a nice glaze. Last step: Add basil and stir-fry quickly. Serves 2 as a main course, or 4 as an appetizer.

    Taiwan’s mountain regions are home to the finest tea plantations in the world. Add a pinch of chopped fresh Taiwanese oolong tea leaves with the basil, if available, for an extra traditional Taiwanese mountain-style taste. The dish is traditionally served in a heated, covered clay pot. The dish is especially delicious served with stir-fried chinese garlic asparagus, white steamed rice, and a gluten free lager beer, ice cold.

  • The Great Strings Experiment

    A pile of assorted used double bass strings.

    Latest updates

    Every double bass sounds different. Some can be dark and rich, full of bass tones and body. Others might ring out with pizzicato and thrive in the midrange. Other double basses might be perfect for solo playing, with loud upper-range pitches that scream. The hunt for the perfect set of strings can be a challenging and potentially expensive endeavor.

    The goal of this experiment is to test multiple sets of used strings on my double bass, to find the best combination. Once the best combo is identified, I’ll invest in one or two brands of new string sets.


    Strings can enhance or exacerbate the sound characteristics of an instrument. They can alter the playability as well. The optimal string setup should have the following characteristics:

    • Richness: The strings should make the double bass sound like a Kobe New York strip steak, pan fried in butter, and served with a dark, rich glass of Cabernet Sauvignon.
    • Projection: The strings should allow the bass to be heard loud and clear in an orchestra.
    • Even tone: There should not be significant variations in sound characteristics between strings.
    • Playability: The strings should be comfortable to play on, particularly for the left hand.
    • Responsiveness: The strings should be responsive and speak when bowed.

    Since my goal is to improve orchestral sound, I focused on classical arco qualities for this experiment.


    To test string qualities evenly, I will run each string set combination through a test suite. I will record a playthrough of the test suite for each string set.


    The subject of this experiment is my double bass, an unlabeled German instrument built probably around 1904. This bass has been played in the Minnesota Orchestra and the Chautauqua Symphony Orchestra before I owned it. It has had extensive restoration work performed and is in a good state at the moment.

    The current set of strings is Bel Canto EADG. I find the ADG strings to be “floppy” and would like something more responsive to the bow. The E string is actually decent sound-wise, and feels fairly good for playability. I may modify the experiment later to return to more use of the Bel Canto E string later on, if the Flexocor Deluxe E doesn’t improve the overall sound for these sets. I also have a Flexocor standard E to try out.

    Before the experiment begins, I will calibrate the string height to ensure the G string height is 4-5mm and the E string is at 7-8mm. This bass has no C extension at the moment, but I plan to add a C extension in the future.

    Knowledge dump from Steve

    Here are some raw notes from my double bass instructor, Stephen Tramontozzi.

    On my bass at the SF Symphony and on my Italian basses: Pirastro Original Flat-Chrome purple and white windings – speak quick, comfortable under left hand, more body, because they have an extra wrap. the more wrap, the darker the sound. But in some cases the set E isn’t balanced, so you might want to try something else.

    Original Flexocor is a similar option: More wrap, even more dark.

    On my English bass – Evah Pirrazzi, synthetic gut core, flatwound steel. Really great sound. I use light gauge on G, some people go light on both G and D. These strings are really thick so they might not feel comfortable.

    Flexocor Deluxe – higher tension red and white winding.

    Passione strings: Some people really like these. Medium is too light. Go heavy on those. (Joe note: I used a solo set a while back and they were pretty good.)

    Charles Chandler uses Bel Canto on A, D, and G, and a Flexocor Deluxe on the low C.


    The variables for this experiment are strings. I have the following prepared:

    • Bel Canto EADG (currently installed)
    • Permanent ADG
    • Flat-Chrome ADG
    • Passione ADG
    • Flexocor Original ADG
    • Flexocor Standard EADG
    • Flexocor Deluxe E

    All strings except the Bel Cantos, Flexocor Standards, and the Flexocor Deluxe were loaned to me, and are not new. The Flexocor “Standards” are just labeled “Flexocor”, and I use “Standard” here just to differentiate from the ones that are actually labeled “Original” and “Deluxe”. The age of the strings may affect responsiveness, but should at least indicate tonal quality and playability.

    String sets

    I will test these string sets in roughly the order shown in the table below. This is not a complete list of options given the inventory of strings on hand, but it would be time-prohibitive to test every single combination. Instead, I assembled this list as a best guess of what would a) sound good, and b) provide the best initial data. If I need additional experiments with alternative string combinations, I will add more to the list as the experiment progresses.

    #E stringA stringD stringG string
    1Bel CantoBel CantoBel CantoBel Canto
    2Flexocor DeluxeBel CantoBel CantoBel Canto
    3Flexocor DeluxeEvah Pirazzi regularEvah Pirazzi regularEvah Pirazzi regular
    4Flexocor DeluxeEvah Pirazzi regularEvah Pirazzi regularEvah Pirazzi weich
    5Flexocor DeluxePassionePassionePassione
    6Flexocor DeluxeOriginal Flat ChromeOriginal Flat ChromeOriginal Flat Chrome
    7Flexocor DeluxeFlexocor OriginalFlexocor OriginalFlexocor Original
    8Flexocor DeluxePermanentPermanentPermanent

    Recording setup

    • Microphone is a modded Oktava MK-319.
    • Record direct to Logic Pro via a Scarlett 2i2 USB interface, no patch.
    • Position the microphone in front of the double bass at a medium height, just above the bridge and in front of where the bow usually contacts the string, 12 inches away from the instrument.

    Additional equipment

    • Peg winder drill bit, for faster string changes.
    • Towel, to protect the top of the bass.

    Test suite

    Record each set. (Recordings available here.) Play multiple times or repeat segments if it is necessary to explore tone or responsiveness.

    1. 3 octave scale, E major.
    2. Long tones on each open string
    3. Bach Cello Suite No.3, Allemande, 1st half
    4. Bottesini Concerto No.2 in B minor, first page to D
    5. Beethoven Symphony No.9, 4th movement (Recitative segments, Ode, Fugue)
    6. Strauss, Ein Heldenleben, rehearsal 9
    7. Mozart Symphony No.35 1st mvt m13-48, 4th mvt m1-A Added Beethoven 5 and Bach Suite 2 prelude in lieu of this.
    8. Beethoven 5, 3rd mvt, Trio
    9. Mahler Symphony No.2, 1st page
    10. Bach Cello Suite No.2, Prelude


    Create a form that will rate each set on a scale of 1-5, 5 being best. For each set, rate:

    • Strings in set (menu to list strings in set)
    • Sound quality (select 1-5)
    • Projection (select 1-5)
    • Even tone (select 1-5)
    • Playability (select 1-5)
    • Responsiveness (select 1-5)
    • Notes (textarea)

    Stage recordings and provide form to multiple interested parties for further analysis.

    Set notes

    Additional qualitative notes on each set are added here.

    Bel Canto EADG

    This is the existing set. Sound overall is even. String tension feels floppy. Strings sound kinda dark overall. Easy to play. Sound good with pizzicato. Not very responsive.

    Bel Canto ADG, Flexocor Deluxe E

    Flexocor is notably louder and punchier than the Bel Cantos. Sounds metallic. Not an even sound at all with the Bel Cantos – too much contrast.

    Note: All the remaining sets leverage a Flexocor Deluxe E string

    Evah Pirazzi regular

    Actually, more even sounding between the Flexocor and the Pirazzis. The Pirazzis go out of tune much easier than anything I’m experienced with. They definitely sound a helluva lot louder on this bass than anything I’m experienced with as well. They ring. I coughed and I could hear sympathetic ringing. Sounds scratchy, raspy, but if I compare this to Bel Canto, the Evah Pirazzis win on this bass. Sounds like an old viol. They are definitely harder to play than other strings – more tension and thickness, I think. I can feel it in my wrist.

    Flat Chrome Original

    Playable. Definitely projects more and has a wider dynamic range than the Bel Cantos. Not quite as much as the Evah Pirazzi set, but goes in that direction. Much easier to play than the Evah Pirazzi set. Strong candidate.


    Sounds similar and slightly brighter to the Bel Cantos, but overall they sound sort of muffled. Similar playability to the Bel Canto set; feels very comfortable to play, speaks well, just lacks a lot of the color and projection that the Evah Pirazzis and Flat Chrome sets have.


    This is a pretty good sounding string. They are bright, but still have lots of tone and body. They have some interesting color. Lots of good dynamic range. They are not as playable as the Bel Canto, Flat Chrome, or Flexocor sets – more stiff and raspy.

    Flexocor Original

    These strings mostly feel great, sound nice, but I have a little trouble getting them to not squeak. Sound is dark and rich.

    Final Analysis

    Each string set had their pros and cons. Evah Pirazzi probably had the best sound, but I found them entirely unplayable because of the size of the strings. Passione and Flexocor were very easy to play, but had little in the way of sound. Bel Canto was my original set, and now that I have some reference to compare them to I can see they have decent sound and playability but not much power.

    Flat Chrome Original and Evah Pirazzi were definitely the biggest-sounding strings. Evah Pirazzi’s response was like a cannon, and Flat Chrome only slightly behind. I listened to the recordings of each string set over a few days to see if I still agreed with myself. This listening/review process was very helpful.

    After reviewing all of the strings for sound and playability, I went with Flat Chrome Original. It was really down to Evah Pirazzi and Flat Chrome in the end. I think the Evah Pirazzi strings had the best sound, but I couldn’t work with them well because of the string thickness. In the future, I will try a new Evah Pirazzi weich set. I also liked the sound of the Flexocor Deluxe E string, and may also try a full set of those in the future. The Flat Chrome Original strings have an amazing sound, are fairly comfortable to play, and they speak well. Most interestingly, they increase my ability to produce dynamic contrast significantly. The only downside is that I’m going to have to learn to play differently. I’ll have to experiment with how I bow to get the right speaking quality and sounding points, but also to learn how to better take advantage of the dynamic range.


    • 2021-03-12: Final analysis complete.
    • 2021-03-10: Review recordings and write up final analysis.
    • 2021-03-09: Recording the Flexocor Originals tonight.
    • 2021-02-15: Tests didn’t begin yesterday because I practiced instead. Today I am picking up where I left off. Form completed, begin tests, clean up doc errors.
    • 2021-02-14: Pirastro Flexocor Deluxe E received, strings organized and labeled. Goals for today are to create the feedback form and test sets 1 and 2.
    • 2021-02-08: Ordered Pirastro Flexocor Deluxe E.
    • 2021-01-24: Set up project goals and created this document.
    • 2023-04-24: I am trying Evah Pirazzi weich strings on A, D, and G. I find them to be a bit too loose, not quite as loud, and not quite as responsive as Flat Chrome Original on this bass. But they have a good, zoomy sound. I think maybe A and D could go with the regular gauge, or even perhaps all three. But as it stands, the Flat Chrome Originals still win. I kept the low E/C string on a Flexocor Deluxe since the gates were tuned specifically for that brand and it has a great sound already.
  • Practice Tips for Musicians

    photo of a practice setup: double bass, sheet music, and tuner

    One of the best ways to improve yourself as a musician is to make the time you spend in the practice room as efficient as possible. Often I’ll see students get frustrated with their progress because they spend time practicing and don’t feel like they are seeing any progress. The root cause isn’t a lack of inherent talent; rather it is almost always due to inefficient practice habits.

    General tips

    Here are some ideas to help you maximize the efficiency of your practice time:

    1. Set a schedule, and stick to it. Set a time for yourself to practice. Optimally, this would be the same time every day, but schedule it for time that works best for you. Try to get at least some practice time in daily – don’t just take a zero.
    2. Practice the hard parts. It cannot be emphasized enough that you should not simply start at the beginning of a piece, play until you make a mistake, and then start over again at the beginning. Because you know what’s going to happen, right? Exactly: You get to the same exact spot where you made the mistake, and then you make the same mistake again, and you instinctively go right back to the beginning. There’s a time and place for playing from the beginning, but that time is not now. Whenever you make a mistake, immediately stop what you are doing, pick up a pencil, and mark the spot. Play just that measure to figure out what is going on. If it is a fingering problem, try a few different options. If it is a shift between two notes or positions, then fix just the shift first. Then back up a measure or two earlier, and see if you can glide into the problem spot now. Better? Good!, Not better? Fix it!
    3. Mark your problem spots. I just mentioned this in the above tip, but it bears repeating: Put markings in your score where you need to practice. During rehearsals or practice sessions, I’ll often just put a little star next to the spot that needs work. When I get focused on that problem spot, I might grab a couple of Post-It notes and use them as blinders on my sheet music so I’m only looking at the spot I need to practice.
    4. Use a metronome. The metronome is one of the greatest inventions in the history of human civilization. Use it. Here’s how:
      1. Identify the spot that needs practice. Initially this should be a short segment – one or two measures in most cases.
      2. Figure out a tempo where you can play the segment perfectly. The notes should be articulated clearly and in perfect time subdivisions, never early, never late. The note is perfectly in tune. The bow is moving in the proper directions, and is placed on the string in a way that produces the sound you’re looking for. And so on. Don’t make any compromises with your slowest tempo. If you can’t play it perfectly, slow the metronme down even further. 40 beats per minute (BPM) or even slower is not an uncommon starting point for me.
        • Pro tip: For string players busy with staccato segments that might seem impossibly fast , practice legato first. Then practice with extremely short bow strokes. Maintain contact with the bow on the string. As you speed up, the short bow strokes will seem to lift and provide the staccato sound you’re looking for.
      3. Figure out your slowest tempo and your target tempo.
      4. Now think about how many times you should repeat this section with the metronome speed incremented. Plan on at least 5 increments of the metronome. 20 is probably a good upper limit in most cases.
      5. Write down a metronome plan for the segment. If your starting tempo is 50 BPM, and your target tempo is 130 BPM, and you want to practice your segment 10 times, then write down something like this: 50, 60, 70, 80, 90, 100, 110, 120, 130, 140. Note: Add one increment over your target tempo. That way when you play the piece at the target tempo, it’ll seem that much easier.
      6. Practice the segment at the slowest tempo (e.g. 50). Resist the urge to play past the segment you’ve indicated – this is inefficient. Stick to the plan. Make sure you’re doing everything as perfectly as possible at the slow tempo. Be self-critical, and honest with yourself.
      7. Now move the metronome to your next inrement (e.g. 60). Practice the thing.
      8. Repeat this routine until you get to your target tempo. Note: If you can’t play perfectly at some higher tempo along the way, stop here. Examine what is holding you up, and see if you can fix it. If it is still unplayable at the higher tempo, practice at the fastest tempo you’re comfortable with for the number of times you intended (e.g. 10) and then try again the next day.
    5. Use a tuner. Tune your instrument before you begin to practice. Spot check your intonation when you’re practicing. I like the Tunable app for Android and iOS, because it has both a tuner with great visualization and a built-in metronome in one app. I keep an old phone mounted onto my music stand that basically serves this one purpose, to run Tunable.
    6. Have a practice space. This might be a corner of your room where your music stand, instrument, metronome, pencil, and other war materiel are all located and readily available. Or have everything packed properly so that when you have to escort yourself to your practice location, everything is available and handy.
    7. Remove distractions. Put your phone on silent mode. Resist the urge to respond whatever social media platform is nagging you. Print out a picture of Gandalf saying “YOU SHALL NOT PASS” in Impact font and tape it to your practice room door if you have to. Everything other activity is useless right now – focus, practice.
    8. Practice progressively. If a segment of 10 notes is giving you a lot of trouble, then start with just the first note. Then the first two notes. Then three notes. And so on. Work out the tone, the shifts, and the articulations along the way.
    9. Use healthy technique. If you wind up injuring yourself, that’ll curtail your practice goals right then and there. Practice with healthy technique habits: Use good posture, focus on ergonomic hand positions, and avoid excessive tension. Bad technique can lead to joint and back aches, tendonitis, and carpal tunnel syndrome. Good technique will allow you to practice more, to play longer in life, and to achieve greater success with your musical goals.
    10. Play with feeling. For your musicality to become truly inspired, play with all the emotion and soul that you can muster. Don’t just settle for ‘techncially correct’. Make it soulful, moving, and human.

    The Practice Algorithm™

    The Practice Algorithm is a fundamental technique that many musicians use to optimize their approach to learning a piece of music. This algorithm is particularly effective for those notoriously difficult passages.

    The Practice Algorithm is the order of what you focus on in sequence as you practice a segment of music – that’s it. Here’s the order of precedence for what you should focus on:

    1. Intonation: are you playing the right notes, and are the notes in tune? For fixed-intonation instruments such as piano, harp, or guitar – is your instrument in tune?
    2. Rhythm: Are you playing the correct rhythm? Does it feel right?
    3. Articulation: Are the notes to be played staccatto, detaché, tenuto, etc.?
    4. Sound: How is your sound quality? Do you like the sound of that note you’re playing, or could it be improved? Are you using the right amount of bounce in the bow, breath control, finger weight, etc.?
    5. Tempo: Now that you have all of the above exactly the way you like it, what’s the target tempo? How will you work up to that tempo? (Hint: It has something to do with a metronome.)

    The Practice Algorithm should drive all active practice session efforts.

About Me

Hello, my name is Joe Lewis. Since 2014, I’ve been working at Google as a technical writer. I have worked as a developer, researcher, and in leadership roles in the energy, security, identity, privacy, and analytics realms. I wrote a few books. I often tinker around on GitHub.

I am also a professional double bassist, actively teaching this instrument on weekends and performing with orchestras as time permits. I like to travel, exercise, and am a mountain bike enthusiast.

Blog at WordPress.com.