From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #321 Reply-To: sc-users Sender: owner-sc-users-digest@lists.io.com Errors-To: owner-sc-users-digest@lists.io.com Precedence: bulk sc-users-digest Thursday, July 12 2001 Volume 01 : Number 321 ---------------------------------------------------------------------- Date: Wed, 11 Jul 2001 17:16:52 +0200 From: Klaus Kessner <---@---.---> Subject: click why does the following code produces audible clicks instead of a continous sound? // create some test file. (Synth.write({ SinOsc.ar(600, mul: 0.4)}, duration: 5.0, pathName: "a:sine")); ( // mit PlayBuf. var nextTimes, offsets; var ntSeq, offSeq; var sf, env; nextTimes = [1.0, 1.0, 1.0, nil]; offsets = [0, 1, 2, 3]; ntSeq = Pseq( nextTimes, 1).asStream; offSeq = Pseq( offsets, 1).asStream; env = Env.linen(0, 1, 0, 1, \linear); sf = SoundFile.new; sf.read("a:sine") and: { sf.preloadData }; 40.rand.do({ '-'.post;}); '-'.postln; Synth.play({ Spawn.ar({ arg spawn, signal, off; spawn.nextTime = ntSeq.next; off = offSeq.next * sf.sampleRate; ("nextTime: " ++ spawn.nextTime ++ "\t | offset: " ++ off).postln; signal = sf.data.at(0); EnvGen.ar(env, PlayBuf.ar(signal, offset: off); )}); }, duration: 4)) ------------------------------ Date: Wed, 11 Jul 2001 10:48:10 -0500 From: James McCartney <---@---.---> Subject: Re: click on 7/11/01 10:16 AM, Klaus Kessner at kkessner@netcologne.de wrote: > env = Env.linen(0, 1, 0, 1, \linear); because you specify attack and release times of zero. ( // mit PlayBuf. var nextTimes, offsets; var ntSeq, offSeq; var sf, env; nextTimes = [1.0, 1.0, 1.0, nil]; offsets = [0, 1, 2, 3]; ntSeq = Pseq( nextTimes, 1).asStream; offSeq = Pseq( offsets, 1).asStream; env = Env.linen(0.005, 0.995, 0.005, 1, \linear); sf = SoundFile.new; sf.read("a:sine") and: { sf.preloadData }; 40.rand.do({ '-'.post;}); '-'.postln; Synth.play({ Spawn.ar({ arg spawn, signal, off; spawn.nextTime = ntSeq.next; off = offSeq.next * sf.sampleRate; ("nextTime: " ++ spawn.nextTime ++ "\t | offset: " ++ off).postln; signal = sf.data.at(0); EnvGen.ar(env) * PlayBuf.ar(signal, offset: off) }); }, duration: 4)) - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Wed, 11 Jul 2001 16:48:45 +0000 From: Jem Finer <---@---.---> Subject: Re: routing out / MOTU 828 cpu drain ? on 10/7/01 14:23, James McCartney at asynth@io.com wrote: > mysynth.channelOffset = channel; > > The synth's outputs will be put onto a contiguous set of channels beginning > at the offset. > The default channel offset is zero, meaning that the synth's first channel > goes onto the output's first channel. ok - then if I write : ( // analog bubbles Synth.play({ thisSynth.channelOffset = 2; f = LFSaw.kr(0.4, 24, LFSaw.kr([8,7.23], 3, 80)).midicps; // glissando function CombN.ar(SinOsc.ar(f, 0, 0.04), 0.2, 0.2, 4) // echoing sine wave })) should the output not come out of channels 3 & 4 - that is what I expected but it comes out of 1 & 2 as per usual. HOWEVER this may be because in the Synth help file it says : "channelOffset - a channel offset used if the Synth is installed in a Spawn unit generator. This is only really called from within a Spawn's newEventFunction." So is this the case - it only works in a Spawn (which I did get to work actually) ? If so why ? ALSO - to get this to work in a Spawn it is necessary to increase the numChannels parameter. So to get audio out of the 8 optical channels it has to be 16, to get audio out of analog 3 & 4 it has to be 4 etc. In the Spawn channel offset example the following work (using the outputRouting below) synth.channelOffset = 2.rand; // channel zero or one at random : numChannels = 2 synth.channelOffset = 8 + 8.rand;// optical 1 - 8 at random : numChannels = 16 synth.channelOffset = 16.rand;// analog 1 - 8 or optical 1 - 8 at random : numChannels = 16 When Playbuf is involved in the Spawn it crashes because of these extra channels. eg (€ ERROR: SoundFile says there are 2 channels, but DiskOut has 4nputs.) Can this be right ? I hope I'm doing something stupid ! the Main routing I am using is : hardwareSetup { super.hardwareSetup; false.trace; //MOTU 828 if (Synth.hardwareName == 'MOTU 828', { Synth.setOutputRouting([ 1, 2, 3, 4, 5, 6, 7, 8,9,10,11,12,13,14,15,16]); Synth.setInputRouting([1, 2, 3, 4, 5, 6, 7, 8,1, 2, 3, 4, 5, 6, 7, 8]); },{ Synth.normalRouting; }); AudioIn works perfectly across 8 channels of analogue and 8 of digital CPU DRAIN ? using the 828 and running multiple Instruments from lib 2 dodgy things happen : a) there is a horrible click every time I open add a new instrument b) I seem to be able to run far fewer Instruments in parallel before SC "crashes" - infact it doesn't so much crash as stop. Not quite a freeze as I can still quit. Cheers, Jem ------------------------------ Date: Wed, 11 Jul 2001 13:03:06 -0400 From: "Anthony G. Holland" <---@---.---> Subject: vocoder help I have a student who wants to do a psychology experiment involving "subliminal" audio. I thought we might try SC and a vocoder at some ultra high freqs.... using say 18kHz as a sound source for a vocoder. Does anyone have a vocoder demo file availalbe which we might use to generate some test sounds for my student's pysch project? Much appreciated Anthony Holland Skidmore College ------------------------------ Date: Wed, 11 Jul 2001 12:35:40 -0500 From: James McCartney <---@---.---> Subject: Re: vocoder help on 7/11/01 12:03 PM, Anthony G. Holland at tholland@skidmore.edu wrote: > I thought we might try SC and a vocoder at > some ultra high freqs.... using say 18kHz as a sound source for a > vocoder. why ?? Synth.play({ SinOsc.ar(18000, 0, 0.5) }) ouch, that hurts my ears. Gary Morrison made some vocoders using SC. There is a link to it on the audiosynth website with lots of sound examples. I don't think he posted the code at the time. You might ask.. - --- james mccartney james@audiosynth.com SuperCollider - a real time synthesis programming language for the PowerMac. ------------------------------ Date: Wed, 11 Jul 2001 11:49:12 -0600 From: David Cottle <---@---.---> Subject: Test, ignore Hi, Just a test. Switching my account over to cerl. - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "What the [musical] layman needs is not to acquire facts, but to cultivate senses." ‹Roger Sessions ------------------------------ Date: Wed, 11 Jul 2001 17:40:53 -0600 From: "David Cottle" <---@---.---> Subject: Re: Dictionary > Hi, > Very interesting but in Finale, > I need to specify which octave I am using: > 60.cpcmidi -> C4 > 72.cpcmidi -> C5 > So I don't know if I can really use your method > Unless I update the value of the octave (+1 every 12 notes). I think you still could. Just parse the octave. If you are just printing to a text file, then this should work: 30.do({ m = rrand(24, 96); a = ["C", "C#", "D", "Eb", "E", "F", "F#", "G", "Ab", "A", "Bb", "B"]; m.post; " : ".post; a.at(m%12).post; //print pitch class ((m - 12)/12).floor.postln; //print octave }) - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "Even that vulgar [Š] music, which makes one man merry, another mad, strikes in me a deep fit of devotion, and a profound contemplation of the first Composer; there is something in it of divinity more than the ear discovers." - -Sir Thomas Brown ------------------------------ Date: Wed, 11 Jul 2001 17:45:44 -0600 From: "David Cottle" <---@---.---> Subject: Re: Dictionary > Other problem: > in SC, the midi notes [70, 71] > cannot be written [bb4, b4] in Finale > because Finale assumes that > the next b in the bar is also flat > unless I specify it is natural (or becarre): > [bb4, b4N]. > Do you have an idea about this? Would Finale suppress a natural if it is not preceded by an accidental? For example, how would it parse this: [b4N, a4N, b4N, etc.] Would it print the suppress the naturals or print them? - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "Imagination is more important than knowledge." ‹Einstein ------------------------------ Date: Thu, 12 Jul 2001 02:01:32 +0200 From: Paul Crabbe <---@---.---> Subject: Re: vocoder help - --============_-1217226345==_ma============ Content-Type: text/plain; charset="us-ascii" ; format="flowed" > >Does anyone have a vocoder demo file available which we might use >to generate some test sounds for my student's pysch project? > a simple one...notes choosen on MIDI keyboard ( var bank1,ed,bank2,nbFilters,nyquist, width,ampInput,ampOutput; var input; var voc,poly; var noise; var w; w = GUIWindow.new("panel", Rect.newBy(490, 125, 256, 247)); SliderView.new( w, Rect.newBy(21, 40, 128, 20), "SliderView", 10, 0.5, 20, 0.1, 'exponential'); SliderView.new( w, Rect.newBy(21, 64, 128, 20), "SliderView",10, 0.5, 20, 0.1, 'exponential'); SliderView.new( w, Rect.newBy(21, 88, 128, 20), "q", 0.005, 0.001, 0.01, 0.0001, 'linear'); ScopeView.new( w, Rect.newBy(20, 123, 196, 79), 4410, -1, 1); StringView.new( w, Rect.newBy(158, 40, 128, 20), "inputVol"); StringView.new( w, Rect.newBy(158, 64, 128, 20), "outputVol"); StringView.new( w, Rect.newBy(158, 88, 128, 20), "q"); nbFilters = 25;//augment it for better definition e = Env.new([0, 1, 1, 0], [0.2, 0.1, 0.2], 'linear', 2); Synth.play({ input = AudioIn.ar(1); noise = WhiteNoise.ar; nyquist = Synth.sampleRate/2; width = nyquist/nbFilters; poly = 3; ampInput = w.at(0).kr; ampOutput = w.at(1).kr; q = w.at(2).kr; voc = Voicer.ar({ arg voicer, i, synth, deltaTime, channel, note, velocity; var notes; notes = ((note-4).midicps/440*(nbFilters/10)); bank1 = Array.fill(nbFilters,{arg i; Resonz.ar(input,((width* (i + 1))-(width/2))*notes,q,ampInput)}); ed = Array.fill(nbFilters,{arg i;Amplitude.kr(bank1.at(i))} ); bank2 = Array.fill(nbFilters,{arg i;Resonz.ar(noise,((width* (i + 1))-(width/2))*notes,q, ed.at(i)*ampOutput)}); EnvGen.ar(e,Mix.ar(bank2)); },1,1,poly); Scope.ar(w.at(3),voc) } ); w.close ) btw,I would like to add a test I saw in a vocoder patch in Max(by Marcel Wierckx), choosing either noise or pulse as resynthesis sound source. Pulse would be choosen when detecting voyels input, noise for consonants (by mean of ZeroCrossing). This wont work, because my synth.repeat inside a Voicer seems useless. Any help?? ( var bank1,ed,bank2,nbFilters,nyquist, width,ampInput,ampOutput; var input; var voc,poly; var noise,pulse; var test; var w; w = GUIWindow.new("panel", Rect.newBy(490, 125, 256, 247)); SliderView.new( w, Rect.newBy(21, 40, 128, 20), "SliderView", 10, 0.5, 20, 0.1, 'exponential'); SliderView.new( w, Rect.newBy(21, 64, 128, 20), "SliderView",10, 0.5, 20, 0.1, 'exponential'); SliderView.new( w, Rect.newBy(21, 88, 128, 20), "q", 0.005, 0.001, 0.01, 0.0001, 'linear'); ScopeView.new( w, Rect.newBy(20, 123, 196, 79), 4410, -1, 1); StringView.new( w, Rect.newBy(158, 40, 128, 20), "inputVol"); StringView.new( w, Rect.newBy(158, 64, 128, 20), "outputVol"); StringView.new( w, Rect.newBy(158, 88, 128, 20), "q"); nbFilters = 25; test = 0.2; e = Env.new([0, 1, 1, 0], [0.2, 0.1, 0.2], 'linear', 2); Synth.play({ input = AudioIn.ar(1); noise = WhiteNoise.ar; nyquist = Synth.sampleRate/2; width = nyquist/nbFilters; poly = 3; ampInput = w.at(0).kr; ampOutput = w.at(1).kr; q = w.at(2).kr; voc = Voicer.ar({ arg voicer, i, synth, deltaTime, channel, note, velocity; var notes,plug; notes = ((note-4).midicps/440*(nbFilters/10)); pulse = LFPulse.ar(note.midicps,0.5,1); plug = Plug.ar(noise); synth.repeat(0.01,0.01,if(ZeroCrossing.ar(input)*0.0001>test == 1,{plug.source_(noise)},{plug.source_(pulse)}));//?? bank1 = Array.fill(nbFilters,{arg i; Resonz.ar(input,((width* (i + 1))-(width/2))*notes,q,ampInput)}); ed = Array.fill(nbFilters,{arg i;Amplitude.kr(bank1.at(i))} ); bank2 = Array.fill(nbFilters,{arg i;Resonz.ar(plug,((width* (i + 1))-(width/2))*notes,q, ed.at(i)*ampOutput)}); EnvGen.ar(e,Mix.ar(bank2)); },1,1,poly); Scope.ar(w.at(3),voc) } ); w.close ) thanks, Paul Crabbe, pcrabbe@club-internet.fr - --============_-1217226345==_ma============ Content-Type: text/html; charset="us-ascii" Re: vocoder help

