added generative audio, tailwind, improvements, adjustments
This commit is contained in:
16
src/lib/audio/instruments/padSynth.ts
Normal file
16
src/lib/audio/instruments/padSynth.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import * as Tone from 'tone';
|
||||
|
||||
export function createPadSynth(isDay: boolean): Tone.PolySynth {
|
||||
return new Tone.PolySynth(Tone.Synth, {
|
||||
oscillator: {
|
||||
type: isDay ? 'triangle' : 'sine'
|
||||
},
|
||||
envelope: {
|
||||
attack: 1.5,
|
||||
decay: 1,
|
||||
sustain: 0.7,
|
||||
release: 1.0
|
||||
},
|
||||
volume: -20
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user