Sunday, September 25, 2011

Python for Alto Saxophone: Intonation, Transcription.

Two things (out of the many) I hope to work on my saxophone, is to transcribe music, so that I can re-arrange it, as well as improve on my intonation. The following script is to aid me in this endevour:

from wave import open as waveOpen
from ossaudiodev import open as ossOpen
import sys, tty, termios
import random

ver = "1.1"

def playTone(myToneFile):
# http://stackoverflow.com/questions/307305/play-a-sound-with-python
	s = waveOpen(myToneFile,'rb')
	(nc,sw,fr,nf,comptype, compname) = s.getparams( )
	dsp = ossOpen('/dev/dsp','w')
	try:
  		from ossaudiodev import AFMT_S16_NE
	except ImportError:
 		if byteorder == "little":
 	   		AFMT_S16_NE = ossaudiodev.AFMT_S16_LE
  		else:
  			AFMT_S16_NE = ossaudiodev.AFMT_S16_BE
	dsp.setparameters(AFMT_S16_NE, nc, fr)
	data = s.readframes(nf)
	s.close()
	dsp.write(data)
	dsp.close()

def _getch():
# http://stackoverflow.com/questions/1052107/reading-a-single-character-getch-style-in-python-is-not-working-in-unix
        fd = sys.stdin.fileno()
        old_settings = termios.tcgetattr(fd)
        try:
            tty.setraw(sys.stdin.fileno())
            ch = sys.stdin.read(1)
        finally:
            termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
        return ch

def getNextRand(currentRand, randRangeMax):
	newRand = random.randrange(0,randRangeMax)
	while (newRand == currentRand):
		newRand = random.randrange(0,randRangeMax)
	return newRand

# Setup dictionary of tones here
# Full range of tones:

fullRange = (
("Low Bb", "low_Bb.wav"),
("Low B", "low_B.wav"),
("Low C", "low_C.wav"),
("Low C#", "low_C#.wav"),
("Low D", "low_D.wav"),
("Low D#", "low_D#.wav"),
("Low E", "low_E.wav"),
("Low F", "low_F.wav"),
("Low F#", "low_F#.wav"),
("Low G", "low_G.wav"),
("Low G#", "low_G#.wav"),
("Low A", "low_A.wav"),
("Low A#", "low_A#.wav"),
("Middle B", "middle_B.wav"),
("Middle C", "middle_C.wav"),
("Middle C#", "middle_C#.wav"),
("Middle D", "middle_D.wav"),
("Middle D#", "middle_D#.wav"),
("Middle E", "middle_E.wav"),
("Middle F", "middle_F.wav"),
("Middle F#", "middle_F#.wav"),
("Middle G", "middle_G.wav"),
("Middle G#", "middle_G#.wav"),
("Middle A", "middle_A.wav"),
("Middle A#", "middle_A#.wav"),
("High B", "high_B.wav"),
("High C", "high_C.wav"),
("High C#", "high_C#.wav"),
("High D", "high_D.wav"),
("High D#", "high_D#.wav"),
("High E", "high_E.wav"),
("High F", "high_F.wav"),
("High F#", "high_F#.wav"))

middleRange = fullRange[7:21]
lowMiddleRange = fullRange[0:21]

soundDictionary = middleRange

print "Intonation/Transcription Ear Developer " + ver
print "\nSpace to play tone, 0 for answer, Enter for next tone, q to quit"

kbValue = ord(_getch())
# set a random note at start

random.seed()

currentRand = random.randrange(0,len(soundDictionary))

currentSound = soundDictionary[currentRand-1]



while 1:
	if kbValue == 32:
		print "Playing tone." 
		playTone(currentSound[1])
		playTone(currentSound[1])
	elif kbValue == 13:
		currentRand = getNextRand(currentRand, len(soundDictionary))
		currentSound = soundDictionary[currentRand-1]
		print "Switched to another tone." 
		
	elif kbValue == 48:
		print "The answer is: " + currentSound[0]
		
	elif kbValue == 113:
		break

	kbValue = ord(_getch())
	


So basically what it does is very simple, play back a specific sound sample, which I will try to use my ears and saxophone to match. In essence this will achieve two things.

First, figuring out a particular note will aid recognition of the particular note, and that will aid transcription. Secondly, with the playback, assuming I can figure out the note, if I can harmonize with the note should help with my intonation.

Hope it works :)

Edit: 27th September 2011
After some real world use, I found that randrange kept giving very close values for the small range I'm using, so additional code was used to ensure the previous tone would not be the next one as well.

Squeeks, figured

Figured out why I was squeeking so bad - it was a bad reed.

That's sad, as this Legere Signature #2.5 is a new one I bought just 2 months ago. The other legeres I got did not seem to exhibit this problem, nor other reeds. Oddly enough, I got this new reed because my old reed had developed a crack. Playing the cracked reed on the V5 did not have the squeeks, but it did have an extra buzz to its sound.

Looks like next month I'll be getting a new Signature... wonder what happened to this one to cause it to fail, no drops or bumps :-/

Thursday, September 22, 2011

Hate reeds and mouthpieces! GAH!