Does anyone have a vocoder demo file available which we might use
to generate some test sounds for my student's pysch project?

a simple one...notes choosen on MIDI keyboard
(
var bank1,ed,bank2,nbFilters,nyquist, width,ampInput,ampOutput;
var input;
var voc,poly;
var noise;
var w;
w =
GUIWindow.new("panel", Rect.newBy(490, 125, 256, 247));
    
SliderView.new( w, Rect.newBy(21, 40, 128, 20), "SliderView", 10, 0.5, 20, 0.1, 'exponential');
SliderView.new( w, Rect.newBy(21, 64, 128, 20), "SliderView",10, 0.5, 20, 0.1, 'exponential');
 
SliderView.new( w, Rect.newBy(21, 88, 128, 20), "q", 0.005, 0.001, 0.01, 0.0001, 'linear');
     ScopeView.new( w, Rect.newBy(20, 123, 196, 79), 4410, -1, 1);

  
StringView.new( w, Rect.newBy(158, 40, 128, 20), "inputVol");
  
StringView.new( w, Rect.newBy(158, 64, 128, 20), "outputVol");
 
StringView.new( w, Rect.newBy(158, 88, 128, 20), "q");
nbFilters = 25;//augment it for better definition
 
e = Env.new([0, 1, 1, 0], [0.2, 0.1, 0.2], 'linear', 2);
Synth.play({
   input =
AudioIn.ar(1);
  noise =
WhiteNoise.ar; 
        nyquist =
Synth.sampleRate/2;
   width = nyquist/nbFilters;
      poly = 3;
       ampInput = w.at(0).kr;
  ampOutput = w.at(1).kr;
q = w.at(2).kr;

voc =
Voicer.ar({ arg voicer, i, synth, deltaTime, channel, note, velocity;
                            
var notes;
                      notes = ((note-4).midicps/440*(nbFilters/10));
  bank1 =
Array.fill(nbFilters,{arg i; Resonz.ar(input,((width* (i + 1))-(width/2))*notes,q,ampInput)});
  ed =
Array.fill(nbFilters,{arg  i;Amplitude.kr(bank1.at(i))} );
bank2 =
Array.fill(nbFilters,{arg i;Resonz.ar(noise,((width* (i + 1))-(width/2))*notes,q, ed.at(i)*ampOutput)});
               
EnvGen.ar(e,Mix.ar(bank2));
            
                },1,1,poly);
    Scope.ar(w.at(3),voc)
  
                }
       );
w.close
)


