Skip to content

Commit

Permalink
gsuiSynthesizer: update gsuiOscillator
Browse files Browse the repository at this point in the history
  • Loading branch information
mr21 committed Feb 26, 2025
1 parent 316012d commit 91c5de2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gsuiSynthesizer/gsuiSynthesizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ class gsuiSynthesizer extends gsui0ne {
// .........................................................................
$setWaveList( arr ) {
this.#waveList = arr;
this.#uiOscs.forEach( o => o.addWaves( arr ) );
this.#uiOscs.forEach( ( o, id ) => {
o.$addWaveCustom( `custom.s${ this.dataset.id }.o${ id }` );
o.$addWaves( arr );
} );
}
$getOscillator( id ) {
return this.#uiOscs.get( id );
Expand Down Expand Up @@ -173,7 +176,8 @@ class gsuiSynthesizer extends gsui0ne {
const uiOsc = GSUcreateElement( "gsui-oscillator", { ...props, "data-id": id } );

this.#uiOscs.set( id, uiOsc );
uiOsc.addWaves( this.#waveList );
uiOsc.$addWaveCustom( `custom.s${ this.dataset.id }.o${ id }` );
uiOsc.$addWaves( this.#waveList );
this.$elements.$oscList.append( uiOsc );
return uiOsc;
}
Expand Down

0 comments on commit 91c5de2

Please sign in to comment.