From: owner-sc-users-digest@lists.io.com (sc-users-digest) To: sc-users-digest@lists.io.com Subject: sc-users-digest V1 #178 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 Monday, October 2 2000 Volume 01 : Number 178 ---------------------------------------------------------------------- Date: Sat, 30 Sep 2000 17:10:16 -0400 From: Landon Rose <---@---.---> Subject: Re: midifile Ron- Thanks for the tip. I was just looking for my hard copy MIDI spec sheet the other day and I know it's here somewhere... I think MIDI is like the internal combustion engine and vice grips- it will always be with us... Landon >HI Hairi and all, > >http://cbr.nc.us.mensa.org/homepages/mark_clay/midi.htm > >is one site with a "MIDI file format specification" (that is the >string I searched on). > >RJK > > >On Mon, 25 Sep 2000, Hairi wrote: > >> >> >> Julian Rohrhuber wrote: >> >> > Hi Jesper, >> > >> > a while ago you said you were working on writing midifiles using sc. >> > have you done anything that opens midifiles? iĨd be really interested, >> > in case you want to share it. >> > >> > Julian >> >> Hi Julian , and list . >> I managed to open and read MidiFiles as Integer8 files . >> One sees note ons , note offs etc . but there is also other info >> i don't know what it is . >> I wrote a Midi file with just one note in it ( in Logic Audio ) >> and then opened it as a File in SC printed it and actually recognised the >> note . >> All that's needed to write a class , is a complete definition of >> how MIDI files are structured . ( headers etc .) >> This should be available on the net , but i don't know where . >> MIDI is too generic for a search . >> >> any clue ? >> >> Hairi >> >> >> >> ------------------------------ Date: Sat, 30 Sep 2000 14:45:07 -0700 From: Alberto de Campo <---@---.---> Subject: Re: How to tell if (Synth.isOn, Hi all, There's a ridiculously simple way of doing it: Make the Synth Class smart enough to tell you. The interface is: if (Synth.isOn, { pollAllMyUgens.value }); if (Synth.isOff, { mySoundFile.readHeader("NowOrNever.AIFF") }); etc. All you need to do is modify the Synth Class: // -------Synth.sc file --------- // Add classvar isPlaying so that Synth // class knows whether it is playing: Synth { // classvars, vars ... // right before *new, add a new classvar: classvar Hi all, > > Another approach is to look at the ugens field of the Synth. If it is > nil, it is not playing. > > RJK > > > > > use > > > > if(thisSynth.notNil,{ > > > > // yrThang.do > > > > },{ > > > > Synth.stop > > > > }); ------------------------------ Date: Sat, 30 Sep 2000 16:32:14 -0600 From: Jim Coker <---@---.---> Subject: Re: 24bit record/ simpler format handling Add me to that list too, and while I'm at it: I think the new graphics stuff (as well as other things) in SC3 is exceptionally cool, but I'm more interested in some practical issues: getting SC to integrate with something else -- anything else in my studio, for that reason, I'd most like to see: - - Some form of synchronization (reading/generating SMTPE or MIDI clock). - - Ability to run SC sounds as VST or MAS plugins. I've got the MAS dev kit, and it's very nice, lots of detailed doc and examples. Getting SC sounds to run as a plugin should be quite easy. This would also motivate me to write SC plugins, instead of MAS or VST plugins. Also, with SC 3's amazing graphics, one could really go to town on plugin interfaces. Running SC objects inside another host program also neatly solves the sync issue, both for MIDI and Audio. - - In the absense of the above, support for ReWire instead. Jim Alberto de Campo wrote: > > 1. Please add me to the list of "24bit too, please!" requests. > > Jost Muxfeldt wrote: > > > At 16:10 Uhr -0800 on 23.09.2000, anthony burr wrote: > > > > > try the ppc version--you have to send some of your music or a small amoun of > > > money to tom erbe... > > > > > > ------------------------------ Date: Sun, 01 Oct 2000 14:52:58 +0000 From: Jem Finer <---@---.---> Subject: out of time > 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_3053256779_46508_MIME_Part Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit If anyone can be bothered to check this out : In the MixerPlayer.sc class I've added 3 classvar's : classvar <>sync,<>localSync,<>beatSync; in *customInit I've initialised them : //sync is one pulse per bar (default is 120 bpm) this.sync = LFPulse.ar(120/240, 0.5, 1.0); //beatSync is one pulse per beat (4 pulses per bar) this.beatSync = LFPulse.ar(120/60, 0.5, 1.0); //localSync is 16 pulses per bar (4 pulses per beat) this.localSync = LFPulse.ar(120/15, 0.5, 1.0); the idea is that these pulses can then be used to trigger various events thus keeping them in sync BUT : Running this I often find that the beat tics are out of time with the bar tic - why ? ( Library.put(['testBlip'], {var a,j; a = Instrument.new(\testBlip, { var bar,beat,quarter; bar = 500 + 500.rand; beat = 1000 + 1000.rand; quarter = 2000 + 1000.rand; TSpawn.ar({ TSpawn.ar({ PSinGrain.ar(bar,0.1) },1,nil,MixerPlayer.sync) + TSpawn.ar({ PSinGrain.ar(beat,0.1) },1,nil,MixerPlayer.beatSync) },1,1,MixerPlayer.sync) }); a.play }) ); cheers Jem - --MS_Mac_OE_3053256779_46508_MIME_Part Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable out of time If anyone can be bothered to check this out :