btw,I would like to add a test I saw in a vocoder patch in Max(by Marcel Wierckx), choosing either noise or pulse as resynthesis sound source.
Pulse would be choosen when detecting voyels input, noise for consonants (by mean of ZeroCrossing).
This wont work, because my synth.repeat inside a Voicer seems useless.
Any help??
(
var bank1,ed,bank2,nbFilters,nyquist, width,ampInput,ampOutput;
var input;
var voc,poly;
var noise,pulse;
var test;
var w;
  w =
GUIWindow.new("panel", Rect.newBy(490, 125, 256, 247));
    
SliderView.new( w, Rect.newBy(21, 40, 128, 20), "SliderView", 10, 0.5, 20, 0.1, 'exponential');
SliderView.new( w, Rect.newBy(21, 64, 128, 20), "SliderView",10, 0.5, 20, 0.1, 'exponential');
 
SliderView.new( w, Rect.newBy(21, 88, 128, 20), "q", 0.005, 0.001, 0.01, 0.0001, 'linear');
     ScopeView.new( w, Rect.newBy(20, 123, 196, 79), 4410, -1, 1);

  
StringView.new( w, Rect.newBy(158, 40, 128, 20), "inputVol");
  
StringView.new( w, Rect.newBy(158, 64, 128, 20), "outputVol");
 
StringView.new( w, Rect.newBy(158, 88, 128, 20), "q");

nbFilters = 25;
test = 0.2;

e = Env.new([0, 1, 1, 0], [0.2, 0.1, 0.2], 'linear', 2);
Synth.play({
    input =
AudioIn.ar(1);
  noise =
WhiteNoise.ar; 
        nyquist =
Synth.sampleRate/2;
   width = nyquist/nbFilters;
      poly = 3;
       ampInput = w.at(0).kr;
  ampOutput = w.at(1).kr;
q = w.at(2).kr;

voc =
Voicer.ar({ arg voicer, i, synth, deltaTime, channel, note, velocity;
                            
var notes,plug;
                notes = ((note-4).midicps/440*(nbFilters/10));
          pulse = LFPulse.ar(note.midicps,0.5,1);
        plug = Plug.ar(noise);
  synth.repeat(0.01,0.01,if(ZeroCrossing.ar(input)*0.0001>test == 1,{plug.source_(noise)},{plug.source_(pulse)}));//??

    bank1 =
Array.fill(nbFilters,{arg i; Resonz.ar(input,((width* (i + 1))-(width/2))*notes,q,ampInput)});
  ed =
Array.fill(nbFilters,{arg  i;Amplitude.kr(bank1.at(i))} );
bank2 =
Array.fill(nbFilters,{arg i;Resonz.ar(plug,((width* (i + 1))-(width/2))*notes,q, ed.at(i)*ampOutput)});
       
EnvGen.ar(e,Mix.ar(bank2));
            
                },1,1,poly);
    Scope.ar(w.at(3),voc)
  
                }
       );
w.close
)