The past few days I've been testing out various combinations of reeds, ligatures and ligature positions in order to figure out why I'm squeaking on my V5 A27. And today, I had a go with a Hahn #2.5. It did not squeak at all, although oddly it had an unexpected side effect of being quite flat? Very obvious when doing my mouthpiece exercises.

On the usual position on the crook, the mouthpiece played very very flat, like 40+ cents flat, I'd never seen that before! Pushing in the mouthpiece till the very edge of the cork seemingly fixed it, and a positive side effect is that middle d is now _only_ 20 cents sharp! Wow!

Would the Hahn be my cure?

I decided to try other synthetics. Fibracell. Other legeres.

Not. A. Squeak.


ARGH!

Sunday, September 18, 2011

[ Houdini Cookoff ] Complete!

FINALLY! IT IS DONE! Oh my goodness.

I think this mini project, whilst cut short had me learn a lot of news things - controlling fluids, figuring out how to composite in COPs, bits on shaders - lots lots.

Not going to do this for a looong while, this sucked up a fair amount of free time, now I can get back to the other stuff I want to learn, music theory, composition, audio engineering, acoustics, python, arduino, photography er.... yeah I have no life :D

Wednesday, September 14, 2011

[ Houdini Cookoff ] 17

Started on rendering the various parts. Can I get this done by this weekend? :D

Dynamics vs Condensers: Microphones

Yesterday, I received some new toys in the mail, a SE Electronics X1 condenser mic, and a Project Studio Reflexion Filter. There was a really good bundle from dv247, that included a metal pop filter, and I really wanted to a) try out condenser mics and b) improve my recordings by improving my room's acoustics.

I only did vocal tests last night on the SM57 (plus Fethead) and the X1, and I can't really say which is better. Subjectively, I actually prefer the SM57!

This evening, I did some quick tests after my saxophone practice - 2 songs, one run on each mic. After getting the levels up to 0db (I'd set the gain on my pres so that I'd only need 0.9 - 1db gain boost in Audacity) and comparing both mics......

I honestly could not tell which was the SM57 and which was the X1.

More testing will be done this weekend.

In addition, the Reflexion Filter may be a dud buy. Not because it does not work, but it may be a possibility that my room is actually quite dead, sonically! Clapping in my room I hardly hear any reflections, similarly with my saxophone. I do notice that there actually are reflections coming in from the small passageway to the bathroom, seemingly sorted by draping some clothes over the door. Buh.

I also did some vocal tests last night on the X1 with and without the reflexion filter.... can't really tell the difference at all. Maybe I need to develop my ears further. Truly, I did not hear any room reflections without the filter.

On issue I encountered with the reflection filter is using the Fethead with it and the SM57 - the extended length of the mic + amp, fitted with the xlr cable at the end actually causes the mic capsule to protrude significantly from the filter's dead zone. Not that I could tell really, thanks to the room's deadness.

Dud buy? Hopefully not.

[ Houdini Cookoff ] 15

Still plodding along, and here's what I've got so far, a ripple simulation that represents the interaction of the milk being poured. The mesh will only be used to generate a reflection pass as the diffuse contribution will be from the volume simulation.

The final comp will perhaps be another second or two longer, just long enough to fade out. Will definitely not be putting the spoon interaction et all in - many other projects demanding my attention, and I haven't been able to concentrate on my music theory since this project started!

Sunday, September 11, 2011

All in the mind?


Decided to spend _some_ of the day not cooped up at home, and to spare the neighbours my un-wholesome sound frequencies, decide to practice at (or under) Primrose Hill Bridge. It's about an hour's walk from where I live, beautiful weather today, sun, with a good breeze, and not humid. Had good fun for two hours, but next time I go, I'll be sure to bring some clips, the wind is strong under the bridge, and had my scores flapping away twice!

Still on the V5 A27, still loving the piece. That said, there is an issue of notes just jumping to the next register for no apparent reason? I did a quick shootout at home with the Optumum AL4 and V16 A6S, and indeed, both of these pieces did not exhibit this tendency. So whats up with that? Going to get my A27 down to a mouthpiece refacer to let them work their artistry on it next week - got class this saturday and I don't want to be without my A27 :)

That said, testing the other two pieces once again brought the sound qualities to the fore. I found it odd that the A27 has become the brightest piece, at least to my ear! And not in a bad way. The AL4 actually sounds bigger, fuller, but it still had that faraway kind of tone. The V16 on the other hand... felt too dark! Still very nice to play at the low register, but I was like.... er... meh.

Will be selling the V16 soon :)

Saturday, September 10, 2011

Fethead Inline Amplifier on Sax and Vocals

The TritonAudio Fethead is a tiny and quite affordable inline amplifier that sits between your microphone and preamp. In my case, I use the Shure SM57 connected to a Onyx Blackjack USB audio interface. The blackjack provides up to 60db of gain, which does sound quite clean even at 60db. (NB: I am a newbie at this).

However, when far miking my saxophone, the recorded audio levels are quite low. Enter the fethead - it uses phantom power, and provides about 20db of clean gain for dynamic mics.

