I am trying to use the SoundNote command with "Violin" as my instrument but I cannot see how I can play quarter tones and smaller denominations ("cents").
I suspect the answer is you cannot play MIDI notes in Mathematica at a cent pitch granularity. Try this:
music1 = Sound[SoundNote["C", 1.25, "Violin"]] music2 = Sound[SoundNote["CSharp", 1.25, "Violin"]] Export["music1.mid", music1] Export["music2.mid", music2]
There's no byte in between 3C and 3D and these notes were interpreted to be a semitone apart. So we know at least we probably cannot export a quarter tone from Mathematica - and I guess it cannot play these notes in the notebook either.
I was thinking maybe I could use the .mid file format spec to edit the .mid files to apply a Pitch Wheel Change message and load it back in, but we're drifting further away from Mathematica at this point. https://www.cs.cmu.edu/~music/cmsip/readings/Standard-MIDI-file-format-updated.pdf
However, if you just want to hear the note you can
This adds some distortion. If you load the
Music package you can get the ratio you need to pitch shift a standard 440Hz $A^\natural$ to get a quarter note.
<< Music` (*https://reference.wolfram.com/language/Music/tutorial/Music.html*) quartertoneRatio = #[]/#[] &@CentsToHertz[QuarterTone]; semitoneRatio = #[]/#[] &@CentsToHertz[QuarterTone]; music1 = Sound@SoundNote["A", 1.25, "Violin"] quartertoneHigherAsPitchShift = AudioPitchShift[music1, quartertoneRatio] semitoneHigher = Sound@SoundNote["ASharp", 1.25, "Violin"] (* Verify the below Audio sounds the same as the semitoneHigher note *) semitoneHigherAsPitchShift = AudioPitchShift[music1, semitoneRatio]