[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] Multiple time signatures - Scheduling with bar numbers?



Hi there,

Say you have readily available Pbindefs to be played throughout a song.

How can one schedule them in a musically structured way e.g. 4 bars of
pattern A and 4 bars of pattern B and then return to patten A for 4
bars.

I know I could do something like :

s.boot;
(
t = TempoClock.new.permanent_(true);
t.tempo = 280/60;
Pbindef(\pattern,
    \root, 0,
    \dur, 1,
);
Pbindef(\pattern).quant = -1;

t.schedAbs(
    t.nextBar,
    {Pbindef(\pattern, \degree, Pseq([1,3,5,7],inf)-1).play(t)}
);
t.schedAbs(
    t.nextBar + (t.beatsPerBar * 4),
    {Pbindef(\pattern, \degree, Pseq([2,4,6,8],inf)-1).play(t)}
);
t.schedAbs(
    t.nextBar + (t.beatsPerBar * 8),
    {Pbindef(\pattern, \degree, Pseq([1,3,5,7],inf)-1).play(t)}
);
t.schedAbs(
    t.nextBar + (t.beatsPerBar * 12),
    {Pbindef(\pattern).stop}
);
)

But what about combining other time signatures?
Even simple folk songs do have a 2/4 6/4 time signature here and there.

So then one could be tempted to naively do :

s.boot;
(
t = TempoClock.new.permanent_(true);
t.tempo = 280/60;
Pbindef(\pattern,
    \root, 0,
    \dur, 1,
);
Pbindef(\pattern).quant = -1;

t.schedAbs(
    t.nextBar,
    {
        t.beatsPerBar = 4;
        Pbindef(\pattern, \degree, Pseq([1,3,5,7],inf)-1).play(t)
    }
);
t.schedAbs(
    t.nextBar + (t.beatsPerBar * 4),
    {
        t.beatsPerBar = 3;
        Pbindef(\pattern, \degree, Pseq([2,4,6],inf)-1).play(t)
    }
);
t.schedAbs(
    t.nextBar + (t.beatsPerBar * 8),
    {
        t.beatsPerBar = 4;
        Pbindef(\pattern, \degree, Pseq([1,3,5,7],inf)-1).play(t)
    }
);
t.schedAbs(
    t.nextBar + (t.beatsPerBar * 12),
    {Pbindef(\pattern).stop}
);
)

^ …But the problem with this is that the t.beatsPerBar should
obviously changes but at the time the code is evaluated the value is
this case is still 4.
As shown in the above example, there is an extra bar + an extra beat
in the, supposed to be 4 bars of 3/4, middle section.

Is it possible to fetch the correct .beatsPerBar of future bars to be played?

Is there a way for tasks to be scheduled *at a specific bar number* ?
^That would just be perfect.

Am I right to assume that SuperCollider is much more "beat" than "bar" oriented?

How do complex song schedule their Pbinds over musical time?

The workflow I'm expecting to be able to use is :
- 8 4/4 bars of patterns [a,b,c]
- Surprise single 3/4 bar with patterns [d,e,f]
- 8 4/4 bars of pattern [a,b,c]

What are your thoughts on how to achieve this?

I was thinking about coding a "scheduler" that would, at each bar,
fetch in a dict (or whatever) what is needed to be done on the next
bar and then schedule it… Not sure that would be a good idea though.

Thanks for any hints
-- 
Pierre-Luc Gauthier

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/