Here's a few charts showing the recorded audio. The topmost sample will be the onyx at 60db gain with no fetheads, and the ones that follow below are with the onyx at various gain levels. Even at just 35, it gives a reasonably hot signal.


And here are some audio clips as well. Note that to hear the full effect of the fethead, you'd definitely need to be listening through a good set of speakers or headphones. I'm using AKG 240MKII studio headsets, and I've been told that listening to these clips on a good set of monitor speakers also show how the fethead fattens up the sound.


SaxFetheadGain35 by Gallen SaxNoFetheadNormalized by Gallen Vocal With Fethead by Gallen VocalNoFethead by Gallen

Thursday, September 08, 2011

[ Houdini Cookoff ] 14

No, I'm still alive. Still on the Making Tea exercise, but tackling it bit at a time - this is taking up waaay to much time and a bit more time intensive than I thought. So here I present, after a lot of tweaking, the tea being mixed with milk!

What I'm not too happy about is the stream of milk entering is already the light brown color - in the reference it still maintains its whitish aspect for abit. If I can get around, I'll do another fluid sim for the white spreading element I've observed.

If not, the next layer will be the reflection pass - this is basically the diffuse pass.

Sunday, September 04, 2011

Saxophone Log: September 2011

The usual every month. As mentioned in an earlier post, I'm playing with my new Vandoren V5 A27 mouthpiece. In addition, I have a bit of new bling - a Vandoren M/O Ligature.
And here's a little extra I bothered to record on video, the super mario bros theme, abridged, at 80bpm :)
Few other soundclips below as well :) Apart from just learning on my own, I'm looking to join a band or orchestra, already have two in London I'll be checking out. In addition, I'm working with a keyboardist to produce some music :3 We're working on an old 80s michael bolton song at the moment. Let's see how it goes :)


Aaaand back to the houdini cookoff :)

Friday, September 02, 2011

[ Houdini Cookoff ] 13

Implemented the smoke sim that will fill up the cup this fine evening. Took awhile to get a nice swirl action going, but yeah :)

Thursday, September 01, 2011

Introversion

Every few days I load up google and search with terms like introversion, introverted etc. Had a new hit pop up:


http://www.moorea-seal.com/2011/06/i-am-introvert.html


I thought this description is much less dramatic than the usual link I toss around, Caring for your introvert.

The Quest for "Tone"

It is still very early days in my saxophone playing, and one thing I recently explored has been modifying how I sound via changing mouthpieces. For some reason, after trying out a multitude of pieces, I went "back to basics" and am currently using a classical piece, a Vandoren V5 A27 (yes I bought yet another one).

Veering off topic for a bit, as mentioned in a previous post, I'd picked up a Vandoren V16 A6S after doing lots of tests down at the sax shop. Playing the V16 for a bit still gave me the feeling that it was not as flexible* as I thought it was. The Vandoren Optimum AL4 has that flexibility - or perhaps it is all the harmonics - but I heard the tone as quite nasal. The V5 sorted that out, not nasal, brighter, more focused. On the flip side, the V5 bears similarity to the AL4 in that middle D took more effort to play resonantly - unlike the V16 that seemed to sort that out. Similarly, the lower register took more effort to play. The V16's lower and mid registers were effortless to play, notes just spoke! On the higher octave, the AL4 and V5 A27 had more body and fullness to them whilst I made the V16 very thin sounding.

Is this the sound concept I'm looking for? No... at this moment I must say I am not exactly sure what kind of sound concept I'm looking for. Why I went for the V5 is mainly how I hear the saxophone - I can't put it down in words, but it sounds like me. It's as if the V5 provided more projection, removed the nasal tone, but did not color the sound, and allowed me to come through. For now, I'm content, and can finally focus on playing, expressing oneself on the sax.

This brings up similarities between photography and the sax - the endless quest for "the lens". Will it give the smooth bokeh, the sharpness, the warmth? All these are valid points, but they do take time away from actual photography. A bit of a rant, I see too many "photographers" kitted out with the latest specs, and sometimes asking me why I'm using an old camera (2007), or why I'm actually using flash in broad daylight >.>

I feel really sad, that in this modern day where information can be found at a click of a mouse, people don't seem to use that capability to *learn*. There is so much out there on the web that just 10 years ago, non existent even in libraries. Few seem to realize that to develop a skill, it's not about buying the latest and greatest. Something even more expensive needs to be used to obtain these skills - time. Time to learn, time to practice, time to put the practice into action.

I think any art form revolves around woodshedding or practice. Endless practice.

And yet, practice just for the sake of practice, I find equally pointless. There have been many days I forced myself to do photography or hobby X - but there was no heart in it. Progress would be minimal. Another key factor, I'd like to think is drive. Passion? No. I don't think I have a "passion" for photography or the sax. Rather, I just enjoy them. For me I think my "passion" is the act of learning, accumulating new skills and gaining knowledge.


*flexible: As it the tone production feels locked down, or guided by the mouthpiece not me.

[ Houdini Cookoff ] 12

So here's tonight's WIP, got the solid milk in place. Next stage will be to emit smoke from it. Tomorrow!