thanks,


Paul Crabbe, pcrabbe@club-internet.fr
- --============_-1217226345==_ma============-- ------------------------------ Date: Wed, 11 Jul 2001 18:03:29 -0600 From: "David Cottle" <---@---.---> Subject: Echo Hi, Is there an echo in here? Is anyone else getting two copies of my posts, or is it just me? How do I fix it? - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "When one arrives at this correct conception of art, there can be no more distinction between science and inspired creating. The farther one presses, the more everything becomes identical, and at last one has the impression of encountering no human work, but rather a work of Nature." ‹Webern ------------------------------ Date: Wed, 11 Jul 2001 20:14:05 -0400 (EDT) From: Matthew Rogalsky <---@---.---> Subject: Re: vocoder help On Wed, 11 Jul 2001, Anthony G. Holland wrote: > Does anyone have a vocoder demo file availalbe which we might use > to generate some test sounds for my student's pysch project? > I doubt this is what you are looking for (not sure what you are looking for actually), but it might be entertaining. enjoy mattr // this uses amplitude of 32 bandpass filters (processing audio input at // 50Hz intervals, starting from 50Hz) to control amplitude of 32 noise // bands ( Synth.play({ Mix.ar( Array.fill(32, { arg i; var bandAmp,sampleOffset,resynthOffset,resynthWidth; sampleOffset = 0; resynthOffset = 0; resynthWidth = 50; bandAmp = Amplitude.kr(BPF.ar(AudioIn.ar(1),((i+1)*50)+sampleOffset,0.1)); BPF.ar(WhiteNoise.ar,((i+1)*resynthWidth)+resynthOffset,0.0001,bandAmp*100); } ); ); }); ) ------------------------------ Date: Wed, 11 Jul 2001 22:36:31 -0500 From: chris clepper <---@---.---> Subject: Re: routing out / MOTU 828 cpu drain ? it is well known about the 828 that it consumes a fair amount of bandwidth regardless of number of channels used, software, etc. i've heard as high as 35-40% of the CPU on some machines! oh well. 8 ins/outs or less to send through them... > >CPU DRAIN ? > >using the 828 and running multiple Instruments from lib 2 dodgy things >happen : > >a) there is a horrible click every time I open add a new instrument > >b) I seem to be able to run far fewer Instruments in parallel before SC >"crashes" - infact it doesn't so much crash as stop. Not quite a freeze as I >can still quit. > > > >Cheers, > > >Jem ------------------------------ Date: Thu, 12 Jul 2001 00:08:00 -0600 From: "David Cottle" <---@---.---> Subject: Test echo, ignore Did I fix the echo? - -- ><><><><><><><><><><><> David Cottle, computer music, contra, cottle@cerlsoundgroup.org "Even that vulgar [Š] music, which makes one man merry, another mad, strikes in me a deep fit of devotion, and a profound contemplation of the first Composer; there is something in it of divinity more than the ear discovers." - -Sir Thomas Brown ------------------------------ Date: Thu, 12 Jul 2001 15:59:26 +0900 From: Takeko KAWAMURA <---@---.---> Subject: FFT Hello! I'm studying FFT. I read "the computer music tutorial" written by Curtis Roads, and found following interesting text... - -------------------------------------------------- Another type of cross-synthesis uses the magnitude functions from one sound with the phase function of another sound to create a hybrid sound effect (Boyer and Kronland-Martinet 1989). - -------------------------------------------------- I want to program like above. But I have a question. How to get magnitude func and phase func from FFT? thanks. Takeko Kawamura tn800@iamas.ac.jp ------------------------------ Date: Thu, 12 Jul 2001 09:08:48 +0000 From: Jem Finer <---@---.---> Subject: Re: Multichannel out Well I wrote it for an early version so it probably needs a tweak. Thomman charge £12 delivery - cheaper than a trip to Berlin - unless you're going there anyway. thomann Mail order hotline ! 0049 9546 9223 55 ivan@thomann.de www.thomann.de motu 828 £635 + £12 postage order #146358 Cheers Jem > A feel a Berlin trip coming on. Thanks Jem. By the way, I really like the > flasher patch - only thing is that it crashes SC (3) when it's finished and > turns off my control strip...answers on a postcard please... > Cheers > Jo > >> From: Jem Finer <---@---.---> >> Reply-To: sc-users@lists.io.com >> Date: Wed, 11 Jul 2001 10:45:05 +0000 >> To: >> Subject: Re: Multichannel out >> >> on 11/7/01 10:09, Joanna mayes at joannamayes@onetel.net.uk wrote: >> >>> Hi all, >>> Does anyone have any cheaper solutions for multichannel out from a G3 333 >>> powerbook (SCSSI & USB) than the new firewire MOTU? What has everyone been >>> using before this? >>> >>> Any ideas gratefully received. >>> >>> Cheers >>> Jo >>> Dartington College of Arts, Devon, England! >>> >>> PS great to meet some of you at the Norwich conference and thanks for >>> sharing your ideas >>> >>> >> >> >> I got my MOTU 828 from Germany - Thomman - a lot cheaper than in the UK >> > > ------------------------------ Date: Thu, 12 Jul 2001 10:54:29 +0100 From: Andy Wilson <---@---.---> Subject: OT: asFFT was: FFT On 12/7/01 7:59 am, "Takeko KAWAMURA" wrote: > I'm studying FFT. mboi::: Version 1.3 : The asFFT Xtra is now available in autodownloadable package, for use in Shockwave, on Macintosh and Windows. You can download it on http://www.as-ci.net . Many thanks to Chuck Neal and MediaMacros (http://www.mediamacros.com) for packaging the asFFT Xtra and making it available for free, in the spirit of the original asFFT Xtra. Check the ReadMe files for information on how to use the asFFT Xtra autodownloadable package online. asFFT Xtra is a Macromedia Director Xtra that computes a FFT (Fast Fourier Transform) on live sound input. Macintosh and Windows versions (no NT, sorry). Freeware. Antoine Schmitt http://www.as-ci.net/ Antoine { andy wilson << managing director << LShift << www.lshift.net } { www.andyw.com && www.faust-pages.com && www.directorxml.com } ------------------------------ Date: Thu, 12 Jul 2001 11:26:10 +0100 From: "fabrice mogini" <---@---.---> Subject: Re: Dictionary Yes, I think it should be ok to do that. I came to the same conclusion (after sending my question) but for your other example (printing which octave), I would have never thought of something like that!... ...It does the job very well. thanks for your support David By the way, I do get your messages in an "Echo" manner. Fabrice - ---------- >From: "David Cottle" <---@---.---> >To: "fabrice mogini" , "SC" >Subject: Re: Dictionary >Date: Thu, Jul 12, 2001, 12:45 am > > >> Other problem: >> in SC, the midi notes [70, 71] >> cannot be written [bb4, b4] in Finale >> because Finale assumes that >> the next b in the bar is also flat >> unless I specify it is natural (or becarre): >> [bb4, b4N]. >> Do you have an idea about this? > > Would Finale suppress a natural if it is not preceded by an accidental? For > example, how would it parse this: > > [b4N, a4N, b4N, etc.] > > Would it print the suppress the naturals or print them? > > -- >><><><><><><><><><><><> > David Cottle, computer music, contra, cottle@cerlsoundgroup.org > > "Imagination is more important than knowledge." ‹Einstein > ------------------------------ Date: Thu, 12 Jul 2001 05:02:07 -0700 From: "tomonori yamasaki" <---@---.---> Subject: Re: FFT > THIS MESSAGE IS IN MIME FORMAT. Since your mail reader does not understand this format, some or all of this message may not be legible. - --MS_Mac_OE_3077758927_317072_MIME_Part Content-type: text/plain; charset="ISO-2022-JP" Content-transfer-encoding: 7bit OK i got some clue... maginitude is easy, you just do .magnitude for complex. also phase can be done by just giving .phase. (type "Complex" and control-j) we just got (x, y) as (fft.real, fft.imag) and converted into magnitude+phase. now we have to do it backward, magnitude+phase to (x, y). if this works, you can do another fft and use one's magnitude and the other's phase... I guess.... Now I'm stuck -I didn't learn math seriously in high school. I just put some wrong answer for the conversion in the attachment. -however. it sounds gooood. very gooood. > Hello! > > I'm studying FFT. > I read "the computer music tutorial" written by Curtis Roads, > and found following interesting text... > > -------------------------------------------------- > Another type of cross-synthesis uses the magnitude functions from one sound > with the phase function of another sound to create a hybrid sound effect > (Boyer and Kronland-Martinet 1989). > -------------------------------------------------- > > I want to program like above. > But I have a question. > How to get magnitude func and phase func from FFT? > > thanks. > Takeko Kawamura > tn800@iamas.ac.jp - --MS_Mac_OE_3077758927_317072_MIME_Part Content-type: multipart/appledouble; boundary="MS_Mac_OE_346858_3077758927_MIME_Part" - --MS_Mac_OE_346858_3077758927_MIME_Part Content-type: application/applefile; name="fftVocoderTest" Content-transfer-encoding: base64 AAUWBwACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAJAAAAPgAAACAAAAADAAAAXgAAAA4AAAAC AAAAbAAABOhURVhUU0NqbQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGZmdFZvY29kZXJUZXN0 AAABAAAABKIAAAOiAAAARgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5oALgAAAAAACwAJ AAQAAAAJwAAAAAAAAAAASAALAAkABAAAAAkAAAAAAAAAAABKAAsACQAEAAAACcAAAAAAAAAA AFsACwAJAAQAAAAJAAAAAAAAAAAAXAALAAkABAAAAAkAAAAAwAAAAABfAAsACQAEAAAACQAA AAAAAAAAAGgACwAJAAQAAAAJAAAAAMAAAAAAawALAAkABAAAAAkAAAAAAAAAAACgAAsACQAE AAAACQAAAADAAAAAAKMACwAJAAQAAAAJAAAAAAAAAAAAyAALAAkABAAAAAkAAAAAwAAAAADL AAsACQAEAAAACQAAAAAAAAAAAPUACwAJA+gAAAAJAAAAAMAAAAAA+AALAAkD6AAAAAkAAAAA AAAAAAEdAAsACQPoAAAACWAAYABgAAAAATEACwAJA+gAAAAJAAAAAAAAAAABOwALAAkD6AAA AAkAAAAAwAAAAAFEAAsACQPoAAAACQAAAAAAAAAAAXoACwAJAAQAAAAJAAAAAAAAAAABrAAL AAkABAAAAAkAAAAAwAAAAAGxAAsACQAEAAAACQAAAAAAAAAAAeMACwAJAAQAAAAJAAAAAMAA AAAB6QALAAkABAAAAAkAAAAAAAAAAAITAAsACQAEAAAACQAAAADAAAAAAhkACwAJAAQAAAAJ AAAAAAAAAAACOwALAAkD6AAAAAkAAAAAwAAAAAJCAAsACQPoAAAACQAAAAAAAAAAAnkACwAJ A+gAAAAJwAAAAAAAAAACiQALAAkABAAAAAnAAAAAAAAAAAKKAAsACQAEAAAACQAAAAAAAAAA ApQACwAJAAQAAAAJAAAAAMAAAAAClwALAAkABAAAAAkAAAAAAAAAAALHAAsACQAEAAAACQAA AADAAAAAAsoACwAJAAQAAAAJAAAAAAAAAAADDgALAAkABAAAAAnAAAAAAAAAAAM3AAsACQAE AAAACQAAAAAAAAAAA0cACwAJAAQAAAAJwAAAAAAAAAADvwALAAkABAAAAAkAAAAAAAAAAAPI AAsACQAEAAAACQAAAADAAAAAA8wACwAJAAQAAAAJAAAAAAAAAAAD3wALAAkABAAAAAkAAAAA wAAAAAPiAAsACQAEAAAACQAAAAAAAAAAA/MACwAJAAQAAAAJwAAAAAAAAAAEQQALAAkABAAA AAkAAAAAAAAAAARKAAsACQAEAAAACQAAAADAAAAABE0ACwAJAAQAAAAJAAAAAAAAAAAAAAAA AQAAAASiAAADogAAAEYHMuGoAI4AAAAcAEYAAXN0eWwAAAASU09VUAAAAB4AgP//AAAAAAAA AAAAgP//AAADngAAAAA= - --MS_Mac_OE_346858_3077758927_MIME_Part Content-type: text/plain; name="fftVocoderTest"; x-mac-creator="53436A6D"; x-mac-type="54455854" Content-disposition: attachment Content-transfer-encoding: base64 Ly8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8v Ly8vLy8vLy8vLy8vLy8vLy8NKA0vL3RlYWNoIG1lIG1hdGghDXthcmcgc3ludGg7DQl2YXIg ZmZ0c2l6ZSwgbnVtZmZ0cywgZmZ0b2Zmc2V0cywgd2luZG93LCBjb3NpbmVUYWJsZTsNCXZh ciBpbnB1dCwgaW5wdXRBbXAsIHRocmVzaGhvbGQsIGdhdGU7DQl2YXIgc3JjMSwgc3JjMiwg ZmZ0MSwgZmZ0MiwgZmZ0MywgaWZmdCwgb3V0Ow12YXIgZmlsZW5hbWUsIHNvdW5kLCBzaWdu YWw7DWZpbGVuYW1lID0gIjpTb3VuZHM6ZmxvYXRpbmdfMSI7DXNvdW5kID0gU291bmRGaWxl Lm5ldzsNc291bmQucmVhZChmaWxlbmFtZSk7DXNpZ25hbCA9IHNvdW5kLmRhdGEuYXQoMCk7 DQludW1mZnRzID0gNDsNCWZmdHNpemUgPSAyMDQ4OwkJDQkNCWZmdG9mZnNldHMgPSBBcnJh eS5zZXJpZXMobnVtZmZ0cywgMCwgZmZ0c2l6ZS9udW1mZnRzKTsNCQ0Jd2luZG93ID0gU2ln bmFsLmhhbm5pbmdXaW5kb3coZmZ0c2l6ZSk7CQkNCWNvc2luZVRhYmxlID0gU2lnbmFsLmZm dENvc1RhYmxlKGZmdHNpemUpOwkNCQ0Jc3JjMSA9IFBsYXlCdWYuYXIoc2lnbmFsLCBzb3Vu ZC5zYW1wbGVSYXRlLCAxLCAwLCAwLCBzaWduYWwuc2l6ZS0yKTsgLy9mbG9hdGluZyBpbnB1 dA0NCWZmdDEgPSAgRkZULmEyc3IoZmZ0c2l6ZSwgZmZ0b2Zmc2V0cywgY29zaW5lVGFibGUs IHdpbmRvdywgbmlsLCBzcmMxLCAwLjApOw0JZyA9IGZmdDEucGhhc2U7DQloID0gZmZ0MS5t YWduaXR1ZGU7DQlrID0gaCpzaW4oZyk7CQkvL2RhPyBob3cgZG8geW91IGdldCB4IG91dCBv ZiBwaGFzZSttYWc/DQlsID0gaCp0YW4oZyk7CQkvL3NhbWUgaGVyZS4gaG93IGRvIHlvdSBn ZXQgeSBvdXQgb2YgcGhhc2UrbWFnPw0vLwlzeW50aC5yZXBlYXQoMCwgMSwge2cucG9sbC5w b3N0bG47IGgucG9sbC5wb3N0bG47fSk7ICAgLy90ZXN0aW5nIG91dA0NCWlmZnQgPSBJRkZU LnMyYXIoY29zaW5lVGFibGUsIG5pbCwgd2luZG93LCBrLCBsKTsNLy8JaWZmdCA9IElGRlQu czJhcihjb3NpbmVUYWJsZSwgbmlsLCB3aW5kb3csIGZmdDEucmVhbCwgZmZ0MS5pbWFnKTsg Ly9ub3JtYWwNCQ0Jb3V0ID0gTWl4LmFyKGlmZnQucmVhbCkgKiAwLjI1OwkNCQ0Jb3V0ID0g b3V0LygyKm51bWZmdHMpOw0JW291dCxvdXRdDX0uc2NvcGUoMC4xKTsp - --MS_Mac_OE_346858_3077758927_MIME_Part-- - --MS_Mac_OE_3077758927_317072_MIME_Part-- ------------------------------ Date: Thu, 12 Jul 2001 14:21:06 +0200 From: Scott Wilson <---@---.---> Subject: Re: FFT on 7/12/01 8:59 AM, Takeko KAWAMURA at tn800@iamas.ac.jp wrote: > Hello! > > I'm studying FFT. > I read "the computer music tutorial" written by Curtis Roads, > and found following interesting text... > > -------------------------------------------------- > Another type of cross-synthesis uses the magnitude functions from one sound > with the phase function of another sound to create a hybrid sound effect > (Boyer and Kronland-Martinet 1989). > -------------------------------------------------- > > I want to program like above. > But I have a question. > How to get magnitude func and phase func from FFT? > > thanks. > Takeko Kawamura > tn800@iamas.ac.jp > The code below will do it. You can also try multiplying magnitudes for further spectral fun... Scott ( // Scott Wilson, created ZKM, 12.04.01 var file1, file2, orig, compressed, numChan; // load files, original first file1 = SoundFile.new; orig = GetFileDialog.new.path; file1.readHeader(orig); file2 = SoundFile.new; compressed = GetFileDialog.new.path; file2.readHeader(compressed); numChan = file1.numChannels.max(file2.numChannels); Synth.record({ var fftsize, numffts, fftoffsets, window, cosineTable; var src1, src2; numffts = 2; // number of overlapped FFTs ( you can change this to 4 (or any integer > 0)) fftsize = 2048; // length of FFT buffer // make offsets for staggering overlapped FFTs fftoffsets = Array.series(numffts, 0, fftsize/numffts); window = Signal.hanningWindow(fftsize); cosineTable = Signal.fftCosTable(fftsize); src1 = DiskIn.ar(file1, true); src2 = DiskIn.ar(file2, true); Array.fill(numChan, { arg i; var in1, in2, fft1, fft2, fft3, ifft, out; if (file1.numChannels ==1, { in1 = src1; }, { in1 = src1@i; }); if (file2.numChannels ==1, { in2 = src2; }, { in2 = src2@i; }); fft1 = FFT.a2sr(fftsize, fftoffsets, cosineTable, window, nil, in1, 0.0); // transform src1 fft2 = FFT.a2sr(fftsize, fftoffsets, cosineTable, window, nil, in2, 0.0); // transform src2 fft3 = Polar.new(fft1.magnitude, fft2.angle).asComplex; // inverse transform ifft = IFFT.s2ar(cosineTable, nil, window, fft3.real, fft3.imag); out = Mix.ar(ifft.real) * 0.25; // mix overlapped outputs out = out/(2*numffts); out * 0.5;}); }, (file1.duration) max: (file2.duration), PutFileDialog.new.path); ) ------------------------------ End of sc-users-digest V1 #321 ******************************