temp push 2
This commit is contained in:
@ -15,7 +15,7 @@ export class SoundEvent extends AudibleEvent {
|
||||
this.values = {
|
||||
s: sound.split(":")[0],
|
||||
n: sound.split(":")[1],
|
||||
dur: 0.5,
|
||||
dur: app.clock.convertPulseToSecond(app.clock.ppqn),
|
||||
};
|
||||
} else {
|
||||
this.values = { s: sound, dur: 0.5 };
|
||||
@ -55,7 +55,7 @@ export class SoundEvent extends AudibleEvent {
|
||||
public sustainVolume = (value: number) =>
|
||||
this.updateValue("sustainVolume", value);
|
||||
public tremolo = (value: number) => this.updateValue("tremolo", value);
|
||||
public duration = (value: number) => this.updateValue("duration", value);
|
||||
public dur = (value: number) => this.updateValue("dur", value);
|
||||
public zzfx = (value: number[]) => this.updateValue("zzfx", value);
|
||||
|
||||
// ================================================================================
|
||||
@ -106,7 +106,7 @@ export class SoundEvent extends AudibleEvent {
|
||||
public lpe = (value: number) => this.updateValue("lpenv", value);
|
||||
public lpattack = (value: number) => this.updateValue("lpattack", value);
|
||||
public lpa = this.lpattack;
|
||||
public lpdecay = (value: number) => this.updateValue("lbdecay", value);
|
||||
public lpdecay = (value: number) => this.updateValue("lpdecay", value);
|
||||
public lpd = this.lpdecay;
|
||||
public lpsustain = (value: number) => this.updateValue("lpsustain", value);
|
||||
public lps = this.lpsustain;
|
||||
@ -295,10 +295,12 @@ export class SoundEvent extends AudibleEvent {
|
||||
this.values.chord.forEach((freq: number) => {
|
||||
const copy = { ...this.values };
|
||||
copy.freq = freq;
|
||||
superdough(copy, 1 / 4, this.values.dur || 0.5);
|
||||
// This is pure non-sense but I need to adapt somehow
|
||||
superdough(copy, this.values.dur * 2, this.values.dur);
|
||||
});
|
||||
} else {
|
||||
superdough(this.values, 1 / 4, this.values.dur || 0.5);
|
||||
// This is pure non-sense but I need to adapt somehow
|
||||
superdough(this.values, this.values.dur * 2, this.values.dur);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ beat([.5, 1].random() / 2) :: snd(
|
||||
|
||||
${makeExample(
|
||||
"Generate a list of random numbers",
|
||||
`beat(0.5) && sound('arp').freq([].gen(300,600,10).div(3)).out()`,
|
||||
`beat(0.5) && sound('arp').freq([].gen(300,600,10).beat(3)).out()`,
|
||||
true
|
||||
)}
|
||||
|
||||
@ -188,7 +188,7 @@ beat(1)::snd('sine').sustain(0.1).freq([100,100,100,100,200].unique().beat()).ou
|
||||
- <ic>add()</ic>: add a given amount to every list element.
|
||||
- <ic>sub()</ic>: add a given amount to every list element.
|
||||
- <ic>mult()</ic>: add a given amount to every list element.
|
||||
- <ic>division()</ic>: add a given amount to every list element. The method is named <ic>division</ic> because obviously <ic>div</ic> is already taken.
|
||||
- <ic>div()</ic>: add a given amount to every list element.
|
||||
|
||||
${makeExample("Simple addition", `[1, 2 ,3].add(2).beat()`, true)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user