i am wondering what "someone who knows this audio stuff" would charge to make it happen.
please reply directly :) Thanks ----- Original Message ---- From: Squeak List <[hidden email]> To: The general-purpose Squeak developers list <[hidden email]> Sent: Sat, March 6, 2010 1:47:07 AM Subject: AbstractSound 2 MIDI? Hello all, Wondering if there is something i have overlooked that would enable me to turn this sort of stuff: #(#('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)) into a standard MIDI file...? --- delightful workspace code: s_PluckedSound new "FMSound clarinet2" . m_MixedSound new. notes_#(0 1 9 4 5 8) . pedal_#(1 2 1 3 1 4 1 5 1 6 6 5 6 4 6 3 6 2 6 1). st_ReadStream on:pedal. oc_OrderedCollection new. octave_'5'. dur_0.1. "0625." vol_300. d_Dictionary new. d at:0 put:'c'; at:1 put:'c#'; at:2 put:'d'; at:3 put:'d#'; at:4 put:'e'; at:5 put:'f'; at:6 put:'f#'; at:7 put:'g'; at:8 put:'g#'; at:9 put:'a'; at:10 put:'a#'; at:11 put:'b'. [st atEnd]whileFalse: [oc add:(Array with:((d at:((notes at:st next))),octave)with:dur with:vol)]. anArray_oc asArray. m add: (AbstractSound noteSequenceOn: s from: anArray ). m play --- i just want to turn THAT into a standard MIDI file... but if there were more "voices" added to the MixedSound, they should also work/show up :) At this point, all i really care about is that the MIDI file produced would just convey the note, octave, duration, and volume information - nothing fancy (no extra/spiffy controllers)... i don't even care what "instrument" the midi file uses (except DRUMS) - as long as it just contains the correct note info :) The goal? To see the notation in a program like Finale, MuseScore, or anything (that runs on Windows) that will show the notes as a music score. I have looked into Siren and Musical Objects for Squeak, but did not find this feature - or at least no way for me to make sense of how to do it... it probably is in there somewhere, but it seems that Siren at least has moved on to VW for the most part... also, MIDIFileReader is kinda the opposite of what i am looking for: (MIDIFileReader(intent))reversed does not work :) i am kinda interested in seeing "standard" musical notation in Squeak, but that is entirely beyond my time and ability right now... --- and finally: i am in the Seattle area and remembering the meetings i went to of: http://www.halcyon.com/podenski/stug/ Puget Sound Smalltalk and Object-Oriented Database User Group yeah, that looks grim :( yet how great it was to discuss this squeak thing with brilliant folks in person... --- thanks, ken |
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 |
Free forum by Nabble | Edit this page |