In the MixerPlayer.sc class I've added 3 classvar's :

classvar <>sync,<>loc= alSync,<>beatSync;


in *customInit I've initialised them :

//sync is one pulse per bar (default is 120 bpm)
this.sync =3D LFPul= se.ar(120/240, 0.5, 1.0);
//beatSync is one pulse per beat (4 pulses per bar) this.beatSync =3D L= FPulse.ar(120/60, 0.5, 1.0);
//localSync is 16 pulses per bar (4 pulses per beat)<= BR> this.localSync =3D = LFPulse.ar(120/15, 0.5, 1.0);

the idea is that these pulses can then be used to trigger various events th= us keeping them in sync




BUT :

Running this I often find that the beat tics are out of time with the bar t= ic - why ?

(
Library.put(['testBlip'<= /FONT>],
{var a,j;

a =3D Instrument.new(\tes= tBlip, {
var bar,beat,quarter;
bar =3D 500 + 500.rand;
beat =3D 1000 + 1000.rand;
quarter =3D 2000 + 1000.rand;
 
TSpawn.ar({
TSpawn.ar({
    PSinGrain.ar(bar,0.1)=
    },1,nil,MixerPlayer.sync)    +
    
TSpawn.ar({
    PSinGrain.ar(beat,0.1= )
    },1,nil,MixerPlayer.beatSync)    

},1,1,MixerPlayer.sync)    &nb= sp;   
});
a.play
})
);

cheers

