[squeak-dev] AbstractSound 2 MIDI? (2.8)

Stéphane Rollandin lecteur at zogotounga.net
Thu Mar 18 08:55:38 UTC 2010


try this:

download the image at
http://www.zogotounga.net/comp/squeak/sqgeo.htm

direct link:
http://www.zogotounga.net/comp/squeak/muo/muO%20235%20image.zip

then open a workspace and evaluate this:


mph := #(#('c5' 0.1 300) #('c#5' 0.1 300) #('c5' 0.1 300) #('a5' 0.1 
300) #('c5' 0.1 300) #('e5' 0.1 300) #('c5' 0.1 300) #('f5' 0.1 300) 
#('c5' 0.1 300) #('g#5' 0.1 300) #('g#5' 0.1 300) #('f5' 0.1 300) 
#('g#5' 0.1 300) #('e5' 0.1 300) #('g#5' 0.1 300) #('a5' 0.1 300) 
#('g#5' 0.1 300) #('c#5' 0.1 300) #('g#5' 0.1 300) #('c5' 0.1 300))
	inject: MusicalPhrase new into: [:ph :n |
		ph, ((MusicalNote fromKeyNote: n first)
			length: n second;
			volume: n third * 0.001)]
	
mph asMIDIFileNamed: 'mph.mid'


isn't it what you want ?

regards,

Stef





More information about the Squeak-dev mailing list