Jem
- --MS_Mac_OE_3053256779_46508_MIME_Part-- ------------------------------ Date: Sun, 01 Oct 2000 18:21:31 +0100 From: Martin Robinson <---@---.---> Subject: Re: out of time Jem, Why dont you use the fastest pulse as the sync source and then use PulseDivider to produce the slower ones. You may need to use Impulse rather than LFPulse for the sync source. They can't un-sync then. But maybe that won't solve a constant out of sync thing. Martin (looking into th 49bpm thing) - -- ..>>>>Martin Robinson :: (Ex)tractor :: && ________ >>><<<_[sonic arts]_[middlesex university]_[en4 8ht] ______ ________________________________________________________________ ________________________________________________________________ >><<>>___t.+44 [0] 7970 405 903 // f.+44 [0] 7970 702 976 __ >><><>____e. _ ------------------------------ Date: Sun, 01 Oct 2000 18:16:59 +0000 From: Jem Finer <---@---.---> Subject: Re: out of time on 1/10/00 17:21, Martin Robinson at m.robinson@mdx.ac.uk wrote: > Jem, > > Why dont you use the fastest pulse as the sync source and then use > PulseDivider to produce the slower ones. You may need to use Impulse rather > than LFPulse for the sync source. > good thinking batman - I'll give it a whirl cheers Jem ------------------------------ Date: Mon, 02 Oct 2000 00:41:30 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re: out of time > Running this I often find that the beat tics are out of time with the bar tic - why ? this will be also an issue in sc3. i havenīt yet found out any sync between Synths. related issue: here is a pattern always yields the deltatime between the previous time it was called and now. it has to be used within a synth though. Pdtime : Pattern { var <>synth; *new { ^super.new.synth_(thisSynth) } asStream { if(synth.isNil, { synth = thisSynth }) ^Routine.new({ var delta, time, newTime; time = synth.time; loop({ newTime = synth.time; delta = newTime - time; time = newTime; delta.yield }) }) } } Iīm trying to live without a MIDISync. here is an example to test it: ( var miditrig, dt, trig; { //miditrig = MIDINoteGate.kr(1, 60); miditrig = Impulse.kr(MouseX.kr(3, 0.3)); dt = Sequencer.kr(Pdtime.new.asStream, miditrig).max(1/3); trig = Impulse.ar(dt.reciprocal*16); TSpawn.ar({ arg sp, j; PSinGrain.ar(2000, 0.1, 0.1) + Spawn.ar({ arg spawn, i; PSinGrain.ar( 1000 + (200*i), 0.02, 0.1 ) }, 1, dt.poll/8, 12) }, 1, nil, miditrig) }.scope; ) ( var miditrig, dt, trig, test; { //miditrig = MIDINoteGate.kr(1, 60); test = Impulse.ar(MouseX.kr(0.6, 0.1)*16); miditrig = PulseDivider.ar(test, 0, 16); dt = Sequencer.ar(Pdtime.new.asStream, miditrig).max(2); trig = TrigXFade.ar({ Impulse.ar(dt.reciprocal*16) }, miditrig, 0.01); Formlet.ar(ImpulseSequencer.ar(`[1, 0, 1, 1, 0, 0.3, 0.4, 0.3], trig), 60.midicps, 0.03, 0.3) + Formlet.ar(ImpulseSequencer.ar(`[0, 1, 0, 0.1, 0, 0.3, 0, 0], trig), 63.midicps, 0.03, 0.3) + Formlet.ar(ImpulseSequencer.ar(`[1, 0, 0, 0, 0, 0, 0, 0], miditrig), 70.midicps, 0.03, 0.3) + Formlet.ar(ImpulseSequencer.ar(`[1, 1, 1, 1, 1, 1, 1, 0], test), 72.midicps, 0.3, 0.1) }.scope; ) I still donīt know how to get the syncs really in sync ... ------------------------------ Date: Sun, 01 Oct 2000 19:15:07 -0400 From: christian adam hresko <---@---.---> Subject: plugged in anyone attempted to write their own plug - ins yet? (SC3 && C++) template, christian ------------------------------ Date: Mon, 02 Oct 2000 09:03:56 +0000 From: Jem Finer <---@---.---> Subject: Re: out of time on 1/10/00 22:41, Julian Rohrhuber at sa6a014@rrz.uni-hamburg.de wrote: > > >> Running this I often find that the beat tics are out of time with the bar tic >> - why ? > > this will be also an issue in sc3. i havenīt yet found out any sync > between Synths. > I'll try these examples out - but on the +ve front Martins idea to pulse divide one pulse keeps things in time much better - very precise. Making the pulse a classvar in the MixerPlayer class means it's there for any lib items to lock onto. Still get crashes though when all seems fine - usually adding a new lib item or changing tempo (another classvar) Cheers Jem The option of syncing via midi to another setup might come in handy. ------------------------------ Date: Mon, 02 Oct 2000 08:46:37 +0900 From: Tomonori Yamasaki <---@---.---> Subject: MIDI time code play({ k = MIDIOut.new(1); t = Impulse.ar(96); //s = PulseDivider.ar(t, 12); //8 per sec //h = PulseDivider.ar(t, 48); //2 per sec //l = PulseDivider.ar(t, 2); //half //i = PulseDivider.ar(t, 84); //every 7 beat //j = PulseDivider.ar(t, 36); //every 3 beat TSpawn.ar({ k.write(1, 1, 16rF0, 9); nil}, 1, nil, k); this is what I use. ------------------------------ Date: Tue, 03 Oct 2000 03:50:21 +0200 From: Julian Rohrhuber <---@---.---> Subject: Re: MIDI time code thank you very much. what do you use to recieve MIDI sync though? Tomonori Yamasaki schrieb: > > play({ > k = MIDIOut.new(1); > t = Impulse.ar(96); > //s = PulseDivider.ar(t, 12); //8 per sec > //h = PulseDivider.ar(t, 48); //2 per sec > //l = PulseDivider.ar(t, 2); //half > //i = PulseDivider.ar(t, 84); //every 7 beat > //j = PulseDivider.ar(t, 36); //every 3 beat > TSpawn.ar({ > k.write(1, 1, 16rF0, 9); > nil}, > 1, nil, k); > > this is what I use. ------------------------------ End of sc-users-digest V1 #178 